Fix "Multiple statements in one line"

This commit is contained in:
Jaex 2018-05-16 11:09:01 +03:00
parent 969cd5f586
commit 7dc95f4ae7
6 changed files with 95 additions and 42 deletions

View file

@ -68,7 +68,9 @@ public void Draw(Graphics g, Rectangle rect)
g.FillRectangle(brush, rect);
}
}
catch { }
catch
{
}
}
}

View file

@ -33,7 +33,86 @@ namespace ShareX.HelpersLib
[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int Left, Top, Right, Bottom;
public int Left;
public int Top;
public int Right;
public int Bottom;
public int X
{
get
{
return Left;
}
set
{
Right -= Left - value;
Left = value;
}
}
public int Y
{
get
{
return Top;
}
set
{
Bottom -= Top - value;
Top = value;
}
}
public int Width
{
get
{
return Right - Left;
}
set
{
Right = value + Left;
}
}
public int Height
{
get
{
return Bottom - Top;
}
set
{
Bottom = value + Top;
}
}
public Point Location
{
get
{
return new Point(Left, Top);
}
set
{
X = value.X;
Y = value.Y;
}
}
public Size Size
{
get
{
return new Size(Width, Height);
}
set
{
Width = value.Width;
Height = value.Height;
}
}
public RECT(int left, int top, int right, int bottom)
{
@ -47,42 +126,6 @@ public RECT(Rectangle r) : this(r.Left, r.Top, r.Right, r.Bottom)
{
}
public int X
{
get { return Left; }
set { Right -= Left - value; Left = value; }
}
public int Y
{
get { return Top; }
set { Bottom -= Top - value; Top = value; }
}
public int Width
{
get { return Right - Left; }
set { Right = value + Left; }
}
public int Height
{
get { return Bottom - Top; }
set { Bottom = value + Top; }
}
public Point Location
{
get { return new Point(Left, Top); }
set { X = value.X; Y = value.Y; }
}
public Size Size
{
get { return new Size(Width, Height); }
set { Width = value.Width; Height = value.Height; }
}
public static implicit operator Rectangle(RECT r)
{
return new Rectangle(r.Left, r.Top, r.Width, r.Height);

View file

@ -172,7 +172,9 @@ private void RunInstaller()
psi.UseShellExecute = true;
Process.Start(psi);
}
catch { }
catch
{
}
}
}

View file

@ -220,7 +220,9 @@ private void UpdateFFmpegPathUI()
backColor = Color.FromArgb(200, 255, 200);
}
}
catch { }
catch
{
}
txtFFmpegPath.BackColor = backColor;
#endif

View file

@ -208,7 +208,9 @@ private static void RunShareX(string arguments = "")
return;
}
}
catch { }
catch
{
}
// Workaround 2
string path = Path.Combine(Environment.SystemDirectory, "cmd.exe");

View file

@ -1021,7 +1021,9 @@ public static void RunShareXAsAdmin(string arguments)
psi.Verb = "runas";
Process.Start(psi);
}
catch { }
catch
{
}
}
public static void OpenQRCode()