public string EnumToString(tPTypeEnum type) { string text = ""; switch (type) { case tPTypeEnum.IP: text = "IP"; break; case tPTypeEnum.IP_SUBNET: text = "IP-SUBNET"; break; case tPTypeEnum.IP_GATEWAY: text = "IP-GATEWAY"; break; case tPTypeEnum.OSI_NSAP: text = "OSI-NSAP"; break; case tPTypeEnum.OSI_TSEL: text = "OSI-TSEL"; break; case tPTypeEnum.OSI_SSEL: text = "OSI-SSEL"; break; case tPTypeEnum.OSI_PSEL: text = "OSI-PSEL"; break; case tPTypeEnum.OSI_AP_Title: text = "OSI-AP-Title"; break; case tPTypeEnum.OSI_AP_Invoke: text = "OSI-AP-Invoke"; break; case tPTypeEnum.OSI_AE_Qualifier: text = "OSI-AE-Qualifier"; break; case tPTypeEnum.OSI_AE_Invoke: text = "OSI-AE-Invoke"; break; case tPTypeEnum.MAC_Address: text = "MAC-Address"; break; case tPTypeEnum.APPID: text = "APPID"; break; case tPTypeEnum.VLAN_PRIORITY: text = "VLAN-PRIORITY"; break; case tPTypeEnum.VLAN_ID: text = "VLAN-ID"; break; default: text = "EXTENSION"; break; } return(text); }
public tPType(tPTypeEnum t) { this.typeField = this.EnumToString(t); }