@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | class VLFImporter |
| 6 | 6 | { |
| 7 | - static function import (string $vlf, PropertyGrid $propertyGrid, ListBox $eventsList, ComboBox $currentSelectedItem, TabControl $formsList, array $settings = array ( |
|
| 7 | + static function import(string $vlf, PropertyGrid $propertyGrid, ListBox $eventsList, ComboBox $currentSelectedItem, TabControl $formsList, array $settings = array( |
|
| 8 | 8 | 'strong_line_parser' => false, |
| 9 | 9 | 'ignore_postobject_info' => true, |
| 10 | 10 | 'ignore_unexpected_method_args' => true, |
@@ -13,20 +13,20 @@ discard block |
||
| 13 | 13 | 'debug_mode' => false |
| 14 | 14 | )): array |
| 15 | 15 | { |
| 16 | - $objects = VLFInterpreter::run (new VLFParser ($vlf, $settings)); |
|
| 16 | + $objects = VLFInterpreter::run(new VLFParser($vlf, $settings)); |
|
| 17 | 17 | $designers = []; |
| 18 | 18 | |
| 19 | 19 | foreach ($objects as $name => $object) |
| 20 | 20 | if ($object instanceof Form) |
| 21 | 21 | { |
| 22 | - $page = new TabPage ($name); |
|
| 23 | - $designers[$object->selector] = new VoidDesigner ($page, $name, $propertyGrid, $eventsList, $currentSelectedItem, $formsList, $object); |
|
| 22 | + $page = new TabPage($name); |
|
| 23 | + $designers[$object->selector] = new VoidDesigner($page, $name, $propertyGrid, $eventsList, $currentSelectedItem, $formsList, $object); |
|
| 24 | 24 | |
| 25 | 25 | $designers[$object->selector]->form->text = $object->text; |
| 26 | 26 | |
| 27 | - VoidStudioAPI::addObjects ('main', ['Designer__'. $name .'Designer' => $designers[$object->selector]]); |
|
| 27 | + VoidStudioAPI::addObjects('main', ['Designer__'.$name.'Designer' => $designers[$object->selector]]); |
|
| 28 | 28 | |
| 29 | - $formsList->items->add ($page); |
|
| 29 | + $formsList->items->add($page); |
|
| 30 | 30 | $formsList->selectedTab = $page->selector; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $parent = $parent->parent; |
| 39 | 39 | |
| 40 | 40 | if (isset ($designers[$parent->selector])) |
| 41 | - $designers[$parent->selector]->addComponent ($object->selector, $name); |
|
| 41 | + $designers[$parent->selector]->addComponent($object->selector, $name); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | catch (\Throwable $e) {} |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | protected $WinAPI; |
| 31 | 31 | |
| 32 | - public function __construct () |
|
| 32 | + public function __construct() |
|
| 33 | 33 | { |
| 34 | 34 | /** |
| 35 | 35 | * Большинство функций было взято из класса "WinAPI" проекта "DevelStudio XL" |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * |
| 41 | 41 | */ |
| 42 | 42 | |
| 43 | - $this->WinAPI = \FFI::cdef (' |
|
| 43 | + $this->WinAPI = \FFI::cdef(' |
|
| 44 | 44 | struct LPCTSTR |
| 45 | 45 | { |
| 46 | 46 | char string; |
@@ -76,25 +76,25 @@ discard block |
||
| 76 | 76 | ', 'User32.dll'); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - public function __call ($method, $args) |
|
| 79 | + public function __call($method, $args) |
|
| 80 | 80 | { |
| 81 | - if (method_exists ($this, $method)) |
|
| 82 | - return $this->$method (...$args); |
|
| 81 | + if (method_exists($this, $method)) |
|
| 82 | + return $this->$method(...$args); |
|
| 83 | 83 | |
| 84 | 84 | else try |
| 85 | 85 | { |
| 86 | - return $this->WinAPI->$method (...$args); |
|
| 86 | + return $this->WinAPI->$method(...$args); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | catch (\Throwable $e) |
| 90 | 90 | { |
| 91 | - throw new \Exception ('Method "'. $method .'" not found or return an exception. Exception info: '. "\n\n". (string) $e); |
|
| 91 | + throw new \Exception('Method "'.$method.'" not found or return an exception. Exception info: '."\n\n".(string) $e); |
|
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | - public function findWindow (string $caption, string $class = null): ?int |
|
| 95 | + public function findWindow(string $caption, string $class = null): ?int |
|
| 96 | 96 | { |
| 97 | - return $this->FindWindowA ($class, $caption); |
|
| 97 | + return $this->FindWindowA($class, $caption); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /*public function getWindowCaption (int $handle) |
@@ -6,33 +6,33 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public $class = 'System.Windows.Forms.ProgressBar'; |
| 8 | 8 | |
| 9 | - public function get_max () |
|
| 9 | + public function get_max() |
|
| 10 | 10 | { |
| 11 | - return $this->getProperty ('Maximum'); |
|
| 11 | + return $this->getProperty('Maximum'); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | - public function set_max (int $max) |
|
| 14 | + public function set_max(int $max) |
|
| 15 | 15 | { |
| 16 | - $this->setProperty ('Maximum', $max); |
|
| 16 | + $this->setProperty('Maximum', $max); |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | - public function get_min () |
|
| 19 | + public function get_min() |
|
| 20 | 20 | { |
| 21 | - return $this->getProperty ('Minimum'); |
|
| 21 | + return $this->getProperty('Minimum'); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - public function set_min (int $min) |
|
| 24 | + public function set_min(int $min) |
|
| 25 | 25 | { |
| 26 | - $this->setProperty ('Minimum', $min); |
|
| 26 | + $this->setProperty('Minimum', $min); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - public function get_position () |
|
| 29 | + public function get_position() |
|
| 30 | 30 | { |
| 31 | - return $this->getProperty ('Value'); |
|
| 31 | + return $this->getProperty('Value'); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - public function set_position (int $position) |
|
| 34 | + public function set_position(int $position) |
|
| 35 | 35 | { |
| 36 | - $this->setProperty ('Value', $position); |
|
| 36 | + $this->setProperty('Value', $position); |
|
| 37 | 37 | } |
| 38 | 38 | } |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public $class = 'System.Windows.Forms.CommonDialog'; |
| 8 | 8 | |
| 9 | - public function execute (): int |
|
| 9 | + public function execute(): int |
|
| 10 | 10 | { |
| 11 | - return $this->callMethod ('ShowDialog'); |
|
| 11 | + return $this->callMethod('ShowDialog'); |
|
| 12 | 12 | } |
| 13 | 13 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -8,11 +8,11 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | protected $items; |
| 10 | 10 | |
| 11 | - public function __construct () |
|
| 11 | + public function __construct() |
|
| 12 | 12 | { |
| 13 | - parent::__construct ($this->class); |
|
| 13 | + parent::__construct($this->class); |
|
| 14 | 14 | |
| 15 | - $this->items = new WFObject ($this->getProperty ('MenuItems')); |
|
| 15 | + $this->items = new WFObject($this->getProperty('MenuItems')); |
|
| 16 | 16 | } |
| 17 | 17 | } |
| 18 | 18 | |
@@ -22,11 +22,11 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | protected $items; |
| 24 | 24 | |
| 25 | - public function __construct () |
|
| 25 | + public function __construct() |
|
| 26 | 26 | { |
| 27 | - parent::__construct ($this->class); |
|
| 27 | + parent::__construct($this->class); |
|
| 28 | 28 | |
| 29 | - $this->items = new WFObject ($this->getProperty ('MenuItems')); |
|
| 29 | + $this->items = new WFObject($this->getProperty('MenuItems')); |
|
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | |
@@ -36,11 +36,11 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | protected $items; |
| 38 | 38 | |
| 39 | - public function __construct (string $text = '') |
|
| 39 | + public function __construct(string $text = '') |
|
| 40 | 40 | { |
| 41 | - parent::__construct (null, $this->class); |
|
| 41 | + parent::__construct(null, $this->class); |
|
| 42 | 42 | |
| 43 | 43 | $this->text = $text; |
| 44 | - $this->items = new WFObject ($this->getProperty ('MenuItems')); |
|
| 44 | + $this->items = new WFObject($this->getProperty('MenuItems')); |
|
| 45 | 45 | } |
| 46 | 46 | } |