quanzhou
2025-09-11 31de09d1ba504cb036ae29a98a9efbb0c2d61914
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
 
namespace Bro.M141.Process.UI
{
    public partial class Frm_Login : Form
    {
        public Frm_Login()
        {
            InitializeComponent();
        }
        private static Frm_Login _instance;
 
        public static Frm_Login GetInstance()
        {
            if (_instance == null || _instance.IsDisposed)
            {
                _instance = new Frm_Login();
            }
            return _instance;
        }
        public delegate void ChangeBoolHander(bool isAmin);
 
        public event ChangeBoolHander changeBool;
 
        public bool isAmin = false;
        private void uiButton1_Click(object sender, EventArgs e)
        {
            if (uiTextBox1.Text == "管理员")
            {
                if (uiTextBox2.Text == "123")
                {
                    uiTextBox2.Text = "";
                    //DataPrinter.GetInstance().Data_Textbox.Enabled = true;
                    //DataPrinter.GetInstance().ISOK = true;
                    isAmin = true;
                    changeBool(isAmin);
                    this.Close();
                }
                else
                {
                    MessageBox.Show("登入密码错误");
                    uiTextBox2.Text = "";
                }
            }
            else
            {
                MessageBox.Show("登入账户不存在");
                uiTextBox1.Text = "";
            }
        }
    }
}