示例#1
0
 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);
 }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
 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);
 }
示例#5
0
        Analysis GetCurrentAnalysis()
        {
            AnalysisPanel analysisPanel = GetCurrentAnalysisPanel();

            if (analysisPanel != null)
            {
                return(analysisPanel.Analysis);
            }
            else
            {
                return(null);
            }
        }
示例#6
0
        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);
        }
示例#7
0
        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);
        }