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 = "";
|
}
|
}
|
}
|
}
|