コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: GSmanXVI/Contact
 private void AddMenuItem_Click(object sender, RoutedEventArgs e)
 {
     _studentAdd = new StudentAdd
     {
         UpdateBtn = { IsEnabled = false },
         SaveBtn   = { IsEnabled = true }
     };
     _studentAdd.ShowDialog();
     StudentlistBox.ItemsSource = StudentList;
     CountLabel.Content         = StudentList.Count;
 }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: GSmanXVI/Contact
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (StudentlistBox.SelectedItem != null)
     {
         _studentAdd = new StudentAdd
         {
             SaveBtn   = { IsEnabled = false },
             UpdateBtn = { IsEnabled = true }
         };
         _studentAdd.ShowDialog();
     }
     else
     {
         MessageBox.Show("You not selected item!");
     }
 }