Example #1
0
        public bool AskPassword(object sender)
        {
            if (GlobalHelper.appSettings.Settings.Password == string.Empty)
            {
                return(false);
            }

            PasswordWindow pw = new PasswordWindow();
            DialogResult   dr = pw.ShowDialog(this);

            if (dr == DialogResult.Cancel)
            {
                //lock(this)
                {
                    System.Diagnostics.Process.GetCurrentProcess().Kill();
                }
            }

            return(true);
        }
Example #2
0
        public bool AskPassword(object sender)
        {
            if (GlobalHelper.appSettings.Settings.Password == string.Empty)
            {
                return false;
            }

            PasswordWindow pw = new PasswordWindow();
            DialogResult dr = pw.ShowDialog(this);

            if (dr == DialogResult.Cancel)
            {
                //lock(this)
                {
                    System.Diagnostics.Process.GetCurrentProcess().Kill();
                }
            }

            return true;
        }