Esempio n. 1
0
 public static BlackBoxMainForm Get()
 {
     if (Instance == null)
     {
         Instance = new BlackBoxMainForm();
     }
     return(Instance);
 }
Esempio n. 2
0
        private void OnToolClicked(object sender, EventArgs e)
        {
            BlackBoxMainForm form = BlackBoxMainForm.Get();

            Form owner = null;

            if (Application.OpenForms.Count > 0)
            {
                owner = Application.OpenForms[0];
            }
            form.ShowDialog(owner);
        }
Esempio n. 3
0
        /// <summary>
        /// Called when the user clicks on the balloon.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnClick(object sender, EventArgs e)
        {
            BlackBoxMainForm form  = BlackBoxMainForm.Get();
            Form             owner = null;

            if (Application.OpenForms.Count > 0)
            {
                owner = Application.OpenForms[0];
            }

            if (owner == null)
            {
                form.ShowInTaskbar = true;
                form.Show();
            }
            else
            {
                form.ShowDialog(owner);
            }
        }