Exemplo n.º 1
0
 private void writeSection(StreamWriter writer, CuiSection section)
 {
     writer.WriteLine("[{0}]", section.Name);
       //Write properties
       foreach (KeyValuePair<String, String> prop in section.Properties)
      writer.WriteLine("{0}={1}", prop.Key, prop.Value);
 }
Exemplo n.º 2
0
        private void readCuiSection(StreamReader reader, String sectionName)
        {
            CuiSection section = new CuiSection();
              section.Name = sectionName;

              while (!reader.EndOfStream)
              {
             if (reader.Peek() == '[')
            break;

             String line = reader.ReadLine();
             if (propertyPattern.IsMatch(line))
             {
            String[] propSplit = propertyPattern.Split(line);
            section.SetProperty(propSplit[1], propSplit[2]);
             }
              }
              this.otherSections.Add(section);
        }