private void AddDefaultAppMenu(ShOnAppLoadCompletedEvent obj) { AddFileMenu(ShAppMenuIds.File); AddViewMenu(ShAppMenuIds.View); AddToolsMenu(ShAppMenuIds.Tools); AddHelpMenu(ShAppMenuIds.Help); }
private void OnAppLoadCompleted(ShOnAppLoadCompletedEvent obj) { var dataSerializationService = ShServiceContainer.Instance.GetAppDataService <ShSerializationDataService>(); var dataPersistanceService = ShServiceContainer.Instance.GetAppDataService <ShAppPersistentStorageDataService>(); var appSetting = dataPersistanceService.LoadTextData("app-options.config"); if (!string.IsNullOrEmpty(appSetting)) { CurrentOptions = dataSerializationService.Deserialize(typeof(MetaPackOptions), appSetting) as MetaPackOptions; } LoadNuGetConnections(); LoadSharePointConnections(); LoadSettings(); }
private void OnAppLoad(ShOnAppLoadCompletedEvent obj) { RaiseEvent(new ShAddAppViewWindowEvent { ViewWindowControl = new ShAppViewWindowControlDefinition { Id = new Guid("BFE433EC-2234-426F-8F76-0815A08F566B"), Title = "Home", AssemblyQualifiedName = typeof(StartPageViewControl).AssemblyQualifiedName } }); RaiseEvent(new ShAddAppViewWindowEvent { ViewWindowControl = new ShAppViewWindowControlDefinition { Id = new Guid("145EFE42-A240-49FD-8541-4145AD16D3FF"), Title = "Installed packages", AssemblyQualifiedName = typeof(InstalledPackagesViewControl).AssemblyQualifiedName } }); RaiseEvent(new ShAddAppViewWindowEvent { ViewWindowControl = new ShAppViewWindowControlDefinition { Id = new Guid("0A8401EE-A00A-4101-9E9E-20C2332FE294"), Title = "Available packages", AssemblyQualifiedName = typeof(AvailablePackagesViewControl).AssemblyQualifiedName } }); RaiseEvent(new ShAddAppViewWindowEvent { ViewWindowControl = new ShAppViewWindowControlDefinition { Id = new Guid("0A8401EE-A00A-4101-9E9E-20C2332FE294"), Title = "Options", //AssemblyQualifiedName = typeof(WfOutputControl).AssemblyQualifiedName, Click = (sender, args) => { MpCommands.Instance.ShowOptionsWindow(); args.Cancel = true; } } }); RaiseEvent(new ShAddAppViewWindowEvent { ViewWindowControl = new ShAppViewWindowControlDefinition { Id = new Guid("0A8401EE-A00A-4101-9E9E-20C2332FE294"), Title = "About", //AssemblyQualifiedName = typeof(WfOutputControl).AssemblyQualifiedName, Click = (sender, args) => { MpCommands.Instance.ShowAboutWindow(); args.Cancel = true; } } }); }
//private void AddDocumentTab(SolutionItemEvent e, object workspaceItem) //{ // var view = tvDocuments; // var controlTypeValue = e.ControlType; // if (string.IsNullOrEmpty(controlTypeValue)) // { // // TODO // //var controlEvent = new GetWorkspaceItemDocumentControlEvent // //{ // // WorkspaceItem = workspaceItem // //}; // //RaiseEvent(controlEvent); // //controlTypeValue = controlEvent.ControlType; // } // if (controlTypeValue == null) // return; // var document = view.Documents // .FirstOrDefault(p => (p.Control is ISolutionItemEditorControl) // && (p.Control.Tag == workspaceItem)); // view.BeginUpdate(); // if (document == null) // { // var type = controlTypeValue; // var controlType = Type.GetType(type); // var control = Activator.CreateInstance(controlType) as ISolutionItemEditorControl; // if (control is Control) // document = view.AddDocument(control as Control); // control.SolutionItemTag = workspaceItem; // control.SolutionItem = workspaceItem; // document.Tag = workspaceItem; // document.Caption = control.SolutionItemTitle; // } // view.Controller.Activate(document); // view.EndUpdate(); //} private void AppLoadCompleted(ShOnAppLoadCompletedEvent e) { //RestoreDockingLayout(); _postInitialiseActions.ForEach(a => a()); }
private void AppLoadCompleted(ShOnAppLoadCompletedEvent e) { }