Exemple #1
0
        /// <summary>
        /// Disposes all forms and recreates them after language is switched.
        /// </summary>
        private void rebuildForm()
        {
            int listIndex = listBoxPlayer.SelectedIndex;
            int tabIndex  = tabControl1.SelectedIndex;

            if (formHelp != null)
            {
                formHelp.Dispose();
            }
            statusStrip1.Dispose();
            splitContainer1.Dispose();
            toolStrip1.Dispose();
            menuStrip1.Dispose();
            InitializeComponent();
            mappingLabelsAndTextBoxes();
            updateLabelsWords();
            formHelp = null;
            tabControl1.SelectedIndex = tabIndex;
            if (players != null)
            {
                if (players.Count != 0)
                {
                    updateListBoxPlayer();
                    if (listIndex != -1)
                    {
                        listBoxPlayer.SelectedIndex = listIndex;
                    }
                }
            }
            listBoxPlayer.Focus();
        }
Exemple #2
0
 /// <summary>
 /// Shows FormHelp form.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Manual(object sender, EventArgs e)
 {
     if (formHelp == null)
     {
         formHelp = new FormManual();
     }
     formHelp.Show();
 }