-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathCursor.cs
More file actions
93 lines (78 loc) · 2.39 KB
/
Cursor.cs
File metadata and controls
93 lines (78 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
using ScriptEngine.Machine.Contexts;
namespace osf
{
public class Cursor
{
public ClCursor dll_obj;
public System.Windows.Forms.Cursor M_Cursor;
public Cursor()
{
M_Cursor = System.Windows.Forms.Cursor.Current;
OneScriptForms.AddToHashtable(M_Cursor, this);
}
public Cursor(osf.Cursor p1)
{
M_Cursor = p1.M_Cursor;
OneScriptForms.AddToHashtable(M_Cursor, this);
}
public Cursor(System.Windows.Forms.Cursor p1)
{
M_Cursor = p1;
OneScriptForms.AddToHashtable(M_Cursor, this);
}
public osf.Cursor Current
{
get { return new Cursor(System.Windows.Forms.Cursor.Current); }
set { System.Windows.Forms.Cursor.Current = value.M_Cursor; }
}
public osf.Point Position
{
get { return new Point(System.Windows.Forms.Cursor.Position); }
set { System.Windows.Forms.Cursor.Position = value.M_Point; }
}
public osf.Size Size
{
get { return new Size(M_Cursor.Size); }
}
}
[ContextClass("КлКурсор", "ClCursor")]
public class ClCursor : AutoContext<ClCursor>
{
public ClCursor()
{
Cursor Cursor1 = new Cursor();
Cursor1.dll_obj = this;
Base_obj = Cursor1;
}
public ClCursor(Cursor p1)
{
Cursor Cursor1 = p1;
Cursor1.dll_obj = this;
Base_obj = Cursor1;
}
public Cursor Base_obj;
private string name;
[ContextProperty("Имя", "Name")]
public string Name
{
get { return name; }
set { name = value; }
}
[ContextProperty("Позиция", "Position")]
public ClPoint Position
{
get { return (ClPoint)OneScriptForms.RevertObj(Base_obj.Position); }
set { Base_obj.Position = value.Base_obj; }
}
[ContextProperty("Размер", "Size")]
public ClSize Size
{
get { return (ClSize)OneScriptForms.RevertObj(Base_obj.Size); }
}
[ContextProperty("Текущий", "Current")]
public ClCursor Current
{
get { return (ClCursor)OneScriptForms.RevertObj(Base_obj.Current); }
}
}
}