Пример #1
0
        public KinectPaintListBoxItem(KinectPaintListBox listBox)
        {
            _listbox = listBox;

            KinectCursor.AddCursorEnterHandler(this, OnCursorEnter);
            KinectCursor.AddCursorLeaveHandler(this, OnCursorLeave);
        }
Пример #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public ImageChooseButton()
        {
            KinectCursor.AddCursorEnterHandler(this, OnCursorEnter);
            KinectCursor.AddCursorLeaveHandler(this, OnCursorLeave);

            // Get the automation peer that can invoke this button properly.
            _invoker = (IInvokeProvider)UIElementAutomationPeer.CreatePeerForElement(this).GetPattern(PatternInterface.Invoke);
        }
Пример #3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 15 "..\..\..\MainWindow.xaml"
                ((Microsoft.Kinect.Samples.KinectPaint.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.MainWindow_Loaded);

            #line default
            #line hidden

            #line 16 "..\..\..\MainWindow.xaml"
                ((Microsoft.Kinect.Samples.KinectPaint.MainWindow)(target)).Closed += new System.EventHandler(this.Window_Closed);

            #line default
            #line hidden
                return;

            case 2:
                this.PART_PaintCanvas = ((System.Windows.Controls.Grid)(target));

            #line 34 "..\..\..\MainWindow.xaml"
                this.PART_PaintCanvas.SizeChanged += new System.Windows.SizeChangedEventHandler(this.PART_PaintCanvas_SizeChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.PART_KinectVideo = ((System.Windows.Controls.Image)(target));
                return;

            case 4:
                this.PART_LoadedImageDisplay = ((System.Windows.Controls.Image)(target));
                return;

            case 5:
                this.PART_ColorPickerListBox = ((Microsoft.Kinect.Samples.KinectPaint.KinectPaintListBox)(target));
                return;

            case 6:
                this.PART_SelectSize = ((Microsoft.Kinect.Samples.KinectPaint.KinectPaintListBox)(target));
                return;

            case 7:
                this.PART_SelectBrush = ((System.Windows.Controls.WrapPanel)(target));
                return;

            case 8:
                this.MENU = ((System.Windows.Controls.WrapPanel)(target));
                return;

            case 9:
                this.Btn_Save = ((Microsoft.Kinect.Samples.KinectPaint.KinectPaintButton)(target));
                return;

            case 10:
                this.Btn_load = ((Microsoft.Kinect.Samples.KinectPaint.KinectPaintButton)(target));
                return;

            case 11:
                this.Btn_New = ((Microsoft.Kinect.Samples.KinectPaint.KinectPaintButton)(target));
                return;

            case 12:
                this.Btn_quit = ((Microsoft.Kinect.Samples.KinectPaint.KinectPaintButton)(target));
                return;

            case 13:
                this.Image_Menu = ((System.Windows.Controls.Image)(target));
                return;

            case 14:
                this.PART_SaveMessage = ((System.Windows.Controls.Grid)(target));
                return;

            case 15:
                this.PART_PopupDisplay = ((System.Windows.Controls.ContentControl)(target));
                return;

            case 16:
                this.PART_Cursor = ((Microsoft.Kinect.Samples.KinectPaint.KinectCursor)(target));
                return;

            case 17:
                this.PART_ErrorText = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="cursor">The cursor interacting with the element</param>
 /// <param name="routedEvent">The event being raised</param>
 /// <param name="source">The element raising the event</param>
 public CursorEventArgs(KinectCursor cursor, RoutedEvent routedEvent, object source) : base(routedEvent, source)
 {
     _cursor    = cursor;
     _timestamp = Environment.TickCount;
 }
Пример #5
0
 public KinectPaintButton()
 {
     KinectCursor.AddCursorEnterHandler(this, OnCursorEnter);
     KinectCursor.AddCursorLeaveHandler(this, OnCursorLeave);
     _invoker = (IInvokeProvider)UIElementAutomationPeer.CreatePeerForElement(this).GetPattern(PatternInterface.Invoke);
 }
Пример #6
0
 /// <summary>
 /// Constructor
 /// </summary>
 public KinectPaintCheckBox()
 {
     KinectCursor.AddCursorEnterHandler(this, OnCursorEnter);
     KinectCursor.AddCursorLeaveHandler(this, OnCursorLeave);
 }
Пример #7
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="cursor">The cursor interacting with the element</param>
 /// <param name="routedEvent">The event being raised</param>
 /// <param name="source">The element raising the event</param>
 public CursorEventArgs(KinectCursor cursor, RoutedEvent routedEvent, object source)
     : base(routedEvent, source)
 {
     _cursor = cursor;
     _timestamp = Environment.TickCount;
 }