This repository has been archived on 2022-08-05. You can view files and clone it, but cannot push or open issues or pull requests.
2020-05-25 19:32:53 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace CC_Functions.W32
|
2020-01-10 16:58:48 +01:00
|
|
|
|
{
|
|
|
|
|
public static class GenericExtensions
|
|
|
|
|
{
|
2020-01-16 19:50:31 +01:00
|
|
|
|
public static Wnd32 GetWindow(this IntPtr handle) => Wnd32.FromHandle(handle);
|
|
|
|
|
public static Wnd32 GetMainWindow(this Process handle) => Wnd32.GetProcessMain(handle);
|
|
|
|
|
public static Wnd32 GetWnd32(this Form frm) => Wnd32.FromForm(frm);
|
2020-01-10 16:58:48 +01:00
|
|
|
|
public static bool IsDown(this Keys key) => KeyboardReader.IsKeyDown(key);
|
2020-01-15 17:59:29 +01:00
|
|
|
|
|
|
|
|
|
public static Privileges.SecurityEntity GetEntity(this Privileges.SecurityEntity2 entity) =>
|
|
|
|
|
Privileges.EntityToEntity(entity);
|
2020-01-10 16:58:48 +01:00
|
|
|
|
}
|
|
|
|
|
}
|