GchrConfigIO.cs 633 B

12345678910111213141516171819202122232425262728
  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.Steuerungsdateien = null;
  18. }
  19. private static GchrConfig NeueInstanz()
  20. {
  21. return new GchrConfig();
  22. }
  23. }
  24. }