public void Load() { var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; OurDirectory = executableDirectoryName; FlyingSettings.LoadSettings(); CurrentMode = Mode.Normal; if (!string.IsNullOrEmpty(FlyingSettings.Profile) && File.Exists(FlyingSettings.Profile)) { CurrentProfile = new FlyingProfile(); CurrentProfile.LoadFile(FlyingSettings.Profile); } else { CurrentProfile = null; Logging.Write("Could not load a valid flying profile"); } }
public bool LoadProfile(string path) { return(CurrentProfile.LoadFile(path)); }