Example #1
0
        public void InitializePlugin(PluginComponentManager pm)
        {
            PluginEvents events = new PluginEvents();

            events.GameLoaded = OnGameLoaded;
            pm.RegisterPlugin(this, events);
        }
        public void InitializePlugin(PluginComponentManager pm)
        {
            PluginEvents events = new PluginEvents();

            events.GameLoaded = OnGameLoaded;
            pm.RegisterPlugin(this, events);

            EchoesXml = db.EchoesXml;
            DoEchoList();
            this.Enabled = false;
        }
Example #3
0
        public void ReleasePlugin()
        {
            this.LevelIndexGear.IndexTranslator -= new WillowTree.CustomControls.WTSlideSelector.SlideIndexTranslator(Util.LevelTranslator);
            this.QualityGear.IndexTranslator    -= new WillowTree.CustomControls.WTSlideSelector.SlideIndexTranslator(Util.QualityTranslator);

            pluginManager = null;
            HighlightFont = null;
            CurrentWSG    = null;

            GearTL = null;
        }
 public void ReleasePlugin()
 {
     pluginManager      = null;
     CurrentWSG         = null;
     SkillsAllXml       = null;
     SkillsCommonXml    = null;
     SkillsBerserkerXml = null;
     SkillsSoldierXml   = null;
     SkillsSirenXml     = null;
     SkillsHunterXml    = null;
 }
Example #5
0
        public void ReleasePlugin()
        {
            this.QualityLocker.IndexTranslator      -= new WillowTree.CustomControls.WTSlideSelector.SlideIndexTranslator(Util.QualityTranslator);
            this.LevelIndexLocker.IndexTranslator   -= new WillowTree.CustomControls.WTSlideSelector.SlideIndexTranslator(Util.LevelTranslator);
            this.LevelIndexOverride.IndexTranslator -= new WillowTree.CustomControls.WTSlideSelector.SlideIndexTranslator(Util.LevelTranslator);
            this.QualityOverride.IndexTranslator    -= new WillowTree.CustomControls.WTSlideSelector.SlideIndexTranslator(Util.QualityTranslator);

            pluginManager = null;
            HighlightFont = null;

            LockerTL = null;
            db.OpenedLockerFilename(null);
        }
        public void InitializePlugin(PluginComponentManager pm)
        {
            PluginEvents events = new PluginEvents();

            events.PluginSelected   = OnPluginSelected;
            events.PluginUnselected = OnPluginUnselected;
            pm.RegisterPlugin(this, events);

#if !DEBUG
            // Only check for new version if it's not a debug build.
            ThreadPool.QueueUserWorkItem(CheckVersion);
#endif
            UpdateButton.Hide();
        }
Example #7
0
        public void InitializePlugin(PluginComponentManager pm)
        {
            PluginEvents events = new PluginEvents();

            events.GameLoaded    = OnGameLoaded;
            events.GameSaving    = OnGameSaving;
            events.PluginCommand = OnPluginCommand;
            pm.RegisterPlugin(this, events);

            pluginManager = pm;

            // The index translators control the caption that goes over the top of each
            // level or quality SlideSelector.  Attach each translator then signal the
            // value changed event to cause the translator to update the caption.
            this.QualityLocker.IndexTranslator      += new WillowTree.CustomControls.WTSlideSelector.SlideIndexTranslator(Util.QualityTranslator);
            this.LevelIndexLocker.IndexTranslator   += new WillowTree.CustomControls.WTSlideSelector.SlideIndexTranslator(Util.LevelTranslator);
            this.LevelIndexOverride.IndexTranslator += new WillowTree.CustomControls.WTSlideSelector.SlideIndexTranslator(Util.LevelTranslator);
            this.QualityOverride.IndexTranslator    += new WillowTree.CustomControls.WTSlideSelector.SlideIndexTranslator(Util.QualityTranslator);
            this.LevelIndexLocker.OnValueChanged(EventArgs.Empty);
            this.QualityLocker.OnValueChanged(EventArgs.Empty);
            this.LevelIndexOverride.OnValueChanged(EventArgs.Empty);
            this.QualityOverride.OnValueChanged(EventArgs.Empty);

            HighlightFont = new Font(LockerTree.Font, FontStyle.Italic | FontStyle.Bold);

            ImportAllFromItems.Enabled   = false;
            ImportAllFromWeapons.Enabled = false;

            LockerTL = new InventoryTreeList(LockerTree, db.LockerList);

            string lockerFilename = db.OpenedLockerFilename();

            if (!System.IO.File.Exists(lockerFilename))
            {
                db.OpenedLockerFilename(db.DataPath + "default.xml");
            }

            try
            {
                LoadLocker(db.OpenedLockerFilename());
                LockerTL.UpdateTree();
            }
            catch (ApplicationException)
            {
                MessageBox.Show("The locker file \"" + db.OpenedLockerFilename() + " could not be loaded.  It may be corrupt.  If you delete or rename it the program will make a new one and you may be able to start the program successfully.  Shutting down now.");
                Application.Exit();
                return;
            }
        }
        /// <summary>
        /// The plugin manager or application will call this to let the
        /// plugin know that the application is ready for the plugin to
        /// request registration for any plugin events it requires.
        /// </summary>
        // Required method to implement the IPlugin interface
        public void InitializePlugin(PluginComponentManager pm)
        {
            // Register for plugin events.
            // Leave any that the plugin doesn't need null
            PluginEvents events = new PluginEvents();

            events.GameLoaded       = GameLoaded;
            events.GameLoading      = GameLoading;
            events.GameSaving       = GameSaving;
            events.GameSaved        = GameSaved;
            events.PluginSelected   = PluginSelected;
            events.PluginUnselected = PluginUnselected;
            pm.RegisterPlugin(this, events);

            // If the plugin needs any other initialization
            // it should be done here.
        }
        public void InitializePlugin(PluginComponentManager pm)
        {
            PluginEvents events = new PluginEvents();

            events.GameLoaded = OnGameLoaded;
            pm.RegisterPlugin(this, events);

            pluginManager      = pm;
            SkillsAllXml       = db.SkillsAllXml;
            SkillsCommonXml    = db.SkillsCommonXml;
            SkillsBerserkerXml = db.SkillsBerserkerXml;
            SkillsSoldierXml   = db.SkillsSoldierXml;
            SkillsSirenXml     = db.SkillsSirenXml;
            SkillsHunterXml    = db.SkillsHunterXml;

            this.Enabled = false;
        }
Example #10
0
        public void InitializePlugin(PluginComponentManager pm)
        {
            PluginEvents events = new PluginEvents();

            events.GameLoaded    = OnGameLoaded;
            events.PluginCommand = OnPluginCommand;
            pm.RegisterPlugin(this, events);

            pluginManager = pm;

            switch (this.Text)
            {
            case "Weapons":
                GearTL           = new InventoryTreeList(GearTree, db.WeaponList);
                this.gbGear.Text = "Weapon Backpack";
                this.copyToBackpackToolStripMenuItem.Visible = false;
                break;

            case "Items":
                GearTL           = new InventoryTreeList(GearTree, db.ItemList);
                this.gbGear.Text = "Item Backpack";
                this.copyToBackpackToolStripMenuItem.Visible = false;
                break;

            case "Bank":
                GearTL           = new InventoryTreeList(GearTree, db.BankList);
                this.gbGear.Text = "Bank";
                this.copyToBankToolStripMenuItem.Visible = false;
                break;
            }

            Init();

            // The index translators control the caption that goes over the top of each
            // level or quality SlideSelector.  Attach each translator then signal the
            // value changed event to cause the translator to update the caption.
            this.LevelIndexGear.IndexTranslator += new WillowTree.CustomControls.WTSlideSelector.SlideIndexTranslator(Util.LevelTranslator);
            this.QualityGear.IndexTranslator    += new WillowTree.CustomControls.WTSlideSelector.SlideIndexTranslator(Util.QualityTranslator);
            this.LevelIndexGear.OnValueChanged(EventArgs.Empty);
            this.QualityGear.OnValueChanged(EventArgs.Empty);

            HighlightFont = new Font(GearTree.Font, FontStyle.Italic | FontStyle.Bold);

            this.Enabled = false;
        }
Example #11
0
        public void InitializePlugin(PluginComponentManager pm)
        {
            PluginEvents events = new PluginEvents();

            events.GameLoaded = OnGameLoaded;
            events.GameSaving = OnGameSaving;
            pm.RegisterPlugin(this, events);

            this.Enabled = false;
            LocationsXml = db.LocationsXml;
            db.setXPchart();
            DoLocationsList();
            Cash.Maximum          = GlobalSettings.MaxCash;
            Experience.Maximum    = GlobalSettings.MaxExperience;
            Level.Maximum         = GlobalSettings.MaxLevel;
            BankSpace.Maximum     = GlobalSettings.MaxBankSlots;
            BackpackSpace.Maximum = GlobalSettings.MaxBackpackSlots;
            SkillPoints.Maximum   = GlobalSettings.MaxSkillPoints;
        }