Fix "Multiple statements in one line"
This commit is contained in:
parent
969cd5f586
commit
7dc95f4ae7
@ -68,7 +68,9 @@ namespace ShareX.HelpersLib
|
||||
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 @@ namespace ShareX.HelpersLib
|
||||
{
|
||||
}
|
||||
|
||||
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 @@ namespace ShareX.HelpersLib
|
||||
psi.UseShellExecute = true;
|
||||
Process.Start(psi);
|
||||
}
|
||||
catch { }
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,9 @@ namespace ShareX.ScreenCaptureLib
|
||||
backColor = Color.FromArgb(200, 255, 200);
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
txtFFmpegPath.BackColor = backColor;
|
||||
#endif
|
||||
|
@ -208,7 +208,9 @@ namespace ShareX.Steam
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
// Workaround 2
|
||||
string path = Path.Combine(Environment.SystemDirectory, "cmd.exe");
|
||||
|
@ -1021,7 +1021,9 @@ namespace ShareX
|
||||
psi.Verb = "runas";
|
||||
Process.Start(psi);
|
||||
}
|
||||
catch { }
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public static void OpenQRCode()
|
||||
|
Loading…
x
Reference in New Issue
Block a user