Utils: Add PhoneNrTypes
This commit is contained in:
@ -48,6 +48,16 @@ namespace Elwig.Helpers {
|
||||
[GeneratedRegex(@"^(.*?) +([0-9].*)$", RegexOptions.Compiled)]
|
||||
private static partial Regex GeneratedAddressRegex();
|
||||
|
||||
public static readonly KeyValuePair<string, string>[] PhoneNrTypes = [
|
||||
new("landline", "Tel.-Nr. (Festnetz)"),
|
||||
new("mobile", "Tel.-Nr. (mobil)"),
|
||||
new("fax", "Fax-Nr."),
|
||||
];
|
||||
|
||||
public static string PhoneNrTypeToString(string type) {
|
||||
return PhoneNrTypes.Where(t => t.Key == type).Select(t => t.Value).FirstOrDefault(type);
|
||||
}
|
||||
|
||||
private static readonly ushort[] Crc16ModbusTable = {
|
||||
0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241,
|
||||
0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440,
|
||||
|
Reference in New Issue
Block a user