新文章 网摘 文章 随笔 日记

Winform 注销登录关闭当前窗体,返回登录窗体

static class Program
    {
        public static bool OpenLoginWinForm { get; set; }
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            OpenLoginWinForm = true;

            while (OpenLoginWinForm)
            {
                OpenLoginWinForm = false;
                Application.Run(new FrmLogin());
            }
        }
    }


        private async void LblSignOut_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {

                GlobalConfig.WinFormProxy.SignOut();
                Program.OpenLoginWinForm = true;
                Close();
        }

 

posted @ 2020-12-14 10:13  岭南春  阅读(393)  评论(0)    收藏  举报