Example #1
0
        protected override void ViewCreated(Window view)
        {
            var screenContent = this.View.FindName <DocumentContent>("screenContent");

            screenContent.Content = screenViewModel.CreateView();
            this.screen           = screenViewModel;

            var profilerContent = this.View.FindName <DocumentContent>("profilerContent");

            profilerContent.Content = profilerViewModel.CreateView();

            this.updateTimer = new DispatcherTimer(
                interval: TimeSpan.FromMilliseconds(100),
                priority: DispatcherPriority.Normal,
                callback: delegate { UpdateProfilerStatistics(); },
                dispatcher: this.View.Dispatcher);

            this.updateTimer.Stop();

            this.View.SourceInitialized += (s, e) =>
            {
                Storage.RestoreWindowLayout(this.View);
            };

            var dockManager = this.View.FindName <DockingManager>("dockManager");

            dockManager.Loaded += (s, e) =>
            {
                Storage.SaveDockingLayout(dockManager, "original");
                Storage.RestoreDockingLayout(dockManager);
            };

            this.View.Closing += (s, e) =>
            {
                storyService.CloseStory();
                Storage.SaveDockingLayout(dockManager);
                Storage.SaveWindowLayout(this.View);
            };
        }
Example #2
0
        protected override void ViewCreated(Window view)
        {
            var storyInfoContent = this.View.FindName <DockableContent>("storyInfoContent");

            storyInfoContent.Content = this.storyInfoViewModel.CreateView();

            var memoryMapContent = this.View.FindName <DockableContent>("memoryMapContent");

            memoryMapContent.Content = this.memoryMapViewModel.CreateView();

            var globalsContent = this.View.FindName <DockableContent>("globalsContent");

            globalsContent.Content = this.globalsViewModel.CreateView();

            var disassemblyContent = this.View.FindName <DocumentContent>("disassemblyContent");

            disassemblyContent.Content = this.disassemblyViewModel.CreateView();

            var objectsContent = this.View.FindName <DocumentContent>("objectsContent");

            objectsContent.Content = this.objectsViewModel.CreateView();

            //var memoryContent = this.View.FindName<DocumentContent>("memoryContent");
            //memoryContent.Content = ViewModelWithView.Create<MemoryViewModel, UserControl>();

            var localsContent = this.View.FindName <DockableContent>("localsContent");

            localsContent.Content = this.localsViewModel.CreateView();

            var callStackContent = this.View.FindName <DockableContent>("callStackContent");

            callStackContent.Content = this.callStackViewModel.CreateView();

            var outputContent = this.View.FindName <DockableContent>("outputContent");

            outputContent.Content = this.outputViewModel.CreateView();

            var messagesContent = this.View.FindName <DockableContent>("messagesContent");

            messagesContent.Content = this.messageLogViewModel.CreateView();

            this.View.SourceInitialized += (s, e) =>
            {
                Storage.RestoreWindowLayout(this.View);
            };

            var dockManager = this.View.FindName <DockingManager>("dockManager");

            dockManager.Loaded += (s, e) =>
            {
                Storage.SaveDockingLayout(dockManager, "original");
                Storage.RestoreDockingLayout(dockManager);
            };

            this.View.Closing += (s, e) =>
            {
                storyService.CloseStory();
                Storage.SaveDockingLayout(dockManager);
                Storage.SaveWindowLayout(this.View);
            };
        }