public RotationManagerForm(RotationManagerController rotationManagerController) { InitializeComponent(); var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; OurDirectory = executableDirectoryName; RotationSettings.LoadSettings(); this.rotationManagerController = rotationManagerController ?? new RotationManagerController(); }
private void RotatorFormLoad(object sender, EventArgs e) { var executableFileInfo = new FileInfo(Application.ExecutablePath); string executableDirectoryName = executableFileInfo.DirectoryName; OurDirectory = executableDirectoryName; RotationSettings.LoadSettings(); if (RotationManagerController == null) { if (File.Exists(OurDirectory + "\\Rotations\\" + RotationSettings.LoadedRotationManager + ".xml")) { RotationManagerController = new RotationManagerController(); RotationManagerController.Load(OurDirectory + "\\Rotations\\" + RotationSettings.LoadedRotationManager + ".xml"); } else { Logging.Write("Could not load the rotation manager"); RotationManagerController = null; } } }