/// <summary> /// Changes the side of the item /// </summary> /// <param name="size">The size selected</param> private void SelectSize(DinoDiner.Menu.Size size) { if (Side != null) { if (size == DinoDiner.Menu.Size.Small) { Side.MakeSmall(); } else if (size == DinoDiner.Menu.Size.Medium) { Side.MakeMedium(); } else if (size == DinoDiner.Menu.Size.Large) { Side.MakeLarge(); } NotifyOfPropertyChange("Special"); NotifyOfPropertyChange("Price"); if (NavigationService.CanGoBack) { NavigationService.GoBack(); } else { NavigationService.Navigate(new MenuCategorySelection()); } } }
/// <summary> /// sets the size /// </summary> /// <param name="size"></param> private void SelectSize(DinoDiner.Menu.Size size) { if (Drink != null) { this.Drink.Size = size; } }
private void SelectSide(Side side) { if (combo == null) { if (Side == null) { if (DataContext is Order order) { this.Side = side; side.Size = this.Size; order.Add(Side); } } else { if (DataContext is Order order) { order.Remove(Side); this.Side = side; side.Size = this.Size; order.Add(Side); NavigationService.GoBack(); } } } else { Size = combo.Size; combo.Side = side; combo.Size = Size; NavigationService.GoBack(); } }
/// <summary> /// Sets the side of the of side so as along as the side isn't null. /// </summary> /// <param name="size"></param> public void SelectSize(DinoDiner.Menu.Size size) { if (Side != null) { this.Side.Size = size; } }
public DrinkSelection(CretaceousCombo drink) { InitializeComponent(); this.Drink = drink.Drink; Size = drink.Size; combo = drink; }
/// <summary> /// Sets the combo. /// </summary> /// <param name="combo">The combo to set.</param> public void SetCombo(CretaceousCombo combo) { _combo = combo; SetSide(combo.Side); SetDrink(combo.Drink); Size = combo.Size; uxSmallBox.Background = Brushes.White; uxMediumBox.Background = Brushes.White; uxLargeBox.Background = Brushes.White; switch (Size) { case DinoDiner.Menu.Size.Small: uxSmallBox.Background = Brushes.LightBlue; break; case DinoDiner.Menu.Size.Medium: uxMediumBox.Background = Brushes.LightBlue; break; case DinoDiner.Menu.Size.Large: uxLargeBox.Background = Brushes.LightBlue; break; } }
/// <summary> /// Constructor for SideSelection for combo /// </summary> /// <param name="combo"> the combo </param> public SideSelection(CretaceousCombo combo, DinoDiner.Menu.Size size) { InitializeComponent(); this.combo = combo; isCombo = true; comboSize = size; }
/// <summary> /// Constructor for the Drink Selection dealing with a combo /// </summary> /// <param name="combo"></param> /// <param name="comboSize"></param> public DrinkSelection(CretaceousCombo combo, DinoDiner.Menu.Size comboSize) { InitializeComponent(); this.combo = combo; this.comboSize = comboSize; isCombo = true; }
/// <summary> /// set the size /// </summary> /// <param name="size"></param> private void SelectSize(DinoDiner.Menu.Size size) { if (cb != null) { this.cb.Size = size; } }
/// <summary> /// Constructor which initializes the side /// </summary> /// <param name="side"></param> public SideSelection(Side side) { InitializeComponent(); this.side = side; size = side.Size; InitializeSizeCheckButton(); }
private void SelectSize(DinoDiner.Menu.Size size) { if (Side != null) { this.Side.Size = size; if (home == 0) { NavigationService?.Navigate(new MenuCategorySelection()); } else if (home == 1) { if (NavigationService.CanGoBack) { NavigationService?.GoBack(); } else { NavigationService?.Navigate(new MenuCategorySelection()); } } else if (home == 2) { if (combo != null) { NavigationService?.Navigate(new CustomizeCombo(combo, combo.Drink, Side)); } } } }
private void SelectSize(DinoDiner.Menu.Size size) { if (DataContext is Order order) { this.combo.Side.Size = size; } }
/// <summary> /// Selects the size of the drink in order /// </summary> /// <param name="size">Size to set drink to</param> private void SelectSize(DinoDiner.Menu.Size size) { if (Combo != null) { this.Combo.Size = size; } }
private void SelectSize(DinoDiner.Menu.Size size) { if (this.Side != null) { this.Side.Size = size; } }
/// <summary> /// Constructor which initializes drink /// </summary> /// <param name="drink"></param> public DrinkSelection(Drink drink) { InitializeComponent(); this.drink = drink; size = drink.Size; ButtonSetup(); }
/*public DrinkSelection(string drink) * { * InitializeComponent(); * switch(drink.ToLower()){ * case ("sodasaurus"): * Flavor.IsEnabled = true; * Flavor.Opacity = 1; * HoldIce.IsEnabled = true; * HoldIce.Opacity = 1; * break; * } * } */ private void ButtonClickDrinkSize(object sender, RoutedEventArgs e) { Button b = (Button)sender; Grid parent = (Grid)b.Parent; TextBlock size = (TextBlock)b.Content; string sizeString = size.Text.ToString(); if (drink != null) { for (int i = 1; i < parent.Children.Count; i++) { Button temp = (Button)parent.Children[i]; temp.Background = Brushes.LightGray; } b.Background = Brushes.LightSteelBlue; switch (sizeString) { case ("Small"): SelectedSize = DinoDiner.Menu.Size.Small; break; case ("Medium"): SelectedSize = DinoDiner.Menu.Size.Medium; break; case ("Large"): SelectedSize = DinoDiner.Menu.Size.Large; break; } drink.Size = SelectedSize; } }
// Size methods private void SizeChangeGeneralized(DinoDiner.Menu.Size size) { if (cc != null) { cc.Size = size; } }
private void SelectSize(DinoDiner.Menu.Size size) { if (Combo != null) { this.Combo.Size = size; NavigationService?.Navigate(new MenuCategorySelection()); } }
/// <summary> /// Helper Method for selecting the size of a side /// </summary> /// <param name="size">the size that you want</param> public void SelectSize(DinoDiner.Menu.Size size) { if (this.side != null) { this.side.Size = size; } NavigationService?.Navigate(new MenuCategorySelection()); }
/// <summary> /// Sets the size of the currently selected side. /// </summary> /// <param name="size">The new size of the side.</param> protected void SelectSize(DinoDiner.Menu.Size size) { if (this.Side != null) { this.Side.Size = size; NavigationService.Navigate(new MenuCategorySelection()); } }
/// <summary> /// Constructor for DrinkSelection for combo /// </summary> /// <param name="combo"> the combo </param> /// <param name="size"> the size of the combo </param> public DrinkSelection(CretaceousCombo combo, DinoDiner.Menu.Size size) { InitializeComponent(); this.combo = combo; comboSize = size; isCombo = true; ChangeSpecialButtons(this.combo.Drink); }
/// <summary> /// Helper Method for selecting the size /// </summary> /// <param name="size">the size that you want</param> public void SelectSize(DinoDiner.Menu.Size size) { if (this.Drink != null) { combo.Drink.Size = size; this.Drink.Size = size; } //NavigationService?.Navigate(new MenuCategorySelection()); }
/// <summary> /// Sets the size of the currently selected combo. /// </summary> /// <param name="size">The new size of the drink.</param> private void SelectSize(DinoDiner.Menu.Size size) { if (this.Combo != null && this.Combo.Side != null && this.Combo.Drink != null) { this.Combo.Size = size; } NavigationService.Navigate(new MenuCategorySelection()); }
/// <summary> /// Constructor which initializes the combo and the side /// </summary> /// <param name="combo"></param> public SideSelection(CretaceousCombo combo) { InitializeComponent(); this.combo = combo; this.side = combo.Side; combo.Side = side; size = side.Size; InitializeSizeCheckButton(); }
/// <summary> /// Construcctor which intializes combo and drink /// </summary> /// <param name="combo"></param> public DrinkSelection(CretaceousCombo combo) { InitializeComponent(); this.combo = combo; this.drink = combo.Drink; combo.Drink = drink; size = drink.Size; ButtonSetup(); }
/// <summary> /// Constructor for the CustomizeCombo /// </summary> /// <param name="combo"> the updated combo </param> public CustomizeCombo(CretaceousCombo combo, DinoDiner.Menu.Size size) { InitializeComponent(); this.combo = combo; comboSize = size; EnableSizeButtons(); ChangeSideText(); ChangeDrinkText(); }
private void SelectSize(DinoDiner.Menu.Size size) { if (DataContext is Order order) { if (Drink != null) { this.Drink.Size = size; } } }
private void SelectSize(DinoDiner.Menu.Size size) { if (DataContext is Order order) { if (CretaceousCombo != null) { CretaceousCombo.Size = size; } } }
/// <summary> /// Changes the size of the drink /// </summary> /// <param name="size">size being set</param> private void SelectSize(DinoDiner.Menu.Size size) { if (Drink != null) { this.Drink.Size = size; } if (isCombo) { combo.Drink = Drink; } }
/// <summary> /// Sets Size of selected Drink and returns to MenuCategorySelection window /// </summary> /// <param name="size">New size of the selected Drink</param> private void SetSize(DinoDiner.Menu.Size size) { if (Combo != null) { Combo.Drink.Size = size; } else if (Drink != null) { Drink.Size = size; } }