Example #1
0
 public void SetPosition(CardPosition position)
 {
     this.position = position;
       //this.Location = new Point((int)position.X, (int)position.Y);
       Point location = new Point((int)(this.Parent.ClientSize.Width * position.X), (int)(this.Parent.ClientSize.Height * position.Y));
       if(!GameView.IsSolitaire)
       {
     var playerView = GameViewHelper.FindParentPlayerView(this);
     if(playerView != null && !playerView.IsActivePlayer)
       location = new Point(location.X,
     this.Parent.ClientSize.Height - location.Y - CardMetricsService.CardRect(CardStyleBehaviorsService.BEHAVIORS_SMALL).Height);
       }
       this.Location = location;
 }
Example #2
0
 void SaveState()
 {
     oldPosition = this.Position.Value;
       oldVisibility = this.Visibility.Value;
       oldReversed = this.Reversed.Value;
       oldLocked = this.Locked.Value;
       oldRotated = this.Rotated.Value;
       oldCustomCharacteristics = this.CustomCharacteristics.Value;
       oldTokens = this.Tokens.ToList();
 }
Example #3
0
 public void SetCardPosition(string key, CardPosition position)
 {
     if(InvokeRequired)
     Invoke(new Action<string, CardPosition>(SetCardPosition), key, position);
       else
       {
     try
     {
       foreach(CardView card in Controls.Find(key, true))
     card.SetPosition(position);
     }
     catch(Exception ex)
     {
       HandleException(ex);
     }
       }
 }