@@ -7,23 +7,23 @@ |
||
7 | 7 | $source = VoidStudioAPI::getObjects ('addPackage')['Package__Source']; |
8 | 8 | $version = VoidStudioAPI::getObjects ('addPackage')['Package__Version']; |
9 | 9 | |
10 | - $source = $source->selectedItem != 'github' ? |
|
10 | + $source = $source->selectedItem != 'github' ? |
|
11 | 11 | $source->selectedItem .':' : ''; |
12 | 12 | |
13 | - $version = $version->text != 'latest' && $version->text ? |
|
14 | - '@'. $version->text : ''; |
|
13 | + $version = $version->text != 'latest' && $version->text ? |
|
14 | + '@'. $version->text : ''; |
|
15 | 15 | |
16 | 16 | VoidStudioAPI::getObjects ('addPackage')['Package__Path']->caption = ($package = $source . VoidStudioAPI::getObjects ('addPackage')['Package__Author']->text .'/'. VoidStudioAPI::getObjects ('addPackage')['Package__Name']->text) . $version; |
17 | 17 | |
18 | - VoidStudioAPI::getObjects ('addPackage')['Package__Add']->enabled = true; |
|
18 | + VoidStudioAPI::getObjects ('addPackage')['Package__Add']->enabled = true; |
|
19 | 19 | |
20 | - foreach (VoidStudioAPI::getObjects ('modules')['ModulesList__QeroPackages']->items->list as $line) |
|
21 | - if ((($pos = strrpos ($line, '@')) !== false && substr ($line, 0, $pos) == $package) || ($pos === false && $line == $package)) |
|
22 | - { |
|
23 | - VoidStudioAPI::getObjects ('addPackage')['Package__Add']->enabled = false; |
|
20 | + foreach (VoidStudioAPI::getObjects ('modules')['ModulesList__QeroPackages']->items->list as $line) |
|
21 | + if ((($pos = strrpos ($line, '@')) !== false && substr ($line, 0, $pos) == $package) || ($pos === false && $line == $package)) |
|
22 | + { |
|
23 | + VoidStudioAPI::getObjects ('addPackage')['Package__Add']->enabled = false; |
|
24 | 24 | |
25 | - break; |
|
26 | - } |
|
25 | + break; |
|
26 | + } |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | function packages__update () |
@@ -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 |
@@ -4,36 +4,36 @@ |
||
4 | 4 | |
5 | 5 | class Chart extends Control |
6 | 6 | { |
7 | - public $class = 'System.Windows.Forms.DataVisualization.Charting.Chart'; |
|
8 | - public $namespace = 'System.Windows.Forms.DataVisualization'; |
|
7 | + public $class = 'System.Windows.Forms.DataVisualization.Charting.Chart'; |
|
8 | + public $namespace = 'System.Windows.Forms.DataVisualization'; |
|
9 | 9 | } |
10 | 10 | |
11 | 11 | class Annotation extends Control |
12 | 12 | { |
13 | - public $class = 'System.Windows.Forms.DataVisualization.Charting.Annotation'; |
|
14 | - public $namespace = 'System.Windows.Forms.DataVisualization'; |
|
13 | + public $class = 'System.Windows.Forms.DataVisualization.Charting.Annotation'; |
|
14 | + public $namespace = 'System.Windows.Forms.DataVisualization'; |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | class ChartArea extends Control |
18 | 18 | { |
19 | - public $class = 'System.Windows.Forms.DataVisualization.Charting.ChartArea'; |
|
20 | - public $namespace = 'System.Windows.Forms.DataVisualization'; |
|
19 | + public $class = 'System.Windows.Forms.DataVisualization.Charting.ChartArea'; |
|
20 | + public $namespace = 'System.Windows.Forms.DataVisualization'; |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | class Legend extends Control |
24 | 24 | { |
25 | - public $class = 'System.Windows.Forms.DataVisualization.Charting.Legend'; |
|
26 | - public $namespace = 'System.Windows.Forms.DataVisualization'; |
|
25 | + public $class = 'System.Windows.Forms.DataVisualization.Charting.Legend'; |
|
26 | + public $namespace = 'System.Windows.Forms.DataVisualization'; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | class Series extends Control |
30 | 30 | { |
31 | - public $class = 'System.Windows.Forms.DataVisualization.Charting.Series'; |
|
32 | - public $namespace = 'System.Windows.Forms.DataVisualization'; |
|
31 | + public $class = 'System.Windows.Forms.DataVisualization.Charting.Series'; |
|
32 | + public $namespace = 'System.Windows.Forms.DataVisualization'; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | class Title extends Control |
36 | 36 | { |
37 | - public $class = 'System.Windows.Forms.DataVisualization.Charting.Title'; |
|
38 | - public $namespace = 'System.Windows.Forms.DataVisualization'; |
|
37 | + public $class = 'System.Windows.Forms.DataVisualization.Charting.Title'; |
|
38 | + public $namespace = 'System.Windows.Forms.DataVisualization'; |
|
39 | 39 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | protected $items; |
10 | 10 | |
11 | 11 | public function __construct (Component $parent = null) |
12 | - { |
|
12 | + { |
|
13 | 13 | parent::__construct ($parent, $this->class); |
14 | 14 | |
15 | 15 | $this->items = new WFObject ($this->getProperty ('TabPages')); |
@@ -4,48 +4,48 @@ |
||
4 | 4 | |
5 | 5 | class PictureBox extends Control |
6 | 6 | { |
7 | - public $class = 'System.Windows.Forms.PictureBox'; |
|
7 | + public $class = 'System.Windows.Forms.PictureBox'; |
|
8 | 8 | |
9 | - protected $image; |
|
9 | + protected $image; |
|
10 | 10 | |
11 | - public function __construct (Component $parent = null) |
|
12 | - { |
|
11 | + public function __construct (Component $parent = null) |
|
12 | + { |
|
13 | 13 | parent::__construct ($parent, $this->class); |
14 | 14 | |
15 | - $this->image = new PictureBoxImage ($this->selector); |
|
16 | - } |
|
15 | + $this->image = new PictureBoxImage ($this->selector); |
|
16 | + } |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | class PictureBoxImage |
20 | 20 | { |
21 | - protected $selector; |
|
21 | + protected $selector; |
|
22 | 22 | protected $pictureBoxSelector; |
23 | 23 | protected $clipboard; |
24 | 24 | |
25 | - public function __construct (int $pictureBoxSelector) |
|
26 | - { |
|
27 | - $this->pictureBoxSelector = $pictureBoxSelector; |
|
28 | - $this->selector = VoidEngine::getProperty ($pictureBoxSelector, 'Image'); |
|
29 | - $this->clipboard = new WFClass ('System.Windows.Forms.Clipboard'); |
|
30 | - } |
|
25 | + public function __construct (int $pictureBoxSelector) |
|
26 | + { |
|
27 | + $this->pictureBoxSelector = $pictureBoxSelector; |
|
28 | + $this->selector = VoidEngine::getProperty ($pictureBoxSelector, 'Image'); |
|
29 | + $this->clipboard = new WFClass ('System.Windows.Forms.Clipboard'); |
|
30 | + } |
|
31 | 31 | |
32 | - public function loadFromFile (string $file) |
|
33 | - { |
|
32 | + public function loadFromFile (string $file) |
|
33 | + { |
|
34 | 34 | VoidEngine::setProperty ($this->pictureBoxSelector, 'Image', (new Image ())->loadFromFile ($file)->selector); |
35 | - } |
|
35 | + } |
|
36 | 36 | |
37 | - public function saveToFile (string $file) |
|
38 | - { |
|
39 | - VoidEngine::callMethod ($this->selector, 'Save', $file); |
|
40 | - } |
|
37 | + public function saveToFile (string $file) |
|
38 | + { |
|
39 | + VoidEngine::callMethod ($this->selector, 'Save', $file); |
|
40 | + } |
|
41 | 41 | |
42 | - public function loadFromClipboard () |
|
43 | - { |
|
44 | - VoidEngine::setProperty ($this->pictureBoxSelector, 'Image', $this->clipboard->getImage ()); |
|
45 | - } |
|
42 | + public function loadFromClipboard () |
|
43 | + { |
|
44 | + VoidEngine::setProperty ($this->pictureBoxSelector, 'Image', $this->clipboard->getImage ()); |
|
45 | + } |
|
46 | 46 | |
47 | - public function saveToClipboard () |
|
48 | - { |
|
49 | - $this->clipboard->setImage (VoidEngine::getProperty ($this->pictureBoxSelector, 'Image')); |
|
50 | - } |
|
47 | + public function saveToClipboard () |
|
48 | + { |
|
49 | + $this->clipboard->setImage (VoidEngine::getProperty ($this->pictureBoxSelector, 'Image')); |
|
50 | + } |
|
51 | 51 | } |
@@ -4,5 +4,5 @@ |
||
4 | 4 | |
5 | 5 | class CheckBox extends Control |
6 | 6 | { |
7 | - public $class = 'System.Windows.Forms.CheckBox'; |
|
7 | + public $class = 'System.Windows.Forms.CheckBox'; |
|
8 | 8 | } |
@@ -4,28 +4,28 @@ |
||
4 | 4 | |
5 | 5 | class Process extends Component |
6 | 6 | { |
7 | - public $class = 'System.Diagnostics.Process'; |
|
8 | - public $namespace = 'System'; |
|
7 | + public $class = 'System.Diagnostics.Process'; |
|
8 | + public $namespace = 'System'; |
|
9 | 9 | |
10 | - public function __construct (int $pid = null) |
|
11 | - { |
|
10 | + public function __construct (int $pid = null) |
|
11 | + { |
|
12 | 12 | $this->selector = VoidEngine::createClass ($this->class, $this->namespace); |
13 | 13 | |
14 | - if ($pid !== null) |
|
14 | + if ($pid !== null) |
|
15 | 15 | $this->selector = $pid == getmypid () ? |
16 | 16 | VoidEngine::callMethod ($this->selector, 'GetCurrentProcess') : |
17 | 17 | VoidEngine::callMethod ($this->selector, 'GetProcessById', $pid); |
18 | 18 | |
19 | - Components::addComponent ($this->selector, $this); |
|
20 | - } |
|
19 | + Components::addComponent ($this->selector, $this); |
|
20 | + } |
|
21 | 21 | |
22 | - public static function getProcessById (int $pid) |
|
23 | - { |
|
24 | - return new self ($pid); |
|
25 | - } |
|
22 | + public static function getProcessById (int $pid) |
|
23 | + { |
|
24 | + return new self ($pid); |
|
25 | + } |
|
26 | 26 | |
27 | - public static function getCurrentProcess () |
|
28 | - { |
|
29 | - return new self (getmypid ()); |
|
30 | - } |
|
27 | + public static function getCurrentProcess () |
|
28 | + { |
|
29 | + return new self (getmypid ()); |
|
30 | + } |
|
31 | 31 | } |
@@ -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 | } |
@@ -12,11 +12,11 @@ |
||
12 | 12 | protected $styles; |
13 | 13 | |
14 | 14 | public function __construct (Component $parent = null) |
15 | - { |
|
15 | + { |
|
16 | 16 | parent::__construct ($parent, $this->class); |
17 | 17 | |
18 | 18 | $this->styles = $this->getProperty ('Styles'); |
19 | - } |
|
19 | + } |
|
20 | 20 | |
21 | 21 | public function resetSyntax () |
22 | 22 | { |