private void MainPromptForm_Closing(object sender, EventArgs e)
        {
            // MessageBox.Show(" Application is closing now ", "INFO", MessageBoxButtons.OK, MessageBoxIcon.Information);

            screenLockObj.releaseHook();
            screenLockObj.maximizeWindow();

            Application.Exit();
        }
Пример #2
0
        private void AccountUpdateForm_Closing(object sender, EventArgs e)
        {
            screenLockObj.releaseHook();
            screenLockObj.maximizeWindow();

            Application.Exit();
        }
        /// <summary>
        /// This button is necessary only for now, that is to unlock
        /// the screen without recording any brain waves.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void exitButton_Click(object sender, EventArgs e)
        {
            // this.Close();
            try
            {
                screenLockObj.removeFromStartup();
                screenLockObj.maximizeWindow();
                screenLockObj.releaseHook();
            }
            catch (Exception ex)
            {
            }

            //Process screenLockPromptProcess = new Process();
            try
            {
                //screenLockPromptProcess.StartInfo.WorkingDirectory = Environment.CurrentDirectory;
                //screenLockPromptProcess.StartInfo.FileName = "Screen Lock Prompt";
                //screenLockPromptProcess.Start();
                ClosingTheAppFlag = true;

                Application.Exit();
            }
            catch (Exception ex)
            {
                MessageBox.Show(Environment.CurrentDirectory);
                MessageBox.Show(ex.Message);
                Application.Exit();
            }
        }
Пример #4
0
 public void OnlineHelpForm_FormClosing(object sender, EventArgs e)
 {
     screenLockHelperStaticObject.maximizeWindow();
     screenLockHelperStaticObject.releaseHook();
     Application.Exit();
 }