示例#1
0
 /// <summary>
 /// Method used either for creating new instance of TeamForm class
 /// and assigning it to the tmForm variable
 /// or focusing on existing TeamForm object
 /// </summary>
 public static void TeamFormsNew()
 {
     if (tmForm == null)
     {
         tmForm = new TeamForm();
         tmForm.Show();
     }
     else
     {
         tmForm.Focus();
     }
 }
示例#2
0
        /// <summary>
        /// Handler for FormClosed event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        internal void OnFormClosed(object sender, EventArgs e)
        {
            _formCount--;
            MessageBox.Show("Форма закрыта");
            if (_formCount <= 0)
            {
                ExitThread();
            }
            switch (sender)
            {
            case PlayerForm p:
                plForm = null;
                return;

            case TeamForm t:
                tmForm = null;
                return;
            }
        }