@@ -49,7 +49,7 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | public function dispose (): void |
52 | - { |
|
52 | + { |
|
53 | 53 | foreach (array_diff (get_object_vars ($this), ['selector']) as $param => $value) |
54 | 54 | { |
55 | 55 | if (is_int ($value)) |
@@ -37,12 +37,12 @@ discard block |
||
37 | 37 | { |
38 | 38 | Components::removeComponent ($this->$name); |
39 | 39 | |
40 | - if (VoidEngine::objectExists ($this->$name)) |
|
41 | - VoidEngine::removeObjects ($this->$name); |
|
40 | + if (VoidEngine::objectExists ($this->$name)) { |
|
41 | + VoidEngine::removeObjects ($this->$name); |
|
42 | + } |
|
43 | + } elseif ($this->$name instanceof Component) { |
|
44 | + $this->$name->dispose (); |
|
42 | 45 | } |
43 | - |
|
44 | - elseif ($this->$name instanceof Component) |
|
45 | - $this->$name->dispose (); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | unset ($this->$name); |
@@ -56,20 +56,21 @@ discard block |
||
56 | 56 | { |
57 | 57 | Components::removeComponent ($value); |
58 | 58 | |
59 | - if (VoidEngine::objectExists ($value)) |
|
60 | - VoidEngine::removeObjects ($value); |
|
59 | + if (VoidEngine::objectExists ($value)) { |
|
60 | + VoidEngine::removeObjects ($value); |
|
61 | + } |
|
62 | + } elseif ($value instanceof Component) { |
|
63 | + $value->dispose (); |
|
61 | 64 | } |
62 | 65 | |
63 | - elseif ($value instanceof Component) |
|
64 | - $value->dispose (); |
|
65 | - |
|
66 | 66 | unset ($this->$param); |
67 | 67 | } |
68 | 68 | |
69 | 69 | if (isset ($this->selector)) |
70 | 70 | { |
71 | - if (VoidEngine::objectExists ($this->selector)) |
|
72 | - VoidEngine::removeObjects ($this->selector); |
|
71 | + if (VoidEngine::objectExists ($this->selector)) { |
|
72 | + VoidEngine::removeObjects ($this->selector); |
|
73 | + } |
|
73 | 74 | |
74 | 75 | Components::removeComponent ($this->selector); |
75 | 76 | } |
@@ -9,82 +9,82 @@ |
||
9 | 9 | public $class = 'System.Windows.Forms.Component'; |
10 | 10 | public $namespace = 'System.Windows.Forms'; |
11 | 11 | |
12 | - public function __construct ($className = null, ...$args) |
|
12 | + public function __construct($className = null, ...$args) |
|
13 | 13 | { |
14 | - parent::__construct ( |
|
14 | + parent::__construct( |
|
15 | 15 | $className === null ? $this->class : $className, |
16 | 16 | $this->namespace, ...$args |
17 | 17 | ); |
18 | 18 | |
19 | - Components::addComponent ($this->selector, $this); |
|
19 | + Components::addComponent($this->selector, $this); |
|
20 | 20 | } |
21 | 21 | |
22 | - public function __debugInfo (): array |
|
22 | + public function __debugInfo(): array |
|
23 | 23 | { |
24 | 24 | return [ |
25 | - 'description' => @$this->__toString (), |
|
25 | + 'description' => @$this->__toString(), |
|
26 | 26 | 'selector' => @$this->selector, |
27 | 27 | 'name' => @$this->name, |
28 | - 'objectInfo' => @json_encode ($this, JSON_PRETTY_PRINT) |
|
28 | + 'objectInfo' => @json_encode($this, JSON_PRETTY_PRINT) |
|
29 | 29 | ]; |
30 | 30 | } |
31 | 31 | |
32 | - public function __unset ($name) |
|
32 | + public function __unset($name) |
|
33 | 33 | { |
34 | 34 | if (isset ($this->$name)) |
35 | 35 | { |
36 | - if (is_int ($this->$name)) |
|
36 | + if (is_int($this->$name)) |
|
37 | 37 | { |
38 | - Components::removeComponent ($this->$name); |
|
38 | + Components::removeComponent($this->$name); |
|
39 | 39 | |
40 | - if (VoidEngine::objectExists ($this->$name)) |
|
41 | - VoidEngine::removeObjects ($this->$name); |
|
40 | + if (VoidEngine::objectExists($this->$name)) |
|
41 | + VoidEngine::removeObjects($this->$name); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | elseif ($this->$name instanceof Component) |
45 | - $this->$name->dispose (); |
|
45 | + $this->$name->dispose(); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | unset ($this->$name); |
49 | 49 | } |
50 | 50 | |
51 | - public function dispose (): void |
|
51 | + public function dispose(): void |
|
52 | 52 | { |
53 | - foreach (array_diff (get_object_vars ($this), ['selector']) as $param => $value) |
|
53 | + foreach (array_diff(get_object_vars($this), ['selector']) as $param => $value) |
|
54 | 54 | { |
55 | - if (is_int ($value)) |
|
55 | + if (is_int($value)) |
|
56 | 56 | { |
57 | - Components::removeComponent ($value); |
|
57 | + Components::removeComponent($value); |
|
58 | 58 | |
59 | - if (VoidEngine::objectExists ($value)) |
|
60 | - VoidEngine::removeObjects ($value); |
|
59 | + if (VoidEngine::objectExists($value)) |
|
60 | + VoidEngine::removeObjects($value); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | elseif ($value instanceof Component) |
64 | - $value->dispose (); |
|
64 | + $value->dispose(); |
|
65 | 65 | |
66 | 66 | unset ($this->$param); |
67 | 67 | } |
68 | 68 | |
69 | 69 | if (isset ($this->selector)) |
70 | 70 | { |
71 | - if (VoidEngine::objectExists ($this->selector)) |
|
72 | - VoidEngine::removeObjects ($this->selector); |
|
71 | + if (VoidEngine::objectExists($this->selector)) |
|
72 | + VoidEngine::removeObjects($this->selector); |
|
73 | 73 | |
74 | - Components::removeComponent ($this->selector); |
|
74 | + Components::removeComponent($this->selector); |
|
75 | 75 | } |
76 | 76 | |
77 | - Components::cleanJunk (); |
|
77 | + Components::cleanJunk(); |
|
78 | 78 | } |
79 | 79 | |
80 | - public function __destruct () |
|
80 | + public function __destruct() |
|
81 | 81 | { |
82 | - if (isset ($this->selector) && VoidEngine::destructObject ($this->selector)) |
|
82 | + if (isset ($this->selector) && VoidEngine::destructObject($this->selector)) |
|
83 | 83 | { |
84 | - VoidEngine::removeObjects ($this->selector); |
|
85 | - Components::removeComponent ($this->selector); |
|
84 | + VoidEngine::removeObjects($this->selector); |
|
85 | + Components::removeComponent($this->selector); |
|
86 | 86 | |
87 | - gc_collect_cycles (); |
|
87 | + gc_collect_cycles(); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | } |
@@ -11,9 +11,7 @@ |
||
11 | 11 | try |
12 | 12 | { |
13 | 13 | $node = $this->selectedNode; |
14 | - } |
|
15 | - |
|
16 | - catch (\Throwable $e) |
|
14 | + } catch (\Throwable $e) |
|
17 | 15 | { |
18 | 16 | return false; |
19 | 17 | } |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | { |
7 | 7 | public $class = 'System.Windows.Forms.TreeView'; |
8 | 8 | |
9 | - public function get_path () |
|
9 | + public function get_path() |
|
10 | 10 | { |
11 | 11 | try |
12 | 12 | { |
@@ -26,15 +26,15 @@ discard block |
||
26 | 26 | { |
27 | 27 | public $class = 'System.Windows.Forms.TreeNode'; |
28 | 28 | |
29 | - public function __construct (string $text = '') |
|
29 | + public function __construct(string $text = '') |
|
30 | 30 | { |
31 | - parent::__construct (null, $this->class); |
|
31 | + parent::__construct(null, $this->class); |
|
32 | 32 | |
33 | 33 | $this->text = $text; |
34 | 34 | } |
35 | 35 | |
36 | - public function get_path () |
|
36 | + public function get_path() |
|
37 | 37 | { |
38 | - return $this->getProperty ('FullPath'); |
|
38 | + return $this->getProperty('FullPath'); |
|
39 | 39 | } |
40 | 40 | } |
@@ -6,18 +6,18 @@ |
||
6 | 6 | { |
7 | 7 | public $class = 'System.Windows.Forms.WebBrowser'; |
8 | 8 | |
9 | - public function back (): void |
|
9 | + public function back(): void |
|
10 | 10 | { |
11 | - $this->callMethod ('GoBack'); |
|
11 | + $this->callMethod('GoBack'); |
|
12 | 12 | } |
13 | 13 | |
14 | - public function forward (): void |
|
14 | + public function forward(): void |
|
15 | 15 | { |
16 | - $this->callMethod ('GoForward'); |
|
16 | + $this->callMethod('GoForward'); |
|
17 | 17 | } |
18 | 18 | |
19 | - public function browse (string $url) |
|
19 | + public function browse(string $url) |
|
20 | 20 | { |
21 | - return $this->callMethod ('Navigate', $url); |
|
21 | + return $this->callMethod('Navigate', $url); |
|
22 | 22 | } |
23 | 23 | } |
@@ -25,24 +25,24 @@ |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | public function get_font (): array |
28 | - { |
|
28 | + { |
|
29 | 29 | $font = $this->getProperty ('Font'); |
30 | 30 | |
31 | - return [ |
|
31 | + return [ |
|
32 | 32 | VoidEngine::getProperty ($font, 'Name'), |
33 | 33 | VoidEngine::getProperty ($font, 'Size') |
34 | 34 | ]; |
35 | - } |
|
35 | + } |
|
36 | 36 | |
37 | - public function set_font (array $font): void |
|
38 | - { |
|
37 | + public function set_font (array $font): void |
|
38 | + { |
|
39 | 39 | $font = array_values ($font); |
40 | 40 | |
41 | 41 | $obj = isset ($font[2]) ? |
42 | 42 | VoidEngine::createObject ('System.Drawing.Font', 'System.Drawing', $font[0], [$font[1], 'float'], [$font[2], 'System.Drawing.FontStyle, System.Drawing']) : |
43 | 43 | VoidEngine::createObject ('System.Drawing.Font', 'System.Drawing', $font[0], [$font[1], 'float']); |
44 | 44 | |
45 | - $this->setProperty ('Font', $obj); |
|
45 | + $this->setProperty ('Font', $obj); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | public function get_backgroundColor () |
@@ -6,106 +6,105 @@ discard block |
||
6 | 6 | { |
7 | 7 | public $class = 'System.Windows.Forms.Control'; |
8 | 8 | |
9 | - public function __construct (Component $parent = null, $className = null, ...$args) |
|
9 | + public function __construct(Component $parent = null, $className = null, ...$args) |
|
10 | 10 | { |
11 | - parent::__construct ($className, ...$args); |
|
11 | + parent::__construct($className, ...$args); |
|
12 | 12 | |
13 | 13 | if ($parent) |
14 | 14 | $this->parent = $parent; |
15 | 15 | } |
16 | 16 | |
17 | - public function get_caption (): string |
|
17 | + public function get_caption(): string |
|
18 | 18 | { |
19 | 19 | return $this->text; |
20 | 20 | } |
21 | 21 | |
22 | - public function set_caption (string $caption) |
|
22 | + public function set_caption(string $caption) |
|
23 | 23 | { |
24 | 24 | $this->text = $caption; |
25 | 25 | } |
26 | 26 | |
27 | - public function get_font (): array |
|
27 | + public function get_font(): array |
|
28 | 28 | { |
29 | - $font = $this->getProperty ('Font'); |
|
29 | + $font = $this->getProperty('Font'); |
|
30 | 30 | |
31 | 31 | return [ |
32 | - VoidEngine::getProperty ($font, 'Name'), |
|
33 | - VoidEngine::getProperty ($font, 'Size') |
|
32 | + VoidEngine::getProperty($font, 'Name'), |
|
33 | + VoidEngine::getProperty($font, 'Size') |
|
34 | 34 | ]; |
35 | 35 | } |
36 | 36 | |
37 | - public function set_font (array $font): void |
|
37 | + public function set_font(array $font): void |
|
38 | 38 | { |
39 | - $font = array_values ($font); |
|
39 | + $font = array_values($font); |
|
40 | 40 | |
41 | 41 | $obj = isset ($font[2]) ? |
42 | - VoidEngine::createObject ('System.Drawing.Font', 'System.Drawing', $font[0], [$font[1], 'float'], [$font[2], 'System.Drawing.FontStyle, System.Drawing']) : |
|
43 | - VoidEngine::createObject ('System.Drawing.Font', 'System.Drawing', $font[0], [$font[1], 'float']); |
|
42 | + VoidEngine::createObject('System.Drawing.Font', 'System.Drawing', $font[0], [$font[1], 'float'], [$font[2], 'System.Drawing.FontStyle, System.Drawing']) : VoidEngine::createObject('System.Drawing.Font', 'System.Drawing', $font[0], [$font[1], 'float']); |
|
44 | 43 | |
45 | - $this->setProperty ('Font', $obj); |
|
44 | + $this->setProperty('Font', $obj); |
|
46 | 45 | } |
47 | 46 | |
48 | - public function get_backgroundColor () |
|
47 | + public function get_backgroundColor() |
|
49 | 48 | { |
50 | - return $this->getProperty (['BackColor', 'color']); |
|
49 | + return $this->getProperty(['BackColor', 'color']); |
|
51 | 50 | } |
52 | 51 | |
53 | - public function set_backgroundColor ($color) |
|
52 | + public function set_backgroundColor($color) |
|
54 | 53 | { |
55 | - $this->setProperty ('BackColor', [$color, 'color']); |
|
54 | + $this->setProperty('BackColor', [$color, 'color']); |
|
56 | 55 | } |
57 | 56 | |
58 | - public function get_foregroundColor () |
|
57 | + public function get_foregroundColor() |
|
59 | 58 | { |
60 | - return $this->getProperty (['ForeColor', 'color']); |
|
59 | + return $this->getProperty(['ForeColor', 'color']); |
|
61 | 60 | } |
62 | 61 | |
63 | - public function set_foregroundColor ($color) |
|
62 | + public function set_foregroundColor($color) |
|
64 | 63 | { |
65 | - $this->setProperty ('ForeColor', [$color, 'color']); |
|
64 | + $this->setProperty('ForeColor', [$color, 'color']); |
|
66 | 65 | } |
67 | 66 | |
68 | - public function get_w (): int |
|
67 | + public function get_w(): int |
|
69 | 68 | { |
70 | 69 | return $this->width; |
71 | 70 | } |
72 | 71 | |
73 | - public function set_w (int $w) |
|
72 | + public function set_w(int $w) |
|
74 | 73 | { |
75 | 74 | $this->width = $w; |
76 | 75 | } |
77 | 76 | |
78 | - public function get_h (): int |
|
77 | + public function get_h(): int |
|
79 | 78 | { |
80 | 79 | return $this->height; |
81 | 80 | } |
82 | 81 | |
83 | - public function set_h (int $h) |
|
82 | + public function set_h(int $h) |
|
84 | 83 | { |
85 | 84 | $this->height = $h; |
86 | 85 | } |
87 | 86 | |
88 | - public function get_x (): int |
|
87 | + public function get_x(): int |
|
89 | 88 | { |
90 | 89 | return $this->left; |
91 | 90 | } |
92 | 91 | |
93 | - public function set_x (int $x) |
|
92 | + public function set_x(int $x) |
|
94 | 93 | { |
95 | 94 | $this->left = $x; |
96 | 95 | } |
97 | 96 | |
98 | - public function get_y (): int |
|
97 | + public function get_y(): int |
|
99 | 98 | { |
100 | 99 | return $this->top; |
101 | 100 | } |
102 | 101 | |
103 | - public function set_y (int $y) |
|
102 | + public function set_y(int $y) |
|
104 | 103 | { |
105 | 104 | $this->top = $y; |
106 | 105 | } |
107 | 106 | |
108 | - public function get_bounds (): array |
|
107 | + public function get_bounds(): array |
|
109 | 108 | { |
110 | 109 | return [ |
111 | 110 | $this->left, |
@@ -115,9 +114,9 @@ discard block |
||
115 | 114 | ]; |
116 | 115 | } |
117 | 116 | |
118 | - public function set_bounds (array $bounds) |
|
117 | + public function set_bounds(array $bounds) |
|
119 | 118 | { |
120 | - $bounds = array_values ($bounds); |
|
119 | + $bounds = array_values($bounds); |
|
121 | 120 | |
122 | 121 | $this->left = (int) $bounds[0]; |
123 | 122 | $this->top = (int) $bounds[1]; |
@@ -125,7 +124,7 @@ discard block |
||
125 | 124 | $this->height = (int) $bounds[3]; |
126 | 125 | } |
127 | 126 | |
128 | - public function get_location (): array |
|
127 | + public function get_location(): array |
|
129 | 128 | { |
130 | 129 | return [ |
131 | 130 | $this->left, |
@@ -133,15 +132,15 @@ discard block |
||
133 | 132 | ]; |
134 | 133 | } |
135 | 134 | |
136 | - public function set_location (array $location) |
|
135 | + public function set_location(array $location) |
|
137 | 136 | { |
138 | - $location = array_values ($location); |
|
137 | + $location = array_values($location); |
|
139 | 138 | |
140 | 139 | $this->left = $location[0]; |
141 | 140 | $this->top = $location[1]; |
142 | 141 | } |
143 | 142 | |
144 | - public function get_size (): array |
|
143 | + public function get_size(): array |
|
145 | 144 | { |
146 | 145 | return [ |
147 | 146 | $this->width, |
@@ -149,27 +148,27 @@ discard block |
||
149 | 148 | ]; |
150 | 149 | } |
151 | 150 | |
152 | - public function set_size (array $size) |
|
151 | + public function set_size(array $size) |
|
153 | 152 | { |
154 | - $size = array_values ($size); |
|
153 | + $size = array_values($size); |
|
155 | 154 | |
156 | 155 | $this->width = (int) $size[0]; |
157 | 156 | $this->height = (int) $size[1]; |
158 | 157 | } |
159 | 158 | |
160 | - public function setBounds (int $x, int $y, int $w, int $h) |
|
159 | + public function setBounds(int $x, int $y, int $w, int $h) |
|
161 | 160 | { |
162 | - $this->set_bounds ([$x, $y, $w, $h]); |
|
161 | + $this->set_bounds([$x, $y, $w, $h]); |
|
163 | 162 | } |
164 | 163 | |
165 | - public function setLocation (int $x, int $y) |
|
164 | + public function setLocation(int $x, int $y) |
|
166 | 165 | { |
167 | - $this->set_location ([$x, $y]); |
|
166 | + $this->set_location([$x, $y]); |
|
168 | 167 | } |
169 | 168 | |
170 | - public function setSize (int $w, int $h) |
|
169 | + public function setSize(int $w, int $h) |
|
171 | 170 | { |
172 | - $this->set_size ([$w, $h]); |
|
171 | + $this->set_size([$w, $h]); |
|
173 | 172 | } |
174 | 173 | |
175 | 174 | /*public function set_anchor (array $anchors) |
@@ -182,14 +181,14 @@ discard block |
||
182 | 181 | return $this->setProperty ('Anchor', $anchor, 'int'); |
183 | 182 | }*/ |
184 | 183 | |
185 | - public function toBack () |
|
184 | + public function toBack() |
|
186 | 185 | { |
187 | - $this->callMethod ('SendToBack'); |
|
186 | + $this->callMethod('SendToBack'); |
|
188 | 187 | } |
189 | 188 | |
190 | - public function toFront () |
|
189 | + public function toFront() |
|
191 | 190 | { |
192 | - $this->callMethod ('BringToFront'); |
|
191 | + $this->callMethod('BringToFront'); |
|
193 | 192 | } |
194 | 193 | } |
195 | 194 |
@@ -10,8 +10,9 @@ |
||
10 | 10 | { |
11 | 11 | parent::__construct ($className, ...$args); |
12 | 12 | |
13 | - if ($parent) |
|
14 | - $this->parent = $parent; |
|
13 | + if ($parent) { |
|
14 | + $this->parent = $parent; |
|
15 | + } |
|
15 | 16 | } |
16 | 17 | |
17 | 18 | public function get_caption (): string |
@@ -31,14 +31,14 @@ |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | public function applyToObject (int $selector): void |
34 | - { |
|
35 | - VoidEngine::setProperty ($selector, 'Icon', $this->selector); |
|
36 | - } |
|
34 | + { |
|
35 | + VoidEngine::setProperty ($selector, 'Icon', $this->selector); |
|
36 | + } |
|
37 | 37 | |
38 | - public function saveToFile (string $file): void |
|
39 | - { |
|
40 | - VoidEngine::callMethod ($this->selector, 'Save', $file); |
|
41 | - } |
|
38 | + public function saveToFile (string $file): void |
|
39 | + { |
|
40 | + VoidEngine::callMethod ($this->selector, 'Save', $file); |
|
41 | + } |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | class Bitmap extends WFObject |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | public $class = 'System.Drawing.Image'; |
8 | 8 | public $namespace = 'System.Drawing'; |
9 | 9 | |
10 | - public function __construct () |
|
10 | + public function __construct() |
|
11 | 11 | { |
12 | - parent::__construct ($this->class); |
|
12 | + parent::__construct($this->class); |
|
13 | 13 | } |
14 | 14 | |
15 | - public function loadFromFile (string $path) |
|
15 | + public function loadFromFile(string $path) |
|
16 | 16 | { |
17 | - return $this->fromFile ($path); |
|
17 | + return $this->fromFile($path); |
|
18 | 18 | } |
19 | 19 | } |
20 | 20 | |
@@ -23,21 +23,21 @@ discard block |
||
23 | 23 | public $class = 'System.Drawing.Icon'; |
24 | 24 | public $namespace = 'System.Drawing'; |
25 | 25 | |
26 | - public function __construct (string $file) |
|
26 | + public function __construct(string $file) |
|
27 | 27 | { |
28 | - parent::__construct ($this->class); |
|
28 | + parent::__construct($this->class); |
|
29 | 29 | |
30 | - $this->fromFile ($file); |
|
30 | + $this->fromFile($file); |
|
31 | 31 | } |
32 | 32 | |
33 | - public function applyToObject (int $selector): void |
|
33 | + public function applyToObject(int $selector): void |
|
34 | 34 | { |
35 | - VoidEngine::setProperty ($selector, 'Icon', $this->selector); |
|
35 | + VoidEngine::setProperty($selector, 'Icon', $this->selector); |
|
36 | 36 | } |
37 | 37 | |
38 | - public function saveToFile (string $file): void |
|
38 | + public function saveToFile(string $file): void |
|
39 | 39 | { |
40 | - VoidEngine::callMethod ($this->selector, 'Save', $file); |
|
40 | + VoidEngine::callMethod($this->selector, 'Save', $file); |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | public $class = 'System.Drawing.Bitmap'; |
47 | 47 | public $namespace = 'System.Drawing'; |
48 | 48 | |
49 | - public function __construct (string $filename) |
|
49 | + public function __construct(string $filename) |
|
50 | 50 | { |
51 | - parent::__construct ($this->class, $this->namespace, [$filename, 'string']); |
|
51 | + parent::__construct($this->class, $this->namespace, [$filename, 'string']); |
|
52 | 52 | } |
53 | 53 | } |
@@ -51,7 +51,8 @@ |
||
51 | 51 | |
52 | 52 | VoidEngine::setProperty ($this->formSelector, 'Icon', $icon); |
53 | 53 | |
54 | - if (!isset ($this->selector)) |
|
55 | - $this->selector = $icon; |
|
54 | + if (!isset ($this->selector)) { |
|
55 | + $this->selector = $icon; |
|
56 | + } |
|
56 | 57 | } |
57 | 58 | } |
@@ -4,36 +4,36 @@ discard block |
||
4 | 4 | |
5 | 5 | class Form extends Control |
6 | 6 | { |
7 | - public $class = 'System.Windows.Forms.Form'; |
|
7 | + public $class = 'System.Windows.Forms.Form'; |
|
8 | 8 | |
9 | - public function get_icon () |
|
10 | - { |
|
11 | - return new FormIcon ($this->selector); |
|
12 | - } |
|
9 | + public function get_icon () |
|
10 | + { |
|
11 | + return new FormIcon ($this->selector); |
|
12 | + } |
|
13 | 13 | |
14 | - public function get_clientSize () |
|
15 | - { |
|
16 | - $obj = $this->getProperty ('ClientSize'); |
|
14 | + public function get_clientSize () |
|
15 | + { |
|
16 | + $obj = $this->getProperty ('ClientSize'); |
|
17 | 17 | |
18 | - $w = VoidEngine::getProperty ($obj, 'Width'); |
|
19 | - $h = VoidEngine::getProperty ($obj, 'Height'); |
|
18 | + $w = VoidEngine::getProperty ($obj, 'Width'); |
|
19 | + $h = VoidEngine::getProperty ($obj, 'Height'); |
|
20 | 20 | |
21 | - VoidEngine::removeObjects ($obj); |
|
21 | + VoidEngine::removeObjects ($obj); |
|
22 | 22 | |
23 | - return [$w, $h]; |
|
24 | - } |
|
23 | + return [$w, $h]; |
|
24 | + } |
|
25 | 25 | |
26 | - public function set_clientSize (array $size) |
|
27 | - { |
|
28 | - $obj = $this->getProperty ('ClientSize'); |
|
26 | + public function set_clientSize (array $size) |
|
27 | + { |
|
28 | + $obj = $this->getProperty ('ClientSize'); |
|
29 | 29 | |
30 | - VoidEngine::setProperty ($obj, 'Width', array_shift ($size)); |
|
31 | - VoidEngine::setProperty ($obj, 'Height', array_shift ($size)); |
|
30 | + VoidEngine::setProperty ($obj, 'Width', array_shift ($size)); |
|
31 | + VoidEngine::setProperty ($obj, 'Height', array_shift ($size)); |
|
32 | 32 | |
33 | - $this->setProperty ('ClientSize', $obj); |
|
33 | + $this->setProperty ('ClientSize', $obj); |
|
34 | 34 | |
35 | - VoidEngine::removeObjects ($obj); |
|
36 | - } |
|
35 | + VoidEngine::removeObjects ($obj); |
|
36 | + } |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | class FormIcon extends Icon |
@@ -46,12 +46,12 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | public function loadFromFile (string $file) |
49 | - { |
|
49 | + { |
|
50 | 50 | $icon = VoidEngine::createObject ('System.Drawing.Icon', 'System.Drawing', $file); |
51 | 51 | |
52 | 52 | VoidEngine::setProperty ($this->formSelector, 'Icon', $icon); |
53 | 53 | |
54 | - if (!isset ($this->selector)) |
|
55 | - $this->selector = $icon; |
|
56 | - } |
|
54 | + if (!isset ($this->selector)) |
|
55 | + $this->selector = $icon; |
|
56 | + } |
|
57 | 57 | } |
@@ -6,33 +6,33 @@ discard block |
||
6 | 6 | { |
7 | 7 | public $class = 'System.Windows.Forms.Form'; |
8 | 8 | |
9 | - public function get_icon () |
|
9 | + public function get_icon() |
|
10 | 10 | { |
11 | - return new FormIcon ($this->selector); |
|
11 | + return new FormIcon($this->selector); |
|
12 | 12 | } |
13 | 13 | |
14 | - public function get_clientSize () |
|
14 | + public function get_clientSize() |
|
15 | 15 | { |
16 | - $obj = $this->getProperty ('ClientSize'); |
|
16 | + $obj = $this->getProperty('ClientSize'); |
|
17 | 17 | |
18 | - $w = VoidEngine::getProperty ($obj, 'Width'); |
|
19 | - $h = VoidEngine::getProperty ($obj, 'Height'); |
|
18 | + $w = VoidEngine::getProperty($obj, 'Width'); |
|
19 | + $h = VoidEngine::getProperty($obj, 'Height'); |
|
20 | 20 | |
21 | - VoidEngine::removeObjects ($obj); |
|
21 | + VoidEngine::removeObjects($obj); |
|
22 | 22 | |
23 | 23 | return [$w, $h]; |
24 | 24 | } |
25 | 25 | |
26 | - public function set_clientSize (array $size) |
|
26 | + public function set_clientSize(array $size) |
|
27 | 27 | { |
28 | - $obj = $this->getProperty ('ClientSize'); |
|
28 | + $obj = $this->getProperty('ClientSize'); |
|
29 | 29 | |
30 | - VoidEngine::setProperty ($obj, 'Width', array_shift ($size)); |
|
31 | - VoidEngine::setProperty ($obj, 'Height', array_shift ($size)); |
|
30 | + VoidEngine::setProperty($obj, 'Width', array_shift($size)); |
|
31 | + VoidEngine::setProperty($obj, 'Height', array_shift($size)); |
|
32 | 32 | |
33 | - $this->setProperty ('ClientSize', $obj); |
|
33 | + $this->setProperty('ClientSize', $obj); |
|
34 | 34 | |
35 | - VoidEngine::removeObjects ($obj); |
|
35 | + VoidEngine::removeObjects($obj); |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
@@ -40,16 +40,16 @@ discard block |
||
40 | 40 | { |
41 | 41 | protected $formSelector; |
42 | 42 | |
43 | - public function __construct (int $formSelector) |
|
43 | + public function __construct(int $formSelector) |
|
44 | 44 | { |
45 | 45 | $this->formSelector = $formSelector; |
46 | 46 | } |
47 | 47 | |
48 | - public function loadFromFile (string $file) |
|
48 | + public function loadFromFile(string $file) |
|
49 | 49 | { |
50 | - $icon = VoidEngine::createObject ('System.Drawing.Icon', 'System.Drawing', $file); |
|
50 | + $icon = VoidEngine::createObject('System.Drawing.Icon', 'System.Drawing', $file); |
|
51 | 51 | |
52 | - VoidEngine::setProperty ($this->formSelector, 'Icon', $icon); |
|
52 | + VoidEngine::setProperty($this->formSelector, 'Icon', $icon); |
|
53 | 53 | |
54 | 54 | if (!isset ($this->selector)) |
55 | 55 | $this->selector = $icon; |
@@ -18,11 +18,11 @@ |
||
18 | 18 | |
19 | 19 | protected $items; |
20 | 20 | |
21 | - public function __construct (string $text = '') |
|
21 | + public function __construct(string $text = '') |
|
22 | 22 | { |
23 | - parent::__construct (null, $this->class); |
|
23 | + parent::__construct(null, $this->class); |
|
24 | 24 | |
25 | 25 | $this->text = $text; |
26 | - $this->items = new WFObject ($this->getProperty ('DropDownItems')); |
|
26 | + $this->items = new WFObject($this->getProperty('DropDownItems')); |
|
27 | 27 | } |
28 | 28 | } |
@@ -10,12 +10,12 @@ |
||
10 | 10 | protected $panel2; |
11 | 11 | |
12 | 12 | public function __construct (Component $parent = null) |
13 | - { |
|
13 | + { |
|
14 | 14 | parent::__construct ($parent, $this->class); |
15 | 15 | |
16 | 16 | $this->panel1 = new SplitterPanel ($this->getProperty ('Panel1')); |
17 | 17 | $this->panel2 = new SplitterPanel ($this->getProperty ('Panel2')); |
18 | - } |
|
18 | + } |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | class SplitterPanel extends Control |
@@ -9,18 +9,18 @@ |
||
9 | 9 | protected $panel1; |
10 | 10 | protected $panel2; |
11 | 11 | |
12 | - public function __construct (Component $parent = null) |
|
12 | + public function __construct(Component $parent = null) |
|
13 | 13 | { |
14 | - parent::__construct ($parent, $this->class); |
|
14 | + parent::__construct($parent, $this->class); |
|
15 | 15 | |
16 | - $this->panel1 = new SplitterPanel ($this->getProperty ('Panel1')); |
|
17 | - $this->panel2 = new SplitterPanel ($this->getProperty ('Panel2')); |
|
16 | + $this->panel1 = new SplitterPanel($this->getProperty('Panel1')); |
|
17 | + $this->panel2 = new SplitterPanel($this->getProperty('Panel2')); |
|
18 | 18 | } |
19 | 19 | } |
20 | 20 | |
21 | 21 | class SplitterPanel extends Control |
22 | 22 | { |
23 | - public function __construct (int $selector) |
|
23 | + public function __construct(int $selector) |
|
24 | 24 | { |
25 | 25 | $this->selector = $selector; |
26 | 26 | } |
@@ -6,6 +6,6 @@ |
||
6 | 6 | |
7 | 7 | class FastColoredTextBox extends NoVisual |
8 | 8 | { |
9 | - public $class = 'FastColoredTextBoxNS.FastColoredTextBox'; |
|
9 | + public $class = 'FastColoredTextBoxNS.FastColoredTextBox'; |
|
10 | 10 | public $namespace = 'FastColoredTextBox'; |
11 | 11 | } |
@@ -2,10 +2,10 @@ |
||
2 | 2 | |
3 | 3 | namespace VoidEngine; |
4 | 4 | |
5 | -EngineAdditions::loadModule ('FastColoredTextBox.dll'); |
|
5 | +EngineAdditions::loadModule('FastColoredTextBox.dll'); |
|
6 | 6 | |
7 | 7 | class FastColoredTextBox extends NoVisual |
8 | 8 | { |
9 | - public $class = 'FastColoredTextBoxNS.FastColoredTextBox'; |
|
9 | + public $class = 'FastColoredTextBoxNS.FastColoredTextBox'; |
|
10 | 10 | public $namespace = 'FastColoredTextBox'; |
11 | 11 | } |