func init // adds using namespace sys.add_use('System.Windows.Forms') // initialize instance sys.add_widget('MaskedTextBox') // initialize properties sys.set_typed_field(104, 'AllowPromptAsInput') sys.set_typed_field(104, 'AsciiOnly') sys.set_typed_field(104, 'BeepOnError') sys.set_typed_field(20, 'Culture') sys.set_undef_field_const('CutCopyMaskFormat', this.props('CutCopyMaskFormat'), 'System.Windows.Forms.MaskFormat') sys.set_typed_field(104, 'HidePromptOnLeave') sys.set_undef_field_const('InsertKeyMode', this.props('InsertKeyMode'), 'System.Windows.Forms.InsertKeyMode') sys.set_undef_field('Mask') sys.set_typed_field(106, 'PasswordChar') sys.set_typed_field(106, 'PromptChar') sys.set_typed_field(104, 'ReadOnly') sys.set_typed_field(104, 'RejectInputOnFirstFailure') sys.set_typed_field(104, 'ResetOnPrompt') sys.set_typed_field(104, 'ResetOnSpace') sys.set_undef_field('SelectedText') sys.set_typed_field(104, 'SkipLiterals') if(not (this.prop_Text == 'defined')) sys.set_undef_field('Text') this.setfield('prop_Text', 'defined') end sys.set_undef_field_const('TextAlign', this.props('TextAlign'), 'System.Windows.Forms.HorizontalAlignment') sys.set_undef_field_const('TextMaskFormat', this.props('TextMaskFormat'), 'System.Windows.Forms.MaskFormat') sys.set_typed_field(104, 'UseSystemPasswordChar') // makes implementation methods for properties sys._prop_init('AcceptsTab', 1, 1, 104) sys._prop_init('AllowPromptAsInput', 1, 1, 104) sys._prop_init('AsciiOnly', 1, 1, 104) sys._prop_init('BeepOnError', 1, 1, 104) sys._prop_init('CanUndo', 1, 0, 104) sys._prop_init('Culture', 1, 1, 0) sys._prop_init('CutCopyMaskFormat', 1, 1, 0) sys._prop_init('FormatProvider', 1, 1, 0) sys._prop_init('HidePromptOnLeave', 1, 1, 104) sys._prop_init('InsertKeyMode', 1, 1, 0) sys._prop_init('IsOverwriteMode', 1, 0, 104) sys._prop_init('Lines', 1, 1, 0) sys._prop_init('Mask', 1, 1, 2) sys._prop_init('MaskCompleted', 1, 0, 104) sys._prop_init('MaskedTextProvider', 1, 0, 0) sys._prop_init('MaskFull', 1, 0, 104) sys._prop_init('MaxLength', 1, 1, 1) sys._prop_init('Multiline', 1, 1, 104) sys._prop_init('PasswordChar', 1, 1, 106) sys._prop_init('PromptChar', 1, 1, 106) sys._prop_init('ReadOnly', 1, 1, 104) sys._prop_init('RejectInputOnFirstFailure', 1, 1, 104) sys._prop_init('ResetOnPrompt', 1, 1, 104) sys._prop_init('ResetOnSpace', 1, 1, 104) sys._prop_init('SelectedText', 1, 1, 2) sys._prop_init('SkipLiterals', 1, 1, 104) sys._prop_init('Text', 1, 1, 2) sys._prop_init('TextAlign', 1, 1, 0) sys._prop_init('TextLength', 1, 0, 1) sys._prop_init('TextMaskFormat', 1, 1, 0) sys._prop_init('UseSystemPasswordChar', 1, 1, 104) sys._prop_init('ValidatingType', 1, 1, 0) sys._prop_init('WordWrap', 1, 1, 104) // makes implementation of methods as properties sys._mtd_as_prop_init('GetFirstCharIndexOfCurrentLine()') sys._mtd_as_prop_init('ToString()') sys._mtd_as_prop_init('ValidateText()') sys._mtd_as_prop_init('MaskedTextBox') // makes implementation of simple methods sys._method_init('ClearUndo') sys._method_init('ScrollToCaret') sys._method_init('Undo') // initialize events sys.add_event_type('onAcceptsTabChanged', 'AcceptsTabChanged', 'Event', 'args') sys.add_event_type('onIsOverwriteModeChanged', 'IsOverwriteModeChanged', 'Event', 'args') sys.add_event_type('onMaskChanged', 'MaskChanged', 'Event', 'args') sys.add_event_type('onMaskInputRejected', 'MaskInputRejected', 'MaskInputRejectedEvent', 'args') sys.add_event_type('onMultilineChanged', 'MultilineChanged', 'Event', 'args') sys.add_event_type('onTextAlignChanged', 'TextAlignChanged', 'Event', 'args') sys.add_event_type('onTypeValidationCompleted', 'TypeValidationCompleted', 'TypeValidationEvent', 'args') // initialize common events and properties include("TextBoxBase-init") include("Control-init") end func doGetFirstCharIndexFromLine(data) if(linked("onGetFirstCharIndexFromLine")) event("onGetFirstCharIndexFromLine", this.codename + '.GetFirstCharIndexFromLine(' + d("lineNumber") + ')') else blk.println(this.codename, '.GetFirstCharIndexFromLine(', d("lineNumber"), ');') end end func doGetLineFromCharIndex(data) if(linked("onGetLineFromCharIndex")) event("onGetLineFromCharIndex", this.codename + '.GetLineFromCharIndex(' + d("index") + ')') else blk.println(this.codename, '.GetLineFromCharIndex(', d("index"), ');') end end include("TextBoxBase") include("Control")