Skip to content

Commit

Permalink
Bump version number
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Jun 23, 2022
1 parent 2c33efb commit 8219354
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
2 changes: 1 addition & 1 deletion JL.Core/Storage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static class Storage
public static readonly string ResourcesPath = Path.Join(AppContext.BaseDirectory, "Resources");
public static readonly string ConfigPath = Path.Join(AppContext.BaseDirectory, "Config");
public static readonly HttpClient Client = new(new HttpClientHandler { UseProxy = false }) { Timeout = TimeSpan.FromMinutes(10) };
public static readonly Version Version = new(1, 11, 1);
public static readonly Version Version = new(1, 12, 0);
public static readonly string GitHubApiUrlForLatestJLRelease = "https://api.github.com/repos/rampaa/JL/releases/latest";
public static readonly Uri JmdictUrl = new("http://ftp.edrdg.org/pub/Nihongo/JMdict_e.gz");
public static readonly Uri JmnedictUrl = new("http://ftp.edrdg.org/pub/Nihongo/JMnedict.xml.gz");
Expand Down
37 changes: 13 additions & 24 deletions JL.Windows/GUI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@ private void Border_OnMouseLeave(object sender, MouseEventArgs e)
// WindowResizer.SetWindowPos(_windowResizer.windowHandle, IntPtr.Zero, Convert.ToInt32(Left + e.HorizontalChange), Convert.ToInt32(Top + e.VerticalChange), Convert.ToInt32(Width), Convert.ToInt32(Height),
//WindowResizer.SetWindowPosFlags.SWP_SHOWWINDOW | WindowResizer.SetWindowPosFlags.SWP_NOREDRAW);
//}

private void ResizeWindow(object sender, MouseButtonEventArgs e)
{
_winApi?.ResizeWindow(sender as Border ?? new());
Expand All @@ -759,33 +760,21 @@ private void ResizeWindow(object sender, MouseButtonEventArgs e)
WidthBeforeResolutionChange = Width;
}

public bool IsMouseOnTitleBar(int lParam)
{
int x = lParam << 16 >> 16;
int y = lParam >> 16;
Point cursorPoint = PointFromScreen(new Point(x, y));

HitTestResult? hitTestResult = VisualTreeHelper.HitTest(this, cursorPoint);

if (hitTestResult != null)
{
return hitTestResult.VisualHit == TitleBar;
}

return false;
}
//public bool IsMouseOnTitleBar(int lParam)
//{
// int x = lParam << 16 >> 16;
// int y = lParam >> 16;
// Point cursorPoint = PointFromScreen(new Point(x, y));

public bool IsMouseOnTitleBar(Point cursorPoint)
{
HitTestResult? hitTestResult = VisualTreeHelper.HitTest(this, cursorPoint);
// HitTestResult? hitTestResult = VisualTreeHelper.HitTest(this, cursorPoint);

if (hitTestResult != null)
{
return hitTestResult.VisualHit == TitleBar;
}
// if (hitTestResult != null)
// {
// return hitTestResult.VisualHit == TitleBar;
// }

return false;
}
// return false;
//}

private void TitleBar_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Expand Down

0 comments on commit 8219354

Please sign in to comment.