Esempio n. 1
0
        private void MakeScreenshot()
        {
            if (ThreadHelper.PressedKey == 0x430003)
            {
                ThreadHelper.MyScreenshot = CaptureScreen();
                if (ThreadHelper.MyScreenshot != null)
                {
                    Clipboard.SetImage(ThreadHelper.MyScreenshot);
                }

                Hide();
            }
            else
            {
                switch (ThreadHelper.Resultmode)
                {
                case ThreadHelper.ResultMode.Clipboard:
                    ThreadHelper.MyScreenshot = CaptureScreen();
                    Clipboard.SetImage(ThreadHelper.MyScreenshot = CaptureScreen());
                    Hide();
                    break;

                case ThreadHelper.ResultMode.Normal:
                    ThreadHelper.MyScreenshot = CaptureScreen();
                    Hide();
                    var myResult = new Mainform {
                        notifyIcon1 = { Visible = false }
                    };
                    ThreadHelper.CaptureForms.Add(myResult);
                    myResult.Show();
                    myResult.ShowInTaskbar = true;
                    myResult.WindowState   = FormWindowState.Normal;
                    break;
                }
            }
        }
Esempio n. 2
0
        private void MakeScreenshot()
        {
            if (ThreadHelper.PressedKey == 0x430003)
            {
                ThreadHelper.MyScreenshot = CaptureScreen();
                if (ThreadHelper.MyScreenshot != null)
                {
                    Clipboard.SetImage(ThreadHelper.MyScreenshot);
                }

                Hide();
            }
            else
            {
                switch (ThreadHelper.Resultmode)
                {
                    case ThreadHelper.ResultMode.Clipboard:
                        ThreadHelper.MyScreenshot = CaptureScreen();
                        Clipboard.SetImage(ThreadHelper.MyScreenshot = CaptureScreen());
                        Hide();
                        break;
                    case ThreadHelper.ResultMode.Normal:
                        ThreadHelper.MyScreenshot = CaptureScreen();
                        Hide();
                        var myResult = new Mainform {notifyIcon1 = {Visible = false}};
                        ThreadHelper.CaptureForms.Add(myResult);
                        myResult.Show();
                        myResult.ShowInTaskbar = true;
                        myResult.WindowState = FormWindowState.Normal;
                        break;
                }
            }
        }