Example #1
0
        /// <summary>
        /// Handles the Click event of the btnAdd control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            winAddLetter add = new winAddLetter();
            add.ShowDialog();

            Init();
        }
 /// <summary>
 /// Handles the Click event of the btnEdit control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
 private void btnEdit_Click(object sender, RoutedEventArgs e)
 {
     if (lsvLetters.SelectedItem != null)
     {
         winAddLetter add = new winAddLetter();
         add.ToEdit = (Letter)lsvLetters.SelectedItem;
         add.ShowDialog();
         Init();
     }
 }