예제 #1
0
 private void hotkey_HotkeyPressed(object sender, EventArgs e)
 {
     if (fullScreenOption.Checked)
     {
         HandleScreenshot(Screenshot.TakeScreenshot(cursorOption.Checked));
     }
     else if (windowOption.Checked)
     {
         HandleScreenshot(Screenshot.TakeScreenshot(SystemWindow.ForegroundWindow, false, cursorOption.Checked, shapeOption.Checked));
     }
     else if (clientAreaOption.Checked)
     {
         HandleScreenshot(Screenshot.TakeScreenshot(SystemWindow.ForegroundWindow, true, cursorOption.Checked, shapeOption.Checked));
     }
     else if (objectOption.Checked)
     {
         SelectorForm sf = new SelectorForm(true, "");
         sf.SelectionFinished += new SelectorForm.SelectionFinishedDelegate(objectSelection_SelectionFinished);
         sf.Show();
     }
     else if (scrollingAreaOption.Checked)
     {
         List <String> extraPointMessages = new List <string>();
         bool          scroll             = autodetectScrollOption.Checked || hWheelScrollOption.Checked || vWheelScrollOption.Checked;
         if (vBarScrollOption.Checked)
         {
             extraPointMessages.Add("the down arrow of the vertical scroll bar");
         }
         if (hBarScrollOption.Checked)
         {
             extraPointMessages.Add("the right arrow of the horizontal scroll bar");
         }
         SelectorForm sf = new SelectorForm(false, " at a point inside the scroll area" + (scroll ? " where scroll wheel events can be applied" : ""), extraPointMessages.ToArray());
         sf.SelectionFinished += new SelectorForm.SelectionFinishedDelegate(scrollingSelection_SelectionFinished);
         sf.Show();
     }
 }
예제 #2
0
 private void hotkey_HotkeyPressed(object sender, EventArgs e)
 {
     if (fullScreenOption.Checked)
     {
         HandleScreenshot(Screenshot.TakeScreenshot(cursorOption.Checked));
     }
     else if (windowOption.Checked)
     {
         HandleScreenshot(Screenshot.TakeScreenshot(SystemWindow.ForegroundWindow, false, cursorOption.Checked, shapeOption.Checked));
     }
     else if (clientAreaOption.Checked)
     {
         HandleScreenshot(Screenshot.TakeScreenshot(SystemWindow.ForegroundWindow, true, cursorOption.Checked, shapeOption.Checked));
     }
     else if (objectOption.Checked)
     {
         SelectorForm sf = new SelectorForm(true, "");
         sf.SelectionFinished += new SelectorForm.SelectionFinishedDelegate(objectSelection_SelectionFinished);
         sf.Show();
     }
     else if (scrollingAreaOption.Checked)
     {
         List<String> extraPointMessages = new List<string>();
         bool scroll = autodetectScrollOption.Checked || hWheelScrollOption.Checked || vWheelScrollOption.Checked;
         if (vBarScrollOption.Checked)
             extraPointMessages.Add("the down arrow of the vertical scroll bar");
         if (hBarScrollOption.Checked)
             extraPointMessages.Add("the right arrow of the horizontal scroll bar");
         SelectorForm sf = new SelectorForm(false, " at a point inside the scroll area" + (scroll ? " where scroll wheel events can be applied" : ""), extraPointMessages.ToArray());
         sf.SelectionFinished += new SelectorForm.SelectionFinishedDelegate(scrollingSelection_SelectionFinished);
         sf.Show();
     }
 }