Esempio n. 1
0
        public void Load(string path)
        {
            try
            {
                foreach (int key in _archiv.Keys)
                {
                    RemoveData(key);
                }
            }
            catch
            {
                Console.WriteLine("Archive was not yet initialized.");
            }


            StreamReader reader = File.OpenText(@path);

            string line = "";

            while ((line = reader.ReadLine()) != null)
            {
                AddData(RocniTeplota.ToRocniTeplota(line));
            }

            reader.Close();
        }
Esempio n. 2
0
 public void AddData(RocniTeplota data)
 {
     try
     {
         _archiv.Remove(data.Rok);
     }
     catch {}
     _archiv.Add(data.Rok, data);
 }