// Decompiled with JetBrains decompiler
// Type: HPG_68D.MsgForm
// 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;
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 MsgForm : Form
  {
    private static ArrayList __ENCList = new ArrayList();
    private IContainer components;
    [AccessedThroughProperty("Panel1")]
    private Panel _Panel1;
    [AccessedThroughProperty("TextBox嵌入信息")]
    private TextBox _TextBox嵌入信息;
    [AccessedThroughProperty("Button3")]
    private Button _Button3;
    [AccessedThroughProperty("Button2")]
    private Button _Button2;
    [AccessedThroughProperty("Button1")]
    private Button _Button1;

    [DebuggerNonUserCode]
    static MsgForm()
    {
    }

    [DebuggerNonUserCode]
    public MsgForm()
    {
      Deactivate += MsgForm_Deactivate;
      FormClosing += MsgForm_FormClosing;
      Load += MsgForm_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 (MsgForm));
      Panel1 = new Panel();
      TextBox嵌入信息 = new TextBox();
      Button3 = new Button();
      Button2 = new Button();
      Button1 = new Button();
      Panel1.SuspendLayout();
      SuspendLayout();
      componentResourceManager.ApplyResources(Panel1, "Panel1");
      Panel1.BorderStyle = BorderStyle.Fixed3D;
      Panel1.Controls.Add(TextBox嵌入信息);
      Panel1.Name = "Panel1";
      componentResourceManager.ApplyResources(TextBox嵌入信息, "TextBox嵌入信息");
      TextBox嵌入信息.Name = "TextBox嵌入信息";
      componentResourceManager.ApplyResources(Button3, "Button3");
      Button3.Name = "Button3";
      Button3.UseVisualStyleBackColor = true;
      componentResourceManager.ApplyResources(Button2, "Button2");
      Button2.Name = "Button2";
      Button2.UseVisualStyleBackColor = true;
      componentResourceManager.ApplyResources(Button1, "Button1");
      Button1.Name = "Button1";
      Button1.UseVisualStyleBackColor = true;
      componentResourceManager.ApplyResources(this, "$this");
      AutoScaleMode = AutoScaleMode.Font;
      Controls.Add(Button3);
      Controls.Add(Button2);
      Controls.Add(Button1);
      Controls.Add(Panel1);
      Name = nameof (MsgForm);
      Panel1.ResumeLayout(false);
      Panel1.PerformLayout();
      ResumeLayout(false);
    }

    internal virtual Panel Panel1
    {
      [DebuggerNonUserCode] get => _Panel1;
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set => _Panel1 = value;
    }

    internal virtual TextBox TextBox嵌入信息
    {
      [DebuggerNonUserCode] get => _TextBox嵌入信息;
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        _TextBox嵌入信息 = value;
      }
    }

    internal virtual Button Button3
    {
      [DebuggerNonUserCode] get => _Button3;
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        _Button3 = value;
      }
    }

    internal virtual Button Button2
    {
      [DebuggerNonUserCode] get => _Button2;
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        _Button2 = value;
      }
    }

    internal virtual Button Button1
    {
      [DebuggerNonUserCode] get => _Button1;
      [DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
      {
        if (_Button1 != null)
          _Button1.Click -= Button1_Click;
        _Button1 = value;
        if (_Button1 == null)
          return;
        _Button1.Click += Button1_Click;
      }
    }

    private void Button1_Click(object sender, EventArgs e) => Close();

    public void MsgForm_Deactivate(object sender, EventArgs e)
    {
      var num = 5248;
      Encoding.ASCII.GetBytes(TextBox嵌入信息.Text.PadRight(128), 0, 128, publicva.EEPROM_Byte, checked (num + 0));
    }

    private void MsgForm_FormClosing(object sender, FormClosingEventArgs e)
    {
      MyProject.Forms.MDIParent1.嵌入信息IToolStripMenuItem.Checked = false;
    }

    public void MsgForm_Load(object sender, EventArgs e)
    {
      MyProject.Forms.MDIParent1.嵌入信息IToolStripMenuItem.Checked = true;
      var num = 5248;
      TextBox嵌入信息.Text = Strings.RTrim(Encoding.ASCII.GetString(publicva.EEPROM_Byte, checked (num + 0), 128));
    }
  }
}
