public MainWindow() { InitializeComponent(); KinectController.InitializeKinectComponent(); EventHandler <SkeletonFrameReadyEventArgs> s = SkeletonReady; KinectController.ChangeKinectEventHandler(null, null, s, null); Action <string> gs = GestureAction; KinectController.ChangeGestureEventHandler(gs); }
private void _sProductInfo_P_RightHandUp(object sender, EventArgs e) { _Global_C_RemoveControl(sProductInfoControl); sProductInfoControl.Dispose(); sProductInfoControl = null; Action <string> RightSwipeGestureHandler = _ViewStyleset_SwipeGestureRight; Action <string> LeftSwipeGestureHandler = _ViewStyleset_SwipeGestureLeft; KinectController.ChangeGestureEventHandler(RightSwipeGestureHandler, "R"); KinectController.ChangeGestureEventHandler(LeftSwipeGestureHandler, "L"); }
private void _CheckPictureA_Initialize() { Action <string> RightSwipeGestureHandler = _CheckPictureA_SwipeGestureRight; Action <string> LeftSwipeGestureHandler = _CheckPictureA_SwipeGestureLeft; KinectController.ChangeGestureEventHandler(RightSwipeGestureHandler, "R"); KinectController.ChangeGestureEventHandler(LeftSwipeGestureHandler, "L"); CheckPictureAControl.btnReTakePicture.Click += new RoutedEventHandler(_CheckPictureA_P_LeftHandUp_Mode1); CheckPictureAControl.btnViewStyleset.Click += new RoutedEventHandler(_CheckPictureA_P_RightHandUp_Mode1); }
private void _ViewStyleset_Initialize() { IRestResponse <_REST_StyleSetListInfo> TopStyleset = null; IRestResponse <_REST_StyleSetListInfo> DownStyleset = null; RESTful RESTObj = new RESTful(); if (TopLookId != 0) { cuponhash = RESTObj.RESTUploadUserLook(TopLookId, DownLookId, FrontPicturePath, FrontPicturePath.Insert(FrontPicturePath.Length - 4, "_proc"), BackPicturePath, "2011003539244269"); } if (DownLookId != 0) { cuponhash = RESTObj.RESTUploadUserLook(DownLookId, TopLookId, FrontPicturePath, FrontPicturePath.Insert(FrontPicturePath.Length - 4, "_proc"), BackPicturePath, "2011003539244269"); } if (TopLookId != 0) { TopStyleset = RESTObj.RESTgetStyleSetListById(TopLookId); } if (DownLookId != 0) { DownStyleset = RESTObj.RESTgetStyleSetListById(DownLookId); } if (TopStyleset != null && DownStyleset != null) { if (TopStyleset.Data != null && DownStyleset.Data != null) { StyleSetData = TopStyleset.Data.ToArray(); _REST_StyleSetInfo[] DownStylesetData = DownStyleset.Data.ToArray(); DownStylesetData.CopyTo(StyleSetData, StyleSetData.Length); } } else if (TopStyleset != null) { if (TopStyleset.Data != null) { StyleSetData = TopStyleset.Data.ToArray(); } } else if (DownStyleset != null) { if (DownStyleset.Data != null) { StyleSetData = DownStyleset.Data.ToArray(); } } StyletIdexLast = StyleSetData.Length - 1; _ViewStyleset_Control(-1); Action <string> RightSwipeGestureHandler = _ViewStyleset_SwipeGestureRight; Action <string> LeftSwipeGestureHandler = _ViewStyleset_SwipeGestureLeft; KinectController.ChangeGestureEventHandler(RightSwipeGestureHandler, "R"); KinectController.ChangeGestureEventHandler(LeftSwipeGestureHandler, "L"); _Global_C_ShowWaitingScreen(); ViewStylesetControl.btnProductDetail.Click += new RoutedEventHandler(_ViewStyleset_P_RightHandUp); ViewStylesetControl.btnRetakePicture.Click += new RoutedEventHandler(_ViewStyleset_P_LeftHandUp); ViewStylesetControl.btnTakeCupon.Click += new RoutedEventHandler(_ViewStyleset_P_HeadUp); }