func init if(linked("doSetStyle")) // adds using namespace sys.add_use('System.Security') end // initialize properties if(isdef("Control")) warning(this.name + ' - manager does not defined') else this.ctrl = sys.get_undef_manager("Control") a = this.props("AllowedEffects") flg = ((a _and_ 2) ? '|DragDropEffects.Copy' : '') + ((a _and_ 4) ? '|DragDropEffects.Move' : '') + ((a _and_ 8) ? '|DragDropEffects.Link' : '') + ((a _and_ 16) ? '|DragDropEffects.Scroll' : '') + ((a _and_ 32) ? '|DragDropEffects.All' : '') this.flags = 'DragDropEffects.None' + flg a = this.props("SkipValue") flg = ((a _and_ 2) ? '|GetChildAtPointSkip.Invisible' : '') + ((a _and_ 4) ? '|GetChildAtPointSkip.Disabled' : '') + ((a _and_ 8) ? '|GetChildAtPointSkip.Transparent' : '') this.skip = 'GetChildAtPointSkip.None' + flg end end func doSetStyle(data) blk.println('try {').inc() .println('Type type = ', this.ctrl, '.GetType();') .println('BindingFlags flags = BindingFlags.NonPublic | BindingFlags.Instance;') .println('MethodInfo method = type.GetMethod( "SetStyle", flags );') .println('if (method != null) {').inc() .println('object[] param = { ', d("flags"), ', ', d("value", 104), ' };') .println('method.Invoke(', this.ctrl, ', param);') .dec().println('}') .dec().println('}') .println('catch(SecurityException) {}') end func doContains(ctl) event("onContains", this.ctrl + '.Contains(' + d("ctl") + ')') end func doBeginInvoke(delegate) if(linked("onBeginInvoke")) event("onBeginInvoke", this.ctrl + '.BeginInvoke(' + d("delegate") + ')') else blk.println(this.ctrl, '.BeginInvoke(', d("delegate"), ');') end end func doBeginInvoke2(delegate, args) if(linked("onBeginInvoke")) event("onBeginInvoke",this.ctrl + '.BeginInvoke(' + d("delegate") + ', params ' + d("args") + ')') else blk.println(this.ctrl, '.BeginInvoke(', d("delegate"), ', params ', d("args"), ');') end end func doDoDragDrop(data, allowedEffects) if(linked("onDoDragDrop")) event("onDoDragDrop", this.ctrl + '.DoDragDrop(' + d("data") + ', ' + this.flags + ')') else blk.println(this.ctrl, '.DoDragDrop(', d("data"), ', ', this.flags, ');') end end func doDrawToBitmap(bitmap, targetBounds) blk.println(this.ctrl, '.DrawToBitmap(', d("bitmap"), ', ', d("targetBounds"), ');') end func doEndInvoke(asyncResult) if(linked("onEndInvoke")) event("onEndInvoke", this.ctrl + '.EndInvoke(' + d("asyncResult") + ')') else blk.println(this.ctrl, '.EndInvoke(', d("asyncResult"), ');') end end func doSetBounds(x, y, width, height) blk.println(this.ctrl, '.SetBounds(', d("x"), ', ', d("y"), ', ', d("width"), ', ', d("height"), ');') end func doSetBounds2(x, y, width, height, specified) blk.println(this.ctrl, '.SetBounds(', d("x"), ', ', d("y"), ', ', d("width"), ', ', d("height"), ', ', d("specified"), ');') end func doGetChildAtPoint(pt) event("onGetChildAtPoint", this.ctrl + '.GetChildAtPoint(' + d("pt") + ')') end func doGetChildAtPoint2(pt, skipValue) event("onGetChildAtPoint", this.ctrl + '.GetChildAtPoint(' + d("pt") + ', ' + this.skip + ')') end func doGetNextControl(ctl, forward) if(linked("onGetNextControl")) event("onGetNextControl", this.ctrl + '.GetNextControl(' + d("ctl") + ', ' + d("forward") + ')') else blk.println(this.ctrl, '.GetNextControl(', d("ctl"), ', ', d("forward"), ');') end end func doInvalidate(child) blk.println(this.ctrl, '.Invalidate(', d("child"), ');') end func doInvalidate2(rect) blk.println(this.ctrl, '.Invalidate(', d("rect"), ');') end func doInvalidate3(region) blk.println(this.ctrl, '.Invalidate(', d("region"), ');') end func doInvalidate4(rect, child) blk.println(this.ctrl, '.Invalidate(', d("rect"), ', ', d("child"), ');') end func doInvalidate5(region, child) blk.println(this.ctrl, '.Invalidate(', d("region"), ', ', d("child"), ');') end func doInvoke(delegate) if(linked("onInvoke")) event("onInvoke", this.ctrl + '.Invoke(' + d("delegate") + ')') else blk.println(this.ctrl + '.Invoke(', d("delegate"), ');') end end func doInvoke2(delegate, args) if(linked("onInvoke")) event("onInvoke", this.ctrl + '.Invoke(' + d("delegate") + ', ' + "params " + d("args") + ')') else blk.println(this.ctrl + '.Invoke(', d("delegate") + ', ' + "params " + d("args"), ');') end end func doSelectNextControl(ctl, forward, tabStopOnly, nested, wrap) if(linked("onSelectNextControl")) event("onSelectNextControl", this.ctrl + '.SelectNextControl(' + d("ctl") + ', ' + d("forward") + ', ' + d("tabStopOnly") + ', ' + d("nested") + ', ' + d("wrap") + ')') else blk.println(this.ctrl, '.SelectNextControl(', d("ctl"), ', ', d("forward"), ', ', d("tabStopOnly"), ', ', d("nested"), ', ', d("wrap"), ');') end end func doIsMnemonic(charCode, src) event("onIsMnemonic", 'Control.IsMnemonic(' + d("charCode") + ', ' + d("src") + ')') end func doPerformLayout(ctl, property) blk.println(this.ctrl, '.PerformLayout(', d("ctl"), ', ', d("property"), ');') end func doScale(ratio) blk.println(this.ctrl, '.Scale(', d("ratio"), ');') end func doScale2(factor) blk.println(this.ctrl, '.Scale(', d("factor"), ');') end func doScale3(dx, dy) blk.println(this.ctrl, '.Scale(', d("dx"), ', ', d("dy"), ');') end func doFromChildHandle(handle) event("onFromChildHandle", 'Control.FromChildHandle(' + d("handle") + ')') end func doFromHandle(handle) event("onFromHandle", 'Control.FromHandle(' + d("handle") + ')') end func doResumeLayout2(performLayout) blk.println(this.ctrl, '.ResumeLayout(', d("performLayout"), ');') end func doRectangleToScreen(rect) event("onRectangleToScreen", this.ctrl + '.RectangleToScreen(' + d("rect") + ')') end func doRectangleToClient(rect) event("onRectangleToClient", this.ctrl + '.RectangleToClient(' + d("rect") + ')') end func doPreProcessMessage(msg) if(linked("onPreProcessMessage")) event("onPreProcessMessage", this.ctrl + '.PreProcessMessage(' + d("msg") + ')') else blk.println(this.ctrl + '.PreProcessMessage(', d("msg"), ');') end end func doPreProcessControlMessage(msg) event("onPreProcessControlMessage", this.ctrl + '.PreProcessControlMessage(' + d("msg") + ')') end func doPointToScreen(pt) event("onPointToScreen", this.ctrl + '.PointToScreen(' + d("pt") + ')') end func doPointToClient(pt) event("onPointToClient", this.ctrl + '.PointToClient(' + d("pt") + ')') end func doGetPreferredSize(proposedSize) event("onGetPreferredSize", this.ctrl + '.GetPreferredSize(' + d("proposedSize") + ')') end func doIsKeyLocked(keyVal) event("onIsKeyLocked", 'Control.IsKeyLocked(Keys.' + this.props("KeyVal").value + ')') end // methods of properties func Control return(this.ctrl) end func CreateGraphics return(this.ctrl + '.CreateGraphics()') end func FindForm return(this.ctrl + '.FindForm()') end func Focus return(this.ctrl + '.Focus()') end func GetContainerControl return(this.ctrl + '.GetContainerControl()') end func AccessibilityObject return(this.ctrl + '.AccessibilityObject') end func AccessibleDefaultActionDescription return(this.ctrl + '.AccessibleDefaultActionDescription') end func AccessibleDescription return(this.ctrl + '.AccessibleDescription') end func AccessibleName return(this.ctrl + '.AccessibleName') end func AccessibleRole return(this.ctrl + '.AccessibleRole') end func AllowDrop return(this.ctrl + '.AllowDrop') end func Anchor return(this.ctrl + '.Anchor') end func AutoScrollOffset return(this.ctrl + '.AutoScrollOffset') end func BackColor return(this.ctrl + '.BackColor') end func BackgroundImage return(this.ctrl + '.BackgroundImage') end func BackgroundImageLayout return(this.ctrl + '.BackgroundImageLayout') end func BindingContext return(this.ctrl + '.BindingContext') end func Bottom return(this.ctrl + '.Bottom') end func Bounds return(this.ctrl + '.Bounds') end func CanFocus return(this.ctrl + '.CanFocus') end func CanSelect return(this.ctrl + '.CanSelect') end func Capture return(this.ctrl + '.Capture') end func CausesValidation return(this.ctrl + '.CausesValidation') end func CheckForIllegalCrossThreadCalls return('Control.CheckForIllegalCrossThreadCalls') end func ClientRectangle return(this.ctrl + '.ClientRectangle') end func ClientSize return(this.ctrl + '.ClientSize') end func CompanyName return(this.ctrl + '.CompanyName') end func ContainsFocus return(this.ctrl + '.ContainsFocus') end func ContextMenu return(this.ctrl + '.ContextMenu') end func ContextMenuStrip return(this.ctrl + '.ContextMenuStrip') end func Controls return(this.ctrl + '.Controls') end func Created return(this.ctrl + '.Created') end func Cursor return(this.ctrl + '.Cursor') end func DataBindings return(this.ctrl + '.DataBindings') end func DefaultBackColor return('Control.DefaultBackColor') end func DefaultFont return('Control.DefaultFont') end func DefaultForeColor return('Control.DefaultForeColor') end func DisplayRectangle return(this.ctrl + '.DisplayRectangle') end func Disposing return(this.ctrl + '.Disposing') end func Dock return(this.ctrl + '.Dock') end func Enabled return(this.ctrl + '.Enabled') end func Focused return(this.ctrl + '.Focused') end func Font return(this.ctrl + '.Font') end func ForeColor return(this.ctrl + '.ForeColor') end func Handle return(this.ctrl + '.Handle') end func HasChildren return(this.ctrl + '.HasChildren') end func Height return(this.ctrl + '.Height') end func ImeMode return(this.ctrl + '.ImeMode') end func InvokeRequired return(this.ctrl + '.InvokeRequired') end func IsAccessible return(this.ctrl + '.IsAccessible') end func IsDisposed return(this.ctrl + '.IsDisposed') end func IsHandleCreated return(this.ctrl + '.IsHandleCreated') end func IsMirrored return(this.ctrl + '.IsMirrored') end func LayoutEngine return(this.ctrl + '.LayoutEngine') end func Left return(this.ctrl + '.Left') end func Location return(this.ctrl + '.Location') end func Margin return(this.ctrl + '.Margin') end func MaximumSize return(this.ctrl + '.MaximumSize') end func MinimumSize return(this.ctrl + '.MinimumSize') end func ModifierKeys return('Control.ModifierKeys') end func MouseButtons return('Control.MouseButtons') end func MousePosition return('Control.MousePosition') end func Name return(this.ctrl + '.Name') end func Padding return(this.ctrl + '.Padding') end func Parent return(this.ctrl + '.Parent') end func PreferredSize return(this.ctrl + '.PreferredSize') end func ProductName return(this.ctrl + '.ProductName') end func ProductVersion return(this.ctrl + '.ProductVersion') end func RecreatingHandle return(this.ctrl + '.RecreatingHandle') end func Region return(this.ctrl + '.Region') end func Right return(this.ctrl + '.Right') end func RightToLeft return(this.ctrl + '.RightToLeft') end func Site return(this.ctrl + '.Site') end func Size return(this.ctrl + '.Size') end func TabIndex return(this.ctrl + '.TabIndex') end func TabStop return(this.ctrl + '.TabStop') end func Tag return(this.ctrl + '.Tag') end func Text return(this.ctrl + '.Text') end func Top return(this.ctrl + '.Top') end func TopLevelControl return(this.ctrl + '.TopLevelControl') end func UseWaitCursor return(this.ctrl + '.UseWaitCursor') end func Visible return(this.ctrl + '.Visible') end func Width return(this.ctrl + '.Width') end