Ejemplo n.º 1
0
 /// <summary>
 /// <para>Method used either for creating new instance of PlayerForm class</para>
 /// <para>and assigning it to the plForm variable</para>
 /// <para>or focusing on existing PlayerForm object</para>
 /// </summary>
 public static void PlayerFormsNew()
 {
     if (plForm == null)
     {
         plForm = new PlayerForm();
         plForm.Show();
     }
     else
     {
         plForm.Focus();
     }
 }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Method that enables run first form (PlayerForm currently) and the whole app accordingly.
 /// </summary>
 internal void Run()
 {
     plForm = new PlayerForm();
     plForm.Show();
 }