Esempio n. 1
0
 public void Read(string filename)
 {
     try
     {
         dict.Clear();
         var lines = File.ReadAllLines(filename);
         foreach (var item in lines)
         {
             var tokens = item.Split(',');
             var c      = Color.FromArgb(Convert.ToInt32(tokens[1]));
             int width  = Convert.ToInt32(tokens[2]);
             var s      = new SeriesSettings(c, width);
             dict.Add(tokens[0], s);
         }
     }
     catch (Exception e)
     {
         System.Windows.Forms.MessageBox.Show(e.Message);
         File.Delete(filename);
     }
 }
Esempio n. 2
0
        public void Add(string label, Color c, int width = 1)
        {
            SeriesSettings s = new SeriesSettings(c, width);

            dict.Add(label, s);
        }