public MainWindow() { InitializeComponent(); this.Topmost = true; this.WindowStyle = System.Windows.WindowStyle.None; this.ResizeMode = System.Windows.ResizeMode.NoResize; this.WindowState = System.Windows.WindowState.Maximized; ScreenWidth = Convert.ToInt32(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Size.Height.ToString()); ScreenHeight = Convert.ToInt32(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Size.Width.ToString()); KinectController.InitializeKinectComponent(); EventHandler <SkeletonFrameReadyEventArgs> s = SkeletonReady; KinectController.ChangeKinectEventHandler(null, null, s, null); _clickHoldingTimer = new Stopwatch(); PageControl.MainThread = this; Main m = new Main(); MainGrid.Width = 1440; MainGrid.Height = 2560; PageControl.registerUserControl(m); MainGrid.Children.Add(m); PageControl.getGrid(Window.GetWindow(this)).Children.Add(Main.MainPageControl); Window WindowObject = Window.GetWindow(this); }
private void _ViewStyleset_P_HeadUp(object sender, EventArgs e) { KinectController.RemoveGestureEventHandler(); SaleCuponControl = new SaleCupon(ViewStylesetControl.SelectedStyleset); _SaleCupon_Initialize(); _Global_C_AddControl(SaleCuponControl); }
private void _ViewStyleset_P_RightHandUp(object sender, EventArgs e) { KinectController.RemoveGestureEventHandler(); sProductInfoControl = new StylesetProductInfo(CurrentStylesetIdx); _sProductInfo_Initialize(StyleSetData[CurrentStylesetIdx]); _Global_C_AddControl(sProductInfoControl); }
private void _TakePicture_P_RightHandUp(object sender, EventArgs e) { //act --> 사진 촬영 시작 Action <string> PostureEventHandler = _TakePicture_PostureAction_OnRightHandUp; KinectController.ChangePostureEventHandler(PostureEventHandler); TakePictureControl.hiddenUiButtonComponent(); TakePictureTimer.Start(); }
private void _ViewStyleset_P_LeftHandUp(object sender, EventArgs e) { KinectController.RemoveGestureEventHandler(); TakePictureControl = new TakePicture(); _Global_C_AddControl(TakePictureControl); _TakePicture_Initialize(0); _Global_C_RemoveControl(ViewStylesetControl); ViewStylesetControl.Dispose(); ViewStylesetControl = null; }
private void _ViewStyleset_C_UserLook3(object sender, EventArgs e) { if (PageControl.getGrid(Window.GetWindow(this)).Children[PageControl.getGrid(Window.GetWindow(this)).Children.Count - 1] != sProductExtraInfoControl) { KinectController.RemoveGestureEventHandler(); sProductExtraInfoControl = new StylesetProductInfo(UserLookList[2].id); _sProductExtraInfo_Initialize(UserLookList[2]); _Global_C_AddControl(sProductExtraInfoControl); } }
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 _CheckPicture_Initialize() { // initVideoElement(); switch (CurrentPictureMode) { case 0: Action <string> PostureEventHandlerM0 = _CheckPicture_PostureAction_Mode0; KinectController.ChangePostureEventHandler(PostureEventHandlerM0); break; case 1: Action <string> PostureEventHandlerM1 = _CheckPicture_PostureAction_Mode1; KinectController.ChangePostureEventHandler(PostureEventHandlerM1); break; } }
private void _Barcode_Initialize() { getCameraTS = new ThreadStart(this._Barcode_TS_setTimer); getCameraThread = new Thread(getCameraTS); getCameraThread.Start(); getBarcodeTS = new ThreadStart(this._Barcode_TS_setBarcodeTimer); getBarcodeThread = new Thread(getBarcodeTS); getBarcodeThread.Start(); Action <string> PostureEventHandler = _Barcode_PostureAction; KinectController.ChangePostureEventHandler(PostureEventHandler); }
public Main() { InitializeComponent(); foreach (DsDevice div in DsDevice.GetDevicesOfCat(FilterCategory.VideoInputDevice)) { if (div.Name == "Microsoft LifeCam Studio") { DsDevice device = div; videoElement.VideoCaptureDevice = device; videoElement.VideoCaptureSource = device.Name; } } Action <string> PostureEventHandler = _Main_PostureAction; KinectController.ChangePostureEventHandler(PostureEventHandler); }
private void _TakePicture_Initialize(int Mode) { CurrentPictureMode = Mode; if (Mode == 0) { TimeSec = 5; } else { TimeSec = 7; } TakePictureTimer.Stop(); TakePictureTimer.Interval = new TimeSpan(0, 0, 1); TakePictureTimer.Tick += new EventHandler(_TakePicture_T_TakePictureStart); Action <string> PostureEventHandler = _TakePicture_PostureAction; KinectController.ChangePostureEventHandler(PostureEventHandler); }
private void _bProductInf_Initialize(string barcode) { _Global_C_RemoveControl(barcodeControl); barcodeControl.Dispose(); barcodeControl = null; RESTful Network = new RESTful(); //Network.RESTfulSingleParmRequest(); bProductInfoControl = new BarcodeProductInfo(); _Global_C_AddControl(bProductInfoControl); Action <string> PostureEventHandler = _bProductInf_PostureAction; KinectController.ChangePostureEventHandler(PostureEventHandler); if (CurrentBarcodeReadMode == 1) { bProductInfoControl.hiddenUiAddProduct(); } }
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); }