diff --git a/ShareX.HelpersLib/CLI/CLIManager.cs b/ShareX.HelpersLib/CLI/CLIManager.cs index 9da65e2a5..6fea2c3ee 100644 --- a/ShareX.HelpersLib/CLI/CLIManager.cs +++ b/ShareX.HelpersLib/CLI/CLIManager.cs @@ -42,14 +42,12 @@ public CLIManager() Actions = new List(); } - public CLIManager(string[] arguments) - : this() + public CLIManager(string[] arguments) : this() { Arguments = arguments; } - public CLIManager(string arguments) - : this() + public CLIManager(string arguments) : this() { Arguments = ParseCLI(arguments); } diff --git a/ShareX.HelpersLib/ColorBgra.cs b/ShareX.HelpersLib/ColorBgra.cs index 33a42159d..faaa9d8dc 100644 --- a/ShareX.HelpersLib/ColorBgra.cs +++ b/ShareX.HelpersLib/ColorBgra.cs @@ -45,14 +45,12 @@ public struct ColorBgra public const byte SizeOf = 4; - public ColorBgra(uint bgra) - : this() + public ColorBgra(uint bgra) : this() { Bgra = bgra; } - public ColorBgra(byte b, byte g, byte r, byte a = 255) - : this() + public ColorBgra(byte b, byte g, byte r, byte a = 255) : this() { Blue = b; Green = g; @@ -60,8 +58,7 @@ public ColorBgra(byte b, byte g, byte r, byte a = 255) Alpha = a; } - public ColorBgra(Color color) - : this(color.B, color.G, color.R, color.A) + public ColorBgra(Color color) : this(color.B, color.G, color.R, color.A) { } diff --git a/ShareX.HelpersLib/Colors/CMYK.cs b/ShareX.HelpersLib/Colors/CMYK.cs index 527fef480..0786c1300 100644 --- a/ShareX.HelpersLib/Colors/CMYK.cs +++ b/ShareX.HelpersLib/Colors/CMYK.cs @@ -145,8 +145,7 @@ public int Alpha } } - public CMYK(double cyan, double magenta, double yellow, double key, int alpha = 255) - : this() + public CMYK(double cyan, double magenta, double yellow, double key, int alpha = 255) : this() { Cyan = cyan; Magenta = magenta; @@ -155,8 +154,7 @@ public CMYK(double cyan, double magenta, double yellow, double key, int alpha = Alpha = alpha; } - public CMYK(int cyan, int magenta, int yellow, int key, int alpha = 255) - : this() + public CMYK(int cyan, int magenta, int yellow, int key, int alpha = 255) : this() { Cyan100 = cyan; Magenta100 = magenta; diff --git a/ShareX.HelpersLib/Colors/ColorPickerForm.cs b/ShareX.HelpersLib/Colors/ColorPickerForm.cs index 90c1bf7b5..6812fd1fe 100644 --- a/ShareX.HelpersLib/Colors/ColorPickerForm.cs +++ b/ShareX.HelpersLib/Colors/ColorPickerForm.cs @@ -37,8 +37,7 @@ public partial class ColorPickerForm : Form private bool oldColorExist; private bool controlChangingColor; - public ColorPickerForm() - : this(Color.Red) + public ColorPickerForm() : this(Color.Red) { } diff --git a/ShareX.HelpersLib/Colors/HSB.cs b/ShareX.HelpersLib/Colors/HSB.cs index 12a97a35e..9309f7882 100644 --- a/ShareX.HelpersLib/Colors/HSB.cs +++ b/ShareX.HelpersLib/Colors/HSB.cs @@ -120,8 +120,7 @@ public int Alpha } } - public HSB(double hue, double saturation, double brightness, int alpha = 255) - : this() + public HSB(double hue, double saturation, double brightness, int alpha = 255) : this() { Hue = hue; Saturation = saturation; @@ -129,8 +128,7 @@ public HSB(double hue, double saturation, double brightness, int alpha = 255) Alpha = alpha; } - public HSB(int hue, int saturation, int brightness, int alpha = 255) - : this() + public HSB(int hue, int saturation, int brightness, int alpha = 255) : this() { Hue360 = hue; Saturation100 = saturation; diff --git a/ShareX.HelpersLib/Colors/RGBA.cs b/ShareX.HelpersLib/Colors/RGBA.cs index 19f05d2f6..fc9187f48 100644 --- a/ShareX.HelpersLib/Colors/RGBA.cs +++ b/ShareX.HelpersLib/Colors/RGBA.cs @@ -80,8 +80,7 @@ public int Alpha } } - public RGBA(int red, int green, int blue, int alpha = 255) - : this() + public RGBA(int red, int green, int blue, int alpha = 255) : this() { Red = red; Green = green; @@ -89,8 +88,7 @@ public RGBA(int red, int green, int blue, int alpha = 255) Alpha = alpha; } - public RGBA(Color color) - : this(color.R, color.G, color.B, color.A) + public RGBA(Color color) : this(color.R, color.G, color.B, color.A) { } diff --git a/ShareX.HelpersLib/ConvolutionMatrix.cs b/ShareX.HelpersLib/ConvolutionMatrix.cs index a2ba2afde..a2a9ba04f 100644 --- a/ShareX.HelpersLib/ConvolutionMatrix.cs +++ b/ShareX.HelpersLib/ConvolutionMatrix.cs @@ -32,8 +32,7 @@ public class ConvolutionMatrix public int Factor { get; set; } public int Offset { get; set; } - public ConvolutionMatrix() - : this(3) + public ConvolutionMatrix() : this(3) { } diff --git a/ShareX.HelpersLib/ExternalProgram.cs b/ShareX.HelpersLib/ExternalProgram.cs index 9ab602687..239e54f05 100644 --- a/ShareX.HelpersLib/ExternalProgram.cs +++ b/ShareX.HelpersLib/ExternalProgram.cs @@ -45,15 +45,13 @@ public ExternalProgram() Args = "%input"; } - public ExternalProgram(string name, string path) - : this() + public ExternalProgram(string name, string path) : this() { Name = name; Path = path; } - public ExternalProgram(string name, string path, string args) - : this(name, path) + public ExternalProgram(string name, string path, string args) : this(name, path) { if (!string.IsNullOrEmpty(args)) { diff --git a/ShareX.HelpersLib/Forms/ErrorForm.cs b/ShareX.HelpersLib/Forms/ErrorForm.cs index 133c2cdda..a5e61b386 100644 --- a/ShareX.HelpersLib/Forms/ErrorForm.cs +++ b/ShareX.HelpersLib/Forms/ErrorForm.cs @@ -35,8 +35,7 @@ public partial class ErrorForm : Form public string LogPath { get; private set; } public string BugReportPath { get; private set; } - public ErrorForm(Exception error, string logPath, string bugReportPath) - : this(error.Message, error.ToString(), logPath, bugReportPath) + public ErrorForm(Exception error, string logPath, string bugReportPath) : this(error.Message, error.ToString(), logPath, bugReportPath) { } diff --git a/ShareX.HelpersLib/Native/FolderSelectDialog.cs b/ShareX.HelpersLib/Native/FolderSelectDialog.cs index 9c887cbf5..c7bdc4590 100644 --- a/ShareX.HelpersLib/Native/FolderSelectDialog.cs +++ b/ShareX.HelpersLib/Native/FolderSelectDialog.cs @@ -217,8 +217,7 @@ internal class Reflector /// Constructor /// /// The namespace containing types to be used - public Reflector(string ns) - : this(ns, ns) + public Reflector(string ns) : this(ns, ns) { } diff --git a/ShareX.HelpersLib/Native/NativeStructs.cs b/ShareX.HelpersLib/Native/NativeStructs.cs index 740c392a2..11f773d23 100644 --- a/ShareX.HelpersLib/Native/NativeStructs.cs +++ b/ShareX.HelpersLib/Native/NativeStructs.cs @@ -43,8 +43,7 @@ public RECT(int left, int top, int right, int bottom) Bottom = bottom; } - public RECT(Rectangle r) - : this(r.Left, r.Top, r.Right, r.Bottom) + public RECT(Rectangle r) : this(r.Left, r.Top, r.Right, r.Bottom) { } @@ -200,10 +199,9 @@ public struct WINDOWINFO public ushort atomWindowType; public ushort wCreatorVersion; - public WINDOWINFO(Boolean? filler) - : this() // Allows automatic initialization of "cbSize" with "new WINDOWINFO(null/true/false)". + public WINDOWINFO(bool? filler) : 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)] public struct FLASHWINFO { - public UInt32 cbSize; + public uint cbSize; public IntPtr hwnd; - public UInt32 dwFlags; - public UInt32 uCount; - public UInt32 dwTimeout; + public uint dwFlags; + public uint uCount; + public uint dwTimeout; } [Serializable, StructLayout(LayoutKind.Sequential)] diff --git a/ShareX.HelpersLib/UpdateChecker/DownloaderForm.cs b/ShareX.HelpersLib/UpdateChecker/DownloaderForm.cs index a96a6a66f..e982e9796 100644 --- a/ShareX.HelpersLib/UpdateChecker/DownloaderForm.cs +++ b/ShareX.HelpersLib/UpdateChecker/DownloaderForm.cs @@ -73,8 +73,7 @@ private DownloaderForm() RunInstallerInBackground = true; } - public DownloaderForm(UpdateChecker updateChecker) - : this(updateChecker.DownloadURL, updateChecker.Filename) + public DownloaderForm(UpdateChecker updateChecker) : this(updateChecker.DownloadURL, updateChecker.Filename) { Proxy = updateChecker.Proxy; @@ -84,8 +83,7 @@ public DownloaderForm(UpdateChecker updateChecker) } } - public DownloaderForm(string url, string filename) - : this() + public DownloaderForm(string url, string filename) : this() { URL = url; Filename = filename; diff --git a/ShareX.HelpersLib/XmlColor.cs b/ShareX.HelpersLib/XmlColor.cs index 686dbb48a..7dc7008b5 100644 --- a/ShareX.HelpersLib/XmlColor.cs +++ b/ShareX.HelpersLib/XmlColor.cs @@ -36,13 +36,11 @@ public class XmlColor public byte G { get; set; } public byte B { get; set; } - public XmlColor() - : this(0, 0, 0) + public XmlColor() : this(0, 0, 0) { } - public XmlColor(byte r, byte g, byte b) - : this(255, r, g, b) + public XmlColor(byte r, byte g, byte b) : this(255, r, g, b) { } @@ -54,8 +52,7 @@ public XmlColor(byte a, byte r, byte g, byte b) B = b; } - public XmlColor(Color color) - : this(color.A, color.R, color.G, color.B) + public XmlColor(Color color) : this(color.A, color.R, color.G, color.B) { } diff --git a/ShareX.ScreenCaptureLib/WindowsList.cs b/ShareX.ScreenCaptureLib/WindowsList.cs index 328bbd536..4dfdd8da4 100644 --- a/ShareX.ScreenCaptureLib/WindowsList.cs +++ b/ShareX.ScreenCaptureLib/WindowsList.cs @@ -42,8 +42,7 @@ public WindowsList() IgnoreWindows = new List(); } - public WindowsList(IntPtr ignoreWindow) - : this() + public WindowsList(IntPtr ignoreWindow) : this() { IgnoreWindows.Add(ignoreWindow); } diff --git a/ShareX.UploadersLib/FileUploaders/Copy.cs b/ShareX.UploadersLib/FileUploaders/Copy.cs index e1854a17d..041548c5c 100644 --- a/ShareX.UploadersLib/FileUploaders/Copy.cs +++ b/ShareX.UploadersLib/FileUploaders/Copy.cs @@ -60,8 +60,7 @@ public Copy(OAuthInfo oauth) AuthInfo = oauth; } - public Copy(OAuthInfo oauth, CopyAccountInfo accountInfo) - : this(oauth) + public Copy(OAuthInfo oauth, CopyAccountInfo accountInfo) : this(oauth) { AccountInfo = accountInfo; } diff --git a/ShareX.UploadersLib/FileUploaders/Dropbox.cs b/ShareX.UploadersLib/FileUploaders/Dropbox.cs index 8d5405257..71464beba 100644 --- a/ShareX.UploadersLib/FileUploaders/Dropbox.cs +++ b/ShareX.UploadersLib/FileUploaders/Dropbox.cs @@ -84,8 +84,7 @@ public Dropbox(OAuth2Info oauth) AuthInfo = oauth; } - public Dropbox(OAuth2Info oauth, DropboxAccountInfo accountInfo) - : this(oauth) + public Dropbox(OAuth2Info oauth, DropboxAccountInfo accountInfo) : this(oauth) { AccountInfo = accountInfo; } diff --git a/ShareX.UploadersLib/FileUploaders/Mega.cs b/ShareX.UploadersLib/FileUploaders/Mega.cs index 10898809c..fe75ee680 100644 --- a/ShareX.UploadersLib/FileUploaders/Mega.cs +++ b/ShareX.UploadersLib/FileUploaders/Mega.cs @@ -55,13 +55,11 @@ public sealed class Mega : FileUploader, IWebClient private readonly MegaApiClient.AuthInfos _authInfos; private readonly string _parentNodeId; - public Mega() - : this(null, null) + public Mega() : this(null, null) { } - public Mega(MegaApiClient.AuthInfos authInfos) - : this(authInfos, null) + public Mega(MegaApiClient.AuthInfos authInfos) : this(authInfos, null) { } diff --git a/ShareX.UploadersLib/Forms/EmailForm.cs b/ShareX.UploadersLib/Forms/EmailForm.cs index 7d8d92a73..7d1f61473 100644 --- a/ShareX.UploadersLib/Forms/EmailForm.cs +++ b/ShareX.UploadersLib/Forms/EmailForm.cs @@ -41,8 +41,7 @@ public EmailForm() Icon = ShareXResources.Icon; } - public EmailForm(string toEmail, string subject, string body) - : this() + public EmailForm(string toEmail, string subject, string body) : this() { txtToEmail.Text = toEmail; txtSubject.Text = subject; diff --git a/ShareX.UploadersLib/Forms/JiraUpload.cs b/ShareX.UploadersLib/Forms/JiraUpload.cs index 1ee455302..94965bad2 100644 --- a/ShareX.UploadersLib/Forms/JiraUpload.cs +++ b/ShareX.UploadersLib/Forms/JiraUpload.cs @@ -54,8 +54,7 @@ public JiraUpload() Icon = ShareXResources.Icon; } - public JiraUpload(string issuePrefix, GetSummaryHandler getSummary) - : this() + public JiraUpload(string issuePrefix, GetSummaryHandler getSummary) : this() { if (getSummary == null) { diff --git a/ShareX.UploadersLib/Forms/TwitterTweetForm.cs b/ShareX.UploadersLib/Forms/TwitterTweetForm.cs index f1e4210b3..b513b6830 100644 --- a/ShareX.UploadersLib/Forms/TwitterTweetForm.cs +++ b/ShareX.UploadersLib/Forms/TwitterTweetForm.cs @@ -102,14 +102,12 @@ public TwitterTweetForm() MediaMode = false; } - public TwitterTweetForm(OAuthInfo oauth) - : this() + public TwitterTweetForm(OAuthInfo oauth) : this() { AuthInfo = oauth; } - public TwitterTweetForm(OAuthInfo oauth, string message) - : this(oauth) + public TwitterTweetForm(OAuthInfo oauth, string message) : this(oauth) { Message = message; } diff --git a/ShareX.UploadersLib/Forms/UserPassBox.cs b/ShareX.UploadersLib/Forms/UserPassBox.cs index 68209b9ad..69f76f5f2 100644 --- a/ShareX.UploadersLib/Forms/UserPassBox.cs +++ b/ShareX.UploadersLib/Forms/UserPassBox.cs @@ -46,15 +46,13 @@ public UserPassBox(string title, string userName, string password) txtPassword.Text = password; } - public UserPassBox(string q, string fullName, string userName, string password) - : this(q, userName, password) + public UserPassBox(string q, string fullName, string userName, string password) : this(q, userName, password) { txtFullName.Text = fullName; txtFullName.Enabled = true; } - public UserPassBox(string q, string fullName, string email, string userName, string password) - : this(q, fullName, userName, password) + public UserPassBox(string q, string fullName, string email, string userName, string password) : this(q, fullName, userName, password) { txtEmail.Text = email; txtEmail.Enabled = true; diff --git a/ShareX.UploadersLib/Helpers/OAuth/OAuthInfo.cs b/ShareX.UploadersLib/Helpers/OAuth/OAuthInfo.cs index f8e947728..d425c2ae4 100644 --- a/ShareX.UploadersLib/Helpers/OAuth/OAuthInfo.cs +++ b/ShareX.UploadersLib/Helpers/OAuth/OAuthInfo.cs @@ -77,21 +77,18 @@ public OAuthInfo() OAuthVersion = "1.0"; } - public OAuthInfo(string consumerKey) - : this() + public OAuthInfo(string consumerKey) : this() { ConsumerKey = consumerKey; } - public OAuthInfo(string consumerKey, string consumerSecret) - : this() + public OAuthInfo(string consumerKey, string consumerSecret) : this() { ConsumerKey = consumerKey; ConsumerSecret = consumerSecret; } - public OAuthInfo(string consumerKey, string consumerSecret, string userToken, string userSecret) - : this(consumerKey, consumerSecret) + public OAuthInfo(string consumerKey, string consumerSecret, string userToken, string userSecret) : this(consumerKey, consumerSecret) { UserToken = userToken; UserSecret = userSecret; diff --git a/ShareX.UploadersLib/ImageUploaders/FlickrUploader.cs b/ShareX.UploadersLib/ImageUploaders/FlickrUploader.cs index 40f98328c..ac48b01a3 100644 --- a/ShareX.UploadersLib/ImageUploaders/FlickrUploader.cs +++ b/ShareX.UploadersLib/ImageUploaders/FlickrUploader.cs @@ -65,8 +65,7 @@ public FlickrUploader(string key, string secret) API_Secret = secret; } - public FlickrUploader(string key, string secret, FlickrAuthInfo auth, FlickrSettings settings) - : this(key, secret) + public FlickrUploader(string key, string secret, FlickrAuthInfo auth, FlickrSettings settings) : this(key, secret) { Auth = auth; Settings = settings; diff --git a/ShareX/Forms/ActionsForm.cs b/ShareX/Forms/ActionsForm.cs index df5e0cc03..d7425428f 100644 --- a/ShareX/Forms/ActionsForm.cs +++ b/ShareX/Forms/ActionsForm.cs @@ -34,8 +34,7 @@ public partial class ActionsForm : Form { public ExternalProgram FileAction { get; private set; } - public ActionsForm() - : this(new ExternalProgram()) + public ActionsForm() : this(new ExternalProgram()) { } diff --git a/ShareX/Forms/ClipboardFormatForm.cs b/ShareX/Forms/ClipboardFormatForm.cs index 281533b61..55f19c173 100644 --- a/ShareX/Forms/ClipboardFormatForm.cs +++ b/ShareX/Forms/ClipboardFormatForm.cs @@ -34,8 +34,7 @@ public partial class ClipboardFormatForm : Form { public ClipboardFormat ClipboardFormat { get; private set; } - public ClipboardFormatForm() - : this(new ClipboardFormat()) + public ClipboardFormatForm() : this(new ClipboardFormat()) { } diff --git a/ShareX/Forms/EncoderProgramForm.cs b/ShareX/Forms/EncoderProgramForm.cs index ae9ee474a..b8601fc25 100644 --- a/ShareX/Forms/EncoderProgramForm.cs +++ b/ShareX/Forms/EncoderProgramForm.cs @@ -34,8 +34,7 @@ public partial class EncoderProgramForm : Form { public VideoEncoder encoder { get; private set; } - public EncoderProgramForm() - : this(new VideoEncoder()) + public EncoderProgramForm() : this(new VideoEncoder()) { } diff --git a/ShareX/Forms/WatchFolderForm.cs b/ShareX/Forms/WatchFolderForm.cs index 9f5f00ad7..b24142ef4 100644 --- a/ShareX/Forms/WatchFolderForm.cs +++ b/ShareX/Forms/WatchFolderForm.cs @@ -34,8 +34,7 @@ public partial class WatchFolderForm : Form { public WatchFolderSettings WatchFolder { get; private set; } - public WatchFolderForm() - : this(new WatchFolderSettings()) + public WatchFolderForm() : this(new WatchFolderSettings()) { } diff --git a/ShareX/HotkeyInfo.cs b/ShareX/HotkeyInfo.cs index e711d8641..24c73101a 100644 --- a/ShareX/HotkeyInfo.cs +++ b/ShareX/HotkeyInfo.cs @@ -118,14 +118,12 @@ public HotkeyInfo() Status = HotkeyStatus.NotConfigured; } - public HotkeyInfo(Keys hotkey) - : this() + public HotkeyInfo(Keys hotkey) : this() { Hotkey = hotkey; } - public HotkeyInfo(Keys hotkey, ushort id) - : this(hotkey) + public HotkeyInfo(Keys hotkey, ushort id) : this(hotkey) { ID = id; } diff --git a/ShareX/HotkeySettings.cs b/ShareX/HotkeySettings.cs index 65de66ca3..8959bfc08 100644 --- a/ShareX/HotkeySettings.cs +++ b/ShareX/HotkeySettings.cs @@ -38,8 +38,7 @@ public HotkeySettings() HotkeyInfo = new HotkeyInfo(); } - public HotkeySettings(HotkeyType job, Keys hotkey = Keys.None) - : this() + public HotkeySettings(HotkeyType job, Keys hotkey = Keys.None) : this() { TaskSettings = TaskSettings.GetDefaultTaskSettings(); TaskSettings.Job = job;