private void NewDevice_Click(object sender, RoutedEventArgs e) { if(null == _items) { return; } ScreenShortcutEdit editWindow = new ScreenShortcutEdit(); editWindow.Owner = Application.Current.MainWindow; if (editWindow.ShowDialog() == true) { _items.Add(editWindow.Shortcut); } }
private void EditDevice_Click(object sender, RoutedEventArgs e) { ScreenShortcutEdit editWindow = new ScreenShortcutEdit(ScreenShortcutListBox.SelectedItem as t_ScreenShortcut); editWindow.Owner = Application.Current.MainWindow; editWindow.ShowDialog(); }