コード例 #1
0
ファイル: WindowSplash.cs プロジェクト: martin762/Eddie
        public string AskUnlockPassword(bool authFailed)
        {
            if (this.InvokeRequired)
            {
                AskUnlockPasswordDelegate inv = new AskUnlockPasswordDelegate(this.AskUnlockPassword);

                return((string)this.Invoke(inv, new object[] { authFailed }));
            }
            else
            {
                Forms.WindowUnlock dlg = new Forms.WindowUnlock();
                dlg.AuthFailed = authFailed;
                dlg.ShowDialog(UiClient.Instance.SplashWindow);
                return(dlg.Body);
            }
        }
コード例 #2
0
        public string AskUnlockPassword(bool authFailed)
        {
            try
            {
                if (this.InvokeRequired)
                {
                    AskUnlockPasswordDelegate inv = new AskUnlockPasswordDelegate(this.AskUnlockPassword);

                    return((string)this.Invoke(inv, new object[] { authFailed }));
                }
                else
                {
                    Forms.WindowUnlock dlg = new Forms.WindowUnlock();
                    dlg.AuthFailed = authFailed;
                    dlg.ShowDialog(UiClient.Instance.SplashWindow);
                    return(dlg.Body);
                }
            }
            catch (Exception ex)
            {
                Engine.Instance.Logs.LogUnexpected(ex);
                return("");
            }
        }