예제 #1
0
        public void Initialize()
        {
            ClassifierMachineLearning = GetClassifierMachineLearning();
            var classifierFixtureList = new FixtureListClassifier();

            classifierFixtureList.FixtureProfiles = Analysis.FixtureProfiles;

            ClassifierComposite = new CompositeClassifier();
            ClassifierComposite.ClassifierMachineLearning = ClassifierMachineLearning;
            ClassifierComposite.ClassifierFixtureList     = classifierFixtureList;

            Analysis.UndoManager.RenderEvent   = StyledEventsViewer.EventsViewer.LinedEventsCanvas.RenderEvent;
            Analysis.UndoManager.RemovePolygon = StyledEventsViewer.EventsViewer.LinedEventsCanvas.Remove;

            StyledEventsViewer.EventsViewer.LinedEventsCanvas.PropertyChanged += new PropertyChangedEventHandler(EventsCanvas_PropertyChanged);
            GraphToolBar.PropertyChanged += new PropertyChangedEventHandler(GraphToolBar_PropertyChanged);
            CommandPanel.PropertyChanged += new PropertyChangedEventHandler(CommandPanel_PropertyChanged);

            GraphToolBar.Analysis     = Analysis;
            GraphToolBar.FeatureLevel = FeatureLevel;
            GraphToolBar.UndoManager  = Analysis.UndoManager;
            GraphToolBar.ClassifierMachineLearning = ClassifierMachineLearning;
            //GraphToolBar.ClassifierFixtureList = classifierComposite;
            GraphToolBar.Initialize();

            CommandPanel.AnalysisPanel = this;
            CommandPanel.Initialize();

            FixtureProfilesEditor.Analysis = this.Analysis;
            FixtureProfilesEditor.Initialize();

            Binding binding;

            if (Properties.Settings.Default.ShowEventPanelsOnLeft)
            {
                dockEventPanelsHorizontal.Visibility = Visibility.Collapsed;

                SelectedEventPanelVertical.Analysis = Analysis;
                Analysis.Events.PropertyChanged    += new PropertyChangedEventHandler(SelectedEventPanelVertical.Events_PropertyChanged);
                SelectedEventPanelVertical.Initialize();
                binding        = new Binding("Visibility");
                binding.Source = SelectedEventPanelVertical;
                BindingOperations.SetBinding(SeparatorSelectedEventPanelVertical, VisibilityProperty, binding);

                CurrentEventPanelVertical.Analysis = Analysis;
                StyledEventsViewer.EventsViewer.LinedEventsCanvas.PropertyChanged += new PropertyChangedEventHandler(CurrentEventPanelVertical.EventsCanvas_PropertyChanged);
                CurrentEventPanelVertical.ShowSelectedEvent = false;
                CurrentEventPanelVertical.Initialize();
            }
            else
            {
                dockEventPanelsVertical.Visibility = Visibility.Collapsed;

                SelectedEventPanel.Analysis      = Analysis;
                Analysis.Events.PropertyChanged += new PropertyChangedEventHandler(SelectedEventPanel.Events_PropertyChanged);
                SelectedEventPanel.Initialize();
                binding        = new Binding("Visibility");
                binding.Source = SelectedEventPanel;
                BindingOperations.SetBinding(SeparatorSelectedEventPanel, VisibilityProperty, binding);

                CurrentEventPanel.Analysis = Analysis;
                StyledEventsViewer.EventsViewer.LinedEventsCanvas.PropertyChanged += new PropertyChangedEventHandler(CurrentEventPanel.EventsCanvas_PropertyChanged);
                CurrentEventPanel.ShowSelectedEvent = false;
                CurrentEventPanel.Initialize();
                binding        = new Binding("Visibility");
                binding.Source = CurrentEventPanel;
                BindingOperations.SetBinding(SeparatorCurrentEventPanel, VisibilityProperty, binding);
            }

            LogMeter log = Analysis.Log as LogMeter;

            if (log == null)
            {
                LogPropertiesPanel.Visibility = Visibility.Collapsed;
            }
            else
            {
                LogPropertiesPanel.Analysis = Analysis;
                LogPropertiesPanel.Initialize();
            }

            binding        = new Binding("Visibility");
            binding.Source = LogPropertiesPanel;
            BindingOperations.SetBinding(SeparatorLogPanel, VisibilityProperty, binding);

            PieChartsPanel.Analysis = Analysis;
            PieChartsPanel.Initialize();

            binding        = new Binding("Visibility");
            binding.Source = PieChartsPanel;
            BindingOperations.SetBinding(SeparatorPieChartsPanel, VisibilityProperty, binding);

            ReportsPanel.Analysis = Analysis;
            ReportsPanel.Initialize();

            binding        = new Binding("Visibility");
            binding.Source = ReportsPanel;
            BindingOperations.SetBinding(SeparatorReportsPanel, VisibilityProperty, binding);

            FixturesPanel.Analysis = Analysis;
            FixturesPanel.Initialize();

            StyledEventsViewer.EventsViewer.LinedEventsCanvas.ClassifierDisaggregation = ClassifierComposite;
            StyledEventsViewer.Events          = Analysis.Events;
            StyledEventsViewer.ViewportSeconds = ViewportSeconds;
            StyledEventsViewer.ViewportVolume  = ViewportVolume;
            StyledEventsViewer.Initialize();
        }
