Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the CardInHand class.
 /// </summary>
 /// <param name="Parent">Placeholder for the Parent object.</param>
 /// <param name="MasterParent">Placeholder for the Master Parent object.</param>
 /// <param name="BaseCard">The card in which to hold this class's data.</param>
 public CardInHand(PlayerHandViewModel Parent, TableViewModel MasterParent, Card BaseCard)
 {
     m_Parent = Parent;
     m_MasterParent = MasterParent;
     m_Card = BaseCard;
     if (!m_MasterParent.HouseRulesVM.FastMode) { OnPropertyChanged("CardImage"); }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the PlayerViewModel class.
 /// </summary>
 /// <param name="Parent">Placeholder for the parent object.</param>
 /// <param name="PlayerNum">Indicates the player number.</param>
 public PlayerViewModel(TableViewModel Parent, int PlayerNum)
 {
     m_MasterParent = Parent;
     m_PlayerModel = new PlayerModel();
     PlayerHandVM = new PlayerHandViewModel[4];
     PlayerHandVM[0] = new PlayerHandViewModel(m_MasterParent, this);
     PlayerHandVM[1] = new PlayerHandViewModel(m_MasterParent, this);
     PlayerHandVM[2] = new PlayerHandViewModel(m_MasterParent, this);
     PlayerHandVM[3] = new PlayerHandViewModel(m_MasterParent, this);
     m_PlayerModel.Name = String.Format("Player {0}", PlayerNum);
 }
 /// <summary>
 /// Initializes a new instance of the PlayerStrategyViewModel class.
 /// </summary>
 /// <param name="Parent">Placeholder for the parent object.</param>
 /// <param name="ParentPHVM">Placeholder for the parent player hand view model object.</param>
 public PlayerStrategyViewModel(TableViewModel Parent, PlayerHandViewModel ParentPHVM)
 {
     m_Parent = Parent;
     m_ParentPlayerHandViewModel = ParentPHVM;
     m_PlayerStrategyModel = new PlayerStrategyModel();
 }
 private void PlayerTableHandUC_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     m_PlayerHandViewModel = (PlayerHandViewModel)DataContext;
 }