Exemplo n.º 1
0
 public void Save(List <SectionIni> listSectionIni)
 {
     foreach (var item in listSectionIni)
     {
         FileWrite.WriteLine($"[{item.Name}]");
         FileWrite.Flush();
         foreach (var itemA in item.Attribute)
         {
             FileWrite.WriteLine($"{itemA.Key}={itemA.Value}");
             FileWrite.Flush();
         }
         FileWrite.WriteLine("\n");
         FileWrite.Flush();
     }
 }
Exemplo n.º 2
0
 public void Save(List <SectionRegistry> sectionRegistries)
 {
     foreach (var item in sectionRegistries)
     {
         FileWrite.WriteLine($"{Config.Get.SectionStartChar}{item.SectionName}{Config.Get.SectionEndChar}");
         FileWrite.Flush();
         foreach (var itemA in item.Get())
         {
             if (itemA.Comment != null && itemA.Comment != "")
             {
                 FileWrite.WriteLine($"{itemA.Key}{Config.Get.KeyValueChar}{itemA.Value} {Config.Get.CommentChar}{itemA.Comment}");
             }
             else
             {
                 FileWrite.WriteLine($"{itemA.Key}{Config.Get.KeyValueChar}{itemA.Value}");
             }
             FileWrite.Flush();
         }
         FileWrite.WriteLine("");
         FileWrite.Flush();
     }
 }