Esempio n. 1
0
        private bool ValidatePlayerSection()
        {
            // Check Player One In/Out Locations
            var good = GroupBoxPlayerOneOptions.Validate() && GroupBoxPlayerTwoOptions.Validate();

            // Check two outs are unique
            if (!_optionsValidator.ValidateUniquePath(GroupBoxPlayerOneOptions.OutLocation, GroupBoxPlayerTwoOptions.OutLocation))
            {
                GroupBoxPlayerOneOptions.SetOutLocationImage(ImageState.FileBad);
                GroupBoxPlayerTwoOptions.SetOutLocationImage(ImageState.FileBad);
                good = false;
            }

            // Enable and Validate Bottom Section
            PanelBottom.Enabled = good;
            return(good ? ValidateBottomSection() : good);
        }
Esempio n. 2
0
 private void SelectLevelChanged(object sender, EventArgs e)
 {
     // Clear out pokemon from teams which no longer are valid at this level
     GroupBoxPlayerOneOptions.CorrectTeam();
     GroupBoxPlayerTwoOptions.CorrectTeam();
 }
Esempio n. 3
0
 public override void Shown(WindowEventArgs args)
 {
     GroupBoxPlayerOneOptions.Shown(args);
     GroupBoxPlayerTwoOptions.Shown(args);
     ValidateTopSection();
 }