Exemplo n.º 1
0
        public RotationManagerForm(RotationManagerController rotationManagerController)
        {
            InitializeComponent();
            var    executableFileInfo      = new FileInfo(Application.ExecutablePath);
            string executableDirectoryName = executableFileInfo.DirectoryName;

            OurDirectory = executableDirectoryName;
            RotationSettings.LoadSettings();
            this.rotationManagerController = rotationManagerController ?? new RotationManagerController();
        }
Exemplo n.º 2
0
        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;
                }
            }
        }