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();
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="slh"></param>
 internal static void reloadHook(ScreenLockHelper slh)
 {
     try
     {
         screenLockHelperStatic = slh;
         screenLockHelperStatic.minimizeWindow();
         screenLockHelperStatic.releaseHook();
         screenLockHelperStatic.enableHook(backgroundScreenStatic, new EventArgs());
     }
     catch (Exception e)
     {
     }
 }
Exemplo n.º 5
0
 public void OnlineHelpForm_FormClosing(object sender, EventArgs e)
 {
     screenLockHelperStaticObject.maximizeWindow();
     screenLockHelperStaticObject.releaseHook();
     Application.Exit();
 }