Beispiel #1
0
 private static void form_Activated(object sender, EventArgs e)
 {
     ExecuteActionHelper.ExecuteAction(delegate()
     {
         ActivateDeactivateForm(sender, true);
     });
 }
Beispiel #2
0
        private static void formClosed(object sender, FormClosedEventArgs e)
        {
            ExecuteActionHelper.ExecuteAction(delegate()
            {
                FormWithKey form = sender as FormWithKey;
                if (form == null)
                {
                    return;
                }

                // remove tool strip button item.
                ToolStripItem item = m_openedWindowToolStrip.Items[MakeToolBarItemName(form)];
                if (item != null)
                {
                    m_openedWindowToolStrip.Items.Remove(item);
                }

                if (form.Key != null)
                {
                    // check if it is a multiple opened form and remove it.
                    if (m_multipleOpenedForms.ContainsKey(form.Key))
                    {
                        m_multipleOpenedForms.Remove(form.Key);
                    }
                }
            });
        }
Beispiel #3
0
        private static void item_Click(object sender, EventArgs e)
        {
            ExecuteActionHelper.ExecuteAction(delegate()
            {
                ToolStripButton item = sender as ToolStripButton;
                if (item == null)
                {
                    return;
                }

                FormWithKey form = item.Tag as FormWithKey;
                if (form == null)
                {
                    return;
                }
                form.BringToFront();
            });
        }