基本信息
源码名称:Winform系统登录(登入登出)架构
源码大小:0.22M
文件格式:.rar
开发语言:C#
更新时间:2019-07-04
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559

本次赞助数额为: 2 元 
   源码介绍
Winform系统登录(登入登出)架构


private void btnLogin_Click(object sender, EventArgs e)
        {
            try
            {
                if (false == this.ValidateInput()) return;

                this.Cursor = Cursors.WaitCursor;
                this.SetButtonEnable(false);
                this.Update();//必須
                this.ShowLoginInfo("正在驗證用戶名及密碼");
                if (SystemSecure.Login(txtUID.Text, txtPWD.Text)) //調用系統安全管理模塊登錄方法
                {
                    //
                    //授權成功, 下載用戶權限數據.....
                    //
                    //登錄成功,初始化主窗體,初始化進度在登錄窗體的狀態欄顯示
                    IMainForm MDI = frmMain.CreateMainFormInsatance();
                    //MDI.InitUserInterface(new StatusBarMessage(lblLoading));
                    MDI.InitUserInterface(new LabelMessage(label3));

                    this.DialogResult = DialogResult.OK; //成功
                    this.Close(); //關閉登陸窗體
                }
                else
                {
                    this.ShowLoginInfo("登錄失敗,請檢查用戶名和密碼!");
                    Msg.Warning("登錄失敗,請檢查用戶名和密碼!");
                }
            }
            catch
            {
                this.SetButtonEnable(true);
                this.ShowLoginInfo("登錄失敗,請檢查用戶名和密碼!");
                Msg.Warning("登錄失敗,請檢查用戶名和密碼!");
            }

            this.Cursor = Cursors.Default;
        }