예제 #1
0
 public void Save(DocumentWriter writer)
 {
     writer.Write(items.Count);
     foreach (var pair in items)
     {
         writer.Write(pair.Key);
         if (pair.Value is bool)
         {
             writer.Write("bool");
             writer.Write((bool)pair.Value);
         }
         else if (pair.Value is int || pair.Value is System.Enum)
         {
             writer.Write("int");
             writer.Write((int)pair.Value);
         }
         else if (pair.Value is Color)
         {
             writer.Write("color");
             writer.Write((Color)pair.Value);
         }
     }
 }
예제 #2
0
파일: Layer.cs 프로젝트: yzwbrian/SimpleCad
 public void Save(DocumentWriter writer)
 {
     writer.Write(Name);
     Style.Save(writer);
     writer.Write(Visible);
 }
예제 #3
0
 public void Save(DocumentWriter writer)
 {
     writer.Write(Name);
     writer.Write(FontFamily);
     writer.Write((int)FontStyle);
 }