183 lines
5.9 KiB
C#
183 lines
5.9 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: HPG_68D.InputPasswordForm
|
|
// 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.Text;
|
|
using System.Windows.Forms;
|
|
|
|
|
|
namespace HPG_68D
|
|
{
|
|
[DesignerGenerated]
|
|
public class InputPasswordForm : Form
|
|
{
|
|
private static ArrayList __ENCList = new ArrayList();
|
|
private IContainer components;
|
|
[AccessedThroughProperty("OK_Button")]
|
|
private Button _OK_Button;
|
|
[AccessedThroughProperty("Cancel_Button")]
|
|
private Button _Cancel_Button;
|
|
[AccessedThroughProperty("Label1")]
|
|
private Label _Label1;
|
|
[AccessedThroughProperty("TextBox1")]
|
|
private TextBox _TextBox1;
|
|
|
|
[DebuggerNonUserCode]
|
|
static InputPasswordForm()
|
|
{
|
|
}
|
|
|
|
[DebuggerNonUserCode]
|
|
public InputPasswordForm()
|
|
{
|
|
FormClosing += InputPasswordForm_FormClosing;
|
|
Load += InputPasswordForm_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()
|
|
{
|
|
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (InputPasswordForm));
|
|
OK_Button = new Button();
|
|
Cancel_Button = new Button();
|
|
Label1 = new Label();
|
|
TextBox1 = new TextBox();
|
|
SuspendLayout();
|
|
OK_Button.AccessibleDescription = (string) null;
|
|
OK_Button.AccessibleName = (string) null;
|
|
componentResourceManager.ApplyResources((object) OK_Button, "OK_Button");
|
|
OK_Button.BackgroundImage = (Image) null;
|
|
OK_Button.Font = (Font) null;
|
|
OK_Button.Name = "OK_Button";
|
|
Cancel_Button.AccessibleDescription = (string) null;
|
|
Cancel_Button.AccessibleName = (string) null;
|
|
componentResourceManager.ApplyResources((object) Cancel_Button, "Cancel_Button");
|
|
Cancel_Button.BackgroundImage = (Image) null;
|
|
Cancel_Button.DialogResult = DialogResult.Cancel;
|
|
Cancel_Button.Font = (Font) null;
|
|
Cancel_Button.Name = "Cancel_Button";
|
|
Label1.AccessibleDescription = (string) null;
|
|
Label1.AccessibleName = (string) null;
|
|
componentResourceManager.ApplyResources((object) Label1, "Label1");
|
|
Label1.Font = (Font) null;
|
|
Label1.Name = "Label1";
|
|
TextBox1.AccessibleDescription = (string) null;
|
|
TextBox1.AccessibleName = (string) null;
|
|
componentResourceManager.ApplyResources((object) TextBox1, "TextBox1");
|
|
TextBox1.BackgroundImage = (Image) null;
|
|
TextBox1.Font = (Font) null;
|
|
TextBox1.Name = "TextBox1";
|
|
AccessibleDescription = (string) null;
|
|
AccessibleName = (string) null;
|
|
componentResourceManager.ApplyResources((object) this, "$this");
|
|
AutoScaleMode = AutoScaleMode.Font;
|
|
BackgroundImage = (Image) null;
|
|
Controls.Add((Control) Cancel_Button);
|
|
Controls.Add((Control) OK_Button);
|
|
Controls.Add((Control) TextBox1);
|
|
Controls.Add((Control) Label1);
|
|
Font = (Font) null;
|
|
FormBorderStyle = FormBorderStyle.FixedDialog;
|
|
MaximizeBox = false;
|
|
MinimizeBox = false;
|
|
Name = nameof (InputPasswordForm);
|
|
ResumeLayout(false);
|
|
PerformLayout();
|
|
}
|
|
|
|
internal virtual Button OK_Button
|
|
{
|
|
[DebuggerNonUserCode] get => _OK_Button;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
if (_OK_Button != null)
|
|
_OK_Button.Click -= OK_Button_Click;
|
|
_OK_Button = value;
|
|
if (_OK_Button == null)
|
|
return;
|
|
_OK_Button.Click += OK_Button_Click;
|
|
}
|
|
}
|
|
|
|
internal virtual Button Cancel_Button
|
|
{
|
|
[DebuggerNonUserCode] get => _Cancel_Button;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
if (_Cancel_Button != null)
|
|
_Cancel_Button.Click -= Cancel_Button_Click;
|
|
_Cancel_Button = value;
|
|
if (_Cancel_Button == null)
|
|
return;
|
|
_Cancel_Button.Click += Cancel_Button_Click;
|
|
}
|
|
}
|
|
|
|
internal virtual Label Label1
|
|
{
|
|
[DebuggerNonUserCode] get => _Label1;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set => _Label1 = value;
|
|
}
|
|
|
|
internal virtual TextBox TextBox1
|
|
{
|
|
[DebuggerNonUserCode] get => _TextBox1;
|
|
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
|
|
{
|
|
_TextBox1 = value;
|
|
}
|
|
}
|
|
|
|
private void OK_Button_Click(object sender, EventArgs e)
|
|
{
|
|
publicva.MSCommTimeOut = 40U;
|
|
publicva.Rw_PasswordStr = TextBox1.Text;
|
|
publicva.MSCommStatus = 2U;
|
|
publicva.ReceivedCount = 5U;
|
|
publicva.SendDataBuf[0] = (byte) 2;
|
|
publicva.SendDataBuf[1] = (byte) 35;
|
|
publicva.SendDataBuf[2] = (byte) 227;
|
|
publicva.SendDataBuf[3] = (byte) 248;
|
|
Encoding.ASCII.GetBytes(publicva.Rw_PasswordStr.PadRight(16), 0, 16, publicva.SendDataBuf, 4);
|
|
publicva.SendDataBuf[20] = (byte) 3;
|
|
MyProject.Forms.MDIParent1.SerialPort1.Write(publicva.SendDataBuf, 0, 21);
|
|
MyProject.Forms.MDIParent1.Timer1.Enabled = true;
|
|
Close();
|
|
}
|
|
|
|
private void Cancel_Button_Click(object sender, EventArgs e)
|
|
{
|
|
publicva.MSCommStatus = 6U;
|
|
MyProject.Forms.MDIParent1.Timer1.Enabled = true;
|
|
Close();
|
|
}
|
|
|
|
private void InputPasswordForm_FormClosing(object sender, FormClosingEventArgs e)
|
|
{
|
|
MyProject.Forms.MDIParent1.Timer1.Enabled = true;
|
|
}
|
|
|
|
private void InputPasswordForm_Load(object sender, EventArgs e) => publicva.MSCommStatus = 6U;
|
|
}
|
|
}
|