示例#1
0
 public static void LoadLibs()
 {
     try
     {
         using (var sr = new StreamReader(MUI_LIB_FILENAME))
         {
             while (!sr.EndOfStream)
             {
                 var NewLine = sr.ReadLine();
                 var Strings = NewLine.Split((char)31);
                 // Fallback option for manual edits. Clever!
                 if (Strings.Length == 1)
                 {
                     Strings = NewLine.Split('|');
                 }
                 int ArrayElementNumber = 1;
                 foreach (Dictionary <string, string> Lib in Libs)
                 {
                     if (Lib.ContainsKey(Strings[0]))
                     {
                         Lib[Strings[0]] = Strings[ArrayElementNumber];
                     }
                     else
                     {
                         Lib.Add(Strings[0], Strings[ArrayElementNumber]);
                     }
                     ArrayElementNumber++;
                 }
             }
         }
     }
     catch
     { }
 }
示例#2
0
    public static void Main(String[] args)
    {
        LogLine("Test add (33, 79) : {}", Lib.Add(33, 79));
        LogLine("Test mul (153842372, 101743999) : {}", Lib.Mult(153842372, 101743999));
        LogLine("Test mul (-333, 1) : {}", Lib.Mult(-333, 1));
        LogLine("The usize value is represented in {} bytes.", Lib.GetUsizeLength());

        const ulong len = 20;

        LogLine("Test Init!");
        Lib.Init(len);
        LogLine("Init done!");

        var sets = new (ulong i, int v)[] { (1, 3), (2, 1), (3, 7) };