/// <summary> /// sets the selected side /// </summary> /// <param name="side"></param> void SetSelectedSide(Side side) { if (side is Fryceritops fry) { Fryceritops.Background = new SolidColorBrush(Colors.LightBlue); Triceritots.ClearValue(Button.BackgroundProperty); MeteorMacAndCheese.ClearValue(Button.BackgroundProperty); MezzorellaSticks.ClearValue(Button.BackgroundProperty); } else if (side is Triceritots tots) { Fryceritops.ClearValue(Button.BackgroundProperty); Triceritots.Background = new SolidColorBrush(Colors.LightBlue); MeteorMacAndCheese.ClearValue(Button.BackgroundProperty); MezzorellaSticks.ClearValue(Button.BackgroundProperty); } else if (side is MeteorMacAndCheese mac) { Fryceritops.ClearValue(Button.BackgroundProperty); Triceritots.ClearValue(Button.BackgroundProperty); MeteorMacAndCheese.Background = new SolidColorBrush(Colors.LightBlue); MezzorellaSticks.ClearValue(Button.BackgroundProperty); } else if (side is MezzorellaSticks sticks) { Fryceritops.ClearValue(Button.BackgroundProperty); Triceritots.ClearValue(Button.BackgroundProperty); MeteorMacAndCheese.ClearValue(Button.BackgroundProperty); MezzorellaSticks.Background = new SolidColorBrush(Colors.LightBlue); } switch (side.Size) { case DinoDiner.Menu.Size.Small: SmallButton.Background = new SolidColorBrush(Colors.LightBlue); MediumButton.ClearValue(Button.BackgroundProperty); LargeButton.ClearValue(Button.BackgroundProperty); break; case DinoDiner.Menu.Size.Medium: MediumButton.Background = new SolidColorBrush(Colors.LightBlue); SmallButton.ClearValue(Button.BackgroundProperty); LargeButton.ClearValue(Button.BackgroundProperty); break; case DinoDiner.Menu.Size.Large: LargeButton.Background = new SolidColorBrush(Colors.LightBlue); SmallButton.ClearValue(Button.BackgroundProperty); MediumButton.ClearValue(Button.BackgroundProperty); break; } }
/// <summary> /// sets combo size /// </summary> void SetSelectedSize() { switch (_combo.Size) { case DinoDiner.Menu.Size.Small: SmallButton.Background = new SolidColorBrush(Colors.LightBlue); MediumButton.ClearValue(Button.BackgroundProperty); LargeButton.ClearValue(Button.BackgroundProperty); break; case DinoDiner.Menu.Size.Medium: MediumButton.Background = new SolidColorBrush(Colors.LightBlue); SmallButton.ClearValue(Button.BackgroundProperty); LargeButton.ClearValue(Button.BackgroundProperty); break; case DinoDiner.Menu.Size.Large: LargeButton.Background = new SolidColorBrush(Colors.LightBlue); SmallButton.ClearValue(Button.BackgroundProperty); MediumButton.ClearValue(Button.BackgroundProperty); break; } }