Exemplo n.º 1
0
        private void label2_Click(object sender, EventArgs e)
        {
            FormUserLogin formUserLogin = new FormUserLogin();

            formUserLogin.ShowDialog();

            if (UserManager.IsLogin)
            {
                lblLogin.Text = "切换用户";
                //lblLogin.Visible = false;
                lblUserName.Text = "登录用户:" + UserManager.LoginUser.UserName;
            }
            else
            {
                lblUserName.Text = "登录用户:" + "未登录";
                lblLogin.Text    = "用户登录";
            }
        }
Exemplo n.º 2
0
        private void FormMain_Shown(object sender, EventArgs e)
        {
            LoadExamInfo();

            FormUserLogin formUserLogin = new FormUserLogin();

            formUserLogin.ShowDialog();

            if (UserManager.IsLogin)
            {
                lblLogin.Text    = "切换用户";
                lblUserName.Text = "登录用户:" + UserManager.LoginUser.UserName;
            }
            else
            {
                lblUserName.Text = "登录用户:" + "未登录";
                lblLogin.Text    = "用户登录";
            }
        }