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); }
private void SelectLevelChanged(object sender, EventArgs e) { // Clear out pokemon from teams which no longer are valid at this level GroupBoxPlayerOneOptions.CorrectTeam(); GroupBoxPlayerTwoOptions.CorrectTeam(); }
public override void Shown(WindowEventArgs args) { GroupBoxPlayerOneOptions.Shown(args); GroupBoxPlayerTwoOptions.Shown(args); ValidateTopSection(); }