Exemple #1
0
        /// <summary>
        /// Handles the Click event of the addCardButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void addCardButton_Click(object sender, RoutedEventArgs e)
        {
            CardWindow window = new CardWindow();

            if (window.OpenWindowInMode(OpenWindowMode.Add) == true)
            {
                this.selectedGroup.AddCard(new Card(window.CardName, window.CodeJK));
                this.RefreshSelectedGroup();
            }
        }
Exemple #2
0
        /// <summary>
        /// Handles the Click event of the editCardButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void editCardButton_Click(object sender, RoutedEventArgs e)
        {
            CardWindow window = new CardWindow();

            window.CardName = this.selectedCard.Name;
            window.CodeJK   = this.selectedCard.CodeJK;
            if (window.OpenWindowInMode(OpenWindowMode.Edit) == true)
            {
                this.selectedCard.Name   = window.CardName;
                this.selectedCard.CodeJK = window.CodeJK;
                this.RefreshSelectedCard();
            }
        }