Skip to content

Commit

Permalink
Capture rect is recalculated from setting values on program start.
Browse files Browse the repository at this point in the history
  • Loading branch information
Petethegoat committed Jul 30, 2017
1 parent 7976b41 commit ac87847
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion WinScroll/WinScroll.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion WinScroll/WinScroll.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public partial class WinScroll : Form
private Rectangle captureRectangle;
private Point p = new Point();

private const string versionString = "0.4";
private const string versionString = "0.5";
private const string aboutURL = "http://www.github.com/Petethegoat";
//private const string apiURL = "https://api.github.com/repos/petethegoat/winscroll/releases/latest";
private const string registry = "SOFTWARE\\WinScroll";
Expand Down Expand Up @@ -148,6 +148,7 @@ public void Init()
captureY.Value = Properties.Settings.Default.CaptureY;
captureWidth.Value = Properties.Settings.Default.CaptureWidth;
captureHeight.Value = Properties.Settings.Default.CaptureHeight;
UpdateCaptureRect();
}

private void Tick(object sender, EventArgs e)
Expand Down Expand Up @@ -192,6 +193,11 @@ private void CaptureBounds(object sender, EventArgs e)
{
captureHeight.Value = captureY.Value + 1;
}
UpdateCaptureRect();
}

private void UpdateCaptureRect()
{
captureRectangle = new Rectangle((int)captureX.Value, (int)captureY.Value, (int)captureWidth.Value, (int)captureHeight.Value);
}

Expand Down
3 changes: 0 additions & 3 deletions WinScroll/WinScroll.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="notifyIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>105, 17</value>
</metadata>
Expand Down

0 comments on commit ac87847

Please sign in to comment.