示例#1
0
 public void RegisterCursor(IKinectCursor cursor)
 {
     lock (cursorDictionarySync)
     {
         cursorDictionary[cursor.GetHashCode()] = cursor;
     }
 }
示例#2
0
        public KinectCursorForm(IKinectCursor cursor, Window window)
            : this()
        {
            mWindow = window;
            mCursor = cursor;
            mCursor.Init(this, window);

            //
            // pointCursorPanel
            //
            UserControl pointCursorPanel = mCursor.ControlPanel;

            pointCursorPanel.AutoScroll  = true;
            pointCursorPanel.Dock        = System.Windows.Forms.DockStyle.Fill;
            pointCursorPanel.Location    = new System.Drawing.Point(3, 3);
            pointCursorPanel.MinimumSize = new System.Drawing.Size(307, 325);
            pointCursorPanel.Name        = "pointCursorPanel";
            pointCursorPanel.Size        = new System.Drawing.Size(732, 544);
            pointCursorPanel.TabIndex    = 0;

            splitContainer1.Panel2.Controls.Add(pointCursorPanel);

            mCursor.CursorMove += new Action <IKinectCursor, float, float>(mCursor_CursorMove);
            mWindow.OverlayManager.CursorMoved += mWindow_CursorMove;
        }
示例#3
0
 public void UnregisterCursor(IKinectCursor cursor)
 {
     lock (cursorDictionarySync)
     {
         if (cursorDictionary.ContainsKey(cursor.GetHashCode()))
         {
             cursorDictionary.Remove(cursor.GetHashCode());
         }
     }
 }
        public KinectCursorForm(IKinectCursor cursor, Window window)
            : this()
        {
            mWindow = window;
            mCursor = cursor;
            mCursor.Init(this, window);

            //
            // pointCursorPanel
            //
            UserControl pointCursorPanel = mCursor.ControlPanel;
            pointCursorPanel.AutoScroll = true;
            pointCursorPanel.Dock = System.Windows.Forms.DockStyle.Fill;
            pointCursorPanel.Location = new System.Drawing.Point(3, 3);
            pointCursorPanel.MinimumSize = new System.Drawing.Size(307, 325);
            pointCursorPanel.Name = "pointCursorPanel";
            pointCursorPanel.Size = new System.Drawing.Size(732, 544);
            pointCursorPanel.TabIndex = 0;

            splitContainer1.Panel2.Controls.Add(pointCursorPanel);

            mCursor.CursorMove += new Action<IKinectCursor,float,float>(mCursor_CursorMove);
            mWindow.OverlayManager.CursorMoved += mWindow_CursorMove;
        }
 private void mCursor_CursorMove(IKinectCursor cursor, float x, float y)
 {
     mWindow.OverlayManager.UpdateCursor(x, y);
 }
示例#6
0
 private void mCursor_CursorMove(IKinectCursor cursor, float x, float y)
 {
     mWindow.OverlayManager.UpdateCursor(x, y);
 }