private void inOutToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!inOutFormOpen)
     {
         frmInOut inOut = new frmInOut();
         inOut.MdiParent     = this;
         inOut.StartPosition = FormStartPosition.CenterScreen;
         inOut.WindowState   = FormWindowState.Maximized;
         inOut.Show();
         inOutFormOpen = true;
     }
     else
     {
         if (Application.OpenForms.OfType <frmInOut>().Count() == 1)
         {
             Application.OpenForms.OfType <frmInOut>().First().BringToFront();
         }
     }
 }
 private void stockToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!inOutFormOpen)
     {
         frmLoading.ShowLoadingScreen();
         frmInOut inOut = new frmInOut
         {
             MdiParent     = this,
             StartPosition = FormStartPosition.CenterScreen,
             WindowState   = FormWindowState.Maximized
         };
         inOut.Show();
         inOutFormOpen = true;
         frmLoading.CloseForm();
     }
     else
     {
         if (Application.OpenForms.OfType <frmInOut>().Count() == 1)
         {
             Application.OpenForms.OfType <frmInOut>().First().BringToFront();
         }
     }
 }