212 lines
7.4 KiB
C#
212 lines
7.4 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: HPG_68D.MSCommWriteForm
|
|
// Assembly: HPG-68D, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 530C99A8-8EEF-42C8-8A74-66FDE7B322C3
|
|
// Assembly location: C:\Program Files (x86)\HONGKAIDE\HPG-68D\HPG-68D.exe
|
|
|
|
using HPG_68D.My;
|
|
using Microsoft.VisualBasic.CompilerServices;
|
|
using System;
|
|
using System.Collections;
|
|
using System.ComponentModel;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Windows.Forms;
|
|
|
|
|
|
namespace HPG_68D
|
|
{
|
|
[DesignerGenerated]
|
|
public class MSCommWriteForm : Form
|
|
{
|
|
private static ArrayList __ENCList = new ArrayList();
|
|
private IContainer components;
|
|
[AccessedThroughProperty("Label1")]
|
|
private Label _Label1;
|
|
[AccessedThroughProperty("Button取消")]
|
|
private Button _Button取消;
|
|
[AccessedThroughProperty("Button写频")]
|
|
private Button _Button写频;
|
|
[AccessedThroughProperty("ProgressBar1")]
|
|
private ProgressBar _ProgressBar1;
|
|
[AccessedThroughProperty("Timer1")]
|
|
private Timer _Timer1;
|
|
|
|
[DebuggerNonUserCode]
|
|
static MSCommWriteForm()
|
|
{
|
|
}
|
|
|
|
[DebuggerNonUserCode]
|
|
public MSCommWriteForm()
|
|
{
|
|
this.Load += new EventHandler(this.MSCommWriteForm_Load);
|
|
MSCommWriteForm.__ENCList.Add((object) new WeakReference((object) this));
|
|
this.InitializeComponent();
|
|
}
|
|
|
|
[DebuggerNonUserCode]
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
if (disposing && this.components != null)
|
|
this.components.Dispose();
|
|
base.Dispose(disposing);
|
|
}
|
|
|
|
[DebuggerStepThrough]
|
|
private void InitializeComponent()
|
|
{
|
|
this.components = (IContainer) new System.ComponentModel.Container();
|
|
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (MSCommWriteForm));
|
|
this.Label1 = new Label();
|
|
this.Button取消 = new Button();
|
|
this.Button写频 = new Button();
|
|
this.ProgressBar1 = new ProgressBar();
|
|
this.Timer1 = new Timer(this.components);
|
|
this.SuspendLayout();
|
|
this.Label1.AccessibleDescription = (string) null;
|
|
this.Label1.AccessibleName = (string) null;
|
|
componentResourceManager.ApplyResources((object) this.Label1, "Label1");
|
|
this.Label1.BackColor = SystemColors.Control;
|
|
this.Label1.Font = (Font) null;
|
|
this.Label1.ForeColor = Color.Red;
|
|
this.Label1.Name = "Label1";
|
|
this.Button取消.AccessibleDescription = (string) null;
|
|
this.Button取消.AccessibleName = (string) null;
|
|
componentResourceManager.ApplyResources((object) this.Button取消, "Button取消");
|
|
this.Button取消.BackgroundImage = (Image) null;
|
|
this.Button取消.Font = (Font) null;
|
|
this.Button取消.Name = "Button取消";
|
|
this.Button取消.UseVisualStyleBackColor = true;
|
|
this.Button写频.AccessibleDescription = (string) null;
|
|
this.Button写频.AccessibleName = (string) null;
|
|
componentResourceManager.ApplyResources((object) this.Button写频, "Button写频");
|
|
this.Button写频.BackgroundImage = (Image) null;
|
|
this.Button写频.Font = (Font) null;
|
|
this.Button写频.Name = "Button写频";
|
|
this.Button写频.UseVisualStyleBackColor = true;
|
|
this.ProgressBar1.AccessibleDescription = (string) null;
|
|
this.ProgressBar1.AccessibleName = (string) null;
|
|
componentResourceManager.ApplyResources((object) this.ProgressBar1, "ProgressBar1");
|
|
this.ProgressBar1.BackgroundImage = (Image) null;
|
|
this.ProgressBar1.Font = (Font) null;
|
|
this.ProgressBar1.Name = "ProgressBar1";
|
|
this.AccessibleDescription = (string) null;
|
|
this.AccessibleName = (string) null;
|
|
componentResourceManager.ApplyResources((object) this, "$this");
|
|
this.AutoScaleMode = AutoScaleMode.Font;
|
|
this.BackgroundImage = (Image) null;
|
|
this.Controls.Add((Control) this.Label1);
|
|
this.Controls.Add((Control) this.Button取消);
|
|
this.Controls.Add((Control) this.Button写频);
|
|
this.Controls.Add((Control) this.ProgressBar1);
|
|
this.Font = (Font) null;
|
|
this.FormBorderStyle = FormBorderStyle.FixedDialog;
|
|
this.MaximizeBox = false;
|
|
this.MinimizeBox = false;
|
|
this.Name = nameof (MSCommWriteForm);
|
|
this.ResumeLayout(false);
|
|
this.PerformLayout();
|
|
}
|
|
|
|
internal virtual Label Label1
|
|
{
|
|
[DebuggerNonUserCode] get => this._Label1;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set => this._Label1 = value;
|
|
}
|
|
|
|
internal virtual Button Button取消
|
|
{
|
|
[DebuggerNonUserCode] get => this._Button取消;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
if (this._Button取消 != null)
|
|
this._Button取消.Click -= new EventHandler(this.Button取消_Click);
|
|
this._Button取消 = value;
|
|
if (this._Button取消 == null)
|
|
return;
|
|
this._Button取消.Click += new EventHandler(this.Button取消_Click);
|
|
}
|
|
}
|
|
|
|
internal virtual Button Button写频
|
|
{
|
|
[DebuggerNonUserCode] get => this._Button写频;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
if (this._Button写频 != null)
|
|
this._Button写频.Click -= new EventHandler(this.Button写频_Click);
|
|
this._Button写频 = value;
|
|
if (this._Button写频 == null)
|
|
return;
|
|
this._Button写频.Click += new EventHandler(this.Button写频_Click);
|
|
}
|
|
}
|
|
|
|
internal virtual ProgressBar ProgressBar1
|
|
{
|
|
[DebuggerNonUserCode] get => this._ProgressBar1;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
this._ProgressBar1 = value;
|
|
}
|
|
}
|
|
|
|
internal virtual Timer Timer1
|
|
{
|
|
[DebuggerNonUserCode] get => this._Timer1;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
if (this._Timer1 != null)
|
|
this._Timer1.Tick -= new EventHandler(this.Timer1_Tick);
|
|
this._Timer1 = value;
|
|
if (this._Timer1 == null)
|
|
return;
|
|
this._Timer1.Tick += new EventHandler(this.Timer1_Tick);
|
|
}
|
|
}
|
|
|
|
private void MSCommWriteForm_Load(object sender, EventArgs e)
|
|
{
|
|
}
|
|
|
|
private void Timer1_Tick(object sender, EventArgs e)
|
|
{
|
|
uint num = checked ((uint) unchecked (checked ((long) publicva.Rw_EEPROM_Add_Length_ListIndex * 100L) / (long) publicva.Rw_EEPROM_Add_Length_ListSum));
|
|
if (num > 100U)
|
|
num = 100U;
|
|
this.ProgressBar1.Value = checked ((int) num);
|
|
this.Label1.Text = Conversions.ToString(num) + "%";
|
|
if (!publicva.F_MSCommStop)
|
|
return;
|
|
this.Timer1.Enabled = false;
|
|
this.Button取消_Click(RuntimeHelpers.GetObjectValue(sender), e);
|
|
}
|
|
|
|
private void Button写频_Click(object sender, EventArgs e)
|
|
{
|
|
MyProject.Forms.MDIParent1.AllForm_SaveData(RuntimeHelpers.GetObjectValue(sender), e);
|
|
if (MyProject.Forms.MDIParent1.MSCcomm_StartInit("Write", publicva.W_EEPROM_Add_Lendgth_List))
|
|
{
|
|
this.Timer1.Enabled = true;
|
|
this.Button写频.Enabled = false;
|
|
this.ProgressBar1.Value = 0;
|
|
this.Label1.Text = "%";
|
|
}
|
|
else
|
|
this.Close();
|
|
}
|
|
|
|
private void Button取消_Click(object sender, EventArgs e)
|
|
{
|
|
MyProject.Forms.MDIParent1.MSComm_Stop();
|
|
this.Timer1.Enabled = false;
|
|
this.Button写频.Enabled = true;
|
|
this.ProgressBar1.Value = 0;
|
|
this.Label1.Text = "%";
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|