public void AddTab(AnalysisPanel analysisPanel, string fileName) { analysisPanel.PropertyChanged += new PropertyChangedEventHandler(analysisPanel_PropertyChanged); analysisPanel.Analysis.Events.PropertyChanged += new PropertyChangedEventHandler(events_PropertyChanged); analysisPanel.Analysis.Events.IsDirty = false; AddTab(CreateTabItemHeader(analysisPanel, fileName), analysisPanel, analysisPanel.StyledEventsViewer.EventsViewer.ScrollViewer, false); }
UIElement CreateTabItemHeader(AnalysisPanel analysisPanel, string fileNameIn) { string fileName = string.IsNullOrEmpty(analysisPanel.SaveFileName) ? fileNameIn : analysisPanel.SaveFileName; StackPanel stackPanel = new StackPanel(); stackPanel.Orientation = Orientation.Horizontal; stackPanel.Margin = new Thickness(2, 1, 0, 0); Image image = new Image(); image.Style = (Style)FindResource("ImageStyle"); image.Source = TwGui.GetImage("trace.png"); image.Margin = new Thickness(0); stackPanel.Children.Add(image); TextBlock textBlock = new TextBlock(); textBlock.Margin = new Thickness(4, 0, 0, 0); textBlock.Text = System.IO.Path.GetFileNameWithoutExtension(fileName); stackPanel.Children.Add(textBlock); stackPanel.ToolTip = fileName; return(stackPanel); }
AnalysisPanel CreateAnalysisPanel(Analysis analysis, string fileName, string analyzer, UIElement analyzerToolTip) { var analysisPanel = new AnalysisPanel(); analysisPanel.ViewportSeconds = GetViewportSeconds(); analysisPanel.ViewportVolume = EventsViewer.VolumeTen; analysisPanel.Analysis = analysis; analysisPanel.FeatureLevel = featureLevel; analysisPanel.Initialize(); return(analysisPanel); }
void DoFullScreen(bool full, AnalysisPanel analysisPanel) { analysisPanel.StyledEventsViewer.TimeFramePanel.Visibility = BoolToVisibility(full); analysisPanel.StyledEventsViewer.dockFixturesRuler.Visibility = BoolToVisibility(full); analysisPanel.StyledEventsViewer.dockApprovalRuler.Visibility = BoolToVisibility(full); analysisPanel.StyledEventsViewer.dockClassificationRuler.Visibility = BoolToVisibility(full); analysisPanel.StyledEventsViewer.dockSelectionRuler.Visibility = BoolToVisibility(full); analysisPanel.dockGraphToolBar.Visibility = BoolToVisibility(full); analysisPanel.dockCommandPanel.Visibility = BoolToVisibility(full); analysisPanel.dockSummaryPanel.Visibility = BoolToVisibility(full); analysisPanel.StatusBar.Visibility = BoolToVisibility(full); }
Analysis GetCurrentAnalysis() { AnalysisPanel analysisPanel = GetCurrentAnalysisPanel(); if (analysisPanel != null) { return(analysisPanel.Analysis); } else { return(null); } }
void BackupSave(TabItem tabItem) { AnalysisPanel analysisPanel = tabItem.Content as AnalysisPanel; if (analysisPanel == null) { return; } Analysis analysis = analysisPanel.Analysis; AnalysisDatabase analysisDatabase = analysis as AnalysisDatabase; if (analysisDatabase == null) { return; } BackupSave(analysisDatabase); }
public AnalysisPanel GetCurrentAnalysisPanel() { TabItem tabItem = null; foreach (TabItem item in TabControl.Items) { if (item.IsSelected == true) { tabItem = item; break; } } if (tabItem == null) { return(null); } AnalysisPanel analysisPanel = tabItem.Content as AnalysisPanel; return(analysisPanel); }