void AddTab(Object obj) { ClosableModuleItem tab = UIManager.GenerateTab(); _mwvm.Tabs.Add(tab); tab.Focus(); }
// utility Boolean testSaved(ClosableModuleItem tab) { if (tab == null || tab.IsSaved || tab.Module == null) { return(true); } tab.Focus(); MessageBoxResult mbxResult = Utils.MsgBox("PS Cmdlet Help Editor", Strings.InfoSaveRequired, MessageBoxImage.Warning, MessageBoxButton.YesNoCancel); switch (mbxResult) { case MessageBoxResult.Yes: SaveProjectFile(null); return(true); case MessageBoxResult.No: return(true); case MessageBoxResult.Cancel: return(false); } return(true); }