Changes for Xylem Nanjing, ver. 3.1.1676

This commit is contained in:
Milan Hanajik
2021-06-18 15:35:46 +02:00
parent f1ef16e1a3
commit 827a9f7c58
837 changed files with 46518 additions and 5851 deletions
+18 -2
View File
@@ -260,7 +260,7 @@ namespace TBF
if (combined) return wmNr1;
int wmPartNr = 1 + (wmNr1 - 1) / Config.Data.LineSize;
int wmPartNr = 1 + (wmNr1 - 1) / Common.Data.LineSize;
return wmPartNr;
}
@@ -316,7 +316,7 @@ namespace TBF
}
else if (significantDigits <= 5)
{
string fmt = Config.Utils.SignificantDigitsToFmt(value, significantDigits);
string fmt = Common.Utils.SignificantDigitsToFmt(value, significantDigits);
return altCulture ? value.ToString(fmt, Program.AltCulture) : value.ToString(fmt);
}
else
@@ -335,6 +335,22 @@ namespace TBF
(route & 0xFFFF).ToString("X4")); /// 5
}
public static string ToBin88(UInt128 route)
{
return string.Format("{0}-{1}-{2}---{3}-{4}-{5}-{6}---{7}-{8}-{9}-{10}",
ToBin8((route >> 80) & 0xFF), /// 0
ToBin8((route >> 72) & 0xFF), /// 1
ToBin8((route >> 64) & 0xFF), /// 2
ToBin8((route >> 56) & 0xFF), /// 3
ToBin8((route >> 48) & 0xFF), /// 4
ToBin8((route >> 40) & 0xFF), /// 5
ToBin8((route >> 32) & 0xFF), /// 6
ToBin8((route >> 24) & 0xFF), /// 7
ToBin8((route >> 16) & 0xFF), /// 8
ToBin8((route >> 8) & 0xFF), /// 9
ToBin8(route & 0xFF)); /// 10
}
public static string ToBin40(UInt64 val)
{
return string.Format("{0}-{1}-{2}-{3}-{4}", ToBin8((val >> 32) & 0xFF),