211 lines
7.3 KiB
C#
211 lines
7.3 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: HPG_68D.MSCommReadForm
|
|
// 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 MSCommReadForm : 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 MSCommReadForm()
|
|
{
|
|
}
|
|
|
|
[DebuggerNonUserCode]
|
|
public MSCommReadForm()
|
|
{
|
|
this.Load += new EventHandler(this.MSCommReadForm_Load);
|
|
MSCommReadForm.__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 (MSCommReadForm));
|
|
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 (MSCommReadForm);
|
|
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 MSCommReadForm_Load(object sender, EventArgs e)
|
|
{
|
|
}
|
|
|
|
private void Button读频_Click(object sender, EventArgs e)
|
|
{
|
|
if (MyProject.Forms.MDIParent1.MSCcomm_StartInit("Read", publicva.R_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();
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|