/// <summary> /// Update diagnostics configuration. /// </summary> /// <param name="visualizationObject">Diagnostics visualization object.</param> public void UpdateSettings(PipelineDiagnosticsVisualizationObject visualizationObject) { // convert colors to MSAGL graph colors Func <System.Windows.Media.Color, Color> colorFromMediaColor = (System.Windows.Media.Color color) => new Color(color.R, color.G, color.B); this.model.VisualizationObject = visualizationObject; this.EdgeColor = colorFromMediaColor(visualizationObject.EdgeColor); this.HighlightColor = colorFromMediaColor(visualizationObject.HighlightColor); this.NodeColor = colorFromMediaColor(visualizationObject.NodeColor); this.SourceNodeColor = colorFromMediaColor(visualizationObject.SourceNodeColor); this.SubpipelineColor = colorFromMediaColor(visualizationObject.SubpipelineColor); this.ConnectorColor = colorFromMediaColor(visualizationObject.ConnectorColor); this.JoinColor = colorFromMediaColor(visualizationObject.JoinColor); this.HeatmapColorBase = colorFromMediaColor(visualizationObject.HeatmapColor); this.InfoTextSize = visualizationObject.InfoTextSize; this.ShowExporterConnections = visualizationObject.ShowExporterConnections; this.LabelColorLight = Color.White; this.LabelColorDark = Color.Black; if (visualizationObject.ModelDirty) { this.model.Reset(); visualizationObject.ModelDirty = false; this.VisualGraph = null; this.view.Update(true); } if (this.model.Graph != null) { this.UpdateGraph(this.model.Graph, true); } }
/// <summary> /// Initializes a new instance of the <see cref="PipelineDiagnosticsVisualizationPresenter"/> class. /// </summary> /// <param name="view">Diagnostics view.</param> /// <param name="visualizationObject">Visualization object for this presenter.</param> public PipelineDiagnosticsVisualizationPresenter(PipelineDiagnosticsVisualizationObjectView view, PipelineDiagnosticsVisualizationObject visualizationObject) { this.model = new PipelineDiagnosticsVisualizationModel(); this.view = view; this.UpdateSettings(visualizationObject); }
/// <summary> /// Update diagnostics configuration. /// </summary> /// <param name="visualizationObject">Diagnostics visualization object.</param> public void UpdateSettings(PipelineDiagnosticsVisualizationObject visualizationObject) {