Example #1
0
 /// <summary>
 /// Application exit point
 /// </summary>
 /// <param name="sender">Sender</param>
 /// <param name="e">EventArgs</param>
 private void ApplicationExit(object sender, EventArgs e)
 {
     if (MessageBox.Show(this, "Do you really want to exit?\r\nThis will prevent you from using the browser authentication!", "Are you sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         //Cleanup code here
         androidServer.CloseServer();
         javascriptServer.CloseServer();
         backgroundIcon.Visible = false;
         backgroundIcon.Dispose();
         Environment.Exit(0);
     }
 }