Пример #1
0
        /// <summary>
        /// 顯示Login畫面
        /// </summary>
        /// <returns></returns>
        private static DialogResult ShowLoginForm()
        {
            FormLogin LpsLogin = new FormLogin();

            LpsLogin.BringToFront();

            DialogResult Ret = LpsLogin.ShowDialog();

            LpsLogin.Close();
            LpsLogin.Dispose();

            return(Ret);
        }
Пример #2
0
        private bool ShowLogin(int form, int heightForm)
        {
            FormLogin fLogin = new FormLogin(form, heightForm, String.Empty);

            fLogin.BringToFront();
            if (fLogin.ShowDialog() == DialogResult.Yes)
            {
                userName  = fLogin.LogedUserName;
                logedUser = fLogin.LogedUser;

                return(true);
            }

            userName  = fLogin.LogedUserName;
            logedUser = fLogin.LogedUser;

            return(false);
        }