Move : this() same line

This commit is contained in:
Jaex 2016-04-06 19:02:48 +03:00
parent 9d49b55e73
commit b825f6a0af
29 changed files with 51 additions and 97 deletions

View file

@ -42,14 +42,12 @@ public CLIManager()
Actions = new List<CLICommandAction>();
}
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);
}

View file

@ -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)
{
}

View file

@ -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;

View file

@ -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)
{
}

View file

@ -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;

View file

@ -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)
{
}

View file

@ -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)
{
}

View file

@ -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))
{

View file

@ -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)
{
}

View file

@ -217,8 +217,7 @@ internal class Reflector
/// Constructor
/// </summary>
/// <param name="ns">The namespace containing types to be used</param>
public Reflector(string ns)
: this(ns, ns)
public Reflector(string ns) : this(ns, ns)
{
}

View file

@ -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)]

View file

@ -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;

View file

@ -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)
{
}

View file

@ -42,8 +42,7 @@ public WindowsList()
IgnoreWindows = new List<IntPtr>();
}
public WindowsList(IntPtr ignoreWindow)
: this()
public WindowsList(IntPtr ignoreWindow) : this()
{
IgnoreWindows.Add(ignoreWindow);
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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)
{
}

View file

@ -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;

View file

@ -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)
{

View file

@ -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;
}

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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())
{
}

View file

@ -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())
{
}

View file

@ -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())
{
}

View file

@ -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())
{
}

View file

@ -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;
}

View file

@ -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;