Esempio n. 1
0
 public void DoCloseTab(CommitEditorTabViewModel vm)
 {
     MainWindowModel.RemoveTab(vm);
     vm.Model.CloseRequested -= CloseTab;
     ((CommitEditorTabModel)vm.Model).CommitRequest -= Commit;
     ((CommitEditorTabModel)vm.Model).FreeEvents();
 }
Esempio n. 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);
        }