mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-27 18:50:20 +12:00
Fix "Multiple statements in one line"
This commit is contained in:
parent
969cd5f586
commit
7dc95f4ae7
|
@ -68,7 +68,9 @@ public void Draw(Graphics g, Rectangle rect)
|
|||
g.FillRectangle(brush, rect);
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -172,7 +172,9 @@ private void RunInstaller()
|
|||
psi.UseShellExecute = true;
|
||||
Process.Start(psi);
|
||||
}
|
||||
catch { }
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -220,7 +220,9 @@ private void UpdateFFmpegPathUI()
|
|||
backColor = Color.FromArgb(200, 255, 200);
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
txtFFmpegPath.BackColor = backColor;
|
||||
#endif
|
||||
|
|
|
@ -208,7 +208,9 @@ private static void RunShareX(string arguments = "")
|
|||
return;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
// Workaround 2
|
||||
string path = Path.Combine(Environment.SystemDirectory, "cmd.exe");
|
||||
|
|
|
@ -1021,7 +1021,9 @@ public static void RunShareXAsAdmin(string arguments)
|
|||
psi.Verb = "runas";
|
||||
Process.Start(psi);
|
||||
}
|
||||
catch { }
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public static void OpenQRCode()
|
||||
|
|
Loading…
Reference in a new issue