private void _CheckPictureA_P_LeftHandUp_Mode1(object sender, EventArgs e)
 {
     _Global_C_RemoveControl(CheckPictureAControl);
     CheckPictureAControl.Dispose();
     CheckPictureAControl = null;
     TakePictureControl   = new TakePicture();
     _TakePicture_Initialize(0);
     _Global_C_AddControl(TakePictureControl);
 }
        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 _CheckPictureA_P_RightHandUp_Mode1(object sender, EventArgs e)
 {
     _Global_C_ShowWaitingScreen();
     _Global_C_RemoveControl(CheckPictureAControl);
     ViewStylesetControl = new ViewStyleset();
     _Global_C_AddControl(ViewStylesetControl);
     NetworkTS     = new ThreadStart(_ViewStyleset_Initialize);
     NetworkThread = new Thread(NetworkTS);
     NetworkThread.Start();
     CheckPictureAControl.Dispose();
     CheckPictureAControl = null;
 }
 private void _CheckPictureA_P_RightHandUp_Mode1(object sender, EventArgs e)
 {
     _Global_C_ShowWaitingScreen();
     _Global_C_RemoveControl(CheckPictureAControl);
     ViewStylesetControl = new ViewStyleset();
     _Global_C_AddControl(ViewStylesetControl);
     NetworkTS = new ThreadStart(_ViewStyleset_Initialize);
     NetworkThread = new Thread(NetworkTS);
     NetworkThread.Start();
     CheckPictureAControl.Dispose();
     CheckPictureAControl = null;
 }
 private void _CheckPictureA_P_LeftHandUp_Mode1(object sender, EventArgs e)
 {
     _Global_C_RemoveControl(CheckPictureAControl);
     CheckPictureAControl.Dispose();
     CheckPictureAControl = null;
     TakePictureControl = new TakePicture();
     _TakePicture_Initialize(0);
     _Global_C_AddControl(TakePictureControl);
 }
        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();
                }
            }));
        }