Esempio n. 1
0
        public WL GetWLInfo(string urlOptionalPart)
        {
            WL winloses = new WL();
            Task <HttpResponseMessage> t = _client.GetAsync(_client.BaseAddress + "players/" + urlOptionalPart);

            if (t.Result.IsSuccessStatusCode)
            {
                string result = t.Result.Content.ReadAsStringAsync().Result;
                winloses = JsonConvert.DeserializeObject <WL>(result);
            }
            return(winloses);
        }
Esempio n. 2
0
    void sort_(List <WL> n, List <entryToAdd> e)
    {
        for (int i = 0; i < n.Count; i++)
        {
            for (int j = i + 1; j < n.Count; j++)
            {
                if (n[j].score > n[i].score)
                {
                    WL temp = n[j];
                    n[j] = n[i];
                    n[i] = temp;

                    entryToAdd w = e[j];
                    e[j] = e[i];
                    e[i] = w;
                }
            }
        }
    }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Console.Write("Source WL: ");
            string f  = Console.ReadLine();
            WL     wl = IO.load(f);

            Console.Write("A: ");
            string a = Console.ReadLine();

            Console.Write("B: ");
            string b = Console.ReadLine();

            Console.Write("C: ");
            string c  = Console.ReadLine();
            string t0 = Path.GetTempFileName();

            Console.Write("PAQ1: ");
            string paq1 = Console.ReadLine();

            Console.Write("PAQ8P: ");
            string paq8p = Console.ReadLine();

            Console.Write("PAQ9A: ");
            string paq9a = Console.ReadLine();
            Stream s     = File.Open(t0, FileMode.Create, FileAccess.Write);

            foreach (Item i in wl)
            {
                i.write(s);
            }
            s.Close();
            Process.Start(paq1, $"\"{a}\" \"{t0}\"");
            Process.Start(paq8p, $"\"{b}\" \"{t0}\"").WaitForExit();
            File.Move(b + ".paq8p", b);
            Process.Start(paq9a, $"a \"{c}\" \"{t0}\"");
        }
Esempio n. 4
0
 public void Send(WL.Packet packet)
 {
     Byte[] array = packet.ToArray();
     stream.Write(array, 0, array.Length);
     stream.Flush();
 }