GchrConfigIO.cs 681 B

1234567891011121314151617181920212223242526272829
  1. using GCHR.Model;
  2. namespace GCHR.Control.IO
  3. {
  4. class GchrConfigIO : ConfigIO
  5. {
  6. public GchrConfigIO(string datei) : base(datei, typeof(GchrConfig))
  7. {
  8. }
  9. public override object Laden()
  10. {
  11. var config = (GchrConfig)DateiLaden() ?? NeueInstanz();
  12. VersionsUpdate(config);
  13. return config;
  14. }
  15. private static void VersionsUpdate(GchrConfig config)
  16. {
  17. config.Einstellungen.Update = null;
  18. config.Einstellungen.Steuerungsdateien = null;
  19. }
  20. private static GchrConfig NeueInstanz()
  21. {
  22. return new GchrConfig();
  23. }
  24. }
  25. }