private static void Init() { ScreenShotWindow window = GetWindowWithRect <ScreenShotWindow>(new Rect(0, 0, 300, 150)); window.titleContent = new GUIContent("屏幕截图"); window.Show(); }
private Bitmap TakeScreenshot() { ScreenShotWindow screenShotWindow = new ScreenShotWindow(); bool? result = screenShotWindow.TakeScreenshot(); if (result is null || !(bool)result) { return(null); } return(screenShotWindow.Screenshot); }
private void ShowFullScreenShotClick(object sender, EventArgs e) { var curImagePath = Project.ImagePath; if (string.IsNullOrEmpty(curImagePath)) { return; } var screenShotWin = new ScreenShotWindow(curImagePath); screenShotWin.ShowDialog(); }