func init // adds using namespace sys.add_use('System.Windows.Forms') sys.add_use('System.ComponentModel') // initialize a member if(not isdef('Name')) sys.add_var(this.name, 'MessageBoxOptions') blk_init.println(this.codename, ' = ', this.MessageBoxOptions(), ';') end // initialize parser sys._se_init('Parse', 'MessageBoxOptions', 'MessageBoxOptions') end func _se_make(value) return('(MessageBoxOptions)Enum.Parse(typeof(MessageBoxOptions), ' + d('Value') + ')') end func doMembers() blk.println('foreach (object item in TypeDescriptor.GetConverter(typeof(MessageBoxOptions)).GetStandardValues()) {').inc() event('onMembers', 'item') blk.dec().println('}') end func MessageBoxOptions() v = this.props('MessageBoxOptions').value flags = ((v _and_ 1) ? '|MessageBoxOptions.ServiceNotification' : '') + ((v _and_ 2) ? '|MessageBoxOptions.DefaultDesktopOnly' : '') + ((v _and_ 4) ? '|MessageBoxOptions.RightAlign' : '') + ((v _and_ 8) ? '|MessageBoxOptions.RtlReading' : '') return('(0' + flags + ')') end