public NetworkHandlers(Dalamud dalamud, bool optOutMbUploads) { this.dalamud = dalamud; this.optOutMbUploads = optOutMbUploads; this.uploader = new UniversalisMarketBoardUploader(dalamud); dalamud.Framework.Network.OnZonePacket += OnZonePacket; }
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 PacketProcessor(string apiKey) { _definitions = Definitions.Get(); _uploader = new UniversalisMarketBoardUploader(this, apiKey); }