Exemplo n.º 1
0
        private static void LoginNormal(string[] args)
        {
            //登录界面
            Logon dlg = new Logon();

            dlg.StartPosition = FormStartPosition.CenterScreen;
            if (DialogResult.OK == dlg.ShowDialog())
            {
                if (dlg.bLogin)
                {
                    SplashScreen.Splasher.Show(typeof(SplashScreen.frmSplash));

                    gc.MainDialog = new MainForm();
                    gc.MainDialog.StartPosition = FormStartPosition.CenterScreen;
                    Application.Run(gc.MainDialog);
                }
            }
            dlg.Dispose();
        }
Exemplo n.º 2
0
        private void btnRelogin_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (MessageDxUtil.ShowYesNoAndWarning("您确定需要重新登录吗?") != DialogResult.Yes)
            {
                return;
            }


            Portal.gc.MainDialog.Hide();

            Logon dlg = new Logon();

            dlg.StartPosition = FormStartPosition.CenterScreen;
            if (DialogResult.OK == dlg.ShowDialog())
            {
                if (dlg.bLogin)
                {
                    CloseAllDocuments();
                    InitUserRelated();
                }
            }
            dlg.Dispose();
            Portal.gc.MainDialog.Show();
        }