private void LoadFromFile() { AsteroidFieldOptions options = UtilityCore.ReadOptions <AsteroidFieldOptions>(FILE) ?? new AsteroidFieldOptions(); this.NumStartingObjects = options.NumStaringObjects ?? NumberOfStartingObjects.Normal; this.OctreeShowLines = options.OctreeShowLines ?? false; this.OctreeCentersDrift = options.OctreeCentersDrift ?? true; this.ShowStars = options.ShowStars ?? true; }
private void SaveToFile() { AsteroidFieldOptions options = new AsteroidFieldOptions(); options.NumStaringObjects = this.NumStartingObjects; options.OctreeShowLines = this.OctreeShowLines; options.OctreeCentersDrift = this.OctreeCentersDrift; options.ShowStars = this.ShowStars; UtilityCore.SaveOptions(options, FILE); }