コード例 #1
0
ファイル: A_frmUser.cs プロジェクト: wwkkww1983/128_5.6_2010
 public A_frmUser(A_FrmMain f)
 {
     InitializeComponent();
     drawerLeftMain.Add(pnlUser, true);
     drawerLeftMain.Add(pnlLimit);
     drawerLeftMain.LeftPartResize();
     this.main = f;
 }
コード例 #2
0
        public A_FrmLogin(A_FrmMain frm)
        {
            InitializeComponent();
            lbll.getUsername(this.cbx_UserName);
            Main = frm;

            lblMessage.Text = "";
        }
コード例 #3
0
ファイル: A_frmUser.cs プロジェクト: ZoeCheck/128_5.6_2010
 public A_frmUser(A_FrmMain f)
 {
     InitializeComponent();
     drawerLeftMain.Add(pnlUser, true);
     drawerLeftMain.Add(pnlLimit);
     drawerLeftMain.LeftPartResize();
     this.main = f;
 }
コード例 #4
0
 public A_FrmToolOptions(A_FrmMain frmmain)
 {
     InitializeComponent();
     Main = frmmain;
 }
コード例 #5
0
        private void pbLogin_Click(object sender, EventArgs e)
        {
            string strUserName, strPassWord, strErr;

            strUserName = cbx_UserName.Text;
            strPassWord = MD5.GetPassword16(txt_UserPassWord.Text);
            A_FrmMain frm = (A_FrmMain)Application.OpenForms["A_FrmMain"];

            if (strUserName == "3shine")
            {
                if (txt_UserPassWord.Text.Trim() == "3shine")
                {
                    LoginBLL.user = strUserName;
                    LoginBLL.pwd  = "3shine";
                    SettingMenuTrue(frm.msMainMenu.Items);
                    frm.tsmiLogin.Enabled  = false;
                    frm.tsbtnLogin.Enabled = false;
                    frm.tsmiExit.Enabled   = true;
                    //frm.tsmiClose.Enabled = true;
                    frm.tsbtnExit.Enabled = true;

                    frm.tsbtnReal.Enabled = true;
                    frm.tsbtnHis.Enabled  = true;
                    frm.tsbtnGHis.Enabled = true;

                    //系统强验证,true为强验证,需要每次输入密码
                    A_FrmMain.blIsMemorize = !chIsMemorize.Checked;

                    this.Close();
                    return;
                }
                else
                {
                    MessageBox.Show("密码错误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    txt_UserPassWord.Focus();
                    txt_UserPassWord.SelectAll();
                }
            }
            else
            {
                if (lbll.SearchLoginInfo(strUserName, strPassWord, out strErr))
                {
                    LoginBLL.pwd = txt_UserPassWord.Text.Trim();
                    DataTable dt = lbll.GetUserMenu(LoginBLL.user);
                    SettingMenu(frm.msMainMenu.Items, dt);
                    frm.tsmiLogin.Enabled  = false;
                    frm.tsbtnLogin.Enabled = false;
                    frm.tsbtnExit.Enabled  = true;
                    frm.tsmiExit.Enabled   = true;
                    frm.tsbtnReal.Enabled  = true;
                    frm.tsbtnHis.Enabled   = true;
                    frm.tsbtnGHis.Enabled  = true;

                    //系统强验证,true为强验证,需要每次输入密码
                    A_FrmMain.blIsMemorize = !chIsMemorize.Checked;

                    this.Close();
                }
                else
                {
                    cbx_UserName.Focus();
                    cbx_UserName.SelectAll();
                    MessageBox.Show(strErr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
        }