Esempio n. 1
0
 public void LoadConfigFromXml(string path)
 {
     if (!File.Exists(path))
     {
         if (path == null)
         {
             path = "Config/GifDrawingConfig.xml";
         }
         path = Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, path);
         if (!File.Exists(path))
         {
             return;
         }
     }
     try
     {
         using (var fs = new FileStream(path, FileMode.Open))
         {
             var xmldes = new XmlSerializer(typeof(DrawingConfig));
             var config = (DrawingConfig)xmldes.Deserialize(fs);
             _drawingPickerInfo = config._drawingPickerInfo;
         }
     }
     catch (Exception ex)
     {
         Trace.WriteLine(ex.ToString());
     }
 }
Esempio n. 2
0
 public DrawingConfig()
 {
     DrawingPickerInfo = new DrawingPickerInfo();
 }