@@ -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 () |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | $this->eventsList->selectedObject = $object; |
57 | 57 | $this->currentSelectedItem->selectedItem = $this->getComponentName ($object); |
58 | 58 | |
59 | - if (isset (VoidStudioAPI::$events[$object])) |
|
60 | - foreach (VoidStudioAPI::$events[$object] as $eventName => $code) |
|
61 | - $this->eventsList->getEventByName ($eventName)->value = '(добавлено)'; |
|
59 | + if (isset (VoidStudioAPI::$events[$object])) |
|
60 | + foreach (VoidStudioAPI::$events[$object] as $eventName => $code) |
|
61 | + $this->eventsList->getEventByName ($eventName)->value = '(добавлено)'; |
|
62 | 62 | |
63 | 63 | $this->eventsList->refresh (); |
64 | 64 | }; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | { |
69 | 69 | $this->componentAddedEvent = function ($self, $args) |
70 | 70 | { |
71 | - if (isset ($GLOBALS['new_component'])) |
|
71 | + if (isset ($GLOBALS['new_component'])) |
|
72 | 72 | { |
73 | 73 | $this->setComponentToHistory ($GLOBALS['new_component'][1], $GLOBALS['new_component'][0]); |
74 | 74 | $components = VoidStudioAPI::getObjects ('main')['PropertiesPanel__SelectedComponent']; |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | $required_packages = array |
25 | 25 | ( |
26 | - array ('github:winforms-php/VoidFramework', '3.5.2'), |
|
27 | - array ('github:KRypt0nn/ConsoleArgs', '1.5'), |
|
28 | - array ('github:winforms-php/VoidBuilder', '1.2') |
|
26 | + array ('github:winforms-php/VoidFramework', '3.5.2'), |
|
27 | + array ('github:KRypt0nn/ConsoleArgs', '1.5'), |
|
28 | + array ('github:winforms-php/VoidBuilder', '1.2') |
|
29 | 29 | ); |
@@ -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 | } |