Esempio n. 1
0
        public static void ReadContracts(string path)
        {
            string text = InfoFromFile.GetTextFile(path);

            string[] clients = text.Split('\n');
            foreach (var client in clients)
            {
                string firstName = client.Split('|')[0];
                string lastName  = client.Split('|')[1];
                ATS.AddContract(firstName, lastName);
            }
        }
Esempio n. 2
0
 public void ReadEvents(string path)
 {
     GenerateCallEvent += GenerateCall;
     string[] calls = InfoFromFile.GetTextFile(path).Split('\n');
     foreach (var call in calls)
     {
         string[] stringPorts = call.Split('|');
         int      port0       = Int32.Parse(stringPorts[0]);
         int      port1       = Int32.Parse(stringPorts[1]);
         if (GenerateCallEvent != null)
         {
             GenerateCallEvent(port0, port1);
         }
     }
 }