func init // adds using namespace sys.add_use('System.Windows.Forms') sys.add_use('System.ComponentModel') // initialize instance sys.add_widget('PictureBox') // initialize properties sys.set_undef_field_const('BorderStyle', this.props('BorderStyle'), 'System.Windows.Forms.BorderStyle') sys.set_typed_field(20, 'ErrorImage') sys.set_typed_field(20, 'Image') sys.set_undef_field('ImageLocation') sys.set_typed_field(20, 'InitialImage') sys.set_undef_field_const('SizeMode', this.props('SizeMode'), 'System.Windows.Forms.PictureBoxSizeMode') sys.set_typed_field(104, 'WaitOnLoad') // makes implementation methods for properties sys._prop_init('BorderStyle', 1, 1, 0) sys._prop_init('ErrorImage', 1, 1, 0) sys._prop_init('Image', 1, 1, 0) sys._prop_init('ImageLocation', 1, 1, 2) sys._prop_init('ImeMode', 1, 1, 0) sys._prop_init('InitialImage', 1, 1, 0) sys._prop_init('SizeMode', 1, 1, 0) sys._prop_init('WaitOnLoad', 1, 1, 104) // makes implementation of methods as properties sys._mtd_as_prop_init('PictureBox') // makes implementation of simple methods sys._method_init('CancelAsync') sys._method_init('Load') sys._method_init('LoadAsync') // initialize events sys.add_event_type('onLoadCompleted', 'LoadCompleted', 'AsyncCompletedEvent', 'args') sys.add_event_type('onLoadProgressChanged', 'LoadProgressChanged', 'ProgressChangedEvent', 'args') sys.add_event_type('onSizeModeChanged', 'SizeModeChanged', 'Event', 'args') // initialize common events and properties include("Control-init") end func doLoad2(url) blk.println(this.codename, '.Load(', d("url"), ');') end func doLoadAsync2(url) blk.println(this.codename, '.LoadAsync(', d("url"), ');') end include("Control")