public AddGradeForm(User user, IEnumerable <HandbookGrade> handbookGrades, GradeForm gradeForm, string Id, string Number, string gradeName)
 {
     InitializeComponent();
     this.user      = user;
     this.gradeForm = gradeForm;
     txtId.Text     = Id;
     txtName.Text   = gradeName;
     txtNumber.Text = Number;
 }
        private async void gradesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ApplicationViewModel applicationViewModel = new ApplicationViewModel();
            await applicationViewModel.GetGrades(user.Login, user.Password);

            GradeForm gradeForm = new GradeForm(user, applicationViewModel.handbookGrades);

            gradeForm.Show();
        }
 public AddGradeForm(User user, IEnumerable <HandbookGrade> handbookGrades, GradeForm gradeForm)
 {
     if (!String.IsNullOrEmpty(Properties.Settings.Default.Language))
     {
         // ВАЖНО: Устанавливать язык нужно до создания элементов формы!
         // Это можно сделать глобально, в рамках приложения в классе Program (см. файл Program.cs).
         System.Threading.Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.GetCultureInfo(Properties.Settings.Default.Language);
         System.Threading.Thread.CurrentThread.CurrentCulture   = System.Globalization.CultureInfo.GetCultureInfo(Properties.Settings.Default.Language);
     }
     InitializeComponent();
     this.user      = user;
     this.gradeForm = gradeForm;
 }