updated windows helper for #554

This commit is contained in:
antelle 2019-09-12 23:37:31 +02:00
parent e0291b2d52
commit 02b7266206
4 changed files with 5 additions and 1 deletions

Binary file not shown.

View File

@ -35,7 +35,7 @@ namespace KeeWebHelper
static void GetWindowInfo()
{
var windowInfo = WindowHelper.GetActiveWindowInfo();
Console.WriteLine("{0}\n{1}", windowInfo.Title, windowInfo.Url);
Console.WriteLine("{0}\n{1}\n{2}", windowInfo.Id, windowInfo.Title, windowInfo.Url);
}
}
}

View File

@ -31,6 +31,9 @@ namespace KeeWebHelper
IntPtr hwnd = GetForegroundWindow();
var result = new WindowInfo();
result.Id = hwnd.ToString();
if (GetWindowText(hwnd, buff, nChars) > 0)
{
result.Title = buff.ToString();

View File

@ -7,6 +7,7 @@ namespace KeeWebHelper
{
class WindowInfo
{
public string Id { get; set; }
public string Title { get; set; }
public string Url { get; set; }
}