示例#1
0
 /// <summary>
 /// Calls frmBarcodePrinting form
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void barcodePrintingToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         frmBarcodePrinting objBarcodePrinting = new frmBarcodePrinting();
         frmBarcodePrinting open = Application.OpenForms["frmBarcodePrinting"] as frmBarcodePrinting;
         if (open == null)
         {
             objBarcodePrinting.MdiParent = this;
             objBarcodePrinting.Show();
         }
         else
         {
             open.Activate();
             if (open.WindowState == FormWindowState.Minimized)
             {
                 open.WindowState = FormWindowState.Normal;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MDI 143: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Calls frmBarcodePrinting form
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void barcodePrintingToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmBarcodePrinting", "View"))
         {
             frmBarcodePrinting objBarcodePrinting = new frmBarcodePrinting();
             frmBarcodePrinting open = Application.OpenForms["frmBarcodePrinting"] as frmBarcodePrinting;
             if (open == null)
             {
                 objBarcodePrinting.MdiParent = this;
                 objBarcodePrinting.Show();
             }
             else
             {
                 open.Activate();
                 if (open.WindowState == FormWindowState.Minimized)
                 {
                     open.WindowState = FormWindowState.Normal;
                 }
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MDI 143: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }