Zastone/HPG-68D/MSCommWriteForm.cs
2024-06-25 23:18:56 +02:00

212 lines
6.8 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()
{
Load += MSCommWriteForm_Load;
__ENCList.Add((object) new WeakReference((object) this));
InitializeComponent();
}
[DebuggerNonUserCode]
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
components.Dispose();
base.Dispose(disposing);
}
[DebuggerStepThrough]
private void InitializeComponent()
{
components = (IContainer) new Container();
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (MSCommWriteForm));
Label1 = new Label();
Button取消 = new Button();
Button写频 = new Button();
ProgressBar1 = new ProgressBar();
Timer1 = new Timer(components);
SuspendLayout();
Label1.AccessibleDescription = (string) null;
Label1.AccessibleName = (string) null;
componentResourceManager.ApplyResources((object) Label1, "Label1");
Label1.BackColor = SystemColors.Control;
Label1.Font = (Font) null;
Label1.ForeColor = Color.Red;
Label1.Name = "Label1";
Button取消.AccessibleDescription = (string) null;
Button取消.AccessibleName = (string) null;
componentResourceManager.ApplyResources((object) Button取消, "Button取消");
Button取消.BackgroundImage = (Image) null;
Button取消.Font = (Font) null;
Button取消.Name = "Button取消";
Button取消.UseVisualStyleBackColor = true;
Button写频.AccessibleDescription = (string) null;
Button写频.AccessibleName = (string) null;
componentResourceManager.ApplyResources((object) Button写频, "Button写频");
Button写频.BackgroundImage = (Image) null;
Button写频.Font = (Font) null;
Button写频.Name = "Button写频";
Button写频.UseVisualStyleBackColor = true;
ProgressBar1.AccessibleDescription = (string) null;
ProgressBar1.AccessibleName = (string) null;
componentResourceManager.ApplyResources((object) ProgressBar1, "ProgressBar1");
ProgressBar1.BackgroundImage = (Image) null;
ProgressBar1.Font = (Font) null;
ProgressBar1.Name = "ProgressBar1";
AccessibleDescription = (string) null;
AccessibleName = (string) null;
componentResourceManager.ApplyResources((object) this, "$this");
AutoScaleMode = AutoScaleMode.Font;
BackgroundImage = (Image) null;
Controls.Add((Control) Label1);
Controls.Add((Control) Button取消);
Controls.Add((Control) Button写频);
Controls.Add((Control) ProgressBar1);
Font = (Font) null;
FormBorderStyle = FormBorderStyle.FixedDialog;
MaximizeBox = false;
MinimizeBox = false;
Name = nameof (MSCommWriteForm);
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 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;
ProgressBar1.Value = checked ((int) num);
Label1.Text = Conversions.ToString(num) + "%";
if (!publicva.F_MSCommStop)
return;
Timer1.Enabled = false;
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))
{
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();
}
}
}