示例#1
0
 private void TestRegionScreenshot()
 {
     using (var x = new Drawing.Capture(Drawing.CaptureMode.Region).GetScreenshot())
     {
         if (x != null)
         {
             TestUpload(x.ToByteArray());
         }
     }
 }
示例#2
0
 private void AddDropDownWindows(ToolStripMenuItem menuItem)
 {
     foreach (var item in WindowManager.GetOpenWindows())
     {
         menuItem.DropDownItems.Add(item.Value, NativeMethodsManager.GetApplicationIconSmall(item.Key).ToBitmap(), delegate
         {
             using (var x = new Drawing.Capture(Drawing.CaptureMode.ActiveWindow).GetScreenshot(item.Key))
             {
                 TestUpload(x.ToByteArray());
             }
         });
     }
 }