예제 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.dockPanel = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 2:
                this.StatusBar = ((TraceWizard.TwApp.TwStatusBar)(target));
                return;

            case 3:
                this.dockCommandPanel = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 4:
                this.CommandPanel = ((TraceWizard.TwApp.CommandPanel)(target));
                return;

            case 5:
                this.dockSummaryPanel = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 6:
                this.FixtureProfilesEditor = ((TraceWizard.TwApp.FixtureProfilesEditor)(target));
                return;

            case 7:
                this.SeparatorFixtureProfilesEditor = ((System.Windows.Controls.Separator)(target));
                return;

            case 8:
                this.dockEventPanelsHorizontal = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 9:
                this.SelectedEventPanel = ((TraceWizard.TwApp.EventPanel)(target));
                return;

            case 10:
                this.SeparatorSelectedEventPanel = ((System.Windows.Controls.Separator)(target));
                return;

            case 11:
                this.CurrentEventPanel = ((TraceWizard.TwApp.EventPanel)(target));
                return;

            case 12:
                this.SeparatorCurrentEventPanel = ((System.Windows.Controls.Separator)(target));
                return;

            case 13:
                this.FixturesPanel = ((TraceWizard.TwApp.FixturesPanel)(target));
                return;

            case 14:
                this.SeparatorLogPanel = ((System.Windows.Controls.Separator)(target));
                return;

            case 15:
                this.LogPropertiesPanel = ((TraceWizard.TwApp.LogPropertiesPanel)(target));
                return;

            case 16:
                this.SeparatorPieChartsPanel = ((System.Windows.Controls.Separator)(target));
                return;

            case 17:
                this.PieChartsPanel = ((TraceWizard.TwApp.PieChartsPanel)(target));
                return;

            case 18:
                this.SeparatorReportsPanel = ((System.Windows.Controls.Separator)(target));
                return;

            case 19:
                this.ReportsPanel = ((TraceWizard.TwApp.QuickReportsPanel)(target));
                return;

            case 20:
                this.dockGraphToolBar = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 21:
                this.GraphToolBar = ((TraceWizard.TwApp.GraphToolBar)(target));
                return;

            case 22:
                this.dockEventPanelsVertical = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 23:
                this.SelectedEventPanelVertical = ((TraceWizard.TwApp.EventPanel)(target));
                return;

            case 24:
                this.SeparatorSelectedEventPanelVertical = ((System.Windows.Controls.Separator)(target));
                return;

            case 25:
                this.CurrentEventPanelVertical = ((TraceWizard.TwApp.EventPanel)(target));
                return;

            case 26:
                this.StyledEventsViewer = ((TraceWizard.TwApp.StyledEventsViewer)(target));
                return;
            }
            this._contentLoaded = true;
        }