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