private void CheckRequirements()
        {
            var validatorTasks = new List<IValidatorTask>();
            validatorTasks.Add(new IsAdministratorValidatorTask());
            validatorTasks.Add(new MkvToolNixValidatorTask());;
            validatorTasks.Add(new PerlExistsValidatorTask());

            foreach (var task in validatorTasks)
            {
                var statusControl = new ValidationStatusControl(task.GetStatusText());
                flowLayoutPanel1.Controls.Add(statusControl);

                bool requirementMet = task.IsRequirementMet();

                if (!requirementMet)
                {
                    bool wasFixed = task.AttemptFixRequirement();

                    if (!wasFixed)
                    {
                        Application.Exit();
                    }
                }

                // Otherwise, okay move onto the next
                statusControl.SetStatus(true);

                Application.DoEvents();
            }

            Close();
        }
Example #2
0
        private void CheckRequirements()
        {
            var validatorTasks = new List <IValidatorTask>();

            validatorTasks.Add(new IsAdministratorValidatorTask());
            validatorTasks.Add(new MkvToolNixValidatorTask());;
            validatorTasks.Add(new PerlExistsValidatorTask());

            foreach (var task in validatorTasks)
            {
                var statusControl = new ValidationStatusControl(task.GetStatusText());
                flowLayoutPanel1.Controls.Add(statusControl);

                bool requirementMet = task.IsRequirementMet();

                if (!requirementMet)
                {
                    bool wasFixed = task.AttemptFixRequirement();

                    if (!wasFixed)
                    {
                        Application.Exit();
                    }
                }

                // Otherwise, okay move onto the next
                statusControl.SetStatus(true);

                Application.DoEvents();
            }

            Close();
        }