Пример #1
0
        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);
                }
            };
        }
Пример #2
0
        public ShellViewModel()
        {
            DisplayName = $"LiteDB Explorer {Versions.CurrentVersion}";

            WindowMenu = IoC.Get <IShellMenu>();

            StatusBarContent = IoC.Get <IShellStatusBar>();

            LeftContent = IoC.Get <IDocumentExplorer>();

            MainContent = IoC.Get <IDocumentSet>();

            MainContent.Documents.Add(MainContent.NewDocumentFactory());
        }
Пример #3
0
        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());
        }