示例#1
0
        void btn_preview_Click(object sender, EventArgs e)
        {
            if (selectedNumsOfMissions.Count == 0)
            {
                MessageBox.Show("Вы ничего не выбрали!", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            Test test = GetCreatedTest();

            test.RegenerateMissions();
            FormMissionSolve form = new FormMissionSolve(new User("Предпросмотр", "*"), test, false);

            if (test.ShowType != TestShowType.OnOneForm)
            {
                try
                {
                    form.Show();
                }
                catch { }
            }
            else
            {
                form.ShowDialog();
            }
        }
        private void btn_correctionOfMistakes_Click(object sender, System.EventArgs e)
        {
            txtbx_log.Text += $"Работа над ошибками:\n";
            var reSolvedTest = Test.CreateCorrectMistakesTest(Test);

            reSolvedTest.InitTest();
            reSolvedTest.TimeStart = new DateTime(Test.TimeStart.Ticks);
            FormMissionSolve missionSolveForm = new FormMissionSolve(User, reSolvedTest, true);

            try
            {
                missionSolveForm.ShowDialog();
            }
            catch { }

            this.Test = reSolvedTest;
            UpdateUI();
        }