Beispiel #1
0
        /// <summary>
        /// Instantiates a new instance of the <see cref="MethodEditor"/> class
        /// </summary>
        /// <param name="parentManager"></param>
        /// <param name="specialCharacters"></param>
        /// <param name="help"></param>
        public MethodEditor(MacroManager parentManager, SpecialCharacters specialCharacters, Help help)
        {
            InitializeComponent();

            this._macroManager = parentManager;
            this._specialCharacters = specialCharacters;
            this._help = help;
            this._methodRegister = new MacroMethodRegister();
        }
Beispiel #2
0
        /// <summary>
        /// Instantiates a new instance of the <see cref="MacroManager"/> class
        /// </summary>
        /// <param name="buddyEnabled">
        /// Specifies whether macros allow RebornBuddy functionality. Passing true
        /// when Ennerbot is not being run under the context of a RebornBuddy plugin
        /// will cause the program to throw
        /// </param>
        /// <param name="testMode">
        /// Test mode will use a different set of execution logic that will not actually
        /// send messages to the FFXIV client
        /// </param>
        public MacroManager(bool buddyEnabled, bool testMode)
        {
            this.InitializeComponent();

            this._buddyEnabled = buddyEnabled;
            this._testMode = testMode;

            this._currentFile = null;
            this._windowFactory = new ArrWindowFactory(new WindowFactory());
            this._help = new Help();
            this._specialCharacters = new SpecialCharacters();
            this._methodEditor = new MethodEditor(this, this._specialCharacters, this._help);
            this._windowPicker = new WindowPicker();
            this._windowPicker.OnWindowSelected += title => this.UpdateClient((new WindowFactory()).HookWindowByCaption(title));

            this.saveFileDialog.InitialDirectory = Application.StartupPath;
        }