Example #1
0
 public void DoCloseTab(MainTabViewModel vm)
 {
     MainWindowModel.RemoveTab(vm);
     vm.Model.CloseRequested -= CloseTab;
     vm.Model.MouseDown      -= (args) => CanvasMouseDown?.Invoke(null, args);
     vm.Model.MouseUp        -= (args) => CanvasMouseUp?.Invoke(null, args);
 }
Example #2
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);
        }