private static void Init()
    {
        ScreenShotWindow window = GetWindowWithRect <ScreenShotWindow>(new Rect(0, 0, 300, 150));

        window.titleContent = new GUIContent("屏幕截图");
        window.Show();
    }
Exemplo n.º 2
0
        private Bitmap TakeScreenshot()
        {
            ScreenShotWindow screenShotWindow = new ScreenShotWindow();
            bool?            result           = screenShotWindow.TakeScreenshot();

            if (result is null || !(bool)result)
            {
                return(null);
            }
            return(screenShotWindow.Screenshot);
        }
Exemplo n.º 3
0
        private void ShowFullScreenShotClick(object sender, EventArgs e)
        {
            var curImagePath = Project.ImagePath;

            if (string.IsNullOrEmpty(curImagePath))
            {
                return;
            }
            var screenShotWin = new ScreenShotWindow(curImagePath);

            screenShotWin.ShowDialog();
        }