private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (e.CloseReason == CloseReason.UserClosing)
     {
         DialogResult result = MessageBox.Show("Did you want to logout?", "Warning", MessageBoxButtons.YesNo);
         if (result == DialogResult.Yes)
         {
             this.Hide();
             Sign.Login login = new Sign.Login();
             login.Show();
         }
         else
         {
             e.Cancel = true;
         }
     }
     else
     {
         e.Cancel = true;
     }
 }
 private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     Sign.Login login = new Sign.Login();
     login.Show();
     this.Close();
 }
 private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     Sign.Login login = new Sign.Login();
     login.MdiParent = this;
     login.Show();
 }