mirror of
https://github.com/greenshot/greenshot
synced 2025-07-13 16:43:54 -07:00
Refactored the editor to be in it's own project, this is a step up to improve maintainability.
This commit is contained in:
parent
54038a3cbe
commit
f084d0e95e
165 changed files with 20167 additions and 19709 deletions
|
@ -21,6 +21,7 @@
|
||||||
[Files]
|
[Files]
|
||||||
Source: {#ReleaseDir}\Greenshot.exe; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
|
Source: {#ReleaseDir}\Greenshot.exe; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
|
||||||
Source: {#ReleaseDir}\Greenshot.Base.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
|
Source: {#ReleaseDir}\Greenshot.Base.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
|
||||||
|
Source: {#ReleaseDir}\Greenshot.Editor.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
|
||||||
Source: {#ReleaseDir}\Greenshot.exe.config; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
|
Source: {#ReleaseDir}\Greenshot.exe.config; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
|
||||||
Source: {#ReleaseDir}\log4net.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
|
Source: {#ReleaseDir}\log4net.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
|
||||||
Source: {#ReleaseDir}\Dapplo.Http*.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
|
Source: {#ReleaseDir}\Dapplo.Http*.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
<PackageReference Include="MSBuildTasks" Version="1.5.0.235" GeneratePathProperty="true" DevelopmentDependency="true" />
|
<PackageReference Include="MSBuildTasks" Version="1.5.0.235" GeneratePathProperty="true" DevelopmentDependency="true" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="PostBuild" BeforeTargets="PostBuildEvent" Condition="$(MSBuildProjectName.Contains('Plugin')) And !$(MSBuildProjectName.Contains('Test')) And !$(MSBuildProjectName.Contains('Demo'))">
|
<Target Name="PostBuild" BeforeTargets="PostBuildEvent" Condition="$(MSBuildProjectName.StartsWith('Greenshot.Plugin.'))">
|
||||||
<Exec Command="
|
<Exec Command="
|
||||||
xcopy /f /y /d "$(TargetDir)$(TargetName).*" "$(SolutionDir)$(SolutionName)\$(OutDir)"

|
xcopy /f /y /d "$(TargetDir)$(TargetName).*" "$(SolutionDir)$(SolutionName)\$(OutDir)"

|
||||||
xcopy /f /y /d "$(TargetDir)*.dll" "$(SolutionDir)$(SolutionName)\$(OutDir)"

|
xcopy /f /y /d "$(TargetDir)*.dll" "$(SolutionDir)$(SolutionName)\$(OutDir)"

|
||||||
|
|
|
@ -51,8 +51,8 @@ namespace Greenshot.Base.Controls
|
||||||
{
|
{
|
||||||
if (_vRefresh == 0)
|
if (_vRefresh == 0)
|
||||||
{
|
{
|
||||||
// get te hDC of the desktop to get the VREFRESH
|
// get te hDC of the desktop to get the V-REFRESH
|
||||||
using SafeWindowDcHandle desktopHandle = SafeWindowDcHandle.FromDesktop();
|
using var desktopHandle = SafeWindowDcHandle.FromDesktop();
|
||||||
_vRefresh = GDI32.GetDeviceCaps(desktopHandle, DeviceCaps.VREFRESH);
|
_vRefresh = GDI32.GetDeviceCaps(desktopHandle, DeviceCaps.VREFRESH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +88,12 @@ namespace Greenshot.Base.Controls
|
||||||
return milliseconds / VRefresh;
|
return milliseconds / VRefresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Calculate the interval for the timer to animate the frames
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Milliseconds for the interval</returns>
|
||||||
|
protected int Interval() => (int)1000 / VRefresh;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initialize the animation
|
/// Initialize the animation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -102,13 +108,13 @@ namespace Greenshot.Base.Controls
|
||||||
|
|
||||||
_timer = new Timer
|
_timer = new Timer
|
||||||
{
|
{
|
||||||
Interval = 1000 / VRefresh
|
Interval = Interval()
|
||||||
};
|
};
|
||||||
_timer.Tick += timer_Tick;
|
_timer.Tick += Timer_Tick;
|
||||||
_timer.Start();
|
_timer.Start();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Unregister at close
|
// Un-register at close
|
||||||
FormClosing += delegate { _timer?.Stop(); };
|
FormClosing += delegate { _timer?.Stop(); };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +123,7 @@ namespace Greenshot.Base.Controls
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void timer_Tick(object sender, EventArgs e)
|
private void Timer_Tick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -125,7 +131,7 @@ namespace Greenshot.Base.Controls
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Log.Warn("An exception occured while animating:", ex);
|
Log.Warn("An exception occurred while animating:", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
|
using Greenshot.Base.Core.Enums;
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces.Plugin;
|
using Greenshot.Base.Interfaces.Plugin;
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
|
using Greenshot.Base.Core.Enums;
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces;
|
using Greenshot.Base.Interfaces;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
|
|
@ -23,6 +23,7 @@ using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
|
using Greenshot.Base.Core.Enums;
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.UnmanagedHelpers;
|
using Greenshot.Base.UnmanagedHelpers;
|
||||||
using Greenshot.Base.UnmanagedHelpers.Enums;
|
using Greenshot.Base.UnmanagedHelpers.Enums;
|
||||||
|
|
|
@ -238,8 +238,10 @@ namespace Greenshot.Base.Core
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_queue.Count > 0)
|
if (_queue.Count <= 0)
|
||||||
{
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
First = Current;
|
First = Current;
|
||||||
CurrentFrameNr = 0;
|
CurrentFrameNr = 0;
|
||||||
AnimationLeg<T> nextLeg = _queue.Dequeue();
|
AnimationLeg<T> nextLeg = _queue.Dequeue();
|
||||||
|
@ -248,9 +250,7 @@ namespace Greenshot.Base.Core
|
||||||
EasingType = nextLeg.EasingType;
|
EasingType = nextLeg.EasingType;
|
||||||
EasingMode = nextLeg.EasingMode;
|
EasingMode = nextLeg.EasingMode;
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,8 +303,10 @@ namespace Greenshot.Base.Core
|
||||||
/// <returns>Rectangle</returns>
|
/// <returns>Rectangle</returns>
|
||||||
public override Rectangle Next()
|
public override Rectangle Next()
|
||||||
{
|
{
|
||||||
if (NextFrame)
|
if (!NextFrame)
|
||||||
{
|
{
|
||||||
|
return Current;
|
||||||
|
}
|
||||||
double easingValue = EasingValue;
|
double easingValue = EasingValue;
|
||||||
double dx = Last.X - First.X;
|
double dx = Last.X - First.X;
|
||||||
double dy = Last.Y - First.Y;
|
double dy = Last.Y - First.Y;
|
||||||
|
@ -316,7 +318,6 @@ namespace Greenshot.Base.Core
|
||||||
int width = First.Width + (int) (easingValue * dw);
|
int width = First.Width + (int) (easingValue * dw);
|
||||||
int height = First.Height + (int) (easingValue * dh);
|
int height = First.Height + (int) (easingValue * dh);
|
||||||
Current = new Rectangle(x, y, width, height);
|
Current = new Rectangle(x, y, width, height);
|
||||||
}
|
|
||||||
|
|
||||||
return Current;
|
return Current;
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ namespace Greenshot.Base.Core
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
// Always dispose, even when a exception occured
|
// Always dispose, even when a exception occurred
|
||||||
value.Dispose();
|
value.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Greenshot.Base.Core.Enums;
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces;
|
using Greenshot.Base.Interfaces;
|
||||||
using Greenshot.Base.Interfaces.Plugin;
|
using Greenshot.Base.Interfaces.Plugin;
|
||||||
|
|
|
@ -26,57 +26,12 @@ using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Greenshot.Base.Core.Enums;
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces;
|
using Greenshot.Base.Interfaces;
|
||||||
|
|
||||||
namespace Greenshot.Base.Core
|
namespace Greenshot.Base.Core
|
||||||
{
|
{
|
||||||
public enum ClipboardFormat
|
|
||||||
{
|
|
||||||
PNG,
|
|
||||||
DIB,
|
|
||||||
HTML,
|
|
||||||
HTMLDATAURL,
|
|
||||||
BITMAP,
|
|
||||||
DIBV5
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum OutputFormat
|
|
||||||
{
|
|
||||||
bmp,
|
|
||||||
gif,
|
|
||||||
jpg,
|
|
||||||
png,
|
|
||||||
tiff,
|
|
||||||
greenshot,
|
|
||||||
ico
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum WindowCaptureMode
|
|
||||||
{
|
|
||||||
Screen,
|
|
||||||
GDI,
|
|
||||||
Aero,
|
|
||||||
AeroTransparent,
|
|
||||||
Auto
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum BuildStates
|
|
||||||
{
|
|
||||||
UNSTABLE,
|
|
||||||
RELEASE_CANDIDATE,
|
|
||||||
RELEASE
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum ClickActions
|
|
||||||
{
|
|
||||||
DO_NOTHING,
|
|
||||||
OPEN_LAST_IN_EXPLORER,
|
|
||||||
OPEN_LAST_IN_EDITOR,
|
|
||||||
OPEN_SETTINGS,
|
|
||||||
SHOW_CONTEXT_MENU
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of CoreConfiguration.
|
/// Description of CoreConfiguration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -19,63 +19,20 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Greenshot.Base.Core;
|
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces;
|
using Greenshot.Base.Interfaces;
|
||||||
using log4net;
|
|
||||||
|
|
||||||
namespace Greenshot.Helpers
|
namespace Greenshot.Base.Core
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of DestinationHelper.
|
/// Helper class to simplify working with destinations.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class DestinationHelper
|
public static class DestinationHelper
|
||||||
{
|
{
|
||||||
private static readonly ILog Log = LogManager.GetLogger(typeof(DestinationHelper));
|
|
||||||
private static readonly CoreConfiguration CoreConfig = IniConfig.GetIniSection<CoreConfiguration>();
|
private static readonly CoreConfiguration CoreConfig = IniConfig.GetIniSection<CoreConfiguration>();
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initialize the internal destinations
|
|
||||||
/// </summary>
|
|
||||||
public static void RegisterInternalDestinations()
|
|
||||||
{
|
|
||||||
foreach (Type destinationType in InterfaceUtils.GetSubclassesOf(typeof(IDestination), true))
|
|
||||||
{
|
|
||||||
// Only take our own
|
|
||||||
if (!"Greenshot.Destinations".Equals(destinationType.Namespace))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (destinationType.IsAbstract) continue;
|
|
||||||
|
|
||||||
IDestination destination;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
destination = (IDestination) Activator.CreateInstance(destinationType);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Log.ErrorFormat("Can't create instance of {0}", destinationType);
|
|
||||||
Log.Error(e);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (destination.IsActive)
|
|
||||||
{
|
|
||||||
Log.DebugFormat("Found destination {0} with designation {1}", destinationType.Name, destination.Designation);
|
|
||||||
SimpleServiceProvider.Current.AddService(destination);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Log.DebugFormat("Ignoring destination {0} with designation {1}", destinationType.Name, destination.Designation);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Method to get all the destinations from the plugins
|
/// Method to get all the destinations from the plugins
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -115,9 +72,21 @@ namespace Greenshot.Helpers
|
||||||
/// A simple helper method which will call ExportCapture for the destination with the specified designation
|
/// A simple helper method which will call ExportCapture for the destination with the specified designation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="manuallyInitiated"></param>
|
/// <param name="manuallyInitiated"></param>
|
||||||
/// <param name="designation"></param>
|
/// <param name="designation">WellKnownDestinations</param>
|
||||||
/// <param name="surface"></param>
|
/// <param name="surface">ISurface</param>
|
||||||
/// <param name="captureDetails"></param>
|
/// <param name="captureDetails">ICaptureDetails</param>
|
||||||
|
public static ExportInformation ExportCapture(bool manuallyInitiated, WellKnownDestinations designation, ISurface surface, ICaptureDetails captureDetails)
|
||||||
|
{
|
||||||
|
return ExportCapture(manuallyInitiated, designation.ToString(), surface, captureDetails);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A simple helper method which will call ExportCapture for the destination with the specified designation
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="manuallyInitiated">bool</param>
|
||||||
|
/// <param name="designation">string</param>
|
||||||
|
/// <param name="surface">ISurface</param>
|
||||||
|
/// <param name="captureDetails">ICaptureDetails</param>
|
||||||
public static ExportInformation ExportCapture(bool manuallyInitiated, string designation, ISurface surface, ICaptureDetails captureDetails)
|
public static ExportInformation ExportCapture(bool manuallyInitiated, string designation, ISurface surface, ICaptureDetails captureDetails)
|
||||||
{
|
{
|
||||||
IDestination destination = GetDestination(designation);
|
IDestination destination = GetDestination(designation);
|
35
src/Greenshot.Base/Core/Enums/ClickActions.cs
Normal file
35
src/Greenshot.Base/Core/Enums/ClickActions.cs
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
* Greenshot - a free and open source screenshot tool
|
||||||
|
* Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
*
|
||||||
|
* For more information see: https://getgreenshot.org/
|
||||||
|
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 1 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Greenshot.Base.Core.Enums
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// This are the defined actions which can be initiated when the menu is clicked
|
||||||
|
/// </summary>
|
||||||
|
public enum ClickActions
|
||||||
|
{
|
||||||
|
DO_NOTHING,
|
||||||
|
OPEN_LAST_IN_EXPLORER,
|
||||||
|
OPEN_LAST_IN_EDITOR,
|
||||||
|
OPEN_SETTINGS,
|
||||||
|
SHOW_CONTEXT_MENU
|
||||||
|
}
|
||||||
|
}
|
36
src/Greenshot.Base/Core/Enums/ClipboardFormat.cs
Normal file
36
src/Greenshot.Base/Core/Enums/ClipboardFormat.cs
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
/*
|
||||||
|
* Greenshot - a free and open source screenshot tool
|
||||||
|
* Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
*
|
||||||
|
* For more information see: https://getgreenshot.org/
|
||||||
|
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 1 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Greenshot.Base.Core.Enums
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// These are the supported clipboard formats
|
||||||
|
/// </summary>
|
||||||
|
public enum ClipboardFormat
|
||||||
|
{
|
||||||
|
PNG,
|
||||||
|
DIB,
|
||||||
|
HTML,
|
||||||
|
HTMLDATAURL,
|
||||||
|
BITMAP,
|
||||||
|
DIBV5
|
||||||
|
}
|
||||||
|
}
|
37
src/Greenshot.Base/Core/Enums/OutputFormat.cs
Normal file
37
src/Greenshot.Base/Core/Enums/OutputFormat.cs
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* Greenshot - a free and open source screenshot tool
|
||||||
|
* Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
*
|
||||||
|
* For more information see: https://getgreenshot.org/
|
||||||
|
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 1 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Greenshot.Base.Core.Enums
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// These are the supported output formats
|
||||||
|
/// </summary>
|
||||||
|
public enum OutputFormat
|
||||||
|
{
|
||||||
|
bmp,
|
||||||
|
gif,
|
||||||
|
jpg,
|
||||||
|
png,
|
||||||
|
tiff,
|
||||||
|
greenshot,
|
||||||
|
ico
|
||||||
|
}
|
||||||
|
}
|
35
src/Greenshot.Base/Core/Enums/WindowCaptureMode.cs
Normal file
35
src/Greenshot.Base/Core/Enums/WindowCaptureMode.cs
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
* Greenshot - a free and open source screenshot tool
|
||||||
|
* Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
*
|
||||||
|
* For more information see: https://getgreenshot.org/
|
||||||
|
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 1 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Greenshot.Base.Core.Enums
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// These are the possible window capture modes
|
||||||
|
/// </summary>
|
||||||
|
public enum WindowCaptureMode
|
||||||
|
{
|
||||||
|
Screen,
|
||||||
|
GDI,
|
||||||
|
Aero,
|
||||||
|
AeroTransparent,
|
||||||
|
Auto
|
||||||
|
}
|
||||||
|
}
|
|
@ -25,6 +25,7 @@ using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Greenshot.Base.Core.Enums;
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces;
|
using Greenshot.Base.Interfaces;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
|
|
@ -32,6 +32,7 @@ using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Controls;
|
using Greenshot.Base.Controls;
|
||||||
|
using Greenshot.Base.Core.Enums;
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces;
|
using Greenshot.Base.Interfaces;
|
||||||
using Greenshot.Base.Interfaces.Plugin;
|
using Greenshot.Base.Interfaces.Plugin;
|
||||||
|
|
|
@ -7,6 +7,7 @@ using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Greenshot.Base.Core.Enums;
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces;
|
using Greenshot.Base.Interfaces;
|
||||||
using Greenshot.Base.Interop;
|
using Greenshot.Base.Interop;
|
||||||
|
|
|
@ -24,7 +24,7 @@ using System.Net;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
|
||||||
namespace Greenshot.Help
|
namespace Greenshot.Base.Help
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of HelpFileLoader.
|
/// Description of HelpFileLoader.
|
48
src/Greenshot.Base/Interfaces/ICaptureHelper.cs
Normal file
48
src/Greenshot.Base/Interfaces/ICaptureHelper.cs
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
/*
|
||||||
|
* Greenshot - a free and open source screenshot tool
|
||||||
|
* Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
*
|
||||||
|
* For more information see: https://getgreenshot.org/
|
||||||
|
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 1 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using Greenshot.Base.Core;
|
||||||
|
using Greenshot.Base.Core.Enums;
|
||||||
|
|
||||||
|
namespace Greenshot.Base.Interfaces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// This is a temporary solution to provide the CaptureHelper functionality via an interface
|
||||||
|
/// </summary>
|
||||||
|
public interface ICaptureHelper
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="windowToCapture"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
WindowDetails SelectCaptureWindow(WindowDetails windowToCapture);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Capture the specified window
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="windowToCapture">WindowDetails</param>
|
||||||
|
/// <param name="capture">ICapture</param>
|
||||||
|
/// <param name="coreConfigurationWindowCaptureMode">WindowCaptureMode</param>
|
||||||
|
/// <returns>ICapture</returns>
|
||||||
|
ICapture CaptureWindow(WindowDetails windowToCapture, ICapture capture, WindowCaptureMode coreConfigurationWindowCaptureMode);
|
||||||
|
}
|
||||||
|
}
|
46
src/Greenshot.Base/Interfaces/IGreenshotMainForm.cs
Normal file
46
src/Greenshot.Base/Interfaces/IGreenshotMainForm.cs
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
/*
|
||||||
|
* Greenshot - a free and open source screenshot tool
|
||||||
|
* Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
*
|
||||||
|
* For more information see: https://getgreenshot.org/
|
||||||
|
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 1 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Greenshot.Base.Interfaces
|
||||||
|
{
|
||||||
|
public interface IGreenshotMainForm : IWin32Window
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Create the "capture window from list" list
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="menuItem">ToolStripMenuItem</param>
|
||||||
|
/// <param name="eventHandler">EventHandler</param>
|
||||||
|
void AddCaptureWindowMenuItems(ToolStripMenuItem menuItem, EventHandler eventHandler);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This is called indirectly from the context menu "Preferences"
|
||||||
|
/// </summary>
|
||||||
|
void ShowSetting();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Show the about window
|
||||||
|
/// </summary>
|
||||||
|
void ShowAbout();
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,14 +1,58 @@
|
||||||
using System.Collections.Generic;
|
/*
|
||||||
|
* Greenshot - a free and open source screenshot tool
|
||||||
|
* Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
*
|
||||||
|
* For more information see: https://getgreenshot.org/
|
||||||
|
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 1 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Greenshot.Base.Interfaces
|
namespace Greenshot.Base.Interfaces
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// This is the interface of the service locator
|
||||||
|
/// </summary>
|
||||||
public interface IServiceLocator
|
public interface IServiceLocator
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Get all instances of the specified service
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="TService">Service to find</typeparam>
|
||||||
|
/// <returns>IEnumerable{TService}</returns>
|
||||||
IEnumerable<TService> GetAllInstances<TService>();
|
IEnumerable<TService> GetAllInstances<TService>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the only instance of the specified service
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="TService">Service to find</typeparam>
|
||||||
|
/// <returns>TService</returns>
|
||||||
TService GetInstance<TService>();
|
TService GetInstance<TService>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add one of more services to the registry
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="TService">Type of the service</typeparam>
|
||||||
|
/// <param name="services">One or more services which need to be added</param>
|
||||||
void AddService<TService>(params TService[] services);
|
void AddService<TService>(params TService[] services);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add multiple services to the registry
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="TService">Type of the service</typeparam>
|
||||||
|
/// <param name="services">IEnumerable{TService} with services to add</param>
|
||||||
void AddService<TService>(IEnumerable<TService> services);
|
void AddService<TService>(IEnumerable<TService> services);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
|
using Greenshot.Base.Core.Enums;
|
||||||
using Greenshot.Base.Effects;
|
using Greenshot.Base.Effects;
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,10 @@ namespace Greenshot.Base.UnmanagedHelpers
|
||||||
[return: MarshalAs(UnmanagedType.Bool)]
|
[return: MarshalAs(UnmanagedType.Bool)]
|
||||||
public static extern bool CloseHandle(IntPtr hObject);
|
public static extern bool CloseHandle(IntPtr hObject);
|
||||||
|
|
||||||
|
[DllImport("kernel32", SetLastError = true, CharSet = CharSet.Auto)]
|
||||||
|
public static extern int GetPackageFullName(IntPtr hProcess, ref Int32 packageFullNameLength, StringBuilder fullName);
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Method to get the process path
|
/// Method to get the process path
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
36
src/Greenshot.Base/WellKnownDestinations.cs
Normal file
36
src/Greenshot.Base/WellKnownDestinations.cs
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
/*
|
||||||
|
* Greenshot - a free and open source screenshot tool
|
||||||
|
* Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
*
|
||||||
|
* For more information see: https://getgreenshot.org/
|
||||||
|
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 1 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Greenshot.Base
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// This contains all the well known destinations, make it possible to find them via the service locator
|
||||||
|
/// </summary>
|
||||||
|
public enum WellKnownDestinations
|
||||||
|
{
|
||||||
|
Clipboard,
|
||||||
|
EMail,
|
||||||
|
FileDialog,
|
||||||
|
FileNoDialog,
|
||||||
|
Picker,
|
||||||
|
Printer
|
||||||
|
}
|
||||||
|
}
|
|
@ -27,9 +27,9 @@ using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Base.UnmanagedHelpers.Enums;
|
using Greenshot.Base.UnmanagedHelpers.Enums;
|
||||||
using Greenshot.Base.UnmanagedHelpers.Structs;
|
using Greenshot.Base.UnmanagedHelpers.Structs;
|
||||||
using Greenshot.Drawing.Fields;
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
|
||||||
namespace Greenshot.Configuration
|
namespace Greenshot.Editor.Configuration
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of CoreConfiguration.
|
/// Description of CoreConfiguration.
|
82
src/Greenshot.Editor/Configuration/LanguageKeys.cs
Normal file
82
src/Greenshot.Editor/Configuration/LanguageKeys.cs
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
/*
|
||||||
|
* Greenshot - a free and open source screenshot tool
|
||||||
|
* Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
*
|
||||||
|
* For more information see: https://getgreenshot.org/
|
||||||
|
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 1 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
namespace Greenshot.Editor.Configuration
|
||||||
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
public enum LangKey
|
||||||
|
{
|
||||||
|
none,
|
||||||
|
contextmenu_capturefullscreen_all,
|
||||||
|
contextmenu_capturefullscreen_left,
|
||||||
|
contextmenu_capturefullscreen_top,
|
||||||
|
contextmenu_capturefullscreen_right,
|
||||||
|
contextmenu_capturefullscreen_bottom,
|
||||||
|
contextmenu_captureie,
|
||||||
|
editor_clipboardfailed,
|
||||||
|
editor_close_on_save,
|
||||||
|
editor_close_on_save_title,
|
||||||
|
editor_copytoclipboard,
|
||||||
|
editor_cuttoclipboard,
|
||||||
|
editor_deleteelement,
|
||||||
|
editor_downonelevel,
|
||||||
|
editor_downtobottom,
|
||||||
|
editor_duplicate,
|
||||||
|
editor_email,
|
||||||
|
editor_imagesaved,
|
||||||
|
editor_title,
|
||||||
|
editor_uponelevel,
|
||||||
|
editor_uptotop,
|
||||||
|
editor_undo,
|
||||||
|
editor_redo,
|
||||||
|
editor_resetsize,
|
||||||
|
error,
|
||||||
|
error_multipleinstances,
|
||||||
|
error_openfile,
|
||||||
|
error_openlink,
|
||||||
|
error_save,
|
||||||
|
error_save_invalid_chars,
|
||||||
|
print_error,
|
||||||
|
quicksettings_destination_file,
|
||||||
|
settings_destination,
|
||||||
|
settings_destination_clipboard,
|
||||||
|
settings_destination_editor,
|
||||||
|
settings_destination_fileas,
|
||||||
|
settings_destination_printer,
|
||||||
|
settings_destination_picker,
|
||||||
|
settings_filenamepattern,
|
||||||
|
settings_message_filenamepattern,
|
||||||
|
settings_printoptions,
|
||||||
|
settings_tooltip_filenamepattern,
|
||||||
|
settings_tooltip_language,
|
||||||
|
settings_tooltip_primaryimageformat,
|
||||||
|
settings_tooltip_storagelocation,
|
||||||
|
settings_visualization,
|
||||||
|
settings_window_capture_mode,
|
||||||
|
tooltip_firststart,
|
||||||
|
warning,
|
||||||
|
warning_hotkeys,
|
||||||
|
wait_ie_capture,
|
||||||
|
update_found
|
||||||
|
}
|
||||||
|
}
|
|
@ -24,7 +24,7 @@ using System.ComponentModel;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Controls;
|
using Greenshot.Base.Controls;
|
||||||
|
|
||||||
namespace Greenshot.Controls
|
namespace Greenshot.Editor.Controls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of BindableToolStripButton.
|
/// Description of BindableToolStripButton.
|
|
@ -24,7 +24,7 @@ using System.ComponentModel;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Controls;
|
using Greenshot.Base.Controls;
|
||||||
|
|
||||||
namespace Greenshot.Controls
|
namespace Greenshot.Editor.Controls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A simple ToolStripComboBox implementing INotifyPropertyChanged for data binding
|
/// A simple ToolStripComboBox implementing INotifyPropertyChanged for data binding
|
|
@ -23,7 +23,7 @@ using System.ComponentModel;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Controls;
|
using Greenshot.Base.Controls;
|
||||||
|
|
||||||
namespace Greenshot.Controls
|
namespace Greenshot.Editor.Controls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A simple ToolStripDropDownButton implementing INotifyPropertyChanged for data binding.
|
/// A simple ToolStripDropDownButton implementing INotifyPropertyChanged for data binding.
|
|
@ -25,9 +25,9 @@ using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Controls;
|
using Greenshot.Base.Controls;
|
||||||
using ColorDialog = Greenshot.Forms.ColorDialog;
|
using ColorDialog = Greenshot.Editor.Forms.ColorDialog;
|
||||||
|
|
||||||
namespace Greenshot.Controls
|
namespace Greenshot.Editor.Controls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of ColorButton.
|
/// Description of ColorButton.
|
|
@ -22,7 +22,7 @@
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Greenshot.Controls
|
namespace Greenshot.Editor.Controls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Prevent having a gradient background in the toolstrip, and the overflow button
|
/// Prevent having a gradient background in the toolstrip, and the overflow button
|
|
@ -24,7 +24,7 @@ using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Greenshot.Controls
|
namespace Greenshot.Editor.Controls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolStripComboBox containing installed font families,
|
/// ToolStripComboBox containing installed font families,
|
|
@ -23,7 +23,7 @@ using System;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.UnmanagedHelpers.Enums;
|
using Greenshot.Base.UnmanagedHelpers.Enums;
|
||||||
|
|
||||||
namespace Greenshot.Controls
|
namespace Greenshot.Editor.Controls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is an extension of the default MenuStrip and allows us to click it even when the form doesn't have focus.
|
/// This is an extension of the default MenuStrip and allows us to click it even when the form doesn't have focus.
|
|
@ -22,7 +22,7 @@
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Greenshot.Controls
|
namespace Greenshot.Editor.Controls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// See: https://nickstips.wordpress.com/2010/03/03/c-panel-resets-scroll-position-after-focus-is-lost-and-regained/
|
/// See: https://nickstips.wordpress.com/2010/03/03/c-panel-resets-scroll-position-after-focus-is-lost-and-regained/
|
|
@ -25,10 +25,10 @@ using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.UnmanagedHelpers;
|
using Greenshot.Base.UnmanagedHelpers;
|
||||||
using Greenshot.Base.UnmanagedHelpers.Enums;
|
using Greenshot.Base.UnmanagedHelpers.Enums;
|
||||||
using Greenshot.Forms;
|
using Greenshot.Editor.Forms;
|
||||||
using ColorDialog = Greenshot.Forms.ColorDialog;
|
using ColorDialog = Greenshot.Editor.Forms.ColorDialog;
|
||||||
|
|
||||||
namespace Greenshot.Controls
|
namespace Greenshot.Editor.Controls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This code was supplied by Hi-Coder as a patch for Greenshot
|
/// This code was supplied by Hi-Coder as a patch for Greenshot
|
|
@ -25,9 +25,9 @@ using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Controls;
|
using Greenshot.Base.Controls;
|
||||||
using ColorDialog = Greenshot.Forms.ColorDialog;
|
using ColorDialog = Greenshot.Editor.Forms.ColorDialog;
|
||||||
|
|
||||||
namespace Greenshot.Controls
|
namespace Greenshot.Editor.Controls
|
||||||
{
|
{
|
||||||
public class ToolStripColorButton : ToolStripButton, INotifyPropertyChanged, IGreenshotLanguageBindable
|
public class ToolStripColorButton : ToolStripButton, INotifyPropertyChanged, IGreenshotLanguageBindable
|
||||||
{
|
{
|
|
@ -22,7 +22,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Greenshot.Controls
|
namespace Greenshot.Editor.Controls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is an extension of the default ToolStrip and allows us to click it even when the form doesn't have focus.
|
/// This is an extension of the default ToolStrip and allows us to click it even when the form doesn't have focus.
|
|
@ -24,7 +24,7 @@ using System.ComponentModel;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Windows.Forms.Design;
|
using System.Windows.Forms.Design;
|
||||||
|
|
||||||
namespace Greenshot.Controls
|
namespace Greenshot.Editor.Controls
|
||||||
{
|
{
|
||||||
[ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip | ToolStripItemDesignerAvailability.StatusStrip)]
|
[ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip | ToolStripItemDesignerAvailability.StatusStrip)]
|
||||||
public class ToolStripNumericUpDown : ToolStripControlHost, INotifyPropertyChanged
|
public class ToolStripNumericUpDown : ToolStripControlHost, INotifyPropertyChanged
|
|
@ -26,11 +26,11 @@ using Greenshot.Base.Core;
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces;
|
using Greenshot.Base.Interfaces;
|
||||||
using Greenshot.Base.Interfaces.Forms;
|
using Greenshot.Base.Interfaces.Forms;
|
||||||
using Greenshot.Configuration;
|
using Greenshot.Editor.Configuration;
|
||||||
using Greenshot.Forms;
|
using Greenshot.Editor.Forms;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
|
||||||
namespace Greenshot.Destinations
|
namespace Greenshot.Editor.Destinations
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of EditorDestination.
|
/// Description of EditorDestination.
|
|
@ -26,7 +26,7 @@ using Greenshot.Base.Core;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Base.Interfaces.Drawing.Adorners;
|
using Greenshot.Base.Interfaces.Drawing.Adorners;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Adorners
|
namespace Greenshot.Editor.Drawing.Adorners
|
||||||
{
|
{
|
||||||
public class AbstractAdorner : IAdorner
|
public class AbstractAdorner : IAdorner
|
||||||
{
|
{
|
|
@ -19,13 +19,13 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.Helpers;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using Greenshot.Editor.Helpers;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Adorners
|
namespace Greenshot.Editor.Drawing.Adorners
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the adorner for the line based containers
|
/// This is the adorner for the line based containers
|
|
@ -19,13 +19,13 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.Helpers;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using Greenshot.Editor.Helpers;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Adorners
|
namespace Greenshot.Editor.Drawing.Adorners
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the default "legacy" gripper adorner, not the one used for the tail in the speech-bubble
|
/// This is the default "legacy" gripper adorner, not the one used for the tail in the speech-bubble
|
|
@ -24,7 +24,7 @@ using System.Drawing.Drawing2D;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Adorners
|
namespace Greenshot.Editor.Drawing.Adorners
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This implements the special "gripper" for the Speech-Bubble tail
|
/// This implements the special "gripper" for the Speech-Bubble tail
|
|
@ -23,9 +23,9 @@ using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Drawing.Fields;
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of LineContainer.
|
/// Description of LineContainer.
|
|
@ -22,10 +22,10 @@
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Drawing.Fields;
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
using Greenshot.Helpers;
|
using Greenshot.Editor.Helpers;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of CropContainer.
|
/// Description of CropContainer.
|
|
@ -21,14 +21,14 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using log4net;
|
using System.IO;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using log4net;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of CursorContainer.
|
/// Description of CursorContainer.
|
|
@ -19,13 +19,6 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.Configuration;
|
|
||||||
using Greenshot.Drawing.Adorners;
|
|
||||||
using Greenshot.Drawing.Fields;
|
|
||||||
using Greenshot.Drawing.Filters;
|
|
||||||
using Greenshot.Helpers;
|
|
||||||
using Greenshot.Memento;
|
|
||||||
using log4net;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
@ -37,8 +30,15 @@ using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces;
|
using Greenshot.Base.Interfaces;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Base.Interfaces.Drawing.Adorners;
|
using Greenshot.Base.Interfaces.Drawing.Adorners;
|
||||||
|
using Greenshot.Editor.Configuration;
|
||||||
|
using Greenshot.Editor.Drawing.Adorners;
|
||||||
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
using Greenshot.Editor.Drawing.Filters;
|
||||||
|
using Greenshot.Editor.Helpers;
|
||||||
|
using Greenshot.Editor.Memento;
|
||||||
|
using log4net;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// represents a rectangle, ellipse, label or whatever. Can contain filters, too.
|
/// represents a rectangle, ellipse, label or whatever. Can contain filters, too.
|
|
@ -19,8 +19,6 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.Configuration;
|
|
||||||
using Greenshot.Memento;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
@ -31,9 +29,11 @@ using System.Windows.Forms;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
using Greenshot.Base.Interfaces;
|
using Greenshot.Base.Interfaces;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Forms;
|
using Greenshot.Editor.Configuration;
|
||||||
|
using Greenshot.Editor.Forms;
|
||||||
|
using Greenshot.Editor.Memento;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Dispatches most of a DrawableContainer's public properties and methods to a list of DrawableContainers.
|
/// Dispatches most of a DrawableContainer's public properties and methods to a list of DrawableContainers.
|
|
@ -23,10 +23,10 @@ using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Drawing.Fields;
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
using Greenshot.Helpers;
|
using Greenshot.Editor.Helpers;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of EllipseContainer.
|
/// Description of EllipseContainer.
|
|
@ -26,10 +26,10 @@ using System.Drawing;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Configuration;
|
using Greenshot.Editor.Configuration;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Fields
|
namespace Greenshot.Editor.Drawing.Fields
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Basic IFieldHolder implementation, providing access to a set of fields
|
/// Basic IFieldHolder implementation, providing access to a set of fields
|
|
@ -24,7 +24,7 @@ using System.Collections.Generic;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Fields
|
namespace Greenshot.Editor.Drawing.Fields
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Basic IFieldHolderWithChildren implementation. Similar to IFieldHolder,
|
/// Basic IFieldHolderWithChildren implementation. Similar to IFieldHolder,
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Fields.Binding
|
namespace Greenshot.Editor.Drawing.Fields.Binding
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Basic IBindingConverter implementation
|
/// Basic IBindingConverter implementation
|
|
@ -23,7 +23,7 @@ using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Fields.Binding
|
namespace Greenshot.Editor.Drawing.Fields.Binding
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Bidirectional binding of properties of two INotifyPropertyChanged instances.
|
/// Bidirectional binding of properties of two INotifyPropertyChanged instances.
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Fields.Binding
|
namespace Greenshot.Editor.Drawing.Fields.Binding
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts decimal to double (%) and vice versa, e.g. 95f to 0.95d
|
/// Converts decimal to double (%) and vice versa, e.g. 95f to 0.95d
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Fields.Binding
|
namespace Greenshot.Editor.Drawing.Fields.Binding
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts decimal to float and vice versa.
|
/// Converts decimal to float and vice versa.
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Fields.Binding
|
namespace Greenshot.Editor.Drawing.Fields.Binding
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts decimal to int and vice versa.
|
/// Converts decimal to int and vice versa.
|
|
@ -19,7 +19,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Fields.Binding
|
namespace Greenshot.Editor.Drawing.Fields.Binding
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interface for a bidirectional converter, for use with BidirectionalBinding.
|
/// Interface for a bidirectional converter, for use with BidirectionalBinding.
|
|
@ -19,7 +19,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Fields.Binding
|
namespace Greenshot.Editor.Drawing.Fields.Binding
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interface for a bidirectional validator, for use with BidirectionalBinding.
|
/// Interface for a bidirectional validator, for use with BidirectionalBinding.
|
|
@ -19,7 +19,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Fields.Binding
|
namespace Greenshot.Editor.Drawing.Fields.Binding
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Validates a value not to be null.
|
/// Validates a value not to be null.
|
|
@ -23,7 +23,7 @@ using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Fields
|
namespace Greenshot.Editor.Drawing.Fields
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a single field of a drawable element, i.e.
|
/// Represents a single field of a drawable element, i.e.
|
|
@ -20,15 +20,15 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using Greenshot.Configuration;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces;
|
using Greenshot.Base.Interfaces;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using Greenshot.Editor.Configuration;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Fields
|
namespace Greenshot.Editor.Drawing.Fields
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the current set of properties for the editor.
|
/// Represents the current set of properties for the editor.
|
|
@ -22,7 +22,7 @@
|
||||||
using System;
|
using System;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Fields
|
namespace Greenshot.Editor.Drawing.Fields
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines all FieldTypes + their default value.
|
/// Defines all FieldTypes + their default value.
|
|
@ -21,13 +21,13 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Greenshot.Drawing.Fields;
|
|
||||||
using Greenshot.Helpers;
|
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
using Greenshot.Editor.Helpers;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// empty container for filter-only elements
|
/// empty container for filter-only elements
|
|
@ -23,9 +23,9 @@ using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Drawing.Fields;
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Filters
|
namespace Greenshot.Editor.Drawing.Filters
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Graphical filter which can be added to DrawableContainer.
|
/// Graphical filter which can be added to DrawableContainer.
|
|
@ -21,13 +21,13 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Greenshot.Drawing.Fields;
|
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Base.UnmanagedHelpers;
|
using Greenshot.Base.UnmanagedHelpers;
|
||||||
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Filters
|
namespace Greenshot.Editor.Drawing.Filters
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class BlurFilter : AbstractFilter
|
public class BlurFilter : AbstractFilter
|
|
@ -21,13 +21,13 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Greenshot.Drawing.Fields;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Drawing.Imaging;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Filters
|
namespace Greenshot.Editor.Drawing.Filters
|
||||||
{
|
{
|
||||||
[Serializable()]
|
[Serializable()]
|
||||||
public class BrightnessFilter : AbstractFilter
|
public class BrightnessFilter : AbstractFilter
|
|
@ -26,7 +26,7 @@ using System.Drawing.Imaging;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Filters
|
namespace Greenshot.Editor.Drawing.Filters
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of GrayscaleFilter.
|
/// Description of GrayscaleFilter.
|
|
@ -21,12 +21,12 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Greenshot.Drawing.Fields;
|
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Filters
|
namespace Greenshot.Editor.Drawing.Filters
|
||||||
{
|
{
|
||||||
[Serializable()]
|
[Serializable()]
|
||||||
public class HighlightFilter : AbstractFilter
|
public class HighlightFilter : AbstractFilter
|
|
@ -23,7 +23,7 @@ using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Filters
|
namespace Greenshot.Editor.Drawing.Filters
|
||||||
{
|
{
|
||||||
public interface IFilter : INotifyPropertyChanged, IFieldHolder
|
public interface IFilter : INotifyPropertyChanged, IFieldHolder
|
||||||
{
|
{
|
|
@ -21,12 +21,12 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Greenshot.Drawing.Fields;
|
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Filters
|
namespace Greenshot.Editor.Drawing.Filters
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class MagnifierFilter : AbstractFilter
|
public class MagnifierFilter : AbstractFilter
|
|
@ -24,10 +24,10 @@ using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Drawing.Fields;
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
using Greenshot.Helpers;
|
using Greenshot.Editor.Helpers;
|
||||||
|
|
||||||
namespace Greenshot.Drawing.Filters
|
namespace Greenshot.Editor.Drawing.Filters
|
||||||
{
|
{
|
||||||
[Serializable()]
|
[Serializable()]
|
||||||
public class PixelizationFilter : AbstractFilter
|
public class PixelizationFilter : AbstractFilter
|
|
@ -19,16 +19,16 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.Drawing.Fields;
|
|
||||||
using Greenshot.Helpers;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
using Greenshot.Editor.Helpers;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of PathContainer.
|
/// Description of PathContainer.
|
|
@ -22,10 +22,10 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Drawing.Fields;
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
using Greenshot.Drawing.Filters;
|
using Greenshot.Editor.Drawing.Filters;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of ObfuscateContainer.
|
/// Description of ObfuscateContainer.
|
|
@ -21,13 +21,13 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using log4net;
|
using System.IO;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using log4net;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of IconContainer.
|
/// Description of IconContainer.
|
|
@ -21,16 +21,16 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
|
||||||
using Greenshot.Drawing.Fields;
|
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using log4net;
|
using System.IO;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
using Greenshot.Base.Effects;
|
using Greenshot.Base.Effects;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
using log4net;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of BitmapContainer.
|
/// Description of BitmapContainer.
|
|
@ -24,11 +24,11 @@ using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Drawing.Fields;
|
using Greenshot.Editor.Drawing.Adorners;
|
||||||
using Greenshot.Helpers;
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
using Greenshot.Drawing.Adorners;
|
using Greenshot.Editor.Helpers;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of LineContainer.
|
/// Description of LineContainer.
|
|
@ -22,10 +22,10 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Drawing.Fields;
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
using Greenshot.Drawing.Filters;
|
using Greenshot.Editor.Drawing.Filters;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of ObfuscateContainer.
|
/// Description of ObfuscateContainer.
|
|
@ -19,7 +19,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Position
|
/// Position
|
|
@ -22,12 +22,12 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using Greenshot.Drawing.Fields;
|
|
||||||
using Greenshot.Helpers;
|
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
using Greenshot.Editor.Helpers;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a rectangular shape on the Surface
|
/// Represents a rectangular shape on the Surface
|
|
@ -19,16 +19,16 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.Drawing.Fields;
|
|
||||||
using Greenshot.Helpers;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Drawing.Text;
|
using System.Drawing.Text;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
using Greenshot.Editor.Helpers;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of SpeechbubbleContainer.
|
/// Description of SpeechbubbleContainer.
|
|
@ -19,16 +19,16 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.Drawing.Fields;
|
|
||||||
using Greenshot.Helpers;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Drawing.Text;
|
using System.Drawing.Text;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
using Greenshot.Editor.Helpers;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is an enumerated label, every single StepLabelContainer shows the number of the order it was created.
|
/// This is an enumerated label, every single StepLabelContainer shows the number of the order it was created.
|
|
@ -19,11 +19,6 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.Configuration;
|
|
||||||
using Greenshot.Drawing.Fields;
|
|
||||||
using Greenshot.Helpers;
|
|
||||||
using Greenshot.Memento;
|
|
||||||
using log4net;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
@ -40,8 +35,13 @@ using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces;
|
using Greenshot.Base.Interfaces;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Base.Interfaces.Drawing.Adorners;
|
using Greenshot.Base.Interfaces.Drawing.Adorners;
|
||||||
|
using Greenshot.Editor.Configuration;
|
||||||
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
using Greenshot.Editor.Helpers;
|
||||||
|
using Greenshot.Editor.Memento;
|
||||||
|
using log4net;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of Surface.
|
/// Description of Surface.
|
|
@ -19,9 +19,6 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.Drawing.Fields;
|
|
||||||
using Greenshot.Helpers;
|
|
||||||
using Greenshot.Memento;
|
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
@ -32,8 +29,11 @@ using System.Runtime.Serialization;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
|
using Greenshot.Editor.Helpers;
|
||||||
|
using Greenshot.Editor.Memento;
|
||||||
|
|
||||||
namespace Greenshot.Drawing
|
namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a textbox (extends RectangleContainer for border/background support
|
/// Represents a textbox (extends RectangleContainer for border/background support
|
|
@ -20,8 +20,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.Base.Controls;
|
using Greenshot.Base.Controls;
|
||||||
|
using Greenshot.Editor.Controls;
|
||||||
|
|
||||||
namespace Greenshot.Forms {
|
namespace Greenshot.Editor.Forms {
|
||||||
public partial class ColorDialog {
|
public partial class ColorDialog {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Designer variable used to keep track of non-visual components.
|
/// Designer variable used to keep track of non-visual components.
|
||||||
|
@ -64,7 +65,7 @@ namespace Greenshot.Forms {
|
||||||
this.textBoxAlpha = new System.Windows.Forms.TextBox();
|
this.textBoxAlpha = new System.Windows.Forms.TextBox();
|
||||||
this.labelAlpha = new GreenshotLabel();
|
this.labelAlpha = new GreenshotLabel();
|
||||||
this.btnApply = new GreenshotButton();
|
this.btnApply = new GreenshotButton();
|
||||||
this.pipette = new Greenshot.Controls.Pipette();
|
this.pipette = new Pipette();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// btnTransparent
|
// btnTransparent
|
||||||
|
@ -228,7 +229,7 @@ namespace Greenshot.Forms {
|
||||||
this.pipette.Name = "pipette";
|
this.pipette.Name = "pipette";
|
||||||
this.pipette.Size = new System.Drawing.Size(33, 23);
|
this.pipette.Size = new System.Drawing.Size(33, 23);
|
||||||
this.pipette.TabIndex = 13;
|
this.pipette.TabIndex = 13;
|
||||||
this.pipette.PipetteUsed += new System.EventHandler<Greenshot.Controls.PipetteUsedArgs>(this.PipetteUsed);
|
this.pipette.PipetteUsed += new System.EventHandler<PipetteUsedArgs>(this.PipetteUsed);
|
||||||
//
|
//
|
||||||
// ColorDialog
|
// ColorDialog
|
||||||
//
|
//
|
||||||
|
@ -277,7 +278,7 @@ namespace Greenshot.Forms {
|
||||||
private System.Windows.Forms.TextBox textBoxBlue;
|
private System.Windows.Forms.TextBox textBoxBlue;
|
||||||
private System.Windows.Forms.Panel colorPanel;
|
private System.Windows.Forms.Panel colorPanel;
|
||||||
private GreenshotButton btnTransparent;
|
private GreenshotButton btnTransparent;
|
||||||
private Greenshot.Controls.Pipette pipette;
|
private Pipette pipette;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,15 +26,15 @@ using System.Globalization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Configuration;
|
using Greenshot.Editor.Configuration;
|
||||||
using Greenshot.Controls;
|
using Greenshot.Editor.Controls;
|
||||||
|
|
||||||
namespace Greenshot.Forms
|
namespace Greenshot.Editor.Forms
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of ColorDialog.
|
/// Description of ColorDialog.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ColorDialog : BaseForm
|
public partial class ColorDialog : EditorForm
|
||||||
{
|
{
|
||||||
private static readonly EditorConfiguration EditorConfig = IniConfig.GetIniSection<EditorConfiguration>();
|
private static readonly EditorConfiguration EditorConfig = IniConfig.GetIniSection<EditorConfiguration>();
|
||||||
private static ColorDialog _instance;
|
private static ColorDialog _instance;
|
|
@ -25,7 +25,7 @@ using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Greenshot.Forms
|
namespace Greenshot.Editor.Forms
|
||||||
{
|
{
|
||||||
public delegate void ColorPickerEventHandler(object o, ColorPickerEventArgs e);
|
public delegate void ColorPickerEventHandler(object o, ColorPickerEventArgs e);
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
using Greenshot.Base.Controls;
|
using Greenshot.Base.Controls;
|
||||||
|
|
||||||
namespace Greenshot.Forms {
|
namespace Greenshot.Editor.Forms {
|
||||||
partial class DropShadowSettingsForm {
|
partial class DropShadowSettingsForm {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
|
@ -24,9 +24,9 @@ using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Effects;
|
using Greenshot.Base.Effects;
|
||||||
|
|
||||||
namespace Greenshot.Forms
|
namespace Greenshot.Editor.Forms
|
||||||
{
|
{
|
||||||
public partial class DropShadowSettingsForm : BaseForm
|
public partial class DropShadowSettingsForm : EditorForm
|
||||||
{
|
{
|
||||||
private readonly DropShadowEffect _effect;
|
private readonly DropShadowEffect _effect;
|
||||||
|
|
29
src/Greenshot.Editor/Forms/EditorForm.cs
Normal file
29
src/Greenshot.Editor/Forms/EditorForm.cs
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* Greenshot - a free and open source screenshot tool
|
||||||
|
* Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
|
||||||
|
*
|
||||||
|
* For more information see: https://getgreenshot.org/
|
||||||
|
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 1 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using Greenshot.Base.Controls;
|
||||||
|
|
||||||
|
namespace Greenshot.Editor.Forms
|
||||||
|
{
|
||||||
|
public class EditorForm : GreenshotForm
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
|
@ -20,9 +20,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.Base.Controls;
|
using Greenshot.Base.Controls;
|
||||||
using Greenshot.Controls;
|
using Greenshot.Editor.Controls;
|
||||||
|
using Greenshot.Editor.Drawing;
|
||||||
|
|
||||||
namespace Greenshot.Forms {
|
namespace Greenshot.Editor.Forms {
|
||||||
partial class ImageEditorForm {
|
partial class ImageEditorForm {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Designer variable used to keep track of non-visual components.
|
/// Designer variable used to keep track of non-visual components.
|
||||||
|
@ -58,7 +59,7 @@ namespace Greenshot.Forms {
|
||||||
this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
this.panel1 = new NonJumpingPanel();
|
this.panel1 = new NonJumpingPanel();
|
||||||
this.toolsToolStrip = new Greenshot.Controls.ToolStripEx();
|
this.toolsToolStrip = new ToolStripEx();
|
||||||
this.btnCursor = new GreenshotToolStripButton();
|
this.btnCursor = new GreenshotToolStripButton();
|
||||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.btnRect = new GreenshotToolStripButton();
|
this.btnRect = new GreenshotToolStripButton();
|
||||||
|
@ -83,7 +84,7 @@ namespace Greenshot.Forms {
|
||||||
this.btnCrop = new GreenshotToolStripButton();
|
this.btnCrop = new GreenshotToolStripButton();
|
||||||
this.rotateCwToolstripButton = new GreenshotToolStripButton();
|
this.rotateCwToolstripButton = new GreenshotToolStripButton();
|
||||||
this.rotateCcwToolstripButton = new GreenshotToolStripButton();
|
this.rotateCcwToolstripButton = new GreenshotToolStripButton();
|
||||||
this.menuStrip1 = new Greenshot.Controls.MenuStripEx();
|
this.menuStrip1 = new MenuStripEx();
|
||||||
this.fileStripMenuItem = new GreenshotToolStripMenuItem();
|
this.fileStripMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.editToolStripMenuItem = new GreenshotToolStripMenuItem();
|
this.editToolStripMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
@ -124,7 +125,7 @@ namespace Greenshot.Forms {
|
||||||
this.helpToolStripMenuItem = new GreenshotToolStripMenuItem();
|
this.helpToolStripMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.helpToolStripMenuItem1 = new GreenshotToolStripMenuItem();
|
this.helpToolStripMenuItem1 = new GreenshotToolStripMenuItem();
|
||||||
this.aboutToolStripMenuItem = new GreenshotToolStripMenuItem();
|
this.aboutToolStripMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.destinationsToolStrip = new Greenshot.Controls.ToolStripEx();
|
this.destinationsToolStrip = new ToolStripEx();
|
||||||
this.btnSave = new GreenshotToolStripButton();
|
this.btnSave = new GreenshotToolStripButton();
|
||||||
this.btnClipboard = new GreenshotToolStripButton();
|
this.btnClipboard = new GreenshotToolStripButton();
|
||||||
this.btnPrint = new GreenshotToolStripButton();
|
this.btnPrint = new GreenshotToolStripButton();
|
||||||
|
@ -141,57 +142,57 @@ namespace Greenshot.Forms {
|
||||||
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.toolStripSeparator16 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator16 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.btnHelp = new GreenshotToolStripButton();
|
this.btnHelp = new GreenshotToolStripButton();
|
||||||
this.propertiesToolStrip = new Greenshot.Controls.ToolStripEx();
|
this.propertiesToolStrip = new ToolStripEx();
|
||||||
this.obfuscateModeButton = new Greenshot.Controls.BindableToolStripDropDownButton();
|
this.obfuscateModeButton = new BindableToolStripDropDownButton();
|
||||||
this.pixelizeToolStripMenuItem = new GreenshotToolStripMenuItem();
|
this.pixelizeToolStripMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.blurToolStripMenuItem = new GreenshotToolStripMenuItem();
|
this.blurToolStripMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.highlightModeButton = new Greenshot.Controls.BindableToolStripDropDownButton();
|
this.highlightModeButton = new BindableToolStripDropDownButton();
|
||||||
this.textHighlightMenuItem = new GreenshotToolStripMenuItem();
|
this.textHighlightMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.areaHighlightMenuItem = new GreenshotToolStripMenuItem();
|
this.areaHighlightMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.grayscaleHighlightMenuItem = new GreenshotToolStripMenuItem();
|
this.grayscaleHighlightMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.magnifyMenuItem = new GreenshotToolStripMenuItem();
|
this.magnifyMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.btnFillColor = new Greenshot.Controls.ToolStripColorButton();
|
this.btnFillColor = new ToolStripColorButton();
|
||||||
this.btnLineColor = new Greenshot.Controls.ToolStripColorButton();
|
this.btnLineColor = new ToolStripColorButton();
|
||||||
this.lineThicknessLabel = new GreenshotToolStripLabel();
|
this.lineThicknessLabel = new GreenshotToolStripLabel();
|
||||||
this.lineThicknessUpDown = new Greenshot.Controls.ToolStripNumericUpDown();
|
this.lineThicknessUpDown = new ToolStripNumericUpDown();
|
||||||
this.counterLabel = new GreenshotToolStripLabel();
|
this.counterLabel = new GreenshotToolStripLabel();
|
||||||
this.counterUpDown = new Greenshot.Controls.ToolStripNumericUpDown();
|
this.counterUpDown = new ToolStripNumericUpDown();
|
||||||
this.fontFamilyComboBox = new Greenshot.Controls.FontFamilyComboBox();
|
this.fontFamilyComboBox = new FontFamilyComboBox();
|
||||||
this.fontSizeLabel = new GreenshotToolStripLabel();
|
this.fontSizeLabel = new GreenshotToolStripLabel();
|
||||||
this.fontSizeUpDown = new Greenshot.Controls.ToolStripNumericUpDown();
|
this.fontSizeUpDown = new ToolStripNumericUpDown();
|
||||||
this.fontBoldButton = new Greenshot.Controls.BindableToolStripButton();
|
this.fontBoldButton = new BindableToolStripButton();
|
||||||
this.fontItalicButton = new Greenshot.Controls.BindableToolStripButton();
|
this.fontItalicButton = new BindableToolStripButton();
|
||||||
this.textVerticalAlignmentButton = new Greenshot.Controls.BindableToolStripDropDownButton();
|
this.textVerticalAlignmentButton = new BindableToolStripDropDownButton();
|
||||||
this.alignTopToolStripMenuItem = new GreenshotToolStripMenuItem();
|
this.alignTopToolStripMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.alignMiddleToolStripMenuItem = new GreenshotToolStripMenuItem();
|
this.alignMiddleToolStripMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.alignBottomToolStripMenuItem = new GreenshotToolStripMenuItem();
|
this.alignBottomToolStripMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.blurRadiusLabel = new GreenshotToolStripLabel();
|
this.blurRadiusLabel = new GreenshotToolStripLabel();
|
||||||
this.blurRadiusUpDown = new Greenshot.Controls.ToolStripNumericUpDown();
|
this.blurRadiusUpDown = new ToolStripNumericUpDown();
|
||||||
this.brightnessLabel = new GreenshotToolStripLabel();
|
this.brightnessLabel = new GreenshotToolStripLabel();
|
||||||
this.brightnessUpDown = new Greenshot.Controls.ToolStripNumericUpDown();
|
this.brightnessUpDown = new ToolStripNumericUpDown();
|
||||||
this.previewQualityLabel = new GreenshotToolStripLabel();
|
this.previewQualityLabel = new GreenshotToolStripLabel();
|
||||||
this.previewQualityUpDown = new Greenshot.Controls.ToolStripNumericUpDown();
|
this.previewQualityUpDown = new ToolStripNumericUpDown();
|
||||||
this.magnificationFactorLabel = new GreenshotToolStripLabel();
|
this.magnificationFactorLabel = new GreenshotToolStripLabel();
|
||||||
this.magnificationFactorUpDown = new Greenshot.Controls.ToolStripNumericUpDown();
|
this.magnificationFactorUpDown = new ToolStripNumericUpDown();
|
||||||
this.pixelSizeLabel = new GreenshotToolStripLabel();
|
this.pixelSizeLabel = new GreenshotToolStripLabel();
|
||||||
this.pixelSizeUpDown = new Greenshot.Controls.ToolStripNumericUpDown();
|
this.pixelSizeUpDown = new ToolStripNumericUpDown();
|
||||||
this.arrowHeadsLabel = new GreenshotToolStripLabel();
|
this.arrowHeadsLabel = new GreenshotToolStripLabel();
|
||||||
this.arrowHeadsDropDownButton = new GreenshotToolStripDropDownButton();
|
this.arrowHeadsDropDownButton = new GreenshotToolStripDropDownButton();
|
||||||
this.arrowHeadStartMenuItem = new GreenshotToolStripMenuItem();
|
this.arrowHeadStartMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.arrowHeadEndMenuItem = new GreenshotToolStripMenuItem();
|
this.arrowHeadEndMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.arrowHeadBothMenuItem = new GreenshotToolStripMenuItem();
|
this.arrowHeadBothMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.arrowHeadNoneMenuItem = new GreenshotToolStripMenuItem();
|
this.arrowHeadNoneMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.shadowButton = new Greenshot.Controls.BindableToolStripButton();
|
this.shadowButton = new BindableToolStripButton();
|
||||||
this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.btnConfirm = new Greenshot.Controls.BindableToolStripButton();
|
this.btnConfirm = new BindableToolStripButton();
|
||||||
this.btnCancel = new Greenshot.Controls.BindableToolStripButton();
|
this.btnCancel = new BindableToolStripButton();
|
||||||
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.closeToolStripMenuItem = new GreenshotToolStripMenuItem();
|
this.closeToolStripMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.fileSavedStatusContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.fileSavedStatusContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this.copyPathMenuItem = new GreenshotToolStripMenuItem();
|
this.copyPathMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.openDirectoryMenuItem = new GreenshotToolStripMenuItem();
|
this.openDirectoryMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.textHorizontalAlignmentButton = new Greenshot.Controls.BindableToolStripDropDownButton();
|
this.textHorizontalAlignmentButton = new BindableToolStripDropDownButton();
|
||||||
this.alignLeftToolStripMenuItem = new GreenshotToolStripMenuItem();
|
this.alignLeftToolStripMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.alignCenterToolStripMenuItem = new GreenshotToolStripMenuItem();
|
this.alignCenterToolStripMenuItem = new GreenshotToolStripMenuItem();
|
||||||
this.alignRightToolStripMenuItem = new GreenshotToolStripMenuItem();
|
this.alignRightToolStripMenuItem = new GreenshotToolStripMenuItem();
|
||||||
|
@ -1094,22 +1095,22 @@ namespace Greenshot.Forms {
|
||||||
this.obfuscateModeButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.obfuscateModeButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
this.obfuscateModeButton.LanguageKey = "editor_obfuscate_mode";
|
this.obfuscateModeButton.LanguageKey = "editor_obfuscate_mode";
|
||||||
this.obfuscateModeButton.Name = "obfuscateModeButton";
|
this.obfuscateModeButton.Name = "obfuscateModeButton";
|
||||||
this.obfuscateModeButton.SelectedTag = Greenshot.Drawing.FilterContainer.PreparedFilter.BLUR;
|
this.obfuscateModeButton.SelectedTag = FilterContainer.PreparedFilter.BLUR;
|
||||||
this.obfuscateModeButton.Tag = Greenshot.Drawing.FilterContainer.PreparedFilter.BLUR;
|
this.obfuscateModeButton.Tag = FilterContainer.PreparedFilter.BLUR;
|
||||||
//
|
//
|
||||||
// pixelizeToolStripMenuItem
|
// pixelizeToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.pixelizeToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("pixelizeToolStripMenuItem.Image")));
|
this.pixelizeToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("pixelizeToolStripMenuItem.Image")));
|
||||||
this.pixelizeToolStripMenuItem.LanguageKey = "editor_obfuscate_pixelize";
|
this.pixelizeToolStripMenuItem.LanguageKey = "editor_obfuscate_pixelize";
|
||||||
this.pixelizeToolStripMenuItem.Name = "pixelizeToolStripMenuItem";
|
this.pixelizeToolStripMenuItem.Name = "pixelizeToolStripMenuItem";
|
||||||
this.pixelizeToolStripMenuItem.Tag = Greenshot.Drawing.FilterContainer.PreparedFilter.PIXELIZE;
|
this.pixelizeToolStripMenuItem.Tag = FilterContainer.PreparedFilter.PIXELIZE;
|
||||||
//
|
//
|
||||||
// blurToolStripMenuItem
|
// blurToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.blurToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("blurToolStripMenuItem.Image")));
|
this.blurToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("blurToolStripMenuItem.Image")));
|
||||||
this.blurToolStripMenuItem.LanguageKey = "editor_obfuscate_blur";
|
this.blurToolStripMenuItem.LanguageKey = "editor_obfuscate_blur";
|
||||||
this.blurToolStripMenuItem.Name = "blurToolStripMenuItem";
|
this.blurToolStripMenuItem.Name = "blurToolStripMenuItem";
|
||||||
this.blurToolStripMenuItem.Tag = Greenshot.Drawing.FilterContainer.PreparedFilter.BLUR;
|
this.blurToolStripMenuItem.Tag = FilterContainer.PreparedFilter.BLUR;
|
||||||
//
|
//
|
||||||
// highlightModeButton
|
// highlightModeButton
|
||||||
//
|
//
|
||||||
|
@ -1123,36 +1124,36 @@ namespace Greenshot.Forms {
|
||||||
this.highlightModeButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.highlightModeButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
this.highlightModeButton.LanguageKey = "editor_highlight_mode";
|
this.highlightModeButton.LanguageKey = "editor_highlight_mode";
|
||||||
this.highlightModeButton.Name = "highlightModeButton";
|
this.highlightModeButton.Name = "highlightModeButton";
|
||||||
this.highlightModeButton.SelectedTag = Greenshot.Drawing.FilterContainer.PreparedFilter.TEXT_HIGHTLIGHT;
|
this.highlightModeButton.SelectedTag = FilterContainer.PreparedFilter.TEXT_HIGHTLIGHT;
|
||||||
this.highlightModeButton.Tag = Greenshot.Drawing.FilterContainer.PreparedFilter.TEXT_HIGHTLIGHT;
|
this.highlightModeButton.Tag = FilterContainer.PreparedFilter.TEXT_HIGHTLIGHT;
|
||||||
//
|
//
|
||||||
// textHighlightMenuItem
|
// textHighlightMenuItem
|
||||||
//
|
//
|
||||||
this.textHighlightMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("textHighlightMenuItem.Image")));
|
this.textHighlightMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("textHighlightMenuItem.Image")));
|
||||||
this.textHighlightMenuItem.LanguageKey = "editor_highlight_text";
|
this.textHighlightMenuItem.LanguageKey = "editor_highlight_text";
|
||||||
this.textHighlightMenuItem.Name = "textHighlightMenuItem";
|
this.textHighlightMenuItem.Name = "textHighlightMenuItem";
|
||||||
this.textHighlightMenuItem.Tag = Greenshot.Drawing.FilterContainer.PreparedFilter.TEXT_HIGHTLIGHT;
|
this.textHighlightMenuItem.Tag = FilterContainer.PreparedFilter.TEXT_HIGHTLIGHT;
|
||||||
//
|
//
|
||||||
// areaHighlightMenuItem
|
// areaHighlightMenuItem
|
||||||
//
|
//
|
||||||
this.areaHighlightMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("areaHighlightMenuItem.Image")));
|
this.areaHighlightMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("areaHighlightMenuItem.Image")));
|
||||||
this.areaHighlightMenuItem.LanguageKey = "editor_highlight_area";
|
this.areaHighlightMenuItem.LanguageKey = "editor_highlight_area";
|
||||||
this.areaHighlightMenuItem.Name = "areaHighlightMenuItem";
|
this.areaHighlightMenuItem.Name = "areaHighlightMenuItem";
|
||||||
this.areaHighlightMenuItem.Tag = Greenshot.Drawing.FilterContainer.PreparedFilter.AREA_HIGHLIGHT;
|
this.areaHighlightMenuItem.Tag = FilterContainer.PreparedFilter.AREA_HIGHLIGHT;
|
||||||
//
|
//
|
||||||
// grayscaleHighlightMenuItem
|
// grayscaleHighlightMenuItem
|
||||||
//
|
//
|
||||||
this.grayscaleHighlightMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("grayscaleHighlightMenuItem.Image")));
|
this.grayscaleHighlightMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("grayscaleHighlightMenuItem.Image")));
|
||||||
this.grayscaleHighlightMenuItem.LanguageKey = "editor_highlight_grayscale";
|
this.grayscaleHighlightMenuItem.LanguageKey = "editor_highlight_grayscale";
|
||||||
this.grayscaleHighlightMenuItem.Name = "grayscaleHighlightMenuItem";
|
this.grayscaleHighlightMenuItem.Name = "grayscaleHighlightMenuItem";
|
||||||
this.grayscaleHighlightMenuItem.Tag = Greenshot.Drawing.FilterContainer.PreparedFilter.GRAYSCALE;
|
this.grayscaleHighlightMenuItem.Tag = FilterContainer.PreparedFilter.GRAYSCALE;
|
||||||
//
|
//
|
||||||
// magnifyMenuItem
|
// magnifyMenuItem
|
||||||
//
|
//
|
||||||
this.magnifyMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("magnifyMenuItem.Image")));
|
this.magnifyMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("magnifyMenuItem.Image")));
|
||||||
this.magnifyMenuItem.LanguageKey = "editor_highlight_magnify";
|
this.magnifyMenuItem.LanguageKey = "editor_highlight_magnify";
|
||||||
this.magnifyMenuItem.Name = "magnifyMenuItem";
|
this.magnifyMenuItem.Name = "magnifyMenuItem";
|
||||||
this.magnifyMenuItem.Tag = Greenshot.Drawing.FilterContainer.PreparedFilter.MAGNIFICATION;
|
this.magnifyMenuItem.Tag = FilterContainer.PreparedFilter.MAGNIFICATION;
|
||||||
//
|
//
|
||||||
// btnFillColor
|
// btnFillColor
|
||||||
//
|
//
|
||||||
|
@ -1432,7 +1433,7 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
this.magnificationFactorLabel.LanguageKey = "editor_magnification_factor";
|
this.magnificationFactorLabel.LanguageKey = "editor_magnification_factor";
|
||||||
this.magnificationFactorLabel.Name = "magnificationFactorLabel";
|
this.magnificationFactorLabel.Name = "magnificationFactorLabel";
|
||||||
this.magnificationFactorLabel.Tag = Greenshot.Drawing.FilterContainer.PreparedFilter.MAGNIFICATION;
|
this.magnificationFactorLabel.Tag = FilterContainer.PreparedFilter.MAGNIFICATION;
|
||||||
//
|
//
|
||||||
// magnificationFactorUpDown
|
// magnificationFactorUpDown
|
||||||
//
|
//
|
||||||
|
@ -1517,28 +1518,28 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
this.arrowHeadStartMenuItem.LanguageKey = "editor_arrowheads_start";
|
this.arrowHeadStartMenuItem.LanguageKey = "editor_arrowheads_start";
|
||||||
this.arrowHeadStartMenuItem.Name = "arrowHeadStartMenuItem";
|
this.arrowHeadStartMenuItem.Name = "arrowHeadStartMenuItem";
|
||||||
this.arrowHeadStartMenuItem.Tag = Greenshot.Drawing.ArrowContainer.ArrowHeadCombination.START_POINT;
|
this.arrowHeadStartMenuItem.Tag = ArrowContainer.ArrowHeadCombination.START_POINT;
|
||||||
this.arrowHeadStartMenuItem.Click += new System.EventHandler(this.ArrowHeadsToolStripMenuItemClick);
|
this.arrowHeadStartMenuItem.Click += new System.EventHandler(this.ArrowHeadsToolStripMenuItemClick);
|
||||||
//
|
//
|
||||||
// arrowHeadEndMenuItem
|
// arrowHeadEndMenuItem
|
||||||
//
|
//
|
||||||
this.arrowHeadEndMenuItem.LanguageKey = "editor_arrowheads_end";
|
this.arrowHeadEndMenuItem.LanguageKey = "editor_arrowheads_end";
|
||||||
this.arrowHeadEndMenuItem.Name = "arrowHeadEndMenuItem";
|
this.arrowHeadEndMenuItem.Name = "arrowHeadEndMenuItem";
|
||||||
this.arrowHeadEndMenuItem.Tag = Greenshot.Drawing.ArrowContainer.ArrowHeadCombination.END_POINT;
|
this.arrowHeadEndMenuItem.Tag = ArrowContainer.ArrowHeadCombination.END_POINT;
|
||||||
this.arrowHeadEndMenuItem.Click += new System.EventHandler(this.ArrowHeadsToolStripMenuItemClick);
|
this.arrowHeadEndMenuItem.Click += new System.EventHandler(this.ArrowHeadsToolStripMenuItemClick);
|
||||||
//
|
//
|
||||||
// arrowHeadBothMenuItem
|
// arrowHeadBothMenuItem
|
||||||
//
|
//
|
||||||
this.arrowHeadBothMenuItem.LanguageKey = "editor_arrowheads_both";
|
this.arrowHeadBothMenuItem.LanguageKey = "editor_arrowheads_both";
|
||||||
this.arrowHeadBothMenuItem.Name = "arrowHeadBothMenuItem";
|
this.arrowHeadBothMenuItem.Name = "arrowHeadBothMenuItem";
|
||||||
this.arrowHeadBothMenuItem.Tag = Greenshot.Drawing.ArrowContainer.ArrowHeadCombination.BOTH;
|
this.arrowHeadBothMenuItem.Tag = ArrowContainer.ArrowHeadCombination.BOTH;
|
||||||
this.arrowHeadBothMenuItem.Click += new System.EventHandler(this.ArrowHeadsToolStripMenuItemClick);
|
this.arrowHeadBothMenuItem.Click += new System.EventHandler(this.ArrowHeadsToolStripMenuItemClick);
|
||||||
//
|
//
|
||||||
// arrowHeadNoneMenuItem
|
// arrowHeadNoneMenuItem
|
||||||
//
|
//
|
||||||
this.arrowHeadNoneMenuItem.LanguageKey = "editor_arrowheads_none";
|
this.arrowHeadNoneMenuItem.LanguageKey = "editor_arrowheads_none";
|
||||||
this.arrowHeadNoneMenuItem.Name = "arrowHeadNoneMenuItem";
|
this.arrowHeadNoneMenuItem.Name = "arrowHeadNoneMenuItem";
|
||||||
this.arrowHeadNoneMenuItem.Tag = Greenshot.Drawing.ArrowContainer.ArrowHeadCombination.NONE;
|
this.arrowHeadNoneMenuItem.Tag = ArrowContainer.ArrowHeadCombination.NONE;
|
||||||
this.arrowHeadNoneMenuItem.Click += new System.EventHandler(this.ArrowHeadsToolStripMenuItemClick);
|
this.arrowHeadNoneMenuItem.Click += new System.EventHandler(this.ArrowHeadsToolStripMenuItemClick);
|
||||||
//
|
//
|
||||||
// shadowButton
|
// shadowButton
|
||||||
|
@ -1843,11 +1844,11 @@ namespace Greenshot.Forms {
|
||||||
private GreenshotToolStripMenuItem alignRightToolStripMenuItem;
|
private GreenshotToolStripMenuItem alignRightToolStripMenuItem;
|
||||||
private GreenshotToolStripMenuItem alignCenterToolStripMenuItem;
|
private GreenshotToolStripMenuItem alignCenterToolStripMenuItem;
|
||||||
private GreenshotToolStripMenuItem alignLeftToolStripMenuItem;
|
private GreenshotToolStripMenuItem alignLeftToolStripMenuItem;
|
||||||
private Greenshot.Controls.BindableToolStripDropDownButton textHorizontalAlignmentButton;
|
private BindableToolStripDropDownButton textHorizontalAlignmentButton;
|
||||||
private GreenshotToolStripMenuItem alignMiddleToolStripMenuItem;
|
private GreenshotToolStripMenuItem alignMiddleToolStripMenuItem;
|
||||||
private GreenshotToolStripMenuItem alignBottomToolStripMenuItem;
|
private GreenshotToolStripMenuItem alignBottomToolStripMenuItem;
|
||||||
private GreenshotToolStripMenuItem alignTopToolStripMenuItem;
|
private GreenshotToolStripMenuItem alignTopToolStripMenuItem;
|
||||||
private Greenshot.Controls.BindableToolStripDropDownButton textVerticalAlignmentButton;
|
private BindableToolStripDropDownButton textVerticalAlignmentButton;
|
||||||
private GreenshotToolStripMenuItem invertToolStripMenuItem;
|
private GreenshotToolStripMenuItem invertToolStripMenuItem;
|
||||||
private GreenshotToolStripButton btnResize;
|
private GreenshotToolStripButton btnResize;
|
||||||
private GreenshotToolStripMenuItem grayscaleToolStripMenuItem;
|
private GreenshotToolStripMenuItem grayscaleToolStripMenuItem;
|
||||||
|
@ -1868,42 +1869,42 @@ namespace Greenshot.Forms {
|
||||||
private GreenshotToolStripMenuItem arrowHeadEndMenuItem;
|
private GreenshotToolStripMenuItem arrowHeadEndMenuItem;
|
||||||
private GreenshotToolStripMenuItem arrowHeadBothMenuItem;
|
private GreenshotToolStripMenuItem arrowHeadBothMenuItem;
|
||||||
private GreenshotToolStripMenuItem arrowHeadNoneMenuItem;
|
private GreenshotToolStripMenuItem arrowHeadNoneMenuItem;
|
||||||
private Greenshot.Controls.BindableToolStripButton btnCancel;
|
private BindableToolStripButton btnCancel;
|
||||||
private Greenshot.Controls.BindableToolStripButton btnConfirm;
|
private BindableToolStripButton btnConfirm;
|
||||||
private GreenshotToolStripMenuItem selectAllToolStripMenuItem;
|
private GreenshotToolStripMenuItem selectAllToolStripMenuItem;
|
||||||
private Greenshot.Controls.BindableToolStripDropDownButton highlightModeButton;
|
private BindableToolStripDropDownButton highlightModeButton;
|
||||||
private GreenshotToolStripMenuItem pixelizeToolStripMenuItem;
|
private GreenshotToolStripMenuItem pixelizeToolStripMenuItem;
|
||||||
private GreenshotToolStripMenuItem blurToolStripMenuItem;
|
private GreenshotToolStripMenuItem blurToolStripMenuItem;
|
||||||
private Greenshot.Controls.BindableToolStripDropDownButton obfuscateModeButton;
|
private BindableToolStripDropDownButton obfuscateModeButton;
|
||||||
private GreenshotToolStripButton btnHighlight;
|
private GreenshotToolStripButton btnHighlight;
|
||||||
private GreenshotToolStripMenuItem loadElementsToolStripMenuItem;
|
private GreenshotToolStripMenuItem loadElementsToolStripMenuItem;
|
||||||
private GreenshotToolStripMenuItem saveElementsToolStripMenuItem;
|
private GreenshotToolStripMenuItem saveElementsToolStripMenuItem;
|
||||||
private Greenshot.Controls.FontFamilyComboBox fontFamilyComboBox;
|
private FontFamilyComboBox fontFamilyComboBox;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator;
|
||||||
private Greenshot.Controls.BindableToolStripButton shadowButton;
|
private BindableToolStripButton shadowButton;
|
||||||
private Greenshot.Controls.BindableToolStripButton fontItalicButton;
|
private BindableToolStripButton fontItalicButton;
|
||||||
private Greenshot.Controls.BindableToolStripButton fontBoldButton;
|
private BindableToolStripButton fontBoldButton;
|
||||||
private Greenshot.Controls.ToolStripNumericUpDown fontSizeUpDown;
|
private ToolStripNumericUpDown fontSizeUpDown;
|
||||||
private GreenshotToolStripLabel fontSizeLabel;
|
private GreenshotToolStripLabel fontSizeLabel;
|
||||||
private Greenshot.Controls.ToolStripNumericUpDown brightnessUpDown;
|
private ToolStripNumericUpDown brightnessUpDown;
|
||||||
private GreenshotToolStripLabel brightnessLabel;
|
private GreenshotToolStripLabel brightnessLabel;
|
||||||
private GreenshotToolStripMenuItem pluginToolStripMenuItem;
|
private GreenshotToolStripMenuItem pluginToolStripMenuItem;
|
||||||
private GreenshotToolStripDropDownButton arrowHeadsDropDownButton;
|
private GreenshotToolStripDropDownButton arrowHeadsDropDownButton;
|
||||||
private GreenshotToolStripLabel arrowHeadsLabel;
|
private GreenshotToolStripLabel arrowHeadsLabel;
|
||||||
private Greenshot.Controls.ToolStripNumericUpDown pixelSizeUpDown;
|
private ToolStripNumericUpDown pixelSizeUpDown;
|
||||||
private GreenshotToolStripLabel pixelSizeLabel;
|
private GreenshotToolStripLabel pixelSizeLabel;
|
||||||
private Greenshot.Controls.ToolStripNumericUpDown magnificationFactorUpDown;
|
private ToolStripNumericUpDown magnificationFactorUpDown;
|
||||||
private GreenshotToolStripLabel magnificationFactorLabel;
|
private GreenshotToolStripLabel magnificationFactorLabel;
|
||||||
private Greenshot.Controls.ToolStripNumericUpDown previewQualityUpDown;
|
private ToolStripNumericUpDown previewQualityUpDown;
|
||||||
private GreenshotToolStripLabel previewQualityLabel;
|
private GreenshotToolStripLabel previewQualityLabel;
|
||||||
private Greenshot.Controls.ToolStripNumericUpDown blurRadiusUpDown;
|
private ToolStripNumericUpDown blurRadiusUpDown;
|
||||||
private GreenshotToolStripLabel blurRadiusLabel;
|
private GreenshotToolStripLabel blurRadiusLabel;
|
||||||
private Greenshot.Controls.ToolStripEx propertiesToolStrip;
|
private ToolStripEx propertiesToolStrip;
|
||||||
private GreenshotToolStripLabel lineThicknessLabel;
|
private GreenshotToolStripLabel lineThicknessLabel;
|
||||||
private Greenshot.Controls.ToolStripNumericUpDown lineThicknessUpDown;
|
private ToolStripNumericUpDown lineThicknessUpDown;
|
||||||
private GreenshotToolStripLabel counterLabel;
|
private GreenshotToolStripLabel counterLabel;
|
||||||
private Greenshot.Controls.ToolStripNumericUpDown counterUpDown;
|
private ToolStripNumericUpDown counterUpDown;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator14;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator14;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator15;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator15;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator16;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator16;
|
||||||
|
@ -1920,7 +1921,7 @@ namespace Greenshot.Forms {
|
||||||
private GreenshotToolStripMenuItem upOneLevelToolStripMenuItem;
|
private GreenshotToolStripMenuItem upOneLevelToolStripMenuItem;
|
||||||
private GreenshotToolStripMenuItem arrangeToolStripMenuItem;
|
private GreenshotToolStripMenuItem arrangeToolStripMenuItem;
|
||||||
private GreenshotToolStripButton btnCursor;
|
private GreenshotToolStripButton btnCursor;
|
||||||
private Greenshot.Controls.ToolStripEx toolsToolStrip;
|
private ToolStripEx toolsToolStrip;
|
||||||
private GreenshotToolStripButton btnArrow;
|
private GreenshotToolStripButton btnArrow;
|
||||||
private GreenshotToolStripMenuItem drawArrowToolStripMenuItem;
|
private GreenshotToolStripMenuItem drawArrowToolStripMenuItem;
|
||||||
private GreenshotToolStripMenuItem drawFreehandToolStripMenuItem;
|
private GreenshotToolStripMenuItem drawFreehandToolStripMenuItem;
|
||||||
|
@ -1959,7 +1960,7 @@ namespace Greenshot.Forms {
|
||||||
private GreenshotToolStripMenuItem copyToolStripMenuItem;
|
private GreenshotToolStripMenuItem copyToolStripMenuItem;
|
||||||
private GreenshotToolStripMenuItem cutToolStripMenuItem;
|
private GreenshotToolStripMenuItem cutToolStripMenuItem;
|
||||||
private GreenshotToolStripMenuItem editToolStripMenuItem;
|
private GreenshotToolStripMenuItem editToolStripMenuItem;
|
||||||
private Greenshot.Controls.MenuStripEx menuStrip1;
|
private MenuStripEx menuStrip1;
|
||||||
private System.Windows.Forms.ToolStripStatusLabel statusLabel;
|
private System.Windows.Forms.ToolStripStatusLabel statusLabel;
|
||||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||||
private GreenshotToolStripButton btnCut;
|
private GreenshotToolStripButton btnCut;
|
||||||
|
@ -1977,10 +1978,10 @@ namespace Greenshot.Forms {
|
||||||
private GreenshotToolStripButton btnSave;
|
private GreenshotToolStripButton btnSave;
|
||||||
private GreenshotToolStripButton btnRect;
|
private GreenshotToolStripButton btnRect;
|
||||||
private System.Windows.Forms.ToolStripContainer topToolStripContainer;
|
private System.Windows.Forms.ToolStripContainer topToolStripContainer;
|
||||||
private Greenshot.Controls.ToolStripEx destinationsToolStrip;
|
private ToolStripEx destinationsToolStrip;
|
||||||
private NonJumpingPanel panel1;
|
private NonJumpingPanel panel1;
|
||||||
private Greenshot.Controls.ToolStripColorButton btnFillColor;
|
private ToolStripColorButton btnFillColor;
|
||||||
private Greenshot.Controls.ToolStripColorButton btnLineColor;
|
private ToolStripColorButton btnLineColor;
|
||||||
private GreenshotToolStripMenuItem autoCropToolStripMenuItem;
|
private GreenshotToolStripMenuItem autoCropToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator17;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator17;
|
||||||
private System.Windows.Forms.ContextMenuStrip zoomMenuStrip;
|
private System.Windows.Forms.ContextMenuStrip zoomMenuStrip;
|
|
@ -26,37 +26,38 @@ using System.Drawing.Drawing2D;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Greenshot.Base;
|
||||||
using Greenshot.Base.Controls;
|
using Greenshot.Base.Controls;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
using Greenshot.Base.Effects;
|
using Greenshot.Base.Effects;
|
||||||
|
using Greenshot.Base.Help;
|
||||||
using Greenshot.Base.IniFile;
|
using Greenshot.Base.IniFile;
|
||||||
using Greenshot.Base.Interfaces;
|
using Greenshot.Base.Interfaces;
|
||||||
using Greenshot.Base.Interfaces.Drawing;
|
using Greenshot.Base.Interfaces.Drawing;
|
||||||
using Greenshot.Base.Interfaces.Forms;
|
using Greenshot.Base.Interfaces.Forms;
|
||||||
using Greenshot.Base.UnmanagedHelpers;
|
using Greenshot.Base.UnmanagedHelpers;
|
||||||
using Greenshot.Base.UnmanagedHelpers.Structs;
|
using Greenshot.Base.UnmanagedHelpers.Structs;
|
||||||
using Greenshot.Configuration;
|
using Greenshot.Editor.Configuration;
|
||||||
using Greenshot.Destinations;
|
using Greenshot.Editor.Destinations;
|
||||||
using Greenshot.Drawing;
|
using Greenshot.Editor.Drawing;
|
||||||
using Greenshot.Drawing.Fields;
|
using Greenshot.Editor.Drawing.Fields;
|
||||||
using Greenshot.Drawing.Fields.Binding;
|
using Greenshot.Editor.Drawing.Fields.Binding;
|
||||||
using Greenshot.Help;
|
using Greenshot.Editor.Helpers;
|
||||||
using Greenshot.Helpers;
|
|
||||||
using log4net;
|
using log4net;
|
||||||
|
|
||||||
namespace Greenshot.Forms
|
namespace Greenshot.Editor.Forms
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of ImageEditorForm.
|
/// Description of ImageEditorForm.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ImageEditorForm : BaseForm, IImageEditor
|
public partial class ImageEditorForm : EditorForm, IImageEditor
|
||||||
{
|
{
|
||||||
private static readonly ILog Log = LogManager.GetLogger(typeof(ImageEditorForm));
|
private static readonly ILog Log = LogManager.GetLogger(typeof(ImageEditorForm));
|
||||||
private static readonly EditorConfiguration EditorConfiguration = IniConfig.GetIniSection<EditorConfiguration>();
|
private static readonly EditorConfiguration EditorConfiguration = IniConfig.GetIniSection<EditorConfiguration>();
|
||||||
|
|
||||||
private static readonly List<string> IgnoreDestinations = new List<string>
|
private static readonly List<string> IgnoreDestinations = new List<string>
|
||||||
{
|
{
|
||||||
PickerDestination.DESIGNATION,
|
nameof(WellKnownDestinations.Picker),
|
||||||
EditorDestination.DESIGNATION
|
EditorDestination.DESIGNATION
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -580,10 +581,10 @@ namespace Greenshot.Forms
|
||||||
|
|
||||||
private void BtnSaveClick(object sender, EventArgs e)
|
private void BtnSaveClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string destinationDesignation = FileDestination.DESIGNATION;
|
var destinationDesignation = WellKnownDestinations.FileNoDialog;
|
||||||
if (_surface.LastSaveFullPath == null)
|
if (_surface.LastSaveFullPath == null)
|
||||||
{
|
{
|
||||||
destinationDesignation = FileWithDialogDestination.DESIGNATION;
|
destinationDesignation = WellKnownDestinations.FileDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
DestinationHelper.ExportCapture(true, destinationDesignation, _surface, _surface.CaptureDetails);
|
DestinationHelper.ExportCapture(true, destinationDesignation, _surface, _surface.CaptureDetails);
|
||||||
|
@ -591,13 +592,13 @@ namespace Greenshot.Forms
|
||||||
|
|
||||||
private void BtnClipboardClick(object sender, EventArgs e)
|
private void BtnClipboardClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DestinationHelper.ExportCapture(true, ClipboardDestination.DESIGNATION, _surface, _surface.CaptureDetails);
|
DestinationHelper.ExportCapture(true, WellKnownDestinations.Clipboard, _surface, _surface.CaptureDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnPrintClick(object sender, EventArgs e)
|
private void BtnPrintClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// The BeginInvoke is a solution for the printdialog not having focus
|
// The BeginInvoke is a solution for the printdialog not having focus
|
||||||
BeginInvoke((MethodInvoker) delegate { DestinationHelper.ExportCapture(true, PrinterDestination.DESIGNATION, _surface, _surface.CaptureDetails); });
|
BeginInvoke((MethodInvoker) delegate { DestinationHelper.ExportCapture(true, WellKnownDestinations.Printer, _surface, _surface.CaptureDetails); });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CloseToolStripMenuItemClick(object sender, EventArgs e)
|
private void CloseToolStripMenuItemClick(object sender, EventArgs e)
|
||||||
|
@ -833,13 +834,13 @@ namespace Greenshot.Forms
|
||||||
|
|
||||||
private void AboutToolStripMenuItemClick(object sender, EventArgs e)
|
private void AboutToolStripMenuItemClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var mainForm = SimpleServiceProvider.Current.GetInstance<MainForm>();
|
var mainForm = SimpleServiceProvider.Current.GetInstance<IGreenshotMainForm>();
|
||||||
mainForm.ShowAbout();
|
mainForm.ShowAbout();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PreferencesToolStripMenuItemClick(object sender, EventArgs e)
|
private void PreferencesToolStripMenuItemClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var mainForm = SimpleServiceProvider.Current.GetInstance<MainForm>();
|
var mainForm = SimpleServiceProvider.Current.GetInstance<IGreenshotMainForm>();
|
||||||
mainForm.ShowSetting();
|
mainForm.ShowSetting();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1531,7 +1532,7 @@ namespace Greenshot.Forms
|
||||||
private void Insert_window_toolstripmenuitemMouseEnter(object sender, EventArgs e)
|
private void Insert_window_toolstripmenuitemMouseEnter(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ToolStripMenuItem captureWindowMenuItem = (ToolStripMenuItem) sender;
|
ToolStripMenuItem captureWindowMenuItem = (ToolStripMenuItem) sender;
|
||||||
var mainForm = SimpleServiceProvider.Current.GetInstance<MainForm>();
|
var mainForm = SimpleServiceProvider.Current.GetInstance<IGreenshotMainForm>();
|
||||||
mainForm.AddCaptureWindowMenuItems(captureWindowMenuItem, Contextmenu_window_Click);
|
mainForm.AddCaptureWindowMenuItems(captureWindowMenuItem, Contextmenu_window_Click);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1548,10 +1549,11 @@ namespace Greenshot.Forms
|
||||||
capture.CaptureDetails.DpiY = graphics.DpiY;
|
capture.CaptureDetails.DpiY = graphics.DpiY;
|
||||||
}
|
}
|
||||||
|
|
||||||
windowToCapture = CaptureHelper.SelectCaptureWindow(windowToCapture);
|
var captureHelper = SimpleServiceProvider.Current.GetInstance<ICaptureHelper>();
|
||||||
|
windowToCapture = captureHelper.SelectCaptureWindow(windowToCapture);
|
||||||
if (windowToCapture != null)
|
if (windowToCapture != null)
|
||||||
{
|
{
|
||||||
capture = CaptureHelper.CaptureWindow(windowToCapture, capture, coreConfiguration.WindowCaptureMode);
|
capture = captureHelper.CaptureWindow(windowToCapture, capture, coreConfiguration.WindowCaptureMode);
|
||||||
if (capture?.CaptureDetails != null && capture.Image != null)
|
if (capture?.CaptureDetails != null && capture.Image != null)
|
||||||
{
|
{
|
||||||
((Bitmap) capture.Image).SetResolution(capture.CaptureDetails.DpiX, capture.CaptureDetails.DpiY);
|
((Bitmap) capture.Image).SetResolution(capture.CaptureDetails.DpiX, capture.CaptureDetails.DpiY);
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Greenshot.Forms
|
namespace Greenshot.Editor.Forms
|
||||||
{
|
{
|
||||||
partial class MovableShowColorForm
|
partial class MovableShowColorForm
|
||||||
{
|
{
|
|
@ -20,11 +20,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.UnmanagedHelpers;
|
using Greenshot.Base.UnmanagedHelpers;
|
||||||
|
|
||||||
namespace Greenshot.Forms
|
namespace Greenshot.Editor.Forms
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This code was supplied by Hi-Coder as a patch for Greenshot
|
/// This code was supplied by Hi-Coder as a patch for Greenshot
|
|
@ -19,10 +19,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using Greenshot.Base.Controls;
|
using Greenshot.Base.Controls;
|
||||||
|
|
||||||
namespace Greenshot.Forms {
|
namespace Greenshot.Editor.Forms {
|
||||||
partial class ResizeSettingsForm {
|
partial class ResizeSettingsForm {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
|
@ -25,12 +25,12 @@ using System.Windows.Forms;
|
||||||
using Greenshot.Base.Core;
|
using Greenshot.Base.Core;
|
||||||
using Greenshot.Base.Effects;
|
using Greenshot.Base.Effects;
|
||||||
|
|
||||||
namespace Greenshot.Forms
|
namespace Greenshot.Editor.Forms
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A form to set the resize settings
|
/// A form to set the resize settings
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ResizeSettingsForm : BaseForm
|
public partial class ResizeSettingsForm : EditorForm
|
||||||
{
|
{
|
||||||
private readonly ResizeEffect _effect;
|
private readonly ResizeEffect _effect;
|
||||||
private readonly string _valuePercent;
|
private readonly string _valuePercent;
|
|
@ -19,10 +19,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using Greenshot.Base.Controls;
|
using Greenshot.Base.Controls;
|
||||||
|
|
||||||
namespace Greenshot.Forms {
|
namespace Greenshot.Editor.Forms {
|
||||||
partial class TornEdgeSettingsForm {
|
partial class TornEdgeSettingsForm {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
|
@ -24,9 +24,9 @@ using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Base.Effects;
|
using Greenshot.Base.Effects;
|
||||||
|
|
||||||
namespace Greenshot.Forms
|
namespace Greenshot.Editor.Forms
|
||||||
{
|
{
|
||||||
public partial class TornEdgeSettingsForm : BaseForm
|
public partial class TornEdgeSettingsForm : EditorForm
|
||||||
{
|
{
|
||||||
private readonly TornEdgeEffect _effect;
|
private readonly TornEdgeEffect _effect;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue