public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            PresentationSource s = PresentationSource.FromVisual(this);
            zoomDispX = s.CompositionTarget.TransformToDevice.M11;
            zoomDispY = s.CompositionTarget.TransformToDevice.M22;

            PART_Viewer = GetTemplateChild("PART_Viewer") as MatScrollViewer;
            PART_Canvas = GetTemplateChild("PART_Canvas") as Canvas;
            PART_Line = GetTemplateChild("PART_Line") as Line;

            Loaded += MatDataObjectPresenter_Loaded;
            Unloaded += MatDataObjectsPresenter_Unloaded;

            PART_Canvas.DragEnter += PART_Canvas_DragEnter;
            PART_Canvas.Drop += PART_Canvas_Drop;
            PART_Canvas.DragOver += PART_Canvas_DragOver;
        }
Ejemplo n.º 2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.GraphScrollViewer = ((MatGUI.MatScrollViewer)(target));
     return;
     case 2:
     this.GraphCanvas = ((System.Windows.Controls.Canvas)(target));
     return;
     case 3:
     this.TimeBar = ((System.Windows.Shapes.Line)(target));
     return;
     case 4:
     this.ListScrollViewer = ((MatGUI.MatScrollViewer)(target));
     return;
     case 5:
     this.ListStackPanel = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 6:
     this.AnalogLGraph = ((MatGUI.MatGraph)(target));
     return;
     case 7:
     this.AnalogRGraph = ((MatGUI.MatGraph)(target));
     return;
     case 8:
     this.DataList = ((System.Windows.Controls.ComboBox)(target));
     return;
     case 9:
     this.NewButton = ((MatGUI.MatButton)(target));
     return;
     case 10:
     this.InportButton = ((MatGUI.MatButton)(target));
     return;
     case 11:
     this.SaveAsButton = ((MatGUI.MatButton)(target));
     return;
     case 12:
     this.DeleteButton = ((MatGUI.MatButton)(target));
     return;
     case 13:
     this.PlayButton = ((MatGUI.MatButton)(target));
     
     #line 67 "..\..\..\..\..\..\Models\DataFlow\Logger\RemoconLoggerControl.xaml"
     this.PlayButton.Click += new System.Windows.RoutedEventHandler(this.PlayButton_Click);
     
     #line default
     #line hidden
     return;
     case 14:
     this.PauseButton = ((MatGUI.MatButton)(target));
     
     #line 73 "..\..\..\..\..\..\Models\DataFlow\Logger\RemoconLoggerControl.xaml"
     this.PauseButton.Click += new System.Windows.RoutedEventHandler(this.PauseButton_Click);
     
     #line default
     #line hidden
     return;
     case 15:
     this.StopButton = ((MatGUI.MatButton)(target));
     
     #line 79 "..\..\..\..\..\..\Models\DataFlow\Logger\RemoconLoggerControl.xaml"
     this.StopButton.Click += new System.Windows.RoutedEventHandler(this.StopButton_Click);
     
     #line default
     #line hidden
     return;
     case 16:
     this.RecButton = ((MatGUI.MatButton)(target));
     
     #line 85 "..\..\..\..\..\..\Models\DataFlow\Logger\RemoconLoggerControl.xaml"
     this.RecButton.Click += new System.Windows.RoutedEventHandler(this.RecButton_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }