mirror of
https://github.com/ZuneDev/Xune.git
synced 2026-07-27 13:13:10 -07:00
Format RenderApi code
This commit is contained in:
@@ -6,82 +6,82 @@
|
||||
|
||||
namespace Microsoft.Iris.Input
|
||||
{
|
||||
public class Cursor
|
||||
{
|
||||
public const int NoneResourceId = 1;
|
||||
public const int MoveResourceId = 2;
|
||||
public const int CopyResourceId = 3;
|
||||
public static readonly Cursor Arrow = new Cursor(32512, CursorID.Arrow);
|
||||
public static readonly Cursor AppStarting = new Cursor(32550, CursorID.AppStarting);
|
||||
public static readonly Cursor Crosshair = new Cursor(32515, CursorID.Crosshair);
|
||||
public static readonly Cursor Default = Cursor.Arrow;
|
||||
public static readonly Cursor Hand = new Cursor(32649, CursorID.Hand);
|
||||
public static readonly Cursor Help = new Cursor(32651, CursorID.Help);
|
||||
public static readonly Cursor IBeam = new Cursor(32513, CursorID.IBeam);
|
||||
public static readonly Cursor No = new Cursor(32648, CursorID.No);
|
||||
public static readonly Cursor Size = new Cursor(32646, CursorID.Size);
|
||||
public static readonly Cursor SizeNS = new Cursor(32645, CursorID.SizeNS);
|
||||
public static readonly Cursor SizeWE = new Cursor(32644, CursorID.SizeWE);
|
||||
public static readonly Cursor SizeNWSE = new Cursor(32642, CursorID.SizeNWSE);
|
||||
public static readonly Cursor SizeNESW = new Cursor(32643, CursorID.SizeNESW);
|
||||
public static readonly Cursor WaitCursor = new Cursor(32514, CursorID.Wait);
|
||||
public static readonly Cursor UpArrow = new Cursor(32516, CursorID.UpArrow);
|
||||
public static readonly Cursor NullCursor = new Cursor(0, CursorID.None);
|
||||
public static readonly Cursor Cancel = new Cursor(1, CursorID.Cancel);
|
||||
public static readonly Cursor Move = new Cursor(2, CursorID.Move);
|
||||
public static readonly Cursor Copy = new Cursor(3, CursorID.Copy);
|
||||
private int m_idResource;
|
||||
private CursorID m_idCursor;
|
||||
|
||||
public Cursor(int idResource, CursorID idCursor)
|
||||
public class Cursor
|
||||
{
|
||||
this.m_idResource = idResource;
|
||||
this.m_idCursor = idCursor;
|
||||
public const int NoneResourceId = 1;
|
||||
public const int MoveResourceId = 2;
|
||||
public const int CopyResourceId = 3;
|
||||
public static readonly Cursor Arrow = new Cursor(32512, CursorID.Arrow);
|
||||
public static readonly Cursor AppStarting = new Cursor(32550, CursorID.AppStarting);
|
||||
public static readonly Cursor Crosshair = new Cursor(32515, CursorID.Crosshair);
|
||||
public static readonly Cursor Default = Cursor.Arrow;
|
||||
public static readonly Cursor Hand = new Cursor(32649, CursorID.Hand);
|
||||
public static readonly Cursor Help = new Cursor(32651, CursorID.Help);
|
||||
public static readonly Cursor IBeam = new Cursor(32513, CursorID.IBeam);
|
||||
public static readonly Cursor No = new Cursor(32648, CursorID.No);
|
||||
public static readonly Cursor Size = new Cursor(32646, CursorID.Size);
|
||||
public static readonly Cursor SizeNS = new Cursor(32645, CursorID.SizeNS);
|
||||
public static readonly Cursor SizeWE = new Cursor(32644, CursorID.SizeWE);
|
||||
public static readonly Cursor SizeNWSE = new Cursor(32642, CursorID.SizeNWSE);
|
||||
public static readonly Cursor SizeNESW = new Cursor(32643, CursorID.SizeNESW);
|
||||
public static readonly Cursor WaitCursor = new Cursor(32514, CursorID.Wait);
|
||||
public static readonly Cursor UpArrow = new Cursor(32516, CursorID.UpArrow);
|
||||
public static readonly Cursor NullCursor = new Cursor(0, CursorID.None);
|
||||
public static readonly Cursor Cancel = new Cursor(1, CursorID.Cancel);
|
||||
public static readonly Cursor Move = new Cursor(2, CursorID.Move);
|
||||
public static readonly Cursor Copy = new Cursor(3, CursorID.Copy);
|
||||
private int m_idResource;
|
||||
private CursorID m_idCursor;
|
||||
|
||||
public Cursor(int idResource, CursorID idCursor)
|
||||
{
|
||||
this.m_idResource = idResource;
|
||||
this.m_idCursor = idCursor;
|
||||
}
|
||||
|
||||
public int ResourceId => this.m_idResource;
|
||||
|
||||
public CursorID CursorID => this.m_idCursor;
|
||||
|
||||
public static Cursor GetCursor(CursorID cursor)
|
||||
{
|
||||
switch (cursor)
|
||||
{
|
||||
case CursorID.Arrow:
|
||||
return Cursor.Arrow;
|
||||
case CursorID.Cancel:
|
||||
return Cursor.Cancel;
|
||||
case CursorID.Copy:
|
||||
return Cursor.Copy;
|
||||
case CursorID.Crosshair:
|
||||
return Cursor.Crosshair;
|
||||
case CursorID.IBeam:
|
||||
return Cursor.IBeam;
|
||||
case CursorID.Hand:
|
||||
return Cursor.Hand;
|
||||
case CursorID.Move:
|
||||
return Cursor.Move;
|
||||
case CursorID.No:
|
||||
return Cursor.No;
|
||||
case CursorID.None:
|
||||
return Cursor.NullCursor;
|
||||
case CursorID.Size:
|
||||
return Cursor.Size;
|
||||
case CursorID.SizeNS:
|
||||
return Cursor.SizeNS;
|
||||
case CursorID.SizeWE:
|
||||
return Cursor.SizeWE;
|
||||
case CursorID.SizeNWSE:
|
||||
return Cursor.SizeNWSE;
|
||||
case CursorID.SizeNESW:
|
||||
return Cursor.SizeNESW;
|
||||
case CursorID.UpArrow:
|
||||
return Cursor.UpArrow;
|
||||
case CursorID.Wait:
|
||||
return Cursor.WaitCursor;
|
||||
default:
|
||||
return (Cursor)null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int ResourceId => this.m_idResource;
|
||||
|
||||
public CursorID CursorID => this.m_idCursor;
|
||||
|
||||
public static Cursor GetCursor(CursorID cursor)
|
||||
{
|
||||
switch (cursor)
|
||||
{
|
||||
case CursorID.Arrow:
|
||||
return Cursor.Arrow;
|
||||
case CursorID.Cancel:
|
||||
return Cursor.Cancel;
|
||||
case CursorID.Copy:
|
||||
return Cursor.Copy;
|
||||
case CursorID.Crosshair:
|
||||
return Cursor.Crosshair;
|
||||
case CursorID.IBeam:
|
||||
return Cursor.IBeam;
|
||||
case CursorID.Hand:
|
||||
return Cursor.Hand;
|
||||
case CursorID.Move:
|
||||
return Cursor.Move;
|
||||
case CursorID.No:
|
||||
return Cursor.No;
|
||||
case CursorID.None:
|
||||
return Cursor.NullCursor;
|
||||
case CursorID.Size:
|
||||
return Cursor.Size;
|
||||
case CursorID.SizeNS:
|
||||
return Cursor.SizeNS;
|
||||
case CursorID.SizeWE:
|
||||
return Cursor.SizeWE;
|
||||
case CursorID.SizeNWSE:
|
||||
return Cursor.SizeNWSE;
|
||||
case CursorID.SizeNESW:
|
||||
return Cursor.SizeNESW;
|
||||
case CursorID.UpArrow:
|
||||
return Cursor.UpArrow;
|
||||
case CursorID.Wait:
|
||||
return Cursor.WaitCursor;
|
||||
default:
|
||||
return (Cursor) null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,26 +6,26 @@
|
||||
|
||||
namespace Microsoft.Iris.Input
|
||||
{
|
||||
public enum CursorID
|
||||
{
|
||||
NotSpecified,
|
||||
AppStarting,
|
||||
Arrow,
|
||||
Cancel,
|
||||
Copy,
|
||||
Crosshair,
|
||||
IBeam,
|
||||
Hand,
|
||||
Help,
|
||||
Move,
|
||||
No,
|
||||
None,
|
||||
Size,
|
||||
SizeNS,
|
||||
SizeWE,
|
||||
SizeNWSE,
|
||||
SizeNESW,
|
||||
UpArrow,
|
||||
Wait,
|
||||
}
|
||||
public enum CursorID
|
||||
{
|
||||
NotSpecified,
|
||||
AppStarting,
|
||||
Arrow,
|
||||
Cancel,
|
||||
Copy,
|
||||
Crosshair,
|
||||
IBeam,
|
||||
Hand,
|
||||
Help,
|
||||
Move,
|
||||
No,
|
||||
None,
|
||||
Size,
|
||||
SizeNS,
|
||||
SizeWE,
|
||||
SizeNWSE,
|
||||
SizeNESW,
|
||||
UpArrow,
|
||||
Wait,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
namespace Microsoft.Iris.Input
|
||||
{
|
||||
public interface IRawInputSite
|
||||
{
|
||||
object OwnerData { get; }
|
||||
}
|
||||
public interface IRawInputSite
|
||||
{
|
||||
object OwnerData { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
namespace Microsoft.Iris.Input
|
||||
{
|
||||
public enum InputDeviceType
|
||||
{
|
||||
None,
|
||||
Keyboard,
|
||||
Mouse,
|
||||
Other,
|
||||
}
|
||||
public enum InputDeviceType
|
||||
{
|
||||
None,
|
||||
Keyboard,
|
||||
Mouse,
|
||||
Other,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,15 +8,15 @@ using System;
|
||||
|
||||
namespace Microsoft.Iris.Input
|
||||
{
|
||||
[Flags]
|
||||
public enum InputHandlerFlags
|
||||
{
|
||||
None = 0,
|
||||
Keyboard = 1,
|
||||
Mouse = 2,
|
||||
Drag = 4,
|
||||
Hid = 8,
|
||||
AppCommand = 16, // 0x00000010
|
||||
All = AppCommand | Hid | Drag | Mouse | Keyboard, // 0x0000001F
|
||||
}
|
||||
[Flags]
|
||||
public enum InputHandlerFlags
|
||||
{
|
||||
None = 0,
|
||||
Keyboard = 1,
|
||||
Mouse = 2,
|
||||
Drag = 4,
|
||||
Hid = 8,
|
||||
AppCommand = 16, // 0x00000010
|
||||
All = AppCommand | Hid | Drag | Mouse | Keyboard, // 0x0000001F
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,22 +8,22 @@ using System;
|
||||
|
||||
namespace Microsoft.Iris.Input
|
||||
{
|
||||
[Flags]
|
||||
public enum InputModifiers
|
||||
{
|
||||
None = 0,
|
||||
ControlKey = 1,
|
||||
ShiftKey = 2,
|
||||
AltKey = 4,
|
||||
WindowsKey = 8,
|
||||
LeftMouse = 16, // 0x00000010
|
||||
RightMouse = 32, // 0x00000020
|
||||
MiddleMouse = 64, // 0x00000040
|
||||
XMouse1 = 128, // 0x00000080
|
||||
XMouse2 = 256, // 0x00000100
|
||||
DoubleClick = 512, // 0x00000200
|
||||
AllKeys = WindowsKey | AltKey | ShiftKey | ControlKey, // 0x0000000F
|
||||
AllButtons = XMouse2 | XMouse1 | MiddleMouse | RightMouse | LeftMouse, // 0x000001F0
|
||||
AllMouse = AllButtons | DoubleClick, // 0x000003F0
|
||||
}
|
||||
[Flags]
|
||||
public enum InputModifiers
|
||||
{
|
||||
None = 0,
|
||||
ControlKey = 1,
|
||||
ShiftKey = 2,
|
||||
AltKey = 4,
|
||||
WindowsKey = 8,
|
||||
LeftMouse = 16, // 0x00000010
|
||||
RightMouse = 32, // 0x00000020
|
||||
MiddleMouse = 64, // 0x00000040
|
||||
XMouse1 = 128, // 0x00000080
|
||||
XMouse2 = 256, // 0x00000100
|
||||
DoubleClick = 512, // 0x00000200
|
||||
AllKeys = WindowsKey | AltKey | ShiftKey | ControlKey, // 0x0000000F
|
||||
AllButtons = XMouse2 | XMouse1 | MiddleMouse | RightMouse | LeftMouse, // 0x000001F0
|
||||
AllMouse = AllButtons | DoubleClick, // 0x000003F0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
namespace Microsoft.Iris.Input
|
||||
{
|
||||
public enum KeyAction
|
||||
{
|
||||
None,
|
||||
Up,
|
||||
Down,
|
||||
Character,
|
||||
}
|
||||
public enum KeyAction
|
||||
{
|
||||
None,
|
||||
Up,
|
||||
Down,
|
||||
Character,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
namespace Microsoft.Iris.Input
|
||||
{
|
||||
public enum KeyboardMessageId
|
||||
{
|
||||
Down,
|
||||
Up,
|
||||
Char,
|
||||
SysDown,
|
||||
SysUp,
|
||||
SysChar,
|
||||
}
|
||||
public enum KeyboardMessageId
|
||||
{
|
||||
Down,
|
||||
Up,
|
||||
Char,
|
||||
SysDown,
|
||||
SysUp,
|
||||
SysChar,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,226 +6,226 @@
|
||||
|
||||
namespace Microsoft.Iris.Input
|
||||
{
|
||||
public enum Keys
|
||||
{
|
||||
Modifiers = -65536, // 0xFFFF0000
|
||||
None = 0,
|
||||
LButton = 1,
|
||||
RButton = 2,
|
||||
Cancel = 3,
|
||||
MButton = 4,
|
||||
XButton1 = 5,
|
||||
XButton2 = 6,
|
||||
Back = 8,
|
||||
Tab = 9,
|
||||
LineFeed = 10, // 0x0000000A
|
||||
Clear = 12, // 0x0000000C
|
||||
Enter = 13, // 0x0000000D
|
||||
Return = 13, // 0x0000000D
|
||||
ShiftKey = 16, // 0x00000010
|
||||
ControlKey = 17, // 0x00000011
|
||||
Menu = 18, // 0x00000012
|
||||
Pause = 19, // 0x00000013
|
||||
Capital = 20, // 0x00000014
|
||||
CapsLock = 20, // 0x00000014
|
||||
HangulMode = 21, // 0x00000015
|
||||
KanaMode = 21, // 0x00000015
|
||||
JunjaMode = 23, // 0x00000017
|
||||
FinalMode = 24, // 0x00000018
|
||||
HanjaMode = 25, // 0x00000019
|
||||
KanjiMode = 25, // 0x00000019
|
||||
Escape = 27, // 0x0000001B
|
||||
IMEConvert = 28, // 0x0000001C
|
||||
IMENonconvert = 29, // 0x0000001D
|
||||
IMEAccept = 30, // 0x0000001E
|
||||
IMEModeChange = 31, // 0x0000001F
|
||||
Space = 32, // 0x00000020
|
||||
PageUp = 33, // 0x00000021
|
||||
Prior = 33, // 0x00000021
|
||||
Next = 34, // 0x00000022
|
||||
PageDown = 34, // 0x00000022
|
||||
End = 35, // 0x00000023
|
||||
Home = 36, // 0x00000024
|
||||
Left = 37, // 0x00000025
|
||||
Up = 38, // 0x00000026
|
||||
Right = 39, // 0x00000027
|
||||
Down = 40, // 0x00000028
|
||||
Select = 41, // 0x00000029
|
||||
Print = 42, // 0x0000002A
|
||||
Execute = 43, // 0x0000002B
|
||||
PrintScreen = 44, // 0x0000002C
|
||||
Snapshot = 44, // 0x0000002C
|
||||
Insert = 45, // 0x0000002D
|
||||
Delete = 46, // 0x0000002E
|
||||
D0 = 48, // 0x00000030
|
||||
D1 = 49, // 0x00000031
|
||||
D2 = 50, // 0x00000032
|
||||
D3 = 51, // 0x00000033
|
||||
D4 = 52, // 0x00000034
|
||||
D5 = 53, // 0x00000035
|
||||
D6 = 54, // 0x00000036
|
||||
D7 = 55, // 0x00000037
|
||||
D8 = 56, // 0x00000038
|
||||
D9 = 57, // 0x00000039
|
||||
A = 65, // 0x00000041
|
||||
B = 66, // 0x00000042
|
||||
C = 67, // 0x00000043
|
||||
D = 68, // 0x00000044
|
||||
E = 69, // 0x00000045
|
||||
F = 70, // 0x00000046
|
||||
G = 71, // 0x00000047
|
||||
H = 72, // 0x00000048
|
||||
I = 73, // 0x00000049
|
||||
J = 74, // 0x0000004A
|
||||
K = 75, // 0x0000004B
|
||||
L = 76, // 0x0000004C
|
||||
M = 77, // 0x0000004D
|
||||
N = 78, // 0x0000004E
|
||||
O = 79, // 0x0000004F
|
||||
P = 80, // 0x00000050
|
||||
Q = 81, // 0x00000051
|
||||
R = 82, // 0x00000052
|
||||
S = 83, // 0x00000053
|
||||
T = 84, // 0x00000054
|
||||
U = 85, // 0x00000055
|
||||
V = 86, // 0x00000056
|
||||
W = 87, // 0x00000057
|
||||
X = 88, // 0x00000058
|
||||
Y = 89, // 0x00000059
|
||||
Z = 90, // 0x0000005A
|
||||
LWin = 91, // 0x0000005B
|
||||
RWin = 92, // 0x0000005C
|
||||
Apps = 93, // 0x0000005D
|
||||
NumPad0 = 96, // 0x00000060
|
||||
NumPad1 = 97, // 0x00000061
|
||||
NumPad2 = 98, // 0x00000062
|
||||
NumPad3 = 99, // 0x00000063
|
||||
NumPad4 = 100, // 0x00000064
|
||||
NumPad5 = 101, // 0x00000065
|
||||
NumPad6 = 102, // 0x00000066
|
||||
NumPad7 = 103, // 0x00000067
|
||||
NumPad8 = 104, // 0x00000068
|
||||
NumPad9 = 105, // 0x00000069
|
||||
Multiply = 106, // 0x0000006A
|
||||
Add = 107, // 0x0000006B
|
||||
Separator = 108, // 0x0000006C
|
||||
Subtract = 109, // 0x0000006D
|
||||
Decimal = 110, // 0x0000006E
|
||||
Divide = 111, // 0x0000006F
|
||||
F1 = 112, // 0x00000070
|
||||
F2 = 113, // 0x00000071
|
||||
F3 = 114, // 0x00000072
|
||||
F4 = 115, // 0x00000073
|
||||
F5 = 116, // 0x00000074
|
||||
F6 = 117, // 0x00000075
|
||||
F7 = 118, // 0x00000076
|
||||
F8 = 119, // 0x00000077
|
||||
F9 = 120, // 0x00000078
|
||||
F10 = 121, // 0x00000079
|
||||
F11 = 122, // 0x0000007A
|
||||
F12 = 123, // 0x0000007B
|
||||
F13 = 124, // 0x0000007C
|
||||
F14 = 125, // 0x0000007D
|
||||
F15 = 126, // 0x0000007E
|
||||
F16 = 127, // 0x0000007F
|
||||
F17 = 128, // 0x00000080
|
||||
F18 = 129, // 0x00000081
|
||||
F19 = 130, // 0x00000082
|
||||
F20 = 131, // 0x00000083
|
||||
F21 = 132, // 0x00000084
|
||||
F22 = 133, // 0x00000085
|
||||
F23 = 134, // 0x00000086
|
||||
F24 = 135, // 0x00000087
|
||||
NumLock = 144, // 0x00000090
|
||||
Scroll = 145, // 0x00000091
|
||||
LShiftKey = 160, // 0x000000A0
|
||||
RShiftKey = 161, // 0x000000A1
|
||||
LControlKey = 162, // 0x000000A2
|
||||
RControlKey = 163, // 0x000000A3
|
||||
LMenu = 164, // 0x000000A4
|
||||
RMenu = 165, // 0x000000A5
|
||||
BrowserBack = 166, // 0x000000A6
|
||||
BrowserForward = 167, // 0x000000A7
|
||||
BrowserRefresh = 168, // 0x000000A8
|
||||
BrowserStop = 169, // 0x000000A9
|
||||
BrowserSearch = 170, // 0x000000AA
|
||||
BrowserFavorites = 171, // 0x000000AB
|
||||
BrowserHome = 172, // 0x000000AC
|
||||
VolumeMute = 173, // 0x000000AD
|
||||
VolumeDown = 174, // 0x000000AE
|
||||
VolumeUp = 175, // 0x000000AF
|
||||
MediaNextTrack = 176, // 0x000000B0
|
||||
MediaPreviousTrack = 177, // 0x000000B1
|
||||
MediaStop = 178, // 0x000000B2
|
||||
MediaPlayPause = 179, // 0x000000B3
|
||||
LaunchMail = 180, // 0x000000B4
|
||||
SelectMedia = 181, // 0x000000B5
|
||||
LaunchApplication1 = 182, // 0x000000B6
|
||||
LaunchApplication2 = 183, // 0x000000B7
|
||||
OemSemicolon = 186, // 0x000000BA
|
||||
OemPlus = 187, // 0x000000BB
|
||||
OemComma = 188, // 0x000000BC
|
||||
OemMinus = 189, // 0x000000BD
|
||||
OemPeriod = 190, // 0x000000BE
|
||||
OemQuestion = 191, // 0x000000BF
|
||||
OemTilde = 192, // 0x000000C0
|
||||
OemOpenBrackets = 219, // 0x000000DB
|
||||
OemPipe = 220, // 0x000000DC
|
||||
OemCloseBrackets = 221, // 0x000000DD
|
||||
OemQuotes = 222, // 0x000000DE
|
||||
Oem8 = 223, // 0x000000DF
|
||||
OemBackslash = 226, // 0x000000E2
|
||||
ProcessKey = 229, // 0x000000E5
|
||||
DBEKatakana = 241, // 0x000000F1
|
||||
DBEHiragana = 242, // 0x000000F2
|
||||
DBESBCSChar = 243, // 0x000000F3
|
||||
DBEDBCSChar = 244, // 0x000000F4
|
||||
DBERoman = 245, // 0x000000F5
|
||||
Attn = 246, // 0x000000F6
|
||||
DBENoroman = 246, // 0x000000F6
|
||||
Crsel = 247, // 0x000000F7
|
||||
Excel = 248, // 0x000000F8
|
||||
EraseEof = 249, // 0x000000F9
|
||||
Play = 250, // 0x000000FA
|
||||
Zoom = 251, // 0x000000FB
|
||||
NoName = 252, // 0x000000FC
|
||||
Pa1 = 253, // 0x000000FD
|
||||
OemClear = 254, // 0x000000FE
|
||||
GamePadA = 22528, // 0x00005800
|
||||
GamePadB = 22529, // 0x00005801
|
||||
GamePadX = 22530, // 0x00005802
|
||||
GamePadY = 22531, // 0x00005803
|
||||
GamePadRShoulder = 22532, // 0x00005804
|
||||
GamePadLShoulder = 22533, // 0x00005805
|
||||
GamePadLTrigger = 22534, // 0x00005806
|
||||
GamePadRTrigger = 22535, // 0x00005807
|
||||
GamePadDPadUp = 22544, // 0x00005810
|
||||
GamePadDPadDown = 22545, // 0x00005811
|
||||
GamePadDPadLeft = 22546, // 0x00005812
|
||||
GamePadDPadRight = 22547, // 0x00005813
|
||||
GamePadStart = 22548, // 0x00005814
|
||||
GamePadLThumbPress = 22550, // 0x00005816
|
||||
GamePadRThumbPress = 22551, // 0x00005817
|
||||
GamePadLThumbUp = 22560, // 0x00005820
|
||||
GamePadLThumbDown = 22561, // 0x00005821
|
||||
GamePadLThumbRight = 22562, // 0x00005822
|
||||
GamePadLThumbLeft = 22563, // 0x00005823
|
||||
GamePadLThumbUpLeft = 22564, // 0x00005824
|
||||
GamePadLThumbUpRight = 22565, // 0x00005825
|
||||
GamePadLThumbDownRight = 22566, // 0x00005826
|
||||
GamePadLThumbDownLeft = 22567, // 0x00005827
|
||||
GamePadRThumbUp = 22576, // 0x00005830
|
||||
GamePadRThumbDown = 22577, // 0x00005831
|
||||
GamePadRThumbRight = 22578, // 0x00005832
|
||||
GamePadRThumbLeft = 22579, // 0x00005833
|
||||
GamePadRThumbUpLeft = 22580, // 0x00005834
|
||||
GamePadRThumbUpRight = 22581, // 0x00005835
|
||||
GamePadRThumbDownRight = 22582, // 0x00005836
|
||||
GamePadRThumbDownLeft = 22583, // 0x00005837
|
||||
GamePadBack = 22597, // 0x00005845
|
||||
KeyCode = 65535, // 0x0000FFFF
|
||||
Shift = 65536, // 0x00010000
|
||||
Control = 131072, // 0x00020000
|
||||
Alt = 262144, // 0x00040000
|
||||
}
|
||||
public enum Keys
|
||||
{
|
||||
Modifiers = -65536, // 0xFFFF0000
|
||||
None = 0,
|
||||
LButton = 1,
|
||||
RButton = 2,
|
||||
Cancel = 3,
|
||||
MButton = 4,
|
||||
XButton1 = 5,
|
||||
XButton2 = 6,
|
||||
Back = 8,
|
||||
Tab = 9,
|
||||
LineFeed = 10, // 0x0000000A
|
||||
Clear = 12, // 0x0000000C
|
||||
Enter = 13, // 0x0000000D
|
||||
Return = 13, // 0x0000000D
|
||||
ShiftKey = 16, // 0x00000010
|
||||
ControlKey = 17, // 0x00000011
|
||||
Menu = 18, // 0x00000012
|
||||
Pause = 19, // 0x00000013
|
||||
Capital = 20, // 0x00000014
|
||||
CapsLock = 20, // 0x00000014
|
||||
HangulMode = 21, // 0x00000015
|
||||
KanaMode = 21, // 0x00000015
|
||||
JunjaMode = 23, // 0x00000017
|
||||
FinalMode = 24, // 0x00000018
|
||||
HanjaMode = 25, // 0x00000019
|
||||
KanjiMode = 25, // 0x00000019
|
||||
Escape = 27, // 0x0000001B
|
||||
IMEConvert = 28, // 0x0000001C
|
||||
IMENonconvert = 29, // 0x0000001D
|
||||
IMEAccept = 30, // 0x0000001E
|
||||
IMEModeChange = 31, // 0x0000001F
|
||||
Space = 32, // 0x00000020
|
||||
PageUp = 33, // 0x00000021
|
||||
Prior = 33, // 0x00000021
|
||||
Next = 34, // 0x00000022
|
||||
PageDown = 34, // 0x00000022
|
||||
End = 35, // 0x00000023
|
||||
Home = 36, // 0x00000024
|
||||
Left = 37, // 0x00000025
|
||||
Up = 38, // 0x00000026
|
||||
Right = 39, // 0x00000027
|
||||
Down = 40, // 0x00000028
|
||||
Select = 41, // 0x00000029
|
||||
Print = 42, // 0x0000002A
|
||||
Execute = 43, // 0x0000002B
|
||||
PrintScreen = 44, // 0x0000002C
|
||||
Snapshot = 44, // 0x0000002C
|
||||
Insert = 45, // 0x0000002D
|
||||
Delete = 46, // 0x0000002E
|
||||
D0 = 48, // 0x00000030
|
||||
D1 = 49, // 0x00000031
|
||||
D2 = 50, // 0x00000032
|
||||
D3 = 51, // 0x00000033
|
||||
D4 = 52, // 0x00000034
|
||||
D5 = 53, // 0x00000035
|
||||
D6 = 54, // 0x00000036
|
||||
D7 = 55, // 0x00000037
|
||||
D8 = 56, // 0x00000038
|
||||
D9 = 57, // 0x00000039
|
||||
A = 65, // 0x00000041
|
||||
B = 66, // 0x00000042
|
||||
C = 67, // 0x00000043
|
||||
D = 68, // 0x00000044
|
||||
E = 69, // 0x00000045
|
||||
F = 70, // 0x00000046
|
||||
G = 71, // 0x00000047
|
||||
H = 72, // 0x00000048
|
||||
I = 73, // 0x00000049
|
||||
J = 74, // 0x0000004A
|
||||
K = 75, // 0x0000004B
|
||||
L = 76, // 0x0000004C
|
||||
M = 77, // 0x0000004D
|
||||
N = 78, // 0x0000004E
|
||||
O = 79, // 0x0000004F
|
||||
P = 80, // 0x00000050
|
||||
Q = 81, // 0x00000051
|
||||
R = 82, // 0x00000052
|
||||
S = 83, // 0x00000053
|
||||
T = 84, // 0x00000054
|
||||
U = 85, // 0x00000055
|
||||
V = 86, // 0x00000056
|
||||
W = 87, // 0x00000057
|
||||
X = 88, // 0x00000058
|
||||
Y = 89, // 0x00000059
|
||||
Z = 90, // 0x0000005A
|
||||
LWin = 91, // 0x0000005B
|
||||
RWin = 92, // 0x0000005C
|
||||
Apps = 93, // 0x0000005D
|
||||
NumPad0 = 96, // 0x00000060
|
||||
NumPad1 = 97, // 0x00000061
|
||||
NumPad2 = 98, // 0x00000062
|
||||
NumPad3 = 99, // 0x00000063
|
||||
NumPad4 = 100, // 0x00000064
|
||||
NumPad5 = 101, // 0x00000065
|
||||
NumPad6 = 102, // 0x00000066
|
||||
NumPad7 = 103, // 0x00000067
|
||||
NumPad8 = 104, // 0x00000068
|
||||
NumPad9 = 105, // 0x00000069
|
||||
Multiply = 106, // 0x0000006A
|
||||
Add = 107, // 0x0000006B
|
||||
Separator = 108, // 0x0000006C
|
||||
Subtract = 109, // 0x0000006D
|
||||
Decimal = 110, // 0x0000006E
|
||||
Divide = 111, // 0x0000006F
|
||||
F1 = 112, // 0x00000070
|
||||
F2 = 113, // 0x00000071
|
||||
F3 = 114, // 0x00000072
|
||||
F4 = 115, // 0x00000073
|
||||
F5 = 116, // 0x00000074
|
||||
F6 = 117, // 0x00000075
|
||||
F7 = 118, // 0x00000076
|
||||
F8 = 119, // 0x00000077
|
||||
F9 = 120, // 0x00000078
|
||||
F10 = 121, // 0x00000079
|
||||
F11 = 122, // 0x0000007A
|
||||
F12 = 123, // 0x0000007B
|
||||
F13 = 124, // 0x0000007C
|
||||
F14 = 125, // 0x0000007D
|
||||
F15 = 126, // 0x0000007E
|
||||
F16 = 127, // 0x0000007F
|
||||
F17 = 128, // 0x00000080
|
||||
F18 = 129, // 0x00000081
|
||||
F19 = 130, // 0x00000082
|
||||
F20 = 131, // 0x00000083
|
||||
F21 = 132, // 0x00000084
|
||||
F22 = 133, // 0x00000085
|
||||
F23 = 134, // 0x00000086
|
||||
F24 = 135, // 0x00000087
|
||||
NumLock = 144, // 0x00000090
|
||||
Scroll = 145, // 0x00000091
|
||||
LShiftKey = 160, // 0x000000A0
|
||||
RShiftKey = 161, // 0x000000A1
|
||||
LControlKey = 162, // 0x000000A2
|
||||
RControlKey = 163, // 0x000000A3
|
||||
LMenu = 164, // 0x000000A4
|
||||
RMenu = 165, // 0x000000A5
|
||||
BrowserBack = 166, // 0x000000A6
|
||||
BrowserForward = 167, // 0x000000A7
|
||||
BrowserRefresh = 168, // 0x000000A8
|
||||
BrowserStop = 169, // 0x000000A9
|
||||
BrowserSearch = 170, // 0x000000AA
|
||||
BrowserFavorites = 171, // 0x000000AB
|
||||
BrowserHome = 172, // 0x000000AC
|
||||
VolumeMute = 173, // 0x000000AD
|
||||
VolumeDown = 174, // 0x000000AE
|
||||
VolumeUp = 175, // 0x000000AF
|
||||
MediaNextTrack = 176, // 0x000000B0
|
||||
MediaPreviousTrack = 177, // 0x000000B1
|
||||
MediaStop = 178, // 0x000000B2
|
||||
MediaPlayPause = 179, // 0x000000B3
|
||||
LaunchMail = 180, // 0x000000B4
|
||||
SelectMedia = 181, // 0x000000B5
|
||||
LaunchApplication1 = 182, // 0x000000B6
|
||||
LaunchApplication2 = 183, // 0x000000B7
|
||||
OemSemicolon = 186, // 0x000000BA
|
||||
OemPlus = 187, // 0x000000BB
|
||||
OemComma = 188, // 0x000000BC
|
||||
OemMinus = 189, // 0x000000BD
|
||||
OemPeriod = 190, // 0x000000BE
|
||||
OemQuestion = 191, // 0x000000BF
|
||||
OemTilde = 192, // 0x000000C0
|
||||
OemOpenBrackets = 219, // 0x000000DB
|
||||
OemPipe = 220, // 0x000000DC
|
||||
OemCloseBrackets = 221, // 0x000000DD
|
||||
OemQuotes = 222, // 0x000000DE
|
||||
Oem8 = 223, // 0x000000DF
|
||||
OemBackslash = 226, // 0x000000E2
|
||||
ProcessKey = 229, // 0x000000E5
|
||||
DBEKatakana = 241, // 0x000000F1
|
||||
DBEHiragana = 242, // 0x000000F2
|
||||
DBESBCSChar = 243, // 0x000000F3
|
||||
DBEDBCSChar = 244, // 0x000000F4
|
||||
DBERoman = 245, // 0x000000F5
|
||||
Attn = 246, // 0x000000F6
|
||||
DBENoroman = 246, // 0x000000F6
|
||||
Crsel = 247, // 0x000000F7
|
||||
Excel = 248, // 0x000000F8
|
||||
EraseEof = 249, // 0x000000F9
|
||||
Play = 250, // 0x000000FA
|
||||
Zoom = 251, // 0x000000FB
|
||||
NoName = 252, // 0x000000FC
|
||||
Pa1 = 253, // 0x000000FD
|
||||
OemClear = 254, // 0x000000FE
|
||||
GamePadA = 22528, // 0x00005800
|
||||
GamePadB = 22529, // 0x00005801
|
||||
GamePadX = 22530, // 0x00005802
|
||||
GamePadY = 22531, // 0x00005803
|
||||
GamePadRShoulder = 22532, // 0x00005804
|
||||
GamePadLShoulder = 22533, // 0x00005805
|
||||
GamePadLTrigger = 22534, // 0x00005806
|
||||
GamePadRTrigger = 22535, // 0x00005807
|
||||
GamePadDPadUp = 22544, // 0x00005810
|
||||
GamePadDPadDown = 22545, // 0x00005811
|
||||
GamePadDPadLeft = 22546, // 0x00005812
|
||||
GamePadDPadRight = 22547, // 0x00005813
|
||||
GamePadStart = 22548, // 0x00005814
|
||||
GamePadLThumbPress = 22550, // 0x00005816
|
||||
GamePadRThumbPress = 22551, // 0x00005817
|
||||
GamePadLThumbUp = 22560, // 0x00005820
|
||||
GamePadLThumbDown = 22561, // 0x00005821
|
||||
GamePadLThumbRight = 22562, // 0x00005822
|
||||
GamePadLThumbLeft = 22563, // 0x00005823
|
||||
GamePadLThumbUpLeft = 22564, // 0x00005824
|
||||
GamePadLThumbUpRight = 22565, // 0x00005825
|
||||
GamePadLThumbDownRight = 22566, // 0x00005826
|
||||
GamePadLThumbDownLeft = 22567, // 0x00005827
|
||||
GamePadRThumbUp = 22576, // 0x00005830
|
||||
GamePadRThumbDown = 22577, // 0x00005831
|
||||
GamePadRThumbRight = 22578, // 0x00005832
|
||||
GamePadRThumbLeft = 22579, // 0x00005833
|
||||
GamePadRThumbUpLeft = 22580, // 0x00005834
|
||||
GamePadRThumbUpRight = 22581, // 0x00005835
|
||||
GamePadRThumbDownRight = 22582, // 0x00005836
|
||||
GamePadRThumbDownLeft = 22583, // 0x00005837
|
||||
GamePadBack = 22597, // 0x00005845
|
||||
KeyCode = 65535, // 0x0000FFFF
|
||||
Shift = 65536, // 0x00010000
|
||||
Control = 131072, // 0x00020000
|
||||
Alt = 262144, // 0x00040000
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,16 +8,16 @@ using System;
|
||||
|
||||
namespace Microsoft.Iris.Input
|
||||
{
|
||||
[Flags]
|
||||
public enum MouseButtons
|
||||
{
|
||||
None = 0,
|
||||
Left = 1,
|
||||
Right = 2,
|
||||
Middle = 4,
|
||||
XButton1 = 8,
|
||||
XButton2 = 16, // 0x00000010
|
||||
Primary = Left, // 0x00000001
|
||||
Secondary = XButton2 | XButton1 | Middle | Right, // 0x0000001E
|
||||
}
|
||||
[Flags]
|
||||
public enum MouseButtons
|
||||
{
|
||||
None = 0,
|
||||
Left = 1,
|
||||
Right = 2,
|
||||
Middle = 4,
|
||||
XButton1 = 8,
|
||||
XButton2 = 16, // 0x00000010
|
||||
Primary = Left, // 0x00000001
|
||||
Secondary = XButton2 | XButton1 | Middle | Right, // 0x0000001E
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,20 +9,20 @@ using System;
|
||||
|
||||
namespace Microsoft.Iris.Input
|
||||
{
|
||||
[Serializable]
|
||||
public struct RawDragData
|
||||
{
|
||||
public IVisual _visCapture;
|
||||
public int _positionX;
|
||||
public int _positionY;
|
||||
public IntPtr _pDataStream;
|
||||
|
||||
public RawDragData(IVisual visCapture, int positionX, int positionY, IntPtr pDataStream)
|
||||
[Serializable]
|
||||
public struct RawDragData
|
||||
{
|
||||
this._visCapture = visCapture;
|
||||
this._positionX = positionX;
|
||||
this._positionY = positionY;
|
||||
this._pDataStream = pDataStream;
|
||||
public IVisual _visCapture;
|
||||
public int _positionX;
|
||||
public int _positionY;
|
||||
public IntPtr _pDataStream;
|
||||
|
||||
public RawDragData(IVisual visCapture, int positionX, int positionY, IntPtr pDataStream)
|
||||
{
|
||||
this._visCapture = visCapture;
|
||||
this._positionX = positionX;
|
||||
this._positionY = positionY;
|
||||
this._pDataStream = pDataStream;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,24 +8,24 @@ using System;
|
||||
|
||||
namespace Microsoft.Iris.Input
|
||||
{
|
||||
[Serializable]
|
||||
public struct RawHidData
|
||||
{
|
||||
public uint _commandCode;
|
||||
public uint _usagePage;
|
||||
public KeyAction _action;
|
||||
public InputDeviceType _deviceType;
|
||||
|
||||
public RawHidData(
|
||||
uint commandCode,
|
||||
uint usagePage,
|
||||
KeyAction action,
|
||||
InputDeviceType deviceType)
|
||||
[Serializable]
|
||||
public struct RawHidData
|
||||
{
|
||||
this._commandCode = commandCode;
|
||||
this._usagePage = usagePage;
|
||||
this._action = action;
|
||||
this._deviceType = deviceType;
|
||||
public uint _commandCode;
|
||||
public uint _usagePage;
|
||||
public KeyAction _action;
|
||||
public InputDeviceType _deviceType;
|
||||
|
||||
public RawHidData(
|
||||
uint commandCode,
|
||||
uint usagePage,
|
||||
KeyAction action,
|
||||
InputDeviceType deviceType)
|
||||
{
|
||||
this._commandCode = commandCode;
|
||||
this._usagePage = usagePage;
|
||||
this._action = action;
|
||||
this._deviceType = deviceType;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,27 +8,27 @@ using System;
|
||||
|
||||
namespace Microsoft.Iris.Input
|
||||
{
|
||||
[Serializable]
|
||||
public struct RawKeyboardData
|
||||
{
|
||||
public Keys _virtualKey;
|
||||
public int _scanCode;
|
||||
public uint _repCount;
|
||||
public InputDeviceType _deviceType;
|
||||
public ushort _flags;
|
||||
|
||||
public RawKeyboardData(
|
||||
Keys virtualKey,
|
||||
int scanCode,
|
||||
uint repCount,
|
||||
ushort flags,
|
||||
InputDeviceType deviceType)
|
||||
[Serializable]
|
||||
public struct RawKeyboardData
|
||||
{
|
||||
this._virtualKey = virtualKey;
|
||||
this._scanCode = scanCode;
|
||||
this._repCount = repCount;
|
||||
this._deviceType = deviceType;
|
||||
this._flags = flags;
|
||||
public Keys _virtualKey;
|
||||
public int _scanCode;
|
||||
public uint _repCount;
|
||||
public InputDeviceType _deviceType;
|
||||
public ushort _flags;
|
||||
|
||||
public RawKeyboardData(
|
||||
Keys virtualKey,
|
||||
int scanCode,
|
||||
uint repCount,
|
||||
ushort flags,
|
||||
InputDeviceType deviceType)
|
||||
{
|
||||
this._virtualKey = virtualKey;
|
||||
this._scanCode = scanCode;
|
||||
this._repCount = repCount;
|
||||
this._deviceType = deviceType;
|
||||
this._flags = flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,48 +9,48 @@ using System;
|
||||
|
||||
namespace Microsoft.Iris.Input
|
||||
{
|
||||
[Serializable]
|
||||
public struct RawMouseData
|
||||
{
|
||||
public IVisual _visCapture;
|
||||
public IVisual _visNatural;
|
||||
public int _positionX;
|
||||
public int _positionY;
|
||||
public int _naturalX;
|
||||
public int _naturalY;
|
||||
public int _physicalX;
|
||||
public int _physicalY;
|
||||
public int _screenX;
|
||||
public int _screenY;
|
||||
public MouseButtons _button;
|
||||
public int _wheelDelta;
|
||||
|
||||
public RawMouseData(
|
||||
IVisual visCapture,
|
||||
IVisual visNatural,
|
||||
int positionX,
|
||||
int positionY,
|
||||
int naturalX,
|
||||
int naturalY,
|
||||
int physicalX,
|
||||
int physicalY,
|
||||
int screenX,
|
||||
int screenY,
|
||||
MouseButtons button,
|
||||
int wheelDelta)
|
||||
[Serializable]
|
||||
public struct RawMouseData
|
||||
{
|
||||
this._visCapture = visCapture;
|
||||
this._visNatural = visNatural;
|
||||
this._positionX = positionX;
|
||||
this._positionY = positionY;
|
||||
this._naturalX = naturalX;
|
||||
this._naturalY = naturalY;
|
||||
this._physicalX = physicalX;
|
||||
this._physicalY = physicalY;
|
||||
this._screenX = screenX;
|
||||
this._screenY = screenY;
|
||||
this._button = button;
|
||||
this._wheelDelta = wheelDelta;
|
||||
public IVisual _visCapture;
|
||||
public IVisual _visNatural;
|
||||
public int _positionX;
|
||||
public int _positionY;
|
||||
public int _naturalX;
|
||||
public int _naturalY;
|
||||
public int _physicalX;
|
||||
public int _physicalY;
|
||||
public int _screenX;
|
||||
public int _screenY;
|
||||
public MouseButtons _button;
|
||||
public int _wheelDelta;
|
||||
|
||||
public RawMouseData(
|
||||
IVisual visCapture,
|
||||
IVisual visNatural,
|
||||
int positionX,
|
||||
int positionY,
|
||||
int naturalX,
|
||||
int naturalY,
|
||||
int physicalX,
|
||||
int physicalY,
|
||||
int screenX,
|
||||
int screenY,
|
||||
MouseButtons button,
|
||||
int wheelDelta)
|
||||
{
|
||||
this._visCapture = visCapture;
|
||||
this._visNatural = visNatural;
|
||||
this._positionX = positionX;
|
||||
this._positionY = positionY;
|
||||
this._naturalX = naturalX;
|
||||
this._naturalY = naturalY;
|
||||
this._physicalX = physicalX;
|
||||
this._physicalY = physicalY;
|
||||
this._screenX = screenX;
|
||||
this._screenY = screenY;
|
||||
this._button = button;
|
||||
this._wheelDelta = wheelDelta;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,105 +10,105 @@ using System.Security;
|
||||
|
||||
namespace Microsoft.Iris.Libraries.OS
|
||||
{
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
internal class RegistryKey
|
||||
{
|
||||
private IntPtr _hkey;
|
||||
public static IntPtr HKEY_CLASSES_ROOT = new IntPtr(int.MinValue);
|
||||
public static IntPtr HKEY_CURRENT_USER = new IntPtr(-2147483647);
|
||||
public static IntPtr HKEY_LOCAL_MACHINE = new IntPtr(-2147483646);
|
||||
|
||||
private RegistryKey(IntPtr hkey) => this._hkey = hkey;
|
||||
|
||||
~RegistryKey() => this.Close();
|
||||
|
||||
public static RegistryKey Open(IntPtr hive, string path) => RegistryKey.OpenWorker(hive, path);
|
||||
|
||||
private static RegistryKey OpenWorker(IntPtr parentKey, string path)
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
internal class RegistryKey
|
||||
{
|
||||
RegistryKey registryKey = (RegistryKey) null;
|
||||
IntPtr phkResult;
|
||||
if (Win32Api.RegOpenKeyExW(parentKey, path, 0, 131097, out phkResult) == 0)
|
||||
registryKey = new RegistryKey(phkResult);
|
||||
return registryKey;
|
||||
}
|
||||
private IntPtr _hkey;
|
||||
public static IntPtr HKEY_CLASSES_ROOT = new IntPtr(int.MinValue);
|
||||
public static IntPtr HKEY_CURRENT_USER = new IntPtr(-2147483647);
|
||||
public static IntPtr HKEY_LOCAL_MACHINE = new IntPtr(-2147483646);
|
||||
|
||||
public RegistryKey OpenSubKey(string path) => RegistryKey.OpenWorker(this._hkey, path);
|
||||
private RegistryKey(IntPtr hkey) => this._hkey = hkey;
|
||||
|
||||
public bool ReadByte(string valueName, out byte value)
|
||||
{
|
||||
bool flag = false;
|
||||
value = (byte) 0;
|
||||
int num = 0;
|
||||
if (this.ReadInt(valueName, out num) && num >= 0 && num <= (int) byte.MaxValue)
|
||||
{
|
||||
value = (byte) num;
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
~RegistryKey() => this.Close();
|
||||
|
||||
public bool ReadBool(string valueName, out bool value)
|
||||
{
|
||||
bool flag = false;
|
||||
value = false;
|
||||
int num = 0;
|
||||
if (this.ReadInt(valueName, out num))
|
||||
{
|
||||
value = num != 0;
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
public static RegistryKey Open(IntPtr hive, string path) => RegistryKey.OpenWorker(hive, path);
|
||||
|
||||
public bool ReadInt(string valueName, out int value)
|
||||
{
|
||||
bool flag = false;
|
||||
value = 0;
|
||||
int lpcbData = 4;
|
||||
int lpType;
|
||||
int lpData;
|
||||
if (Win32Api.RegQueryValueExW(this._hkey, valueName, IntPtr.Zero, out lpType, out lpData, ref lpcbData) == 0 && lpType == 4)
|
||||
{
|
||||
value = lpData;
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
private static RegistryKey OpenWorker(IntPtr parentKey, string path)
|
||||
{
|
||||
RegistryKey registryKey = (RegistryKey)null;
|
||||
IntPtr phkResult;
|
||||
if (Win32Api.RegOpenKeyExW(parentKey, path, 0, 131097, out phkResult) == 0)
|
||||
registryKey = new RegistryKey(phkResult);
|
||||
return registryKey;
|
||||
}
|
||||
|
||||
public bool ReadString(string valueName, out string value)
|
||||
{
|
||||
bool flag = false;
|
||||
value = (string) null;
|
||||
int lpcbData = 0;
|
||||
int lpType;
|
||||
if (Win32Api.RegQueryValueExW(this._hkey, valueName, IntPtr.Zero, out lpType, (char[]) null, ref lpcbData) == 0 && lpType == 1)
|
||||
flag = this.ReadStringValueWorker(valueName, lpcbData, out value);
|
||||
return flag;
|
||||
}
|
||||
public RegistryKey OpenSubKey(string path) => RegistryKey.OpenWorker(this._hkey, path);
|
||||
|
||||
private bool ReadStringValueWorker(string valueName, int dataBytes, out string value)
|
||||
{
|
||||
value = (string) null;
|
||||
bool flag = false;
|
||||
int length = dataBytes / 2;
|
||||
char[] lpData = new char[length];
|
||||
int lpType;
|
||||
if (Win32Api.RegQueryValueExW(this._hkey, valueName, IntPtr.Zero, out lpType, lpData, ref dataBytes) == 0 && lpType == 1)
|
||||
{
|
||||
if (lpData[length - 1] == char.MinValue)
|
||||
--length;
|
||||
value = new string(lpData, 0, length);
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
public bool ReadByte(string valueName, out byte value)
|
||||
{
|
||||
bool flag = false;
|
||||
value = (byte)0;
|
||||
int num = 0;
|
||||
if (this.ReadInt(valueName, out num) && num >= 0 && num <= (int)byte.MaxValue)
|
||||
{
|
||||
value = (byte)num;
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
Win32Api.RegCloseKey(this._hkey);
|
||||
this._hkey = IntPtr.Zero;
|
||||
GC.SuppressFinalize((object) this);
|
||||
public bool ReadBool(string valueName, out bool value)
|
||||
{
|
||||
bool flag = false;
|
||||
value = false;
|
||||
int num = 0;
|
||||
if (this.ReadInt(valueName, out num))
|
||||
{
|
||||
value = num != 0;
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
public bool ReadInt(string valueName, out int value)
|
||||
{
|
||||
bool flag = false;
|
||||
value = 0;
|
||||
int lpcbData = 4;
|
||||
int lpType;
|
||||
int lpData;
|
||||
if (Win32Api.RegQueryValueExW(this._hkey, valueName, IntPtr.Zero, out lpType, out lpData, ref lpcbData) == 0 && lpType == 4)
|
||||
{
|
||||
value = lpData;
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
public bool ReadString(string valueName, out string value)
|
||||
{
|
||||
bool flag = false;
|
||||
value = (string)null;
|
||||
int lpcbData = 0;
|
||||
int lpType;
|
||||
if (Win32Api.RegQueryValueExW(this._hkey, valueName, IntPtr.Zero, out lpType, (char[])null, ref lpcbData) == 0 && lpType == 1)
|
||||
flag = this.ReadStringValueWorker(valueName, lpcbData, out value);
|
||||
return flag;
|
||||
}
|
||||
|
||||
private bool ReadStringValueWorker(string valueName, int dataBytes, out string value)
|
||||
{
|
||||
value = (string)null;
|
||||
bool flag = false;
|
||||
int length = dataBytes / 2;
|
||||
char[] lpData = new char[length];
|
||||
int lpType;
|
||||
if (Win32Api.RegQueryValueExW(this._hkey, valueName, IntPtr.Zero, out lpType, lpData, ref dataBytes) == 0 && lpType == 1)
|
||||
{
|
||||
if (lpData[length - 1] == char.MinValue)
|
||||
--length;
|
||||
value = new string(lpData, 0, length);
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
Win32Api.RegCloseKey(this._hkey);
|
||||
this._hkey = IntPtr.Zero;
|
||||
GC.SuppressFinalize((object)this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,190 +10,190 @@ using System.Globalization;
|
||||
|
||||
namespace Microsoft.Iris.Library
|
||||
{
|
||||
public static class InvariantString
|
||||
{
|
||||
public static string Format(string format, object param) => string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param);
|
||||
|
||||
public static string Format(string format, object[] param) => throw new Exception("Should never format with object array. Use one of the dedicated format methods");
|
||||
|
||||
public static string Format(string format, object param1, object param2) => string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2);
|
||||
|
||||
public static string Format(string format, object param1, object param2, object param3) => string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3);
|
||||
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4)
|
||||
public static class InvariantString
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4);
|
||||
}
|
||||
public static string Format(string format, object param) => string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param);
|
||||
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4,
|
||||
object param5)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5);
|
||||
}
|
||||
public static string Format(string format, object[] param) => throw new Exception("Should never format with object array. Use one of the dedicated format methods");
|
||||
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4,
|
||||
object param5,
|
||||
object param6)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6);
|
||||
}
|
||||
public static string Format(string format, object param1, object param2) => string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2);
|
||||
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4,
|
||||
object param5,
|
||||
object param6,
|
||||
object param7)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7);
|
||||
}
|
||||
public static string Format(string format, object param1, object param2, object param3) => string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3);
|
||||
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4,
|
||||
object param5,
|
||||
object param6,
|
||||
object param7,
|
||||
object param8)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8);
|
||||
}
|
||||
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4,
|
||||
object param5,
|
||||
object param6,
|
||||
object param7,
|
||||
object param8,
|
||||
object param9)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8, param9);
|
||||
}
|
||||
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4,
|
||||
object param5,
|
||||
object param6,
|
||||
object param7,
|
||||
object param8,
|
||||
object param9,
|
||||
object param10)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10);
|
||||
}
|
||||
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4,
|
||||
object param5,
|
||||
object param6,
|
||||
object param7,
|
||||
object param8,
|
||||
object param9,
|
||||
object param10,
|
||||
object param11)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11);
|
||||
}
|
||||
|
||||
public static bool Equals(string leftName, string rightName) => string.Compare(leftName, rightName, StringComparison.Ordinal) == 0;
|
||||
|
||||
public static bool EqualsI(string leftName, string rightName) => string.Compare(leftName, rightName, StringComparison.OrdinalIgnoreCase) == 0;
|
||||
|
||||
public static bool StartsWith(string valueName, string prefixName) => valueName.StartsWith(prefixName, StringComparison.Ordinal);
|
||||
|
||||
public static bool StartsWithI(string valueName, string prefixName) => valueName.StartsWith(prefixName, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public static bool EndsWith(string valueName, string suffixName) => valueName.EndsWith(suffixName, StringComparison.Ordinal);
|
||||
|
||||
public static bool EndsWithI(string valueName, string suffixName) => valueName.EndsWith(suffixName, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public static string ValueToString(ushort v, string formatName) => v.ToString(formatName, (IFormatProvider) CultureInfo.InvariantCulture);
|
||||
|
||||
public static IEqualityComparer<string> OrdinalIgnoreCaseComparer => (IEqualityComparer<string>) InvariantString.OrdinalIgnoreCaseStringComparer.Instance;
|
||||
|
||||
public static IEqualityComparer<string> OrdinalComparer => (IEqualityComparer<string>) InvariantString.OrdinalStringComparer.Instance;
|
||||
|
||||
public class OrdinalStringComparer : IEqualityComparer<string>
|
||||
{
|
||||
private static InvariantString.OrdinalStringComparer _instance;
|
||||
|
||||
private OrdinalStringComparer()
|
||||
{
|
||||
}
|
||||
|
||||
public static InvariantString.OrdinalStringComparer Instance
|
||||
{
|
||||
get
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4)
|
||||
{
|
||||
if (InvariantString.OrdinalStringComparer._instance == null)
|
||||
InvariantString.OrdinalStringComparer._instance = new InvariantString.OrdinalStringComparer();
|
||||
return InvariantString.OrdinalStringComparer._instance;
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4);
|
||||
}
|
||||
}
|
||||
|
||||
public int Compare(string x, string y) => string.Compare(x, y, StringComparison.Ordinal);
|
||||
|
||||
public int GetHashCode(string obj) => obj.GetHashCode();
|
||||
|
||||
public bool Equals(string x, string y) => this.Compare(x, y) == 0;
|
||||
}
|
||||
|
||||
public class OrdinalIgnoreCaseStringComparer : IEqualityComparer<string>
|
||||
{
|
||||
private static InvariantString.OrdinalIgnoreCaseStringComparer _instance;
|
||||
|
||||
private OrdinalIgnoreCaseStringComparer()
|
||||
{
|
||||
}
|
||||
|
||||
public static InvariantString.OrdinalIgnoreCaseStringComparer Instance
|
||||
{
|
||||
get
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4,
|
||||
object param5)
|
||||
{
|
||||
if (InvariantString.OrdinalIgnoreCaseStringComparer._instance == null)
|
||||
InvariantString.OrdinalIgnoreCaseStringComparer._instance = new InvariantString.OrdinalIgnoreCaseStringComparer();
|
||||
return InvariantString.OrdinalIgnoreCaseStringComparer._instance;
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5);
|
||||
}
|
||||
}
|
||||
|
||||
public int Compare(string x, string y) => string.Compare(x, y, StringComparison.OrdinalIgnoreCase);
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4,
|
||||
object param5,
|
||||
object param6)
|
||||
{
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6);
|
||||
}
|
||||
|
||||
public int GetHashCode(string obj) => obj.ToLowerInvariant().GetHashCode();
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4,
|
||||
object param5,
|
||||
object param6,
|
||||
object param7)
|
||||
{
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7);
|
||||
}
|
||||
|
||||
public bool Equals(string x, string y) => this.Compare(x, y) == 0;
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4,
|
||||
object param5,
|
||||
object param6,
|
||||
object param7,
|
||||
object param8)
|
||||
{
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8);
|
||||
}
|
||||
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4,
|
||||
object param5,
|
||||
object param6,
|
||||
object param7,
|
||||
object param8,
|
||||
object param9)
|
||||
{
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8, param9);
|
||||
}
|
||||
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4,
|
||||
object param5,
|
||||
object param6,
|
||||
object param7,
|
||||
object param8,
|
||||
object param9,
|
||||
object param10)
|
||||
{
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10);
|
||||
}
|
||||
|
||||
public static string Format(
|
||||
string format,
|
||||
object param1,
|
||||
object param2,
|
||||
object param3,
|
||||
object param4,
|
||||
object param5,
|
||||
object param6,
|
||||
object param7,
|
||||
object param8,
|
||||
object param9,
|
||||
object param10,
|
||||
object param11)
|
||||
{
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11);
|
||||
}
|
||||
|
||||
public static bool Equals(string leftName, string rightName) => string.Compare(leftName, rightName, StringComparison.Ordinal) == 0;
|
||||
|
||||
public static bool EqualsI(string leftName, string rightName) => string.Compare(leftName, rightName, StringComparison.OrdinalIgnoreCase) == 0;
|
||||
|
||||
public static bool StartsWith(string valueName, string prefixName) => valueName.StartsWith(prefixName, StringComparison.Ordinal);
|
||||
|
||||
public static bool StartsWithI(string valueName, string prefixName) => valueName.StartsWith(prefixName, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public static bool EndsWith(string valueName, string suffixName) => valueName.EndsWith(suffixName, StringComparison.Ordinal);
|
||||
|
||||
public static bool EndsWithI(string valueName, string suffixName) => valueName.EndsWith(suffixName, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public static string ValueToString(ushort v, string formatName) => v.ToString(formatName, (IFormatProvider)CultureInfo.InvariantCulture);
|
||||
|
||||
public static IEqualityComparer<string> OrdinalIgnoreCaseComparer => (IEqualityComparer<string>)InvariantString.OrdinalIgnoreCaseStringComparer.Instance;
|
||||
|
||||
public static IEqualityComparer<string> OrdinalComparer => (IEqualityComparer<string>)InvariantString.OrdinalStringComparer.Instance;
|
||||
|
||||
public class OrdinalStringComparer : IEqualityComparer<string>
|
||||
{
|
||||
private static InvariantString.OrdinalStringComparer _instance;
|
||||
|
||||
private OrdinalStringComparer()
|
||||
{
|
||||
}
|
||||
|
||||
public static InvariantString.OrdinalStringComparer Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (InvariantString.OrdinalStringComparer._instance == null)
|
||||
InvariantString.OrdinalStringComparer._instance = new InvariantString.OrdinalStringComparer();
|
||||
return InvariantString.OrdinalStringComparer._instance;
|
||||
}
|
||||
}
|
||||
|
||||
public int Compare(string x, string y) => string.Compare(x, y, StringComparison.Ordinal);
|
||||
|
||||
public int GetHashCode(string obj) => obj.GetHashCode();
|
||||
|
||||
public bool Equals(string x, string y) => this.Compare(x, y) == 0;
|
||||
}
|
||||
|
||||
public class OrdinalIgnoreCaseStringComparer : IEqualityComparer<string>
|
||||
{
|
||||
private static InvariantString.OrdinalIgnoreCaseStringComparer _instance;
|
||||
|
||||
private OrdinalIgnoreCaseStringComparer()
|
||||
{
|
||||
}
|
||||
|
||||
public static InvariantString.OrdinalIgnoreCaseStringComparer Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (InvariantString.OrdinalIgnoreCaseStringComparer._instance == null)
|
||||
InvariantString.OrdinalIgnoreCaseStringComparer._instance = new InvariantString.OrdinalIgnoreCaseStringComparer();
|
||||
return InvariantString.OrdinalIgnoreCaseStringComparer._instance;
|
||||
}
|
||||
}
|
||||
|
||||
public int Compare(string x, string y) => string.Compare(x, y, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public int GetHashCode(string obj) => obj.ToLowerInvariant().GetHashCode();
|
||||
|
||||
public bool Equals(string x, string y) => this.Compare(x, y) == 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,56 +10,56 @@ using System.Security;
|
||||
|
||||
namespace Microsoft.Iris.OS.Libraries
|
||||
{
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
internal sealed class Win32Api
|
||||
{
|
||||
public const uint ERROR_SUCCESS = 0;
|
||||
public const uint ERROR_FILE_NOT_FOUND = 2;
|
||||
public const uint ERROR_PATH_NOT_FOUND = 3;
|
||||
public const uint ERROR_ACCESS_DENIED = 5;
|
||||
public const uint ERROR_INVALID_HANDLE = 6;
|
||||
public const uint ERROR_NOT_ENOUGH_MEMORY = 8;
|
||||
public const uint ERROR_OUTOFMEMORY = 14;
|
||||
public const uint ERROR_NOT_SUPPORTED = 50;
|
||||
public const uint ERROR_INVALID_PARAMETER = 87;
|
||||
public const uint ERROR_CALL_NOT_IMPLEMENTED = 120;
|
||||
public const uint ERROR_MORE_DATA = 234;
|
||||
public const uint ERROR_SERVICE_ALREADY_RUNNING = 1056;
|
||||
public const uint ERROR_NOT_FOUND = 1168;
|
||||
public const uint ERROR_NO_MATCH = 1169;
|
||||
public const uint ERROR_SET_NOT_FOUND = 1170;
|
||||
public const uint ERROR_SERVICE_DATABASE_LOCKED = 1055;
|
||||
public const int KEY_READ = 131097;
|
||||
public const int REG_SZ = 1;
|
||||
public const int REG_DWORD = 4;
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
internal sealed class Win32Api
|
||||
{
|
||||
public const uint ERROR_SUCCESS = 0;
|
||||
public const uint ERROR_FILE_NOT_FOUND = 2;
|
||||
public const uint ERROR_PATH_NOT_FOUND = 3;
|
||||
public const uint ERROR_ACCESS_DENIED = 5;
|
||||
public const uint ERROR_INVALID_HANDLE = 6;
|
||||
public const uint ERROR_NOT_ENOUGH_MEMORY = 8;
|
||||
public const uint ERROR_OUTOFMEMORY = 14;
|
||||
public const uint ERROR_NOT_SUPPORTED = 50;
|
||||
public const uint ERROR_INVALID_PARAMETER = 87;
|
||||
public const uint ERROR_CALL_NOT_IMPLEMENTED = 120;
|
||||
public const uint ERROR_MORE_DATA = 234;
|
||||
public const uint ERROR_SERVICE_ALREADY_RUNNING = 1056;
|
||||
public const uint ERROR_NOT_FOUND = 1168;
|
||||
public const uint ERROR_NO_MATCH = 1169;
|
||||
public const uint ERROR_SET_NOT_FOUND = 1170;
|
||||
public const uint ERROR_SERVICE_DATABASE_LOCKED = 1055;
|
||||
public const int KEY_READ = 131097;
|
||||
public const int REG_SZ = 1;
|
||||
public const int REG_DWORD = 4;
|
||||
|
||||
[DllImport("Advapi32.dll", CharSet = CharSet.Unicode)]
|
||||
public static extern int RegOpenKeyExW(
|
||||
IntPtr hkey,
|
||||
string lpSubKey,
|
||||
int options,
|
||||
int securityMask,
|
||||
out IntPtr result);
|
||||
[DllImport("Advapi32.dll", CharSet = CharSet.Unicode)]
|
||||
public static extern int RegOpenKeyExW(
|
||||
IntPtr hkey,
|
||||
string lpSubKey,
|
||||
int options,
|
||||
int securityMask,
|
||||
out IntPtr result);
|
||||
|
||||
[DllImport("Advapi32.dll", CharSet = CharSet.Unicode)]
|
||||
public static extern int RegQueryValueExW(
|
||||
IntPtr hKey,
|
||||
string lpValueName,
|
||||
IntPtr reserved,
|
||||
out int lpType,
|
||||
char[] lpData,
|
||||
ref int lpcbData);
|
||||
[DllImport("Advapi32.dll", CharSet = CharSet.Unicode)]
|
||||
public static extern int RegQueryValueExW(
|
||||
IntPtr hKey,
|
||||
string lpValueName,
|
||||
IntPtr reserved,
|
||||
out int lpType,
|
||||
char[] lpData,
|
||||
ref int lpcbData);
|
||||
|
||||
[DllImport("Advapi32.dll", CharSet = CharSet.Unicode)]
|
||||
public static extern int RegQueryValueExW(
|
||||
IntPtr hKey,
|
||||
string lpValueName,
|
||||
IntPtr reserved,
|
||||
out int lpType,
|
||||
out int lpData,
|
||||
ref int lpcbData);
|
||||
[DllImport("Advapi32.dll", CharSet = CharSet.Unicode)]
|
||||
public static extern int RegQueryValueExW(
|
||||
IntPtr hKey,
|
||||
string lpValueName,
|
||||
IntPtr reserved,
|
||||
out int lpType,
|
||||
out int lpData,
|
||||
ref int lpcbData);
|
||||
|
||||
[DllImport("Advapi32.dll")]
|
||||
public static extern int RegCloseKey(IntPtr hkey);
|
||||
}
|
||||
[DllImport("Advapi32.dll")]
|
||||
public static extern int RegCloseKey(IntPtr hkey);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
|
||||
namespace Microsoft.Iris.Render
|
||||
{
|
||||
public delegate void ActivationChangeHandler();
|
||||
public delegate void ActivationChangeHandler();
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
|
||||
namespace Microsoft.Iris.Render
|
||||
{
|
||||
public enum AlphaOperation
|
||||
{
|
||||
Add,
|
||||
Subtract,
|
||||
Multiply,
|
||||
Source1,
|
||||
Source2,
|
||||
}
|
||||
public enum AlphaOperation
|
||||
{
|
||||
Add,
|
||||
Subtract,
|
||||
Multiply,
|
||||
Source1,
|
||||
Source2,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,64 +10,64 @@ using Microsoft.Iris.Render.Protocols.Splash.Rendering;
|
||||
|
||||
namespace Microsoft.Iris.Render.Animation
|
||||
{
|
||||
internal abstract class Animation :
|
||||
SharedRenderObject,
|
||||
IAnimation,
|
||||
ISharedRenderObject,
|
||||
IAnimationCallback
|
||||
{
|
||||
public static readonly string OutputProperty = "Output";
|
||||
public static readonly string PlayMethod = "Play";
|
||||
public static readonly string PauseMethod = "Pause";
|
||||
public static readonly string ResetMethod = "Reset";
|
||||
public static readonly string FinishMethod = "Finish";
|
||||
public static readonly string NotifyMethod = "AsyncNotify";
|
||||
|
||||
internal Animation()
|
||||
internal abstract class Animation :
|
||||
SharedRenderObject,
|
||||
IAnimation,
|
||||
ISharedRenderObject,
|
||||
IAnimationCallback
|
||||
{
|
||||
public static readonly string OutputProperty = "Output";
|
||||
public static readonly string PlayMethod = "Play";
|
||||
public static readonly string PauseMethod = "Pause";
|
||||
public static readonly string ResetMethod = "Reset";
|
||||
public static readonly string FinishMethod = "Finish";
|
||||
public static readonly string NotifyMethod = "AsyncNotify";
|
||||
|
||||
internal Animation()
|
||||
{
|
||||
}
|
||||
|
||||
public abstract int RepeatCount { get; set; }
|
||||
|
||||
public abstract bool IsPlaying { get; }
|
||||
|
||||
public abstract bool IsActive { get; }
|
||||
|
||||
public abstract bool AutoReset { get; set; }
|
||||
|
||||
public abstract AnimationResetBehavior ResetBehavior { get; set; }
|
||||
|
||||
public abstract void Play();
|
||||
|
||||
public abstract void Pause();
|
||||
|
||||
public abstract void Reset();
|
||||
|
||||
public abstract void InstantAdvance(float advanceTime);
|
||||
|
||||
public abstract void InstantFinish();
|
||||
|
||||
void IAnimationCallback.AsyncNotify(RENDERHANDLE target, int nCookie)
|
||||
{
|
||||
if (this.AsyncNotifyEvent == null)
|
||||
return;
|
||||
this.AsyncNotifyEvent(nCookie);
|
||||
}
|
||||
|
||||
public event AsyncNotifyHandler AsyncNotifyEvent;
|
||||
|
||||
protected enum AnimatableProperties : uint
|
||||
{
|
||||
Output = 1,
|
||||
}
|
||||
|
||||
protected enum ActivatableMethods : uint
|
||||
{
|
||||
Play = 1,
|
||||
Pause = 2,
|
||||
Reset = 3,
|
||||
Finish = 4,
|
||||
Notify = 5,
|
||||
}
|
||||
}
|
||||
|
||||
public abstract int RepeatCount { get; set; }
|
||||
|
||||
public abstract bool IsPlaying { get; }
|
||||
|
||||
public abstract bool IsActive { get; }
|
||||
|
||||
public abstract bool AutoReset { get; set; }
|
||||
|
||||
public abstract AnimationResetBehavior ResetBehavior { get; set; }
|
||||
|
||||
public abstract void Play();
|
||||
|
||||
public abstract void Pause();
|
||||
|
||||
public abstract void Reset();
|
||||
|
||||
public abstract void InstantAdvance(float advanceTime);
|
||||
|
||||
public abstract void InstantFinish();
|
||||
|
||||
void IAnimationCallback.AsyncNotify(RENDERHANDLE target, int nCookie)
|
||||
{
|
||||
if (this.AsyncNotifyEvent == null)
|
||||
return;
|
||||
this.AsyncNotifyEvent(nCookie);
|
||||
}
|
||||
|
||||
public event AsyncNotifyHandler AsyncNotifyEvent;
|
||||
|
||||
protected enum AnimatableProperties : uint
|
||||
{
|
||||
Output = 1,
|
||||
}
|
||||
|
||||
protected enum ActivatableMethods : uint
|
||||
{
|
||||
Play = 1,
|
||||
Pause = 2,
|
||||
Reset = 3,
|
||||
Finish = 4,
|
||||
Notify = 5,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user