mirror of https://github.com/keeweb/keeweb.git
updated windows helper for #554
This commit is contained in:
parent
e0291b2d52
commit
02b7266206
Binary file not shown.
|
@ -35,7 +35,7 @@ namespace KeeWebHelper
|
||||||
static void GetWindowInfo()
|
static void GetWindowInfo()
|
||||||
{
|
{
|
||||||
var windowInfo = WindowHelper.GetActiveWindowInfo();
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,9 @@ namespace KeeWebHelper
|
||||||
IntPtr hwnd = GetForegroundWindow();
|
IntPtr hwnd = GetForegroundWindow();
|
||||||
|
|
||||||
var result = new WindowInfo();
|
var result = new WindowInfo();
|
||||||
|
|
||||||
|
result.Id = hwnd.ToString();
|
||||||
|
|
||||||
if (GetWindowText(hwnd, buff, nChars) > 0)
|
if (GetWindowText(hwnd, buff, nChars) > 0)
|
||||||
{
|
{
|
||||||
result.Title = buff.ToString();
|
result.Title = buff.ToString();
|
||||||
|
|
|
@ -7,6 +7,7 @@ namespace KeeWebHelper
|
||||||
{
|
{
|
||||||
class WindowInfo
|
class WindowInfo
|
||||||
{
|
{
|
||||||
|
public string Id { get; set; }
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public string Url { get; set; }
|
public string Url { get; set; }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue