private void EditToolButton_Click(object sender, RoutedEventArgs e) { if (ToolDataGrid.SelectedItem is Tool tool) { var id = tool.Id; var createWindow = new EditTool(id); createWindow.ShowDialog(); } }
private void CreateToolButton_Click(object sender, RoutedEventArgs e) { var createWindow = new EditTool(0); createWindow.ShowDialog(); }