private void ChangePresenterType(EquipmentPresenterType type) { switch (type) { case EquipmentPresenterType.Weapon: this.Background = Application.Current.Resources["EquipmentPresenterWeaponBackground"] as SolidColorBrush; TextBlockEquipmentType.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockEquipmentType.FontSize = 20; TextBlockEquipmentType.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush; TextBlockEquipmentName.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockEquipmentName.FontSize = 20; TextBlockEquipmentName.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush; TextBlockCurrentValue.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockCurrentValue.FontSize = 20; TextBlockCurrentValue.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush; ImageEquipmentPicture.Width = 200; ImageEquipmentPicture.Height = 200; break; case EquipmentPresenterType.Grenade: this.Background = Application.Current.Resources["EquipmentPresenterGrenadeBackground"] as SolidColorBrush; TextBlockEquipmentType.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockEquipmentType.FontSize = 20; TextBlockEquipmentType.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush;; TextBlockEquipmentName.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockEquipmentName.FontSize = 20; TextBlockEquipmentName.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush; TextBlockCurrentValue.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockCurrentValue.FontSize = 20; TextBlockCurrentValue.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush; ImageEquipmentPicture.Width = 200; ImageEquipmentPicture.Height = 200; break; case EquipmentPresenterType.Equipment: this.Background = Application.Current.Resources["EquipmentPresenterEquipmentBackground"] as SolidColorBrush; TextBlockEquipmentType.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockEquipmentType.FontSize = 20; TextBlockEquipmentType.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush;; TextBlockEquipmentName.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockEquipmentName.FontSize = 20; TextBlockEquipmentName.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush; TextBlockCurrentValue.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockCurrentValue.FontSize = 20; TextBlockCurrentValue.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush; ImageEquipmentPicture.Width = 200; ImageEquipmentPicture.Height = 200; break; case EquipmentPresenterType.Armor: this.Background = Application.Current.Resources["EquipmentPresenterArmorBackground"] as SolidColorBrush; TextBlockEquipmentType.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockEquipmentType.FontSize = 20; TextBlockEquipmentType.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush;; TextBlockEquipmentName.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockEquipmentName.FontSize = 20; TextBlockEquipmentName.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush; TextBlockCurrentValue.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockCurrentValue.FontSize = 20; TextBlockCurrentValue.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush; ImageEquipmentPicture.Width = 200; ImageEquipmentPicture.Height = 200; break; case EquipmentPresenterType.Bomb: this.Background = Application.Current.Resources["EquipmentPresenterBombBackground"] as SolidColorBrush; TextBlockEquipmentType.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockEquipmentType.FontSize = 20; TextBlockEquipmentType.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush;; TextBlockEquipmentName.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockEquipmentName.FontSize = 20; TextBlockEquipmentName.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush; TextBlockCurrentValue.FontStyle = Windows.UI.Text.FontStyle.Normal; TextBlockCurrentValue.FontSize = 20; TextBlockCurrentValue.Foreground = Application.Current.Resources["EquipmentPresenterForegroung"] as SolidColorBrush; ImageEquipmentPicture.Width = 200; ImageEquipmentPicture.Height = 200; break; default: break; } }
private void OnPresenterTypeChanged(EquipmentPresenterType newValue, EquipmentPresenterType oldValue) { ChangePresenterType(newValue); }