// 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() { Load += MSCommReadForm_Load; __ENCList.Add(new WeakReference(this)); InitializeComponent(); } [DebuggerNonUserCode] protected override void Dispose(bool disposing) { if (disposing && components != null) components.Dispose(); base.Dispose(disposing); } [DebuggerStepThrough] private void InitializeComponent() { components = new Container(); var componentResourceManager = new ComponentResourceManager(typeof (MSCommReadForm)); Label1 = new Label(); Button取消 = new Button(); Button读频 = new Button(); ProgressBar1 = new ProgressBar(); Timer1 = new Timer(components); SuspendLayout(); Label1.AccessibleDescription = null; Label1.AccessibleName = null; componentResourceManager.ApplyResources(Label1, "Label1"); Label1.BackColor = SystemColors.Control; Label1.Font = null; Label1.ForeColor = Color.Red; Label1.Name = "Label1"; Button取消.AccessibleDescription = null; Button取消.AccessibleName = null; componentResourceManager.ApplyResources(Button取消, "Button取消"); Button取消.BackgroundImage = null; Button取消.Font = null; Button取消.Name = "Button取消"; Button取消.UseVisualStyleBackColor = true; Button读频.AccessibleDescription = null; Button读频.AccessibleName = null; componentResourceManager.ApplyResources(Button读频, "Button读频"); Button读频.BackgroundImage = null; Button读频.Font = null; Button读频.Name = "Button读频"; Button读频.UseVisualStyleBackColor = true; ProgressBar1.AccessibleDescription = null; ProgressBar1.AccessibleName = null; componentResourceManager.ApplyResources(ProgressBar1, "ProgressBar1"); ProgressBar1.BackgroundImage = null; ProgressBar1.Font = null; ProgressBar1.Name = "ProgressBar1"; AccessibleDescription = null; AccessibleName = null; componentResourceManager.ApplyResources(this, "$this"); AutoScaleMode = AutoScaleMode.Font; BackgroundImage = null; Controls.Add(Label1); Controls.Add(Button取消); Controls.Add(Button读频); Controls.Add(ProgressBar1); Font = null; FormBorderStyle = FormBorderStyle.FixedDialog; MaximizeBox = false; MinimizeBox = false; Name = nameof (MSCommReadForm); ResumeLayout(false); PerformLayout(); } internal virtual Label Label1 { [DebuggerNonUserCode] get => _Label1; [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set => _Label1 = value; } internal virtual Button Button取消 { [DebuggerNonUserCode] get => _Button取消; [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set { if (_Button取消 != null) _Button取消.Click -= Button取消_Click; _Button取消 = value; if (_Button取消 == null) return; _Button取消.Click += Button取消_Click; } } internal virtual Button Button读频 { [DebuggerNonUserCode] get => _Button读频; [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set { if (_Button读频 != null) _Button读频.Click -= Button读频_Click; _Button读频 = value; if (_Button读频 == null) return; _Button读频.Click += Button读频_Click; } } internal virtual ProgressBar ProgressBar1 { [DebuggerNonUserCode] get => _ProgressBar1; [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set { _ProgressBar1 = value; } } internal virtual Timer Timer1 { [DebuggerNonUserCode] get => _Timer1; [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set { if (_Timer1 != null) _Timer1.Tick -= Timer1_Tick; _Timer1 = value; if (_Timer1 == null) return; _Timer1.Tick += 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)) { Timer1.Enabled = true; Button读频.Enabled = false; ProgressBar1.Value = 0; Label1.Text = "%"; } else Close(); } private void Button取消_Click(object sender, EventArgs e) { MyProject.Forms.MDIParent1.MSComm_Stop(); Timer1.Enabled = false; Button读频.Enabled = true; ProgressBar1.Value = 0; Label1.Text = "%"; Close(); } private void Timer1_Tick(object sender, EventArgs e) { var num = checked ((uint) unchecked (checked (publicva.Rw_EEPROM_Add_Length_ListIndex * 100L) / publicva.Rw_EEPROM_Add_Length_ListSum)); if (num > 100U) num = 100U; ProgressBar1.Value = checked ((int) num); Label1.Text = Conversions.ToString(num) + "%"; if (!publicva.F_MSCommStop) return; Timer1.Enabled = false; Button取消_Click(RuntimeHelpers.GetObjectValue(sender), e); } } }