private void _CheckPicture_P_LeftHandUp_Mode1(object sender, EventArgs e)
 {
     TakePictureControl = new TakePicture();
     _TakePicture_Initialize(1);
     _Global_C_AddControl(TakePictureControl);
     _Global_C_RemoveControl(CheckPictureBackControl);
     CheckPictureBackControl.Dispose();
     CheckPictureBackControl = null;
 }
        private void _TakePicture_T_getCameraImage()
        {
            string path = null;

            System.Windows.Size sz = new System.Windows.Size(1080, 1920);
            IntPtr hDesk           = GetDesktopWindow();
            IntPtr hScre           = GetWindowDC(hDesk);
            IntPtr hDest           = CreateCompatibleDC(hScre);
            IntPtr hBitmap         = CreateCompatibleBitmap(hScre, (int)sz.Width, (int)sz.Height);
            IntPtr hOldBit         = SelectObject(hDest, hBitmap);

            Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Send, new Action(delegate
            {
                System.Windows.Point CurrentWindowPoint = this.PointToScreen(new System.Windows.Point());

                BitBlt(hDest, 0, 0, (int)sz.Width, (int)sz.Height, hScre, (int)CurrentWindowPoint.X,
                       (int)CurrentWindowPoint.Y, System.Drawing.CopyPixelOperation.SourceCopy | System.Drawing.CopyPixelOperation.CaptureBlt);

                System.Drawing.Bitmap bitmap = System.Drawing.Bitmap.FromHbitmap(hBitmap);
                SelectObject(hDest, hOldBit);
                DeleteObject(hBitmap);
                DeleteDC(hDest);
                ReleaseDC(hDesk, hScre);

                path = CameraController.procImage(bitmap);

                if (CurrentPictureMode == 0)
                {
                    FrontPicturePath = path;
                }
                else if (CurrentPictureMode == 1)
                {
                    BackPicturePath = path;
                }

                TakePictureTimer = new DispatcherTimer();
                if (CurrentPictureMode == 0)
                {
                    _Global_C_RemoveControl(TakePictureControl);
                    TakePictureControl.Dispose();
                    TakePictureControl = null;
                    TakePictureControl = new TakePicture();
                    _TakePicture_Initialize(1);
                    _Global_C_AddControl(TakePictureControl);
                }
                else
                {
                    CheckPictureAControl = new CheckPictureAll();
                    _Global_C_RemoveControl(TakePictureControl);
                    TakePictureControl.Dispose();
                    TakePictureControl = null;
                    _Global_C_AddControl(CheckPictureAControl);
                    _CheckPictureA_Initialize();
                }
            }));
        }
 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;
 }
Beispiel #4
0
 private void _TakePicture_P_LeftHandUp(object sender, EventArgs e)
 {
     //act --> 바코드 다시찍기
     barcodeControl         = new ReadBarcode();
     CurrentBarcodeReadMode = 0;
     _Global_C_AddControl(barcodeControl);
     _Global_C_RemoveControl(TakePictureControl);
     TakePictureControl.Dispose();
     TakePictureControl = null;
 }
 private void _bProductInf_P_RightHandUp(object sender, EventArgs e)
 {
     //act --> 사진 찍기
     TakePictureControl = new TakePicture();
     _Global_C_AddControl(TakePictureControl);
     _TakePicture_Initialize(0);
     _Global_C_RemoveControl(bProductInfoControl);
     bProductInfoControl.Dispose();
     bProductInfoControl = null;
 }
