private Label GetLabel(EnumCardType thisCat) { Label output = new Label(); output.FontSize = 14; output.TextColor = Color.White; output.HorizontalOptions = LayoutOptions.Center; output.FontAttributes = FontAttributes.Bold; switch (thisCat) { case EnumCardType.IsRoom: output.Text = "Rooms"; break; case EnumCardType.IsWeapon: output.Text = "Weapons"; break; case EnumCardType.IsCharacter: output.Text = "Characters"; break; default: break; } return(output); }
private TextBlock GetLabel(EnumCardType thisCat) { TextBlock output = new TextBlock(); output.FontSize = 14; output.Foreground = Brushes.White; output.HorizontalAlignment = HorizontalAlignment.Center; output.FontWeight = FontWeights.Bold; switch (thisCat) { case EnumCardType.IsRoom: output.Text = "Rooms"; break; case EnumCardType.IsWeapon: output.Text = "Weapons"; break; case EnumCardType.IsCharacter: output.Text = "Characters"; break; default: break; } return(output); }
private string FindCardName(int deck, EnumCardType whatType) { if (whatType == EnumCardType.IsCharacter) { if (deck == 1) { return("Mrs. Peacock"); } if (deck == 2) { return("Mr. Green"); } if (deck == 3) { return("Professor Plum"); } if (deck == 4) { return("Miss Scarlet"); } if (deck == 5) { return("Mrs. White"); } if (deck == 6) { return("Colonel Mustard"); } throw new BasicBlankException("Not Found"); } if (whatType == EnumCardType.IsRoom) { return(RoomList[deck].Name); } if (whatType == EnumCardType.IsWeapon) { return(WeaponList[deck].Name); } throw new BasicBlankException("Wrong type"); }
private static void CardTypePropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { var thisItem = (CardGraphicsWPF)sender; thisItem.MainObject !.CardType = (EnumCardType)e.NewValue; }
private static void CardTypePropertyChanged(BindableObject bindable, object oldValue, object newValue) { var thisItem = (CardGraphicsXF)bindable; thisItem.MainObject !.CardType = (EnumCardType)newValue; }