Exemple #1
0
 private void IVUDefSetup_FormClosing(object sender, FormClosingEventArgs e)
 {
     // Is the form being closed, or just hidden?
     if (GPAddIn.CloseIVUDefSetupForm == false)
     {
         // Do not allow the form to completely close and be removed from memory.
         // Just hide the form and cancel the close operation.
         this.Hide();
         e.Cancel = true;
     }
     else
     {
         CloseIVUDefListSetupForm = true;
         IVUDefListSetupForm.Close();
         IVUDefListSetupForm = null;
     }
 }
Exemple #2
0
        private void callIVUDefListSetupForm(string label, byte idx)
        {
            if (IVUDefListSetupForm == null)
            {
                try
                {
                    IVUDefListSetupForm = new IVUDefListSetup();
                }
                catch (Exception ex)
                {
                    Dynamics.Forms.SyVisualStudioHelper.Functions.DexError.Invoke(ex.Message);
                }
            }

            IVUDefListSetupForm.IVUDefLabel   = label;
            IVUDefListSetupForm.IVUDefListIdx = idx;
            // Always show and activate the WinForm
            IVUDefListSetupForm.Show();
            IVUDefListSetupForm.Activate();

            CloseIVUDefListSetupForm = false;
        }