Disabled some unused code.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1878 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-05-18 09:02:38 +00:00
parent cac99fbaf3
commit f01731ef16
3 changed files with 3 additions and 43 deletions

View file

@ -124,6 +124,7 @@ namespace Greenshot.Forms {
// Fix missing focus
WindowDetails.ToForeground(this.Handle);
this.TopMost = true;
}
#region key handling
@ -147,9 +148,6 @@ namespace Greenshot.Forms {
// Toggle mouse cursor
capture.CursorVisible = !capture.CursorVisible;
pictureBox.Invalidate();
} else if (e.KeyCode == Keys.V && conf.isExperimentalFeatureEnabled("Video")) {
capture.CaptureDetails.CaptureMode = CaptureMode.Video;
pictureBox.Invalidate();
} else if (e.KeyCode == Keys.Space) {
switch (captureMode) {
case CaptureMode.Region:
@ -347,11 +345,6 @@ namespace Greenshot.Forms {
if (mouseDown || captureMode == CaptureMode.Window) {
captureRect.Intersect(new Rectangle(Point.Empty, capture.ScreenBounds.Size)); // crop what is outside the screen
Rectangle fixedRect = new Rectangle( captureRect.X, captureRect.Y, captureRect.Width, captureRect.Height );
if (capture.CaptureDetails.CaptureMode == CaptureMode.Video) {
graphics.FillRectangle( RedOverlayBrush, fixedRect );
} else {
graphics.FillRectangle( GreenOverlayBrush, fixedRect );
}
graphics.DrawRectangle( OverlayPen, fixedRect );
// rulers

View file

@ -45,7 +45,7 @@ namespace Greenshot.Helpers {
public class CaptureHelper {
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(CaptureHelper));
private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
private static ScreenCaptureHelper screenCapture = null;
//private static ScreenCaptureHelper screenCapture = null;
private List<WindowDetails> windows = new List<WindowDetails>();
private WindowDetails selectedCaptureWindow = null;
private Rectangle captureRect = Rectangle.Empty;
@ -154,13 +154,6 @@ namespace Greenshot.Helpers {
/// Make Capture with specified destinations
/// </summary>
private void MakeCapture() {
// Experimental code
if (screenCapture != null) {
screenCapture.Stop();
screenCapture = null;
return;
}
LOG.Debug(String.Format("Capturing with mode {0} and using Cursor {1}", captureMode, captureMouseCursor));
capture.CaptureDetails.CaptureMode = captureMode;
@ -343,13 +336,6 @@ namespace Greenshot.Helpers {
HandleCapture();
}
break;
case CaptureMode.Video:
capture = WindowCapture.CaptureScreen(capture);
// Set the capturemode to be window
captureMode = CaptureMode.Window;
capture.CaptureDetails.AddMetaData("source", "Video");
CaptureWithFeedback();
break;
default:
LOG.Warn("Unknown capture mode: " + captureMode);
break;
@ -784,25 +770,6 @@ namespace Greenshot.Helpers {
capture.CaptureDetails.Title = selectedCaptureWindow.Text;
}
// Experimental code
if (capture.CaptureDetails.CaptureMode == CaptureMode.Video) {
if (captureForm.UsedCaptureMode == CaptureMode.Window) {
screenCapture = new ScreenCaptureHelper(selectedCaptureWindow);
} else if (captureForm.UsedCaptureMode == CaptureMode.Region) {
screenCapture = new ScreenCaptureHelper(captureRect);
}
if (screenCapture != null) {
screenCapture.RecordMouse = capture.CursorVisible;
if (screenCapture.Start(25)) {
return;
}
// User clicked cancel or a problem occured
screenCapture.Stop();
screenCapture = null;
return;
}
}
if (captureRect.Height > 0 && captureRect.Width > 0) {
if (windowDetailsThread != null) {
windowDetailsThread.Join();

View file

@ -26,7 +26,7 @@ namespace Greenshot.Plugin {
/// <summary>
/// The capture mode for Greenshot
/// </summary>
public enum CaptureMode { None, Region, FullScreen, ActiveWindow, Window, LastRegion, Clipboard, File, IE, Video, Import };
public enum CaptureMode { None, Region, FullScreen, ActiveWindow, Window, LastRegion, Clipboard, File, IE, Import };
public enum ScreenCaptureMode { Auto, FullScreen, Fixed};
/// <summary>