예제 #1
0
 public static StyleFactory LoadFromFile(string fileName)
 {
     StyleFactory result = new StyleFactory();
     Memento styles = Memento.ReadFromFile(fileName);
     foreach (Memento s in styles.Children)
     {
         ShapeStyle newStyle = ShapeStyle.CreateFromMemento(s);
         result.Add(newStyle.Name, newStyle);
     }
     return result;
 }