Beispiel #1
0
 private void startTraining_Click(object sender, EventArgs e)
 {
     TrainingParametersForm param = new TrainingParametersForm();
     param.Owner = this;
     param.ShowDialog();
     levelBox.Text = Convert.ToString(_currentUser.NumberOfLastLevel);
     dateLastTrainBox.Text = _currentUser.DateofLastTraining.ToString();
 }
Beispiel #2
0
 /// <summary>
 /// Действия при загрузке формы
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TrainingForm_Load(object sender, EventArgs e)
 {
     main = this.Owner as TrainingParametersForm;
     if (main != null)
     {
         currentUser = main.CurrentUser;
         выToolStripMenuItem.Text = "Вы: " + currentUser.Login;
         currentTraining = main.CurrentTraining;
         letter1.UserFontSize = currentTraining.FontSize;
         letter1.Refresh();
         уровеньToolStripMenuItem.Text = "Уровень: " + currentTraining.NumberOfLevel;
         упражнениеToolStripMenuItem.Text = "Упражнение: " + currentTraining.NumberOfCurrentExercise;
         Exercise newEx = new Exercise(currentTraining.NumberOfCurrentExercise, currentTraining.NumberOfLevel);
         int code = newEx.selectExercise();
         label1.Visible = false;
         label1.Text = newEx.Text.Replace(' ', '_');
         letter1.Visible=false;
         usingSymbol = newEx.UsingSymbols;
         liteUsedSymbols(usingSymbol,true);
         keyBoard1.Focus();
     }
 }