Пример #1
0
        private void AddCardButton_Click(object sender, RoutedEventArgs e)
        {
            var cardView = new CardViewWindow(this);

            if (cardView.ShowDialog() == true)
            {
                if (cardToReturn != null)
                {
                    cardList.Add(cardToReturn);
                    lbCardList.SelectedIndex = cardList.Count - 1;
                }
            }
        }
Пример #2
0
 private void EditCardButton_Click(object sender, RoutedEventArgs e)
 {
     if (cardList.Count > 0)
     {
         CardContainer selectedCard = cardList.Where(cc => cardList.IndexOf(cc) == lbCardList.SelectedIndex).FirstOrDefault();
         var           cardView     = new CardViewWindow(this, selectedCard.CardObject);
         if (cardView.ShowDialog() == true)
         {
             if (cardToReturn != null)
             {
                 cardList.Insert(lbCardList.SelectedIndex, cardToReturn);
                 cardList.Remove(selectedCard);
             }
         }
     }
 }
 public AskForFlavorQuoteWindow(CardViewWindow cw)
 {
     InitializeComponent();
     CW = cw;
 }