Beispiel #6
0
        private void _TakePicture_T_getCameraImage()
        {
            int    width = 0, height = 0;
            string path = null;
            bool   flag = true;

            Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Send, new Action(delegate
            {
                width  = (int)videoElement.ActualHeight;
                height = (int)videoElement.ActualWidth;
                bmp    = ConverterBitmapImage(videoElement);
                path   = CameraController.procImage(bmp);
                while (flag)
                {
                    if (path != null)
                    {
                        flag = false;
                        if (CurrentPictureMode == 0)
                        {
                            FrontPicturePath = path;
                        }
                        else if (CurrentPictureMode == 1)
                        {
                            BackPicturePath = path;
                        }

                        TakePictureTimer    = new DispatcherTimer();
                        CheckPictureControl = new CheckPicture(path, CurrentPictureMode);
                        _Global_C_RemoveControl(TakePictureControl);
                        TakePictureControl.Dispose();
                        TakePictureControl = null;
                        _Global_C_AddControl(CheckPictureControl);
                        _CheckPicture_Initialize();
                    }
                }
            }));
        }
 private void _CheckPicture_P_LeftHandUp_Mode1(object sender, EventArgs e)
 {
     _TakePicture_Initialize(1);
     TakePictureControl = new TakePicture();
     _Global_C_AddControl(TakePictureControl);
     _Global_C_RemoveControl(CheckPictureControl);
     CheckPictureControl.Dispose();
     CheckPictureControl = null;
 }
 private void _TakePicture_P_LeftHandUp(object sender, EventArgs e)
 {
     //act --> 바코드 다시찍기
     barcodeControl = new ReadBarcode();
     CurrentBarcodeReadMode = 0;
     _Global_C_AddControl(barcodeControl);
     _Global_C_RemoveControl(TakePictureControl);
     TakePictureControl.Dispose();
     TakePictureControl = null;
 }
        private void _TakePicture_T_getCameraImage()
        {
            int width = 0, height = 0;
            string path = null;
            bool flag = true;
            Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Send, new Action(delegate
            {
                width = (int)videoElement.ActualHeight;
                height = (int)videoElement.ActualWidth;
                bmp =  ConverterBitmapImage(videoElement);
                path = CameraController.procImage(bmp);
                while (flag)
                {
                    if (path != null)
                    {
                        flag = false;
                        if (CurrentPictureMode == 0)
                            FrontPicturePath = path;
                        else if (CurrentPictureMode == 1)
                            BackPicturePath = path;

                        TakePictureTimer = new DispatcherTimer();
                        CheckPictureControl = new CheckPicture(path, CurrentPictureMode);
                        _Global_C_RemoveControl(TakePictureControl);
                        TakePictureControl.Dispose();
                        TakePictureControl = null;
                        _Global_C_AddControl(CheckPictureControl);
                        _CheckPicture_Initialize();

                    }
                }
            }));

        }
 private void _bProductInf_P_RightHandUp(object sender, EventArgs e)
 {
     //act --> 사진 찍기
     TakePictureControl = new TakePicture();
     _Global_C_AddControl(TakePictureControl);
     _TakePicture_Initialize(0);
     _Global_C_RemoveControl(bProductInfoControl);
     bProductInfoControl.Dispose();
     bProductInfoControl = null;
 }
 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 _TakePicture_T_getCameraImage()
        {
            string path = null;

            System.Windows.Size sz = new System.Windows.Size(1080, 1920);
            IntPtr hDesk = GetDesktopWindow();
            IntPtr hScre = GetWindowDC(hDesk);
            IntPtr hDest = CreateCompatibleDC(hScre);
            IntPtr hBitmap = CreateCompatibleBitmap(hScre, (int)sz.Width, (int)sz.Height);
            IntPtr hOldBit = SelectObject(hDest, hBitmap);

            Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Send, new Action(delegate
            {
                System.Windows.Point CurrentWindowPoint = this.PointToScreen(new System.Windows.Point());

                BitBlt(hDest, 0, 0, (int)sz.Width, (int)sz.Height, hScre, (int)CurrentWindowPoint.X, 
                    (int)CurrentWindowPoint.Y, System.Drawing.CopyPixelOperation.SourceCopy | System.Drawing.CopyPixelOperation.CaptureBlt);
                
                System.Drawing.Bitmap bitmap = System.Drawing.Bitmap.FromHbitmap(hBitmap);
                SelectObject(hDest, hOldBit);
                DeleteObject(hBitmap);
                DeleteDC(hDest);
                ReleaseDC(hDesk, hScre);

                path = CameraController.procImage(bitmap);
                
                if (CurrentPictureMode == 0)
                    FrontPicturePath = path;
                else if (CurrentPictureMode == 1)
                    BackPicturePath = path;
                
                TakePictureTimer = new DispatcherTimer();
                if (CurrentPictureMode == 0)
                {
                    _Global_C_RemoveControl(TakePictureControl);
                    TakePictureControl.Dispose();
                    TakePictureControl = null;
                    TakePictureControl = new TakePicture();
                    _TakePicture_Initialize(1);
                    _Global_C_AddControl(TakePictureControl);
                }
                else
                {
                    CheckPictureAControl = new CheckPictureAll();
                    _Global_C_RemoveControl(TakePictureControl);
                    TakePictureControl.Dispose();
                    TakePictureControl = null;
                    _Global_C_AddControl(CheckPictureAControl);
                    _CheckPictureA_Initialize();
                }
            }));
        }