/// <summary> /// Returns the DepthTouchWindow instance. We only want one of these /// </summary> /// <param name="touchWall"></param> /// <returns>Returns the DepthTouchWindow instance</returns> public static CanvasWindow GetDepthTouchWindowInstance(TouchWallApp touchWall) { if (Instance == null) { Instance = new DepthTouchWindow(touchWall); } return(Instance); }
/// <summary> /// Closes the MultitouchWindow if it exists, then opens the DepthTouchWindow /// </summary> public void OpenDepthTouchWindow() { if (TouchWallApp.KinectSensor.IsAvailable) { if (TouchWallApp.MultiTouchMode == 1) { CloseMultiTouchWindow(); } if (TouchWallApp.MultiTouchMode != 2 && TouchWallApp.CalibrateStatus == 0) { TouchWallApp.CursorStatus = 0; TouchWallApp.MultiTouchMode = 2; _depthTouchWindow = (DepthTouchWindow)DepthTouchWindow.GetDepthTouchWindowInstance(_touchWall); _depthTouchWindow.Show(); } } }