コード例 #1
0
        private void NewButton_Click(object sender, RoutedEventArgs e)
        {
            EditWindow editWindow = new EditWindow("New Contact");

            editWindow.Show();
            editWindow.Closed += EditWindow_Closed;
        }
コード例 #2
0
 private void EditButton_Click(object sender, RoutedEventArgs e)
 {
     if (!(ContactListBox.SelectedItem is null))
     {
         ContactModel contact    = ContactListBox.SelectedItem as ContactModel;
         EditWindow   editWindow = new EditWindow("Edit Contact", contact);
         editWindow.Show();
         editWindow.Closed += EditWindow_Closed;
     }
 }