Пример #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();
        }
Пример #2
0
 private void LoadBehavior()
 {
     rotationManagerController = new RotationManagerController();
     ClearTree(BeRotations);
     rotationManagerController.Load(OurDirectory + "\\Rotations\\" + BeTBSelectBehavior.SelectedItem + ".xml");
     foreach (Rotation rule in rotationManagerController.Rotations)
     {
         AddCondition(rule, BeRotations);
     }
     BeTabs.Enabled            = true;
     BeBarRuleModifier.Enabled = true;
     RotationSettings.LoadedRotationManager = BeTBSelectBehavior.SelectedItem.ToString();
     RotationSettings.SaveSettings();
 }
Пример #3
0
 private void Save()
 {
     if (rotationManagerController.Name != string.Empty)
     {
         rotationManagerController.ResetControllers();
         foreach (Node node in BeRotations.Nodes)
         {
             var rotation = (Rotation)node.Tag;
             // rule.Priority = node.Index;
             rotationManagerController.Rotations.Add(rotation);
         }
         rotationManagerController.Save();
         RotationSettings.LoadedRotationManager = BeTBSelectBehavior.SelectedItem.ToString();
         RotationSettings.SaveSettings();
     }
 }
Пример #4
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;
                }
            }
        }
Пример #5
0
 private void BehaviorFormFormClosing(object sender, FormClosingEventArgs e)
 {
     PveBehaviorSettings.AllowScripts = BtnAllowScripts.Checked;
     RotationSettings.SaveSettings();
 }