예제 #1
0
        public void Initialize(DalamudPluginInterface pluginInterface)
        {
            Version           = Assembly.GetExecutingAssembly().GetName().Version.ToString();
            PluginInterface   = pluginInterface;
            this.PluginConfig = (ItemSearchPluginConfig)pluginInterface.GetPluginConfig() ?? new ItemSearchPluginConfig();

            ItemSearchPlugin.DataSites = new DataSite[] {
                new GarlandToolsDataSite(),
                new TeamcraftDataSite(PluginConfig),
                new GamerEscapeDatasite(),
            };

            this.PluginConfig.Init(pluginInterface, this);


            SetupGameFunctions();

            ReloadLocalization();

            FittingRoomUI = new FittingRoomUI(this);

            CraftingRecipeFinder = new CraftingRecipeFinder(this);

            PluginInterface.UiBuilder.OnBuildUi += this.BuildUI;
            SetupCommands();

#if DEBUG
            OnItemSearchCommand("", "");
#endif
        }
예제 #2
0
        public void Dispose()
        {
            PluginInterface.UiBuilder.OnBuildUi -= this.BuildUI;
            FittingRoomUI?.Dispose();
            CraftingRecipeFinder?.Dispose();
            itemSearchWindow?.Dispose();
            RemoveCommands();
            PluginInterface.Dispose();


            foreach (var t in textureDictionary)
            {
                t.Value?.Dispose();
            }

            textureDictionary.Clear();
        }
예제 #3
0
        public void Initialize(DalamudPluginInterface pluginInterface)
        {
            Version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
            this.PluginInterface = pluginInterface;
            this.PluginConfig    = (ItemSearchPluginConfig)pluginInterface.GetPluginConfig() ?? new ItemSearchPluginConfig();
            this.PluginConfig.Init(pluginInterface, this);

            ReloadLocalization();

            FittingRoomUI = new FittingRoomUI(this);

            CraftingRecipeFinder = new CraftingRecipeFinder(this);

            PluginInterface.UiBuilder.OnBuildUi += this.BuildUI;
            SetupCommands();

#if DEBUG
            OnItemSearchCommand("", "");
#endif
        }