public void Execute(object parameter) { ModuleEditorControl editor = modulesTab.SelectedFactory.CreateNewEditor(modulesTab.Modules); ModulesEditor editorWindow = new ModulesEditor(editor); editor.AddOnSaveAction(() => editorWindow.Close()); editorWindow.ShowDialog(); }
public void Execute(object parameter) { try { ModuleEditorControl editor = modulesTab.ModuleEditorFactories.First(f => f.IsValidModule(modulesTab.SelectedModule)) .CreateEditor(modulesTab.SelectedModule); ModulesEditor editorWindow = new ModulesEditor(editor); editor.AddOnSaveAction(() => editorWindow.Close()); editorWindow.ShowDialog(); } catch { } }