public AddQuestionForm(User user, HandbookTest test, QuestionForm questionForm, QuestionDB question)
 {
     InitializeComponent();
     this.user         = user;
     this.test         = test;
     this.questionForm = questionForm;
     txtId.Text        = question.Id.ToString();
     txtContent.Text   = question.Content;
     txtAnswer.Text    = question.Answer.ToString();
 }
        private async void questionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ApplicationViewModel applicationViewModel = new ApplicationViewModel();
            await applicationViewModel.GetQuestions(user.Login, user.Password);

            await applicationViewModel.GetTests(user.Login, user.Password);

            QuestionForm questionsForm = new QuestionForm(user, applicationViewModel.handbookTests, applicationViewModel.handbookQuestions);

            questionsForm.Show();
        }
 public AddQuestionForm(User user, HandbookTest test, QuestionForm questionForm)
 {
     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.test         = test;
     this.questionForm = questionForm;
 }