Exemple #1
0
        public void Initialize(DalamudPluginInterface pluginInterface)
        {
            this.pi = pluginInterface;

            this.configuration = this.pi.GetPluginConfig() as Configuration ?? new Configuration();
            this.configuration.Initialize(this.pi);

            // you might normally want to embed resources and load them from the manifest stream
            var imagePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"goat.png");
            var goatImage = this.pi.UiBuilder.LoadImage(imagePath);

            this.ui = new PluginUI(this.configuration, goatImage);

            this.pi.CommandManager.AddHandler(commandName, new CommandInfo(OnCommand)
            {
                HelpMessage = "A useful message to display in /xlhelp"
            });

            this.pi.UiBuilder.OnBuildUi      += DrawUI;
            this.pi.UiBuilder.OnOpenConfigUi += (sender, args) => DrawConfigUI();
        }
 /// <summary>
 /// Creates a plugin panel for the plugin
 /// </summary>
 public void CreatePluginPanel()
 {
     this.pluginUI = new PluginUI(this);
     this.pluginUI.Text = LocaleHelper.GetString("Title.PluginPanel");
     this.pluginPanel = PluginBase.MainForm.CreateDockablePanel(this.pluginUI, this.pluginGuid, this.pluginImage, DockState.DockRight);
 }
 /// <summary>
 /// Creates a plugin panel for the plugin
 /// </summary>
 public void CreatePluginPanel()
 {
     this.pluginUI      = new PluginUI(this);
     this.pluginUI.Text = LocaleHelper.GetString("Title.PluginPanel");
     this.pluginPanel   = PluginBase.MainForm.CreateDockablePanel(this.pluginUI, this.pluginGuid, this.pluginImage, DockState.DockRight);
 }