четверг, 22 октября 2009 г.

.Net Control-ы для Intouch 10 +

Графические символы дбавленые в 10ом интаче вещь красивая но с ними добавили возможность использования .Net Control! На официальном форуме даже есть рекомендации по их использованию :)
Цитата с оф. форума:
Rickard Norin
I am not aware of any official guidelies. The best thing for you to do is probably to familiarize with the QuickScript.NET scripting language and the ArchestrA datatypes.
These impose a few limitations. The most obvious that come to mind are:


Scripting is not capable of catching exceptions. Catch exceptions internally and expose possible exception messages as a string property of the class.


Scripting does not fare well with some data relationships. For instance, it is not possible to do recusive script calls to traverse a hiearchical structure as the nodes collection of a TreeView. The parsing of such data has to be built into the control.


Scripting is, as far as I know, incapable of generics. This means that you have to use explicit datatypes as avoid properties of types like ObservableCollection or List.

As far as I know, only controls inheriting from System.Windows.Forms.Control namespace are valid. Using Windows Presentation Foundation (System.Windows.Controls namespace) is probably out of the picture.

Other than that, I think that most things are ok. As a scripting language as opposed to programming language (if there is such a distinction =), I find QuickScript.NET very capable. There is a very nice data binding and event subscription implementation for controls.

You can also import %WinDir%\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll and see what you can do with the standard controls out of the box. This will give you some ideas of how controls behave in the ArchestrA symbols.


Но ... ипортировать все контролы сразу я считаю не самая хорошая идя, всетаки их больше 50 , да и работать будут не все :) лучше уж взять и написать потомка от нужного заодно дописав немного функционала Smile например нужные вещи вывести в свойства ... события например данные не все возвращают нормально ...

Например недавно писал потомка TreeView для меню в Интаче... очень красиво получилось ... опишу в следующий раз наверное