mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Move : this() same line
This commit is contained in:
parent
9d49b55e73
commit
b825f6a0af
29 changed files with 51 additions and 97 deletions
|
@ -42,14 +42,12 @@ public CLIManager()
|
||||||
Actions = new List<CLICommandAction>();
|
Actions = new List<CLICommandAction>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public CLIManager(string[] arguments)
|
public CLIManager(string[] arguments) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
Arguments = arguments;
|
Arguments = arguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CLIManager(string arguments)
|
public CLIManager(string arguments) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
Arguments = ParseCLI(arguments);
|
Arguments = ParseCLI(arguments);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,14 +45,12 @@ public struct ColorBgra
|
||||||
|
|
||||||
public const byte SizeOf = 4;
|
public const byte SizeOf = 4;
|
||||||
|
|
||||||
public ColorBgra(uint bgra)
|
public ColorBgra(uint bgra) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
Bgra = bgra;
|
Bgra = bgra;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ColorBgra(byte b, byte g, byte r, byte a = 255)
|
public ColorBgra(byte b, byte g, byte r, byte a = 255) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
Blue = b;
|
Blue = b;
|
||||||
Green = g;
|
Green = g;
|
||||||
|
@ -60,8 +58,7 @@ public ColorBgra(byte b, byte g, byte r, byte a = 255)
|
||||||
Alpha = a;
|
Alpha = a;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ColorBgra(Color color)
|
public ColorBgra(Color color) : this(color.B, color.G, color.R, color.A)
|
||||||
: this(color.B, color.G, color.R, color.A)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,8 +145,7 @@ public int Alpha
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public CMYK(double cyan, double magenta, double yellow, double key, int alpha = 255)
|
public CMYK(double cyan, double magenta, double yellow, double key, int alpha = 255) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
Cyan = cyan;
|
Cyan = cyan;
|
||||||
Magenta = magenta;
|
Magenta = magenta;
|
||||||
|
@ -155,8 +154,7 @@ public CMYK(double cyan, double magenta, double yellow, double key, int alpha =
|
||||||
Alpha = alpha;
|
Alpha = alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CMYK(int cyan, int magenta, int yellow, int key, int alpha = 255)
|
public CMYK(int cyan, int magenta, int yellow, int key, int alpha = 255) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
Cyan100 = cyan;
|
Cyan100 = cyan;
|
||||||
Magenta100 = magenta;
|
Magenta100 = magenta;
|
||||||
|
|
|
@ -37,8 +37,7 @@ public partial class ColorPickerForm : Form
|
||||||
private bool oldColorExist;
|
private bool oldColorExist;
|
||||||
private bool controlChangingColor;
|
private bool controlChangingColor;
|
||||||
|
|
||||||
public ColorPickerForm()
|
public ColorPickerForm() : this(Color.Red)
|
||||||
: this(Color.Red)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,8 +120,7 @@ public int Alpha
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public HSB(double hue, double saturation, double brightness, int alpha = 255)
|
public HSB(double hue, double saturation, double brightness, int alpha = 255) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
Hue = hue;
|
Hue = hue;
|
||||||
Saturation = saturation;
|
Saturation = saturation;
|
||||||
|
@ -129,8 +128,7 @@ public HSB(double hue, double saturation, double brightness, int alpha = 255)
|
||||||
Alpha = alpha;
|
Alpha = alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HSB(int hue, int saturation, int brightness, int alpha = 255)
|
public HSB(int hue, int saturation, int brightness, int alpha = 255) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
Hue360 = hue;
|
Hue360 = hue;
|
||||||
Saturation100 = saturation;
|
Saturation100 = saturation;
|
||||||
|
|
|
@ -80,8 +80,7 @@ public int Alpha
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public RGBA(int red, int green, int blue, int alpha = 255)
|
public RGBA(int red, int green, int blue, int alpha = 255) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
Red = red;
|
Red = red;
|
||||||
Green = green;
|
Green = green;
|
||||||
|
@ -89,8 +88,7 @@ public RGBA(int red, int green, int blue, int alpha = 255)
|
||||||
Alpha = alpha;
|
Alpha = alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RGBA(Color color)
|
public RGBA(Color color) : this(color.R, color.G, color.B, color.A)
|
||||||
: this(color.R, color.G, color.B, color.A)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,7 @@ public class ConvolutionMatrix
|
||||||
public int Factor { get; set; }
|
public int Factor { get; set; }
|
||||||
public int Offset { get; set; }
|
public int Offset { get; set; }
|
||||||
|
|
||||||
public ConvolutionMatrix()
|
public ConvolutionMatrix() : this(3)
|
||||||
: this(3)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,15 +45,13 @@ public ExternalProgram()
|
||||||
Args = "%input";
|
Args = "%input";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExternalProgram(string name, string path)
|
public ExternalProgram(string name, string path) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
Name = name;
|
Name = name;
|
||||||
Path = path;
|
Path = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExternalProgram(string name, string path, string args)
|
public ExternalProgram(string name, string path, string args) : this(name, path)
|
||||||
: this(name, path)
|
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(args))
|
if (!string.IsNullOrEmpty(args))
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,8 +35,7 @@ public partial class ErrorForm : Form
|
||||||
public string LogPath { get; private set; }
|
public string LogPath { get; private set; }
|
||||||
public string BugReportPath { get; private set; }
|
public string BugReportPath { get; private set; }
|
||||||
|
|
||||||
public ErrorForm(Exception error, string logPath, string bugReportPath)
|
public ErrorForm(Exception error, string logPath, string bugReportPath) : this(error.Message, error.ToString(), logPath, bugReportPath)
|
||||||
: this(error.Message, error.ToString(), logPath, bugReportPath)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -217,8 +217,7 @@ internal class Reflector
|
||||||
/// Constructor
|
/// Constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ns">The namespace containing types to be used</param>
|
/// <param name="ns">The namespace containing types to be used</param>
|
||||||
public Reflector(string ns)
|
public Reflector(string ns) : this(ns, ns)
|
||||||
: this(ns, ns)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,7 @@ public RECT(int left, int top, int right, int bottom)
|
||||||
Bottom = bottom;
|
Bottom = bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RECT(Rectangle r)
|
public RECT(Rectangle r) : this(r.Left, r.Top, r.Right, r.Bottom)
|
||||||
: this(r.Left, r.Top, r.Right, r.Bottom)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,10 +199,9 @@ public struct WINDOWINFO
|
||||||
public ushort atomWindowType;
|
public ushort atomWindowType;
|
||||||
public ushort wCreatorVersion;
|
public ushort wCreatorVersion;
|
||||||
|
|
||||||
public WINDOWINFO(Boolean? filler)
|
public WINDOWINFO(bool? filler) : this() // Allows automatic initialization of "cbSize" with "new WINDOWINFO(null/true/false)".
|
||||||
: this() // Allows automatic initialization of "cbSize" with "new WINDOWINFO(null/true/false)".
|
|
||||||
{
|
{
|
||||||
cbSize = (UInt32)Marshal.SizeOf(typeof(WINDOWINFO));
|
cbSize = (uint)Marshal.SizeOf(typeof(WINDOWINFO));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -705,11 +703,11 @@ public interface IViewObject
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public struct FLASHWINFO
|
public struct FLASHWINFO
|
||||||
{
|
{
|
||||||
public UInt32 cbSize;
|
public uint cbSize;
|
||||||
public IntPtr hwnd;
|
public IntPtr hwnd;
|
||||||
public UInt32 dwFlags;
|
public uint dwFlags;
|
||||||
public UInt32 uCount;
|
public uint uCount;
|
||||||
public UInt32 dwTimeout;
|
public uint dwTimeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, StructLayout(LayoutKind.Sequential)]
|
[Serializable, StructLayout(LayoutKind.Sequential)]
|
||||||
|
|
|
@ -73,8 +73,7 @@ private DownloaderForm()
|
||||||
RunInstallerInBackground = true;
|
RunInstallerInBackground = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DownloaderForm(UpdateChecker updateChecker)
|
public DownloaderForm(UpdateChecker updateChecker) : this(updateChecker.DownloadURL, updateChecker.Filename)
|
||||||
: this(updateChecker.DownloadURL, updateChecker.Filename)
|
|
||||||
{
|
{
|
||||||
Proxy = updateChecker.Proxy;
|
Proxy = updateChecker.Proxy;
|
||||||
|
|
||||||
|
@ -84,8 +83,7 @@ public DownloaderForm(UpdateChecker updateChecker)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public DownloaderForm(string url, string filename)
|
public DownloaderForm(string url, string filename) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
URL = url;
|
URL = url;
|
||||||
Filename = filename;
|
Filename = filename;
|
||||||
|
|
|
@ -36,13 +36,11 @@ public class XmlColor
|
||||||
public byte G { get; set; }
|
public byte G { get; set; }
|
||||||
public byte B { get; set; }
|
public byte B { get; set; }
|
||||||
|
|
||||||
public XmlColor()
|
public XmlColor() : this(0, 0, 0)
|
||||||
: this(0, 0, 0)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public XmlColor(byte r, byte g, byte b)
|
public XmlColor(byte r, byte g, byte b) : this(255, r, g, b)
|
||||||
: this(255, r, g, b)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,8 +52,7 @@ public XmlColor(byte a, byte r, byte g, byte b)
|
||||||
B = b;
|
B = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public XmlColor(Color color)
|
public XmlColor(Color color) : this(color.A, color.R, color.G, color.B)
|
||||||
: this(color.A, color.R, color.G, color.B)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,7 @@ public WindowsList()
|
||||||
IgnoreWindows = new List<IntPtr>();
|
IgnoreWindows = new List<IntPtr>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public WindowsList(IntPtr ignoreWindow)
|
public WindowsList(IntPtr ignoreWindow) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
IgnoreWindows.Add(ignoreWindow);
|
IgnoreWindows.Add(ignoreWindow);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,7 @@ public Copy(OAuthInfo oauth)
|
||||||
AuthInfo = oauth;
|
AuthInfo = oauth;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Copy(OAuthInfo oauth, CopyAccountInfo accountInfo)
|
public Copy(OAuthInfo oauth, CopyAccountInfo accountInfo) : this(oauth)
|
||||||
: this(oauth)
|
|
||||||
{
|
{
|
||||||
AccountInfo = accountInfo;
|
AccountInfo = accountInfo;
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,8 +84,7 @@ public Dropbox(OAuth2Info oauth)
|
||||||
AuthInfo = oauth;
|
AuthInfo = oauth;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dropbox(OAuth2Info oauth, DropboxAccountInfo accountInfo)
|
public Dropbox(OAuth2Info oauth, DropboxAccountInfo accountInfo) : this(oauth)
|
||||||
: this(oauth)
|
|
||||||
{
|
{
|
||||||
AccountInfo = accountInfo;
|
AccountInfo = accountInfo;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,13 +55,11 @@ public sealed class Mega : FileUploader, IWebClient
|
||||||
private readonly MegaApiClient.AuthInfos _authInfos;
|
private readonly MegaApiClient.AuthInfos _authInfos;
|
||||||
private readonly string _parentNodeId;
|
private readonly string _parentNodeId;
|
||||||
|
|
||||||
public Mega()
|
public Mega() : this(null, null)
|
||||||
: this(null, null)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public Mega(MegaApiClient.AuthInfos authInfos)
|
public Mega(MegaApiClient.AuthInfos authInfos) : this(authInfos, null)
|
||||||
: this(authInfos, null)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,7 @@ public EmailForm()
|
||||||
Icon = ShareXResources.Icon;
|
Icon = ShareXResources.Icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EmailForm(string toEmail, string subject, string body)
|
public EmailForm(string toEmail, string subject, string body) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
txtToEmail.Text = toEmail;
|
txtToEmail.Text = toEmail;
|
||||||
txtSubject.Text = subject;
|
txtSubject.Text = subject;
|
||||||
|
|
|
@ -54,8 +54,7 @@ public JiraUpload()
|
||||||
Icon = ShareXResources.Icon;
|
Icon = ShareXResources.Icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JiraUpload(string issuePrefix, GetSummaryHandler getSummary)
|
public JiraUpload(string issuePrefix, GetSummaryHandler getSummary) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
if (getSummary == null)
|
if (getSummary == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -102,14 +102,12 @@ public TwitterTweetForm()
|
||||||
MediaMode = false;
|
MediaMode = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TwitterTweetForm(OAuthInfo oauth)
|
public TwitterTweetForm(OAuthInfo oauth) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
AuthInfo = oauth;
|
AuthInfo = oauth;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TwitterTweetForm(OAuthInfo oauth, string message)
|
public TwitterTweetForm(OAuthInfo oauth, string message) : this(oauth)
|
||||||
: this(oauth)
|
|
||||||
{
|
{
|
||||||
Message = message;
|
Message = message;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,15 +46,13 @@ public UserPassBox(string title, string userName, string password)
|
||||||
txtPassword.Text = password;
|
txtPassword.Text = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserPassBox(string q, string fullName, string userName, string password)
|
public UserPassBox(string q, string fullName, string userName, string password) : this(q, userName, password)
|
||||||
: this(q, userName, password)
|
|
||||||
{
|
{
|
||||||
txtFullName.Text = fullName;
|
txtFullName.Text = fullName;
|
||||||
txtFullName.Enabled = true;
|
txtFullName.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserPassBox(string q, string fullName, string email, string userName, string password)
|
public UserPassBox(string q, string fullName, string email, string userName, string password) : this(q, fullName, userName, password)
|
||||||
: this(q, fullName, userName, password)
|
|
||||||
{
|
{
|
||||||
txtEmail.Text = email;
|
txtEmail.Text = email;
|
||||||
txtEmail.Enabled = true;
|
txtEmail.Enabled = true;
|
||||||
|
|
|
@ -77,21 +77,18 @@ public OAuthInfo()
|
||||||
OAuthVersion = "1.0";
|
OAuthVersion = "1.0";
|
||||||
}
|
}
|
||||||
|
|
||||||
public OAuthInfo(string consumerKey)
|
public OAuthInfo(string consumerKey) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
ConsumerKey = consumerKey;
|
ConsumerKey = consumerKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OAuthInfo(string consumerKey, string consumerSecret)
|
public OAuthInfo(string consumerKey, string consumerSecret) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
ConsumerKey = consumerKey;
|
ConsumerKey = consumerKey;
|
||||||
ConsumerSecret = consumerSecret;
|
ConsumerSecret = consumerSecret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OAuthInfo(string consumerKey, string consumerSecret, string userToken, string userSecret)
|
public OAuthInfo(string consumerKey, string consumerSecret, string userToken, string userSecret) : this(consumerKey, consumerSecret)
|
||||||
: this(consumerKey, consumerSecret)
|
|
||||||
{
|
{
|
||||||
UserToken = userToken;
|
UserToken = userToken;
|
||||||
UserSecret = userSecret;
|
UserSecret = userSecret;
|
||||||
|
|
|
@ -65,8 +65,7 @@ public FlickrUploader(string key, string secret)
|
||||||
API_Secret = secret;
|
API_Secret = secret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FlickrUploader(string key, string secret, FlickrAuthInfo auth, FlickrSettings settings)
|
public FlickrUploader(string key, string secret, FlickrAuthInfo auth, FlickrSettings settings) : this(key, secret)
|
||||||
: this(key, secret)
|
|
||||||
{
|
{
|
||||||
Auth = auth;
|
Auth = auth;
|
||||||
Settings = settings;
|
Settings = settings;
|
||||||
|
|
|
@ -34,8 +34,7 @@ public partial class ActionsForm : Form
|
||||||
{
|
{
|
||||||
public ExternalProgram FileAction { get; private set; }
|
public ExternalProgram FileAction { get; private set; }
|
||||||
|
|
||||||
public ActionsForm()
|
public ActionsForm() : this(new ExternalProgram())
|
||||||
: this(new ExternalProgram())
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,7 @@ public partial class ClipboardFormatForm : Form
|
||||||
{
|
{
|
||||||
public ClipboardFormat ClipboardFormat { get; private set; }
|
public ClipboardFormat ClipboardFormat { get; private set; }
|
||||||
|
|
||||||
public ClipboardFormatForm()
|
public ClipboardFormatForm() : this(new ClipboardFormat())
|
||||||
: this(new ClipboardFormat())
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,7 @@ public partial class EncoderProgramForm : Form
|
||||||
{
|
{
|
||||||
public VideoEncoder encoder { get; private set; }
|
public VideoEncoder encoder { get; private set; }
|
||||||
|
|
||||||
public EncoderProgramForm()
|
public EncoderProgramForm() : this(new VideoEncoder())
|
||||||
: this(new VideoEncoder())
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,7 @@ public partial class WatchFolderForm : Form
|
||||||
{
|
{
|
||||||
public WatchFolderSettings WatchFolder { get; private set; }
|
public WatchFolderSettings WatchFolder { get; private set; }
|
||||||
|
|
||||||
public WatchFolderForm()
|
public WatchFolderForm() : this(new WatchFolderSettings())
|
||||||
: this(new WatchFolderSettings())
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,14 +118,12 @@ public HotkeyInfo()
|
||||||
Status = HotkeyStatus.NotConfigured;
|
Status = HotkeyStatus.NotConfigured;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HotkeyInfo(Keys hotkey)
|
public HotkeyInfo(Keys hotkey) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
Hotkey = hotkey;
|
Hotkey = hotkey;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HotkeyInfo(Keys hotkey, ushort id)
|
public HotkeyInfo(Keys hotkey, ushort id) : this(hotkey)
|
||||||
: this(hotkey)
|
|
||||||
{
|
{
|
||||||
ID = id;
|
ID = id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,8 +38,7 @@ public HotkeySettings()
|
||||||
HotkeyInfo = new HotkeyInfo();
|
HotkeyInfo = new HotkeyInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HotkeySettings(HotkeyType job, Keys hotkey = Keys.None)
|
public HotkeySettings(HotkeyType job, Keys hotkey = Keys.None) : this()
|
||||||
: this()
|
|
||||||
{
|
{
|
||||||
TaskSettings = TaskSettings.GetDefaultTaskSettings();
|
TaskSettings = TaskSettings.GetDefaultTaskSettings();
|
||||||
TaskSettings.Job = job;
|
TaskSettings.Job = job;
|
||||||
|
|
Loading…
Reference in a new issue