Ejemplo n.º 1
0
 public void RegisterHub(ViewHub hub)
 {
     hub.AnalysisStarted += () => OnAnalysisStarted();
     hub.MetricsReady    += m => OnAnalysisFinished(m);
     if (hub.MostRecentMetrics != null)
     {
         OnAnalysisFinished(hub.MostRecentMetrics);
     }
 }
Ejemplo n.º 2
0
        public static FrameworkElement CreateTypeCycles(ViewHub hub)
        {
            var typeCyclesView      = new View.TypeCycles();
            var typeCyclesViewModel = new ViewModels.TypeCycles.TypeCycles {
                Dispatchable = typeCyclesView
            };

            typeCyclesViewModel.RegisterHub(hub);
            typeCyclesView.DataContext = typeCyclesViewModel;
            return(typeCyclesView);
        }
Ejemplo n.º 3
0
        public static FrameworkElement CreateGraphs(ViewHub hub)
        {
            var graphsView      = new View.Graphs();
            var graphsViewModel = new ViewModels.Graphs.Graphs {
                Dispatchable = graphsView
            };

            graphsViewModel.RegisterHub(hub);
            graphsView.DataContext = graphsViewModel;
            return(graphsView);
        }
Ejemplo n.º 4
0
        public static FrameworkElement CreateCurrent(ViewHub hub)
        {
            var currentView      = new View.Current();
            var currentViewModel = new ViewModels.Current.Current {
                Dispatchable = currentView
            };

            currentViewModel.RegisterHub(hub);
            currentView.DataContext = currentViewModel;
            return(currentView);
        }
Ejemplo n.º 5
0
        public static FrameworkElement CreateDistributions(ViewHub hub)
        {
            var distributionsView      = new View.Distributions();
            var distributionsViewModel = new ViewModels.Distributions.Distributions {
                Dispatchable = distributionsView
            };

            distributionsViewModel.RegisterHub(hub);
            distributionsView.DataContext = distributionsViewModel;
            return(distributionsView);
        }
Ejemplo n.º 6
0
        public static FrameworkElement CreateCockpit(ViewHub hub, IJumpToSource jumpToSource)
        {
            var cockpitView      = new View.Cockpit();
            var cockpitViewModel = new ViewModels.Cockpit.Cockpit {
                Dispatchable = cockpitView
            };

            cockpitViewModel.RegisterHub(hub);
            cockpitViewModel.SourceLocating = jumpToSource;
            cockpitView.DataContext         = cockpitViewModel;
            return(cockpitView);
        }
Ejemplo n.º 7
0
        public static FrameworkElement CreateSQI(ViewHub hub, IKnowSqiDetails sqiDetails)
        {
            var sqiView      = new View.SQI();
            var sqiViewModel = new ViewModels.SQI.SQI {
                Dispatchable = sqiView
            };

            sqiViewModel.Details = sqiDetails;
            sqiViewModel.RegisterHub(hub);
            sqiView.DataContext = sqiViewModel;
            return(sqiView);
        }
Ejemplo n.º 8
0
        public static FrameworkElement CreateHotspots(ViewHub hub, IJumpToSource jumpToSource)
        {
            var hotspotsView      = new View.Hotspots();
            var hotspotsViewModel = new ViewModels.Hotspots.Hotspots {
                Dispatchable = hotspotsView
            };

            hotspotsViewModel.RegisterHub(hub);
            hotspotsViewModel.SourceLocating = jumpToSource;
            hotspotsView.DataContext         = hotspotsViewModel;
            return(hotspotsView);
        }
Ejemplo n.º 9
0
 public ShellViewModel()
 {
     Hub = ViewHub.Instance;
 }