Пример #1
0
        public void Initialize()
        {
            EventsViewer.Events              = Events;
            EventsViewer.ViewportSeconds     = ViewportSeconds;
            EventsViewer.ViewportVolume      = ViewportVolume;
            EventsViewer.HorizontalRuler     = HorizontalRuler;
            EventsViewer.VerticalRuler       = VerticalRuler;
            EventsViewer.SelectionRuler      = SelectionRuler;
            EventsViewer.ApprovalRuler       = ApprovalRuler;
            EventsViewer.ClassificationRuler = ClassificationRuler;
            EventsViewer.FixturesRuler       = FixturesRuler;

            EventsViewer.Initialize();

            TimeFramePanel.Events = Events;
            TimeFramePanel.Initialize();

            SelectionRuler.Events = Events;
            SelectionRuler.Initialize();

            ApprovalRuler.Events = Events;
            ApprovalRuler.Initialize();

            ClassificationRuler.Events = Events;
            ClassificationRuler.Initialize();

            FixturesRuler.Events          = Events;
            FixturesRuler.ViewportSeconds = ViewportSeconds;
            FixturesRuler.Initialize();

            BindTimeFrameView();
            ScrollViewersSetBindings();

            Events.PropertyChanged += new PropertyChangedEventHandler(Events_PropertyChanged);
        }
Пример #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.TimeFramePanel = ((TraceWizard.TwApp.TimeFramePanel)(target));
                return;

            case 2:
                this.dockFixturesRuler = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 3:
                this.FixturesRuler = ((TraceWizard.TwApp.FixturesRuler)(target));
                return;

            case 4:
                this.dockApprovalRuler = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 5:
                this.ApprovalRuler = ((TraceWizard.TwApp.ApprovalRuler)(target));
                return;

            case 6:
                this.dockClassificationRuler = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 7:
                this.ClassificationRuler = ((TraceWizard.TwApp.ClassificationRuler)(target));
                return;

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

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

            case 10:
                this.HorizontalRuler = ((TraceWizard.TwApp.HorizontalRuler)(target));
                return;

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

            case 12:
                this.EventsViewer = ((TraceWizard.TwApp.EventsViewer)(target));
                return;
            }
            this._contentLoaded = true;
        }
        public void BringRowIntoViewLow(FixtureProfileRow row)
        {
            double percentElapsed = ((double)StackPanelRows.Children.IndexOf(row) + 1) / (double)StackPanelRows.Children.Count;

            if (((percentElapsed * StackPanelRows.ActualHeight) - ScrollViewer.ActualHeight / 2) >= (StackPanelRows.ActualHeight - ScrollViewer.ActualHeight))
            {
                ScrollViewer.ScrollToEnd();
            }
            else
            {
                ScrollViewer.ScrollToVerticalOffset(EventsViewer.Between(0, StackPanelRows.ActualHeight - ScrollViewer.ActualHeight, ((percentElapsed * StackPanelRows.ActualHeight) - ScrollViewer.ActualHeight / 2)));
            }
        }
Пример #4
0
        int GetSecondsOffsetEndTimeView(EventsViewer eventsViewer, Events events)
        {
            double percentElapsed = ((eventsViewer.ScrollViewer.HorizontalOffset + eventsViewer.ScrollViewer.ViewportWidth) / eventsViewer.LinedEventsCanvas.Width);

            return((int)(percentElapsed * events.Duration.TotalSeconds));
        }
Пример #5
0
 void RedrawVolumesChanged()
 {
     EventsViewer.ScrollChanged(true);
     EventsViewer.RestoreHorizontalScrollPosition(EventsViewer.UndoPosition);
 }
Пример #6
0
 public double GetViewportSeconds()
 {
     return(EventsViewer.GetViewportSeconds(Properties.Settings.Default.ViewportSeconds));
 }