Esempio n. 1
0
 private void parseValue(string value, SettingItemCollection settings)
 {
     string[] lines = value.Split(new char[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
     if (lines != null)
     {
         foreach (string line in lines)
         {
             string temp   = line;
             bool   isAnno = false;
             if (temp.StartsWith("#"))
             {
                 isAnno = true;
                 temp   = temp.TrimStart('#');
             }
             string[] segs = temp.Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
             if (segs.Length == 2)
             {
                 settings.Add(new SettingItem(segs[0], segs[1], isAnno));
             }
         }
     }
 }
Esempio n. 2
0
 public Settings()
 {
     VideoInfoCollection = new SettingItemCollection();
     UserCollection      = new SettingItemCollection();
 }