public void NewCommitViewer(CommitNodeModel m) { CommitViewerTabViewModel cv; if (CommitViewers.Keys.Contains(m)) { cv = CommitViewers[m]; } else { cv = CreateViewer(m); CommitViewers.Add(m, cv); MainWindowModel.AddTab(cv); } SelectTab(cv); }
public void NewCommitEditor() { if (CommitEditorTab != null) { SelectTab(CommitEditorTab); return; } CommitEditorTabModel m = new CommitEditorTabModel(); m.CloseRequested += CloseTab; m.CommitRequest += Commit; CommitEditorTabViewModel vm = new CommitEditorTabViewModel(m); MainWindowModel.AddTab(vm); SelectTab(vm); }
public void AddMainTab() { if (MainTab != null) { SelectTab(MainTab); return; } MainTabModel m = new MainTabModel(); m.CloseRequested += CloseTab; m.MouseDown += (args) => CanvasMouseDown?.Invoke(null, args); m.MouseUp += (args) => CanvasMouseUp?.Invoke(null, args); m.PanelModel = ActionPanel; MainTabViewModel vm = new MainTabViewModel(m); MainTabModel = m; MainWindowModel.AddTab(vm); SelectTab(vm); }