public void RegisterHub(ViewHub hub)
 {
     hub.AnalysisStarted += () => OnAnalysisStarted();
     hub.MetricsReady += m => OnAnalysisFinished(m);
     if (hub.MostRecentMetrics != null)
         OnAnalysisFinished(hub.MostRecentMetrics);
 }
Exemple #2
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;
 }
Exemple #3
0
 public static FrameworkElement CreateCockpit(ViewHub hub)
 {
     var cockpitView = new View.Cockpit();
     var cockpitViewModel = new ViewModels.Cockpit.Cockpit { Dispatchable = cockpitView };
     cockpitViewModel.RegisterHub(hub);
     cockpitView.DataContext = cockpitViewModel;
     return cockpitView;
 }
Exemple #4
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;
		}
Exemple #5
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;
		}
Exemple #6
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;
 }
Exemple #7
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;
 }
Exemple #8
0
 public static FrameworkElement CreateCurrent(ViewHub hub, Action<Action<LineLocation>> lineRequestor)
 {
     var currentView = new View.Current();
     var currentViewModel = new ViewModels.Current.Current { Dispatchable = currentView };
     currentViewModel.RegisterHub(hub);
     lineRequestor(currentViewModel.RequestLineHandler());
     currentView.DataContext = currentViewModel;
     return currentView;
 }