Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }