protected override async void OnViewLoaded(object view) { ToolPanelsContent.ActivateItem(IoC.Get <IOutput>()); if (Properties.Settings.Default.ShowNavigationPanelOnOpen) { ShellLayoutController.Current.LeftContentIsVisible = true; } if (Properties.Settings.Default.ShowStartPageOnOpen) { await MainContent.OpenDocument <IStartupDocument>(); } if (Properties.Settings.Default.Diagnostics_ShowManagedMemory) { StatusBarContent.ActivateContent(new MemoryUsageStatusButton().Start(), StatusBarContentLocation.Right); } CommandManager.InvalidateRequerySuggested(); if (!AppConstants.IsDebug) { _ = Task.Delay(TimeSpan.FromSeconds(30)) .ContinueWith(task => { OnUIThread(async() => await AppUpdateManager.Current.CheckForUpdates(false)); }) .ConfigureAwait(false); } }
private async void MainContentOnActiveDocumentChanged(object sender, EventArgs e) { if (!MainContent.Documents.Any() && Properties.Settings.Default.ShowStartOnCloseAll) { await MainContent.OpenDocument <IStartupDocument>(); } }
protected override async void OnViewLoaded(object view) { if (Properties.Settings.Default.ShowStartPageOnOpen) { await MainContent.OpenDocument <IStartupDocument>(); } }
public ShellViewModel() { DisplayName = "LiteDB Explorer"; WindowMenu = IoC.Get <IShellMenu>(); WindowRightMenu = IoC.Get <IShellRightMenu>(); StatusBarContent = IoC.Get <IShellStatusBar>(); LeftContent = IoC.Get <IDocumentExplorer>(); MainContent = IoC.Get <IDocumentSet>(); var initialDocument = MainContent.NewDocumentFactory(); if (initialDocument != null) { MainContent.OpenDocument(initialDocument); } MainContent.ActiveDocumentChanged += (sender, args) => { if (!MainContent.Documents.Any() && initialDocument != null) { MainContent.OpenDocument(initialDocument); } }; }
public ShellViewModel() { DisplayName = "LiteDB Explorer"; WindowMenu = IoC.Get <IShellMenu>(); WindowRightMenu = IoC.Get <IShellRightMenu>(); StatusBarContent = IoC.Get <IShellStatusBar>(); LeftContent = IoC.Get <IDocumentExplorer>(); MainContent = IoC.Get <IDocumentSet>(); if (Properties.Settings.Default.ShowStartPageOnOpen) { MainContent.OpenDocument <IStartupDocument>(); } MainContent.ActiveDocumentChanged += (sender, args) => { if (!MainContent.Documents.Any() && Properties.Settings.Default.ShowStartOnCloseAll) { MainContent.OpenDocument <IStartupDocument>(); } }; }
protected override async void OnViewLoaded(object view) { if (Properties.Settings.Default.ShowStartPageOnOpen) { await MainContent.OpenDocument <IStartupDocument>(); } if (Properties.Settings.Default.Diagnostics_ShowManagedMemory) { StatusBarContent.ActivateContent(new MemoryUsageStatusButton().Start(), StatusBarContentLocation.Right); } BottomToolPanels.ActivateItem(IoC.Get <IOutput>()); }
public ShellViewModel() { DisplayName = "LiteDB Explorer"; WindowMenu = IoC.Get <IShellMenu>(); WindowRightMenu = IoC.Get <IShellRightMenu>(); StatusBarContent = IoC.Get <IShellStatusBar>(); LeftContent = IoC.Get <IDocumentExplorer>(); MainContent = IoC.Get <IDocumentSet>(); MainContent.OpenDocument(MainContent.NewDocumentFactory()); }
private async void MainContentOnDocumentDeactivated(object sender, DocumentDeactivateEventArgs e) { if (!e.Close) { return; } if (!MainContent.Documents.Any() && Properties.Settings.Default.ShowStartOnCloseAll) { if (e.Item is IStartupDocument) { return; } await MainContent.OpenDocument <IStartupDocument>(); } }
protected override async void OnViewLoaded(object view) { ToolPanelsContent.ActivateItem(IoC.Get <IOutput>()); if (Properties.Settings.Default.ShowNavigationPanelOnOpen) { ShellLayoutController.Current.LeftContentIsVisible = true; } if (Properties.Settings.Default.ShowStartPageOnOpen) { await MainContent.OpenDocument <IStartupDocument>(); } if (Properties.Settings.Default.Diagnostics_ShowManagedMemory) { StatusBarContent.ActivateContent(new MemoryUsageStatusButton().Start(), StatusBarContentLocation.Right); } CommandManager.InvalidateRequerySuggested(); }