File naming changes

This commit is contained in:
Jaex 2016-05-04 11:28:29 +03:00
parent 7c9f37b33a
commit 81a11f94b8
13 changed files with 45 additions and 45 deletions

View file

@ -31,14 +31,14 @@ You should have received a copy of the GNU General Public License
namespace ShareX.ScreenCaptureLib
{
public class FreeHandRegion : Surface
public class FreeHandRegionForm : SurfaceForm
{
private NodeObject lastNode;
private List<Point> points;
private bool isAreaCreated;
private Rectangle currentArea;
public FreeHandRegion()
public FreeHandRegionForm()
{
points = new List<Point>(128);
regionFillPath = new GraphicsPath();

View file

@ -32,13 +32,13 @@ You should have received a copy of the GNU General Public License
namespace ShareX.ScreenCaptureLib
{
public class PolygonRegion : Surface
public class PolygonRegionForm : SurfaceForm
{
private List<NodeObject> nodes;
private bool isAreaCreated;
private Rectangle currentArea;
public PolygonRegion()
public PolygonRegionForm()
{
nodes = new List<NodeObject>();
MouseDown += PolygonRegionSurface_MouseDown;

View file

@ -36,7 +36,7 @@ You should have received a copy of the GNU General Public License
namespace ShareX.ScreenCaptureLib
{
public class RectangleAnnotate : Form
public class RectangleAnnotateForm : Form
{
public static Rectangle LastSelectionRectangle0Based { get; private set; }
@ -95,7 +95,7 @@ public Point PreviousMousePosition0Based
private Stopwatch penTimer;
private Font infoFont;
public RectangleAnnotate(RectangleAnnotateOptions options)
public RectangleAnnotateForm(RectangleAnnotateOptions options)
{
Options = options;

View file

@ -34,7 +34,7 @@ You should have received a copy of the GNU General Public License
namespace ShareX.ScreenCaptureLib
{
public class RectangleLight : Form
public class RectangleLightForm : Form
{
public static Rectangle LastSelectionRectangle0Based { get; private set; }
@ -66,7 +66,7 @@ public Rectangle SelectionRectangle0Based
private bool isMouseDown;
private Stopwatch penTimer;
public RectangleLight()
public RectangleLightForm()
{
backgroundImage = Screenshot.CaptureFullscreen();
backgroundBrush = new TextureBrush(backgroundImage);

View file

@ -35,7 +35,7 @@ You should have received a copy of the GNU General Public License
namespace ShareX.ScreenCaptureLib
{
public class RectangleRegion : Surface
public class RectangleRegionForm : SurfaceForm
{
public AreaManager AreaManager { get; private set; }
@ -75,7 +75,7 @@ public Color CurrentColor
private ColorBlinkAnimation colorBlinkAnimation = new ColorBlinkAnimation();
public RectangleRegion()
public RectangleRegionForm()
{
AreaManager = new AreaManager(this);

View file

@ -34,7 +34,7 @@ You should have received a copy of the GNU General Public License
namespace ShareX.ScreenCaptureLib
{
public class RectangleTransparent : LayeredForm
public class RectangleTransparentForm : LayeredForm
{
public static Rectangle LastSelectionRectangle0Based { get; private set; }
@ -77,7 +77,7 @@ private Rectangle PreviousSelectionRectangle0Based
private bool isMouseDown;
private Stopwatch penTimer;
public RectangleTransparent()
public RectangleTransparentForm()
{
clearPen = new Pen(Color.FromArgb(1, 0, 0, 0));
borderDotPen = new Pen(Color.Black, 1);

View file

@ -160,7 +160,7 @@ private void SelectRectangle()
Thread.Sleep(250);
Rectangle rect;
if (Surface.SelectRegion(out rect))
if (SurfaceForm.SelectRegion(out rect))
{
selectedRectangle = rect;
lblSelectedRectangle.Text = selectedRectangle.ToString();
@ -186,7 +186,7 @@ private void btnCapture_Click(object sender, EventArgs e)
private SimpleWindowInfo GetWindowInfo()
{
using (RectangleRegion surface = new RectangleRegion())
using (RectangleRegionForm surface = new RectangleRegionForm())
{
surface.OneClickMode = true;
surface.Config.DetectWindows = true;

View file

@ -37,7 +37,7 @@ You should have received a copy of the GNU General Public License
namespace ShareX.ScreenCaptureLib
{
public class Surface : Form
public abstract class SurfaceForm : Form
{
public Image SurfaceImage { get; set; }
public SurfaceOptions Config { get; set; }
@ -62,7 +62,7 @@ public class Surface : Form
private bool pause;
public Surface()
public SurfaceForm()
{
ScreenRectangle = CaptureHelpers.GetScreenBounds();
ScreenRectangle0Based = CaptureHelpers.ScreenToClient(ScreenRectangle);
@ -459,7 +459,7 @@ public static bool SelectRegion(out Rectangle rect)
public static bool SelectRegion(out Rectangle rect, SurfaceOptions options)
{
using (RectangleRegion surface = new RectangleRegion())
using (RectangleRegionForm surface = new RectangleRegionForm())
{
surface.Config = options;
surface.Config.ShowTips = false;

View file

@ -142,10 +142,10 @@ public bool IsResizing
public bool IncludeControls { get; set; }
public int MinimumSize { get; set; } = 3;
private RectangleRegion surface;
private RectangleRegionForm surface;
private ContextMenuStrip cmsShapeMenu;
public AreaManager(RectangleRegion surface)
public AreaManager(RectangleRegionForm surface)
{
this.surface = surface;

View file

@ -65,7 +65,7 @@ public bool Visible
private NodeObject[] nodes;
private Rectangle tempRect;
public ResizeManager(Surface surface, AreaManager areaManager)
public ResizeManager(SurfaceForm surface, AreaManager areaManager)
{
this.areaManager = areaManager;

View file

@ -60,10 +60,10 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Enums.cs" />
<Compile Include="Forms\RectangleAnnotate.cs">
<Compile Include="Forms\RectangleAnnotateForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\RectangleTransparent.cs">
<Compile Include="Forms\RectangleTransparentForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\ScrollingCaptureForm.cs">
@ -97,10 +97,10 @@
<DependentUpon>FFmpegOptionsForm.cs</DependentUpon>
</Compile>
<Compile Include="Screencast\ScreencastOptions.cs" />
<Compile Include="Forms\RectangleLight.cs">
<Compile Include="Forms\RectangleLightForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\Surface.cs">
<Compile Include="Forms\SurfaceForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Screencast\ImageCache.cs" />
@ -112,13 +112,13 @@
</Compile>
<Compile Include="RegionHelpers\AreaManager.cs" />
<Compile Include="RegionHelpers\DrawObject.cs" />
<Compile Include="Forms\FreeHandRegion.cs">
<Compile Include="Forms\FreeHandRegionForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\PolygonRegion.cs">
<Compile Include="Forms\PolygonRegionForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\RectangleRegion.cs">
<Compile Include="Forms\RectangleRegionForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="RegionHelpers\InputManager.cs" />

View file

@ -2075,19 +2075,19 @@ private void CaptureWindow(IntPtr handle, TaskSettings taskSettings = null, bool
private void CaptureRegion(CaptureType captureType, TaskSettings taskSettings, bool autoHideForm = true)
{
Surface surface;
SurfaceForm surface;
switch (captureType)
{
default:
case CaptureType.Rectangle:
surface = new RectangleRegion();
surface = new RectangleRegionForm();
break;
case CaptureType.Polygon:
surface = new PolygonRegion();
surface = new PolygonRegionForm();
break;
case CaptureType.Freehand:
surface = new FreeHandRegion();
surface = new FreeHandRegionForm();
break;
}
@ -2175,7 +2175,7 @@ private void CaptureRectangleAnnotate(TaskSettings taskSettings = null, bool aut
{
Image img = null;
using (RectangleAnnotate rectangleAnnotate = new RectangleAnnotate(taskSettings.CaptureSettingsReference.RectangleAnnotateOptions))
using (RectangleAnnotateForm rectangleAnnotate = new RectangleAnnotateForm(taskSettings.CaptureSettingsReference.RectangleAnnotateOptions))
{
if (rectangleAnnotate.ShowDialog() == DialogResult.OK)
{
@ -2200,7 +2200,7 @@ private void CaptureRectangleLight(TaskSettings taskSettings = null, bool autoHi
{
Image img = null;
using (RectangleLight rectangleLight = new RectangleLight())
using (RectangleLightForm rectangleLight = new RectangleLightForm())
{
if (rectangleLight.ShowDialog() == DialogResult.OK)
{
@ -2225,7 +2225,7 @@ private void CaptureRectangleTransparent(TaskSettings taskSettings = null, bool
{
Image img = null;
using (RectangleTransparent rectangleTransparent = new RectangleTransparent())
using (RectangleTransparentForm rectangleTransparent = new RectangleTransparentForm())
{
if (rectangleTransparent.ShowDialog() == DialogResult.OK)
{
@ -2247,13 +2247,13 @@ private void CaptureLastRegion(TaskSettings taskSettings, bool autoHideForm = tr
switch (lastRegionCaptureType)
{
case LastRegionCaptureType.Surface:
if (Surface.LastRegionFillPath != null)
if (SurfaceForm.LastRegionFillPath != null)
{
DoCapture(() =>
{
using (Image screenshot = Screenshot.CaptureFullscreen())
{
return ShapeCaptureHelpers.GetRegionImage(screenshot, Surface.LastRegionFillPath, Surface.LastRegionDrawPath, taskSettings.CaptureSettings.SurfaceOptions);
return ShapeCaptureHelpers.GetRegionImage(screenshot, SurfaceForm.LastRegionFillPath, SurfaceForm.LastRegionDrawPath, taskSettings.CaptureSettings.SurfaceOptions);
}
}, CaptureType.LastRegion, taskSettings, autoHideForm);
}
@ -2263,13 +2263,13 @@ private void CaptureLastRegion(TaskSettings taskSettings, bool autoHideForm = tr
}
break;
case LastRegionCaptureType.Light:
if (!RectangleLight.LastSelectionRectangle0Based.IsEmpty)
if (!RectangleLightForm.LastSelectionRectangle0Based.IsEmpty)
{
DoCapture(() =>
{
using (Image screenshot = Screenshot.CaptureFullscreen())
{
return ImageHelpers.CropImage(screenshot, RectangleLight.LastSelectionRectangle0Based);
return ImageHelpers.CropImage(screenshot, RectangleLightForm.LastSelectionRectangle0Based);
}
}, CaptureType.LastRegion, taskSettings, autoHideForm);
}
@ -2279,13 +2279,13 @@ private void CaptureLastRegion(TaskSettings taskSettings, bool autoHideForm = tr
}
break;
case LastRegionCaptureType.Transparent:
if (!RectangleTransparent.LastSelectionRectangle0Based.IsEmpty)
if (!RectangleTransparentForm.LastSelectionRectangle0Based.IsEmpty)
{
DoCapture(() =>
{
using (Image screenshot = Screenshot.CaptureFullscreen())
{
return ImageHelpers.CropImage(screenshot, RectangleTransparent.LastSelectionRectangle0Based);
return ImageHelpers.CropImage(screenshot, RectangleTransparentForm.LastSelectionRectangle0Based);
}
}, CaptureType.LastRegion, taskSettings, autoHideForm);
}
@ -2295,13 +2295,13 @@ private void CaptureLastRegion(TaskSettings taskSettings, bool autoHideForm = tr
}
break;
case LastRegionCaptureType.Annotate:
if (!RectangleAnnotate.LastSelectionRectangle0Based.IsEmpty)
if (!RectangleAnnotateForm.LastSelectionRectangle0Based.IsEmpty)
{
DoCapture(() =>
{
using (Image screenshot = Screenshot.CaptureFullscreen())
{
return ImageHelpers.CropImage(screenshot, RectangleAnnotate.LastSelectionRectangle0Based);
return ImageHelpers.CropImage(screenshot, RectangleAnnotateForm.LastSelectionRectangle0Based);
}
}, CaptureType.LastRegion, taskSettings, autoHideForm);
}

View file

@ -308,12 +308,12 @@ private static void AddExternalProgramFromRegistry(TaskSettings taskSettings, st
public static bool SelectRegion(out Rectangle rect, TaskSettings taskSettings)
{
return Surface.SelectRegion(out rect, taskSettings.CaptureSettings.SurfaceOptions);
return SurfaceForm.SelectRegion(out rect, taskSettings.CaptureSettings.SurfaceOptions);
}
public static PointInfo SelectPointColor()
{
using (RectangleRegion surface = new RectangleRegion())
using (RectangleRegionForm surface = new RectangleRegionForm())
{
surface.ScreenColorPickerMode = true;
surface.Config.DetectWindows = false;
@ -538,7 +538,7 @@ public static void OpenScreenColorPicker(TaskSettings taskSettings = null)
public static void OpenRuler()
{
using (RectangleRegion surface = new RectangleRegion())
using (RectangleRegionForm surface = new RectangleRegionForm())
{
surface.RulerMode = true;
surface.Config.ShowTips = false;