Esempio n. 1
0
 private void CardView_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         fullform = new FullCard(card);
         fullform.StartPosition = FormStartPosition.Manual;
         fullform.Location      = new Point(owner.Location.X + owner.Size.Width, owner.Location.Y);
         fullform.Show();
     }
 }
Esempio n. 2
0
 private void lbCards_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (lbCards.SelectedIndex == -1)
     {
         return;
     }
     if (c == null || c.IsDisposed)
     {
         Card findedCard = CardBase.Instance.Cards.Find(x => x == lbCards.SelectedItem);
         if (findedCard != null)
         {
             c = new FullCard(findedCard);
         }
     }
     else
     {
         c.LoadCard(CardBase.Instance.Cards.Find(x => x == lbCards.SelectedItem));
     }
     if (c != null && !c.Visible)
     {
         c.Show(this);
         c.Location = new Point(this.Location.X + this.Width, this.Location.Y);
     }
 }