Zastone/HPG-68D/InputPasswordForm.cs
2024-06-26 00:21:14 +02:00

182 lines
5.6 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.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(new WeakReference(this));
InitializeComponent();
}
[DebuggerNonUserCode]
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
components.Dispose();
base.Dispose(disposing);
}
[DebuggerStepThrough]
private void InitializeComponent()
{
var componentResourceManager = new ComponentResourceManager(typeof (InputPasswordForm));
OK_Button = new Button();
Cancel_Button = new Button();
Label1 = new Label();
TextBox1 = new TextBox();
SuspendLayout();
OK_Button.AccessibleDescription = null;
OK_Button.AccessibleName = null;
componentResourceManager.ApplyResources(OK_Button, "OK_Button");
OK_Button.BackgroundImage = null;
OK_Button.Font = null;
OK_Button.Name = "OK_Button";
Cancel_Button.AccessibleDescription = null;
Cancel_Button.AccessibleName = null;
componentResourceManager.ApplyResources(Cancel_Button, "Cancel_Button");
Cancel_Button.BackgroundImage = null;
Cancel_Button.DialogResult = DialogResult.Cancel;
Cancel_Button.Font = null;
Cancel_Button.Name = "Cancel_Button";
Label1.AccessibleDescription = null;
Label1.AccessibleName = null;
componentResourceManager.ApplyResources(Label1, "Label1");
Label1.Font = null;
Label1.Name = "Label1";
TextBox1.AccessibleDescription = null;
TextBox1.AccessibleName = null;
componentResourceManager.ApplyResources(TextBox1, "TextBox1");
TextBox1.BackgroundImage = null;
TextBox1.Font = null;
TextBox1.Name = "TextBox1";
AccessibleDescription = null;
AccessibleName = null;
componentResourceManager.ApplyResources(this, "$this");
AutoScaleMode = AutoScaleMode.Font;
BackgroundImage = null;
Controls.Add(Cancel_Button);
Controls.Add(OK_Button);
Controls.Add(TextBox1);
Controls.Add(Label1);
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] = 2;
publicva.SendDataBuf[1] = 35;
publicva.SendDataBuf[2] = 227;
publicva.SendDataBuf[3] = 248;
Encoding.ASCII.GetBytes(publicva.Rw_PasswordStr.PadRight(16), 0, 16, publicva.SendDataBuf, 4);
publicva.SendDataBuf[20] = 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;
}
}