func init // adds using namespace sys.add_use('System.Security.AccessControl') sys.add_use('System.ComponentModel') // initialize a member if(not isdef('Name')) sys.add_var(this.name, 'RegistryRights') blk_init.println(this.codename, ' = ', this.RegistryRights(), ';') end // initialize parser sys._se_init('Parse', 'RegistryRights', 'RegistryRights') end func _se_make(value) return('(RegistryRights)Enum.Parse(typeof(RegistryRights), ' + d('Value') + ')') end func doMembers() blk.println('foreach (object item in TypeDescriptor.GetConverter(typeof(RegistryRights)).GetStandardValues()) {').inc() event('onMembers', 'item') blk.dec().println('}') end func RegistryRights() v = this.props('RegistryRights').value flags = ((v _and_ 1) ? '|RegistryRights.QueryValues' : '') + ((v _and_ 2) ? '|RegistryRights.SetValue' : '') + ((v _and_ 4) ? '|RegistryRights.CreateSubKey' : '') + ((v _and_ 8) ? '|RegistryRights.EnumerateSubKeys' : '') + ((v _and_ 16) ? '|RegistryRights.Notify' : '') + ((v _and_ 32) ? '|RegistryRights.CreateLink' : '') + ((v _and_ 64) ? '|RegistryRights.ExecuteKey' : '') + ((v _and_ 128) ? '|RegistryRights.ReadKey' : '') + ((v _and_ 256) ? '|RegistryRights.WriteKey' : '') + ((v _and_ 512) ? '|RegistryRights.Delete' : '') + ((v _and_ 1024) ? '|RegistryRights.ReadPermissions' : '') + ((v _and_ 2048) ? '|RegistryRights.ChangePermissions' : '') + ((v _and_ 4096) ? '|RegistryRights.TakeOwnership' : '') + ((v _and_ 8192) ? '|RegistryRights.FullControl' : '') return('(0' + flags + ')') end