예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            WindowLayer mc = new WindowLayer();

            mc.OutputDescription = "Camera Mode Enabled";
            mc.Show();
        }
예제 #2
0
파일: main.cs 프로젝트: vantruc/skimpt
        private void KeyboardHookInstance_KeyIntercepted(KeyboardHookEventArgs keyboardEvents)
        {
            skImage myImage = null;
            Bitmap i;

            if (keyboardEvents.PressedKey == Keys.PrintScreen) {
                switch (CurrentMode) {
                    case mode.FullScreen:
                        i = skImageCapture.GetDesktopWindowCaptureAsBitmap();
                        myImage = new skImage(i);
                        break;
                    case mode.CameraMode:
                        this.Hide();
                        if (!instanceCreated) {
                            mc = new WindowLayer();
                            instanceCreated = true;
                            mc.Show();
                        } else {
                            WindowFrameToCapture = mc.GetWindowFrame();
                            i = skImageCapture.CaptureDeskTopRectangle(WindowFrameToCapture, WindowFrameToCapture.Width, WindowFrameToCapture.Height);
                            myImage = new skImage(i);
                            mc.Dispose();
                            mc = null;
                            instanceCreated = false;
                        }
                        break;
                    case mode.HighlightMode:
                        this.Hide();
                        if (!instanceCreated) {
                            mc = new WindowLayer();
                            instanceCreated = true;
                            mc.Show();
                        } else {
                            WindowFrameToCapture = mc.GetWindowFrame();
                            i = skImageCapture.GetDesktopWindowCaptureAsBitmap();
                            myImage = new skImage(i, WindowFrameToCapture);
                            mc.Dispose();
                            mc = null;
                            instanceCreated = false;
                        }
                        break;
                    default:
                        MessageBox.Show("unable to capture screen");
                        break;
                }

                if (myImage != null) {
                    Common.ShowToastForm(myImage);
                }

            }
        }
예제 #3
0
파일: test.cs 프로젝트: vantruc/skimpt
 private void button1_Click(object sender, EventArgs e) {
     WindowLayer mc = new WindowLayer();
     mc.OutputDescription = "Camera Mode Enabled";
     mc.Show();
 }
예제 #4
0
파일: main.cs 프로젝트: xiexin36/skimpt
        private void KeyboardHookInstance_KeyIntercepted(KeyboardHookEventArgs keyboardEvents)
        {
            skImage myImage = null;
            Bitmap  i;

            if (keyboardEvents.PressedKey == Keys.PrintScreen)
            {
                switch (CurrentMode)
                {
                case mode.FullScreen:
                    i       = skImageCapture.GetDesktopWindowCaptureAsBitmap();
                    myImage = new skImage(i);
                    break;

                case mode.CameraMode:
                    this.Hide();
                    if (!instanceCreated)
                    {
                        mc = new WindowLayer();
                        instanceCreated = true;
                        mc.Show();
                    }
                    else
                    {
                        WindowFrameToCapture = mc.GetWindowFrame();
                        i       = skImageCapture.CaptureDeskTopRectangle(WindowFrameToCapture, WindowFrameToCapture.Width, WindowFrameToCapture.Height);
                        myImage = new skImage(i);
                        mc.Dispose();
                        mc = null;
                        instanceCreated = false;
                    }
                    break;

                case mode.HighlightMode:
                    this.Hide();
                    if (!instanceCreated)
                    {
                        mc = new WindowLayer();
                        instanceCreated = true;
                        mc.Show();
                    }
                    else
                    {
                        WindowFrameToCapture = mc.GetWindowFrame();
                        i       = skImageCapture.GetDesktopWindowCaptureAsBitmap();
                        myImage = new skImage(i, WindowFrameToCapture);
                        mc.Dispose();
                        mc = null;
                        instanceCreated = false;
                    }
                    break;

                default:
                    MessageBox.Show("unable to capture screen");
                    break;
                }

                if (myImage != null)
                {
                    Common.ShowToastForm(myImage);
                }
            }
        }