コード例 #1
0
 private void BuyButton_Click(object sender, RoutedEventArgs e)
 {
     if (datagrid_main.SelectedItems.Count > 0)
     {
         var buyWindow = new BuyWindow(this, (BookModel)datagrid_main.SelectedItem);
         buyWindow.Show();
     }
 }
コード例 #2
0
 private void Window_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.F12 && !(datagrid_main.SelectedItem is null))
     {
         var buyWindow = new BuyWindow(this, (BookModel)datagrid_main.SelectedItem);
         buyWindow.Show();
     }
 }