AnalysisPanel CreateAnalysisPanel(Analysis analysis, string fileName, Disaggregator disaggregator, bool showAnalyzer, double viewportSeconds, double viewportVolume) { var toolTip = TwGui.CreateAnalyzerToolTip(disaggregator.GetType(), disaggregator); return(CreateAnalysisPanel(analysis, fileName, showAnalyzer ? disaggregator.Name : null, toolTip)); }
void Populate() { var classifiers = TwClassifiers.CreateClassifiers(); for (int i = 0; i < classifiers.Count; i++) { var classifier = classifiers[i]; int column = 0; grid.RowDefinitions.Add(new RowDefinition()); var button = new CheckBox(); button.Padding = new Thickness(4, 0, 4, 4); button.Margin = new Thickness(4); button.VerticalAlignment = VerticalAlignment.Top; button.VerticalContentAlignment = VerticalAlignment.Top; button.Tag = classifier; button.Content = classifier.Name; button.ToolTip = TwGui.CreateAnalyzerToolTip(classifier.GetType(), classifier); if (!TwClassifiers.CanLoad(classifier) || classifier is FixtureListClassifier) { button.IsEnabled = false; } Grid.SetRow(button, i); Grid.SetColumn(button, column++); grid.Children.Add(button); var description = new TextBlock(); description.TextWrapping = TextWrapping.Wrap; description.MaxWidth = 200; description.Padding = new Thickness(4, 0, 4, 4); description.Margin = new Thickness(4); description.VerticalAlignment = VerticalAlignment.Top; description.Text = classifier.Description; Grid.SetRow(description, i); Grid.SetColumn(description, column++); grid.Children.Add(description); } }
public void Load(Traces traces) { Traces = traces; InitUserControl(); DockPanel dockPanel = new DockPanel(); dockPanel.Background = Brushes.White; DockPanel.SetDock(aggregatePanel = CreateAggregatePanel(), Dock.Bottom); dockPanel.Children.Add(aggregatePanel); DockPanel.SetDock(gridOuter = CreateGrid(), Dock.Bottom); dockPanel.Children.Add(gridOuter); this.Content = WrapWithLabel(dockPanel, traces.Classifier.Name, TwGui.CreateAnalyzerToolTip(traces.Classifier.GetType(), traces.Classifier), traces.Adopter.Name, TwGui.CreateAnalyzerToolTip(traces.Adopter.GetType(), traces.Adopter), System.IO.Path.GetDirectoryName(traces.FilesLoaded[0]), CreateElementFiles(traces.FilesLoaded)); PopulateRowLabel(); PopulateColumnLabel(); CreateDisplayModeSelector(); CreateRowAndColumnHeaders(); PopulateRowHeaders(); PopulateColumnHeaders(); PopulateRows(); RenderRows(); PopulateFixturesColumnNoText(); PopulateFixturesRowNoText(); PopulateStatistics(); PopulateAggregatePanel(); }