Ejemplo n.º 1
0
 public static void Save(AppSettings MooAppSettings)
 {
     //serialize the object to save
     try
     {
         using (FileStream fs = new FileStream(@"Configuration/mooconf.mco", FileMode.Open, FileAccess.Write))
         {
             BinaryFormatter bf = new BinaryFormatter();
             bf.Serialize(fs, MooAppSettings);
         }
     }
     catch (Exception e) { Exceptioner.Log(e); }
 }
Ejemplo n.º 2
0
 private void LoadAppState()
 {
     MOO_APPLICATION_SETTINGS = AppSettings.Load();
 }
Ejemplo n.º 3
0
 public static AppSettings Load()
 {
     //deserialize the object to load
     AppSettings ASObject = new AppSettings();
     try
     {
         using (FileStream fs = new FileStream(@"Configuration/mooconf.mco", FileMode.Open, FileAccess.Read))
         {
             BinaryFormatter bf = new BinaryFormatter();
             ASObject = (AppSettings)bf.Deserialize(fs);
         }
     }
     catch (Exception e) { Exceptioner.Log(e); }
     return ASObject;
 }