/// <summary> /// Opens the Add Item dialog /// </summary> private void OpenAddItem() { ItemEditorWindow addItemWindow = new ItemEditorWindow(fLogic); ((ItemEditorViewModell)addItemWindow.DataContext).Title = "Add new item"; addItemWindow.ShowDialog(); }
/// <summary> /// Edit existing item /// </summary> private void EditItem() { ItemEditorWindow editor = new ItemEditorWindow(fLogic, SelectedItem); var editorViewModell = (ItemEditorViewModell)editor.DataContext; editor.ShowDialog(); }
private void EditItem(Item existing = null) { ItemEditorWindow editor = new ItemEditorWindow(existing); editor.Owner = window; editor.ShowDialog(); if (CurrentQuery != null) { Search(); } }