cleanup code, added version to commandline interface, updated MSTest nuget packages.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using Katteker.Gui.Properties;
|
||||
|
||||
@@ -24,7 +23,7 @@ namespace Katteker.Gui
|
||||
Font = SystemFonts.MessageBoxFont;
|
||||
Application.EnableVisualStyles();
|
||||
if (Environment.OSVersion.Version.Major >= 6)
|
||||
SetProcessDPIAware();
|
||||
NativeMethods.SetProcessDPIAware();
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
@@ -46,14 +45,6 @@ namespace Katteker.Gui
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
[DllImport("User32.dll")]
|
||||
private static extern bool ReleaseCapture();
|
||||
|
||||
[DllImport("User32.dll")]
|
||||
private static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern bool SetProcessDPIAware();
|
||||
private void CloseBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
@@ -77,8 +68,8 @@ namespace Katteker.Gui
|
||||
return;
|
||||
}
|
||||
if (e.Button != MouseButtons.Left) return;
|
||||
ReleaseCapture();
|
||||
SendMessage(Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0);
|
||||
NativeMethods.ReleaseCapture();
|
||||
NativeMethods.SendMessage(Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user