public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText) { lblStatus = pluginStatusText; // Hand the status label's reference to our local var pluginScreenSpace.Controls.Add(this); // Add this UserControl to the tab ACT provides this.Dock = DockStyle.Fill; // Expand the UserControl to fill the tab's client space xmlSettings = new SettingsSerializer(this); // Create a new settings serializer and pass it this instance xmlSettings.AddControlSetting(textBox_addr.Name, textBox_addr); xmlSettings.AddControlSetting(checkbox_sendraw.Name, checkbox_sendraw); LoadSettings(); pluginScreenSpace.Text = "DauntUtils"; try { _definitions = new Definitions(); FfxivPlugin = GetFfxivPlugin(); FfxivPlugin.DataSubscription.LogLine += DataSubscriptionLogLine; FfxivPlugin.DataSubscription.NetworkReceived += DataSubscriptionOnNetworkReceived; FfxivPlugin.DataSubscription.NetworkSent += DataSubscriptionOnNetworkSent; Log("plugin loaded."); lblStatus.Text = "Plugin Started"; } catch (Exception ex) { Log("[ERROR] Could not initialize plugin:\n" + ex); lblStatus.Text = "Plugin Failed"; } }
private object GetFfxivPlugin() { ffxivPlugin = null; var plugins = ActGlobals.oFormActMain.ActPlugins; foreach (var plugin in plugins) { if (plugin.pluginFile.Name.ToUpper().Contains("FFXIV_ACT_Plugin".ToUpper()) && plugin.lblPluginStatus.Text.ToUpper().Contains("FFXIV Plugin Started.".ToUpper())) { ffxivPlugin = (FFXIV_ACT_Plugin.FFXIV_ACT_Plugin)plugin.pluginObj; } } if (ffxivPlugin == null) { throw new Exception("Could not find FFXIV plugin. Make sure that it is loaded before HousingCheck."); } return(ffxivPlugin); }
public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText) { lblStatus = pluginStatusText; // Hand the status label's reference to our local var pluginScreenSpace.Controls.Add(this); // Add this UserControl to the tab ACT provides this.Dock = DockStyle.Fill; // Expand the UserControl to fill the tab's client space xmlSettings = new SettingsSerializer(this); // Create a new settings serializer and pass it this instance LoadSettings(); pluginScreenSpace.Text = "FFXIVMB"; Log(Definitions.GetJson()); try { //if (CheckNeedsUpdate()) //{ // MessageBox.Show( // "The FFXIVMB plugin needs to be updated. Please download an updated version from the FFXIVMB website", // "FFXIVMB plugin update", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); // Process.Start("https://ffxivmb.com/Downloads"); // return; //} _definitions = Definitions.Get(); FfxivPlugin = GetFfxivPlugin(); FfxivPlugin.DataSubscription.NetworkReceived += DataSubscriptionOnNetworkReceived; _uploader = new FFXIVMBUploader(this); Log("FFXIVMB plugin loaded."); lblStatus.Text = "Plugin Started"; } catch (Exception ex) { Log("[ERROR] Could not initialize plugin:\n" + ex); lblStatus.Text = "Plugin Failed"; } }
public ParsePlugin(IActPluginV1 plugin) { _parsePlugin = (FFXIV_ACT_Plugin.FFXIV_ACT_Plugin)plugin; }