Beispiel #1
0
 internal static void RegForm(MyForm form)
 {
     if (!forms.Contains(form))
     {
         forms.Add(form);
         form.Load       += form_Load;
         form.FormClosed += form_FormClosed;
     }
 }
Beispiel #2
0
        static void form_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e)
        {
            MyForm form = (MyForm)sender;

            form.Load       -= form_Load;
            form.FormClosed -= form_FormClosed;
            forms.Remove(form);

            if (MainForm == form)
            {
                MainForm = null;
            }
        }
Beispiel #3
0
 static void form_Load(object sender, EventArgs e)
 {
     MyForm form = (MyForm)sender;
 }