This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct Vector | |
{ | |
public double X { get; private set; } | |
public double Y { get; private set; } | |
public Vector(POINT pt) | |
{ | |
X = pt.X; | |
Y = pt.Y; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override string ToString() | |
{ | |
StringBuilder sb = new(); | |
var fields = this.GetType().GetProperties(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public); | |
foreach (var item in fields) | |
{ | |
if (item.CanRead) | |
{ | |
sb.AppendFormat(CultureInfo.CurrentCulture, "{0}: {1}, ", item.Name, item.GetValue(this)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Author: KuroiLight - klomb - <kuroilight@openmailbox.org> | |
;Started On: 08/08/15 | |
;License: Public Domain (http://www.unlicense.org/) | |
GetUserHotkey(enable := true) { | |
global __htky, __last_valid | |
static WH_KEYBOARD := 2, WH_MOUSE_LL := 14, KBHHandle := 0, MHHandle := 0, info | |
static MouseCallback := RegisterCallback("MouseProc",,3), KeyboardCallback := RegisterCallback("KeyboardProc",,3) | |
if(MHHandle) { |