public void InitPlugin(System.Windows.Forms.TabPage pluginScreenSpace, System.Windows.Forms.Label pluginStatusText) { // store a reference to plugin's status label lblStatus = pluginStatusText; try { // Configure ACT for updates, and check for update. Advanced_Combat_Tracker.ActGlobals.oFormActMain.UpdateCheckClicked += new Advanced_Combat_Tracker.FormActMain.NullDelegate(UpdateCheckClicked); if (Advanced_Combat_Tracker.ActGlobals.oFormActMain.GetAutomaticUpdatesAllowed()) { Thread updateThread = new Thread(new ThreadStart(UpdateCheckClicked)); updateThread.IsBackground = true; updateThread.Start(); } // Update the listing of columns inside ACT. UpdateACTTables(); // Configure ACT Wrapper LogParse.Initialize(new ACTWrapper()); 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 // character name cannot be parsed from logfile name Advanced_Combat_Tracker.ActGlobals.oFormActMain.LogPathHasCharName = false; Advanced_Combat_Tracker.ActGlobals.oFormActMain.LogFileFilter = "*.log"; // Default Timestamp length, but this can be overridden in parser code. Advanced_Combat_Tracker.ActGlobals.oFormActMain.TimeStampLen = DateTime.Now.ToString("HH:mm:ss.fff").Length + 1; // Set Date time format parsing. Advanced_Combat_Tracker.ActGlobals.oFormActMain.GetDateTimeFromLog = new Advanced_Combat_Tracker.FormActMain.DateTimeLogParser(LogParse.ParseLogDateTime); // Set primary parser delegate for processing data Advanced_Combat_Tracker.ActGlobals.oFormActMain.BeforeLogLineRead += LogParse.BeforeLogLineRead; // Hard-code zone name Advanced_Combat_Tracker.ActGlobals.oFormActMain.ChangeZone("Blade and Soul"); // Initialize logging thread LogWriter.Initialize(); lblStatus.Text = "BnS Plugin Started."; } catch (Exception ex) { LogParserMessage("Exception during InitPlugin: " + ex.ToString().Replace(Environment.NewLine, " ")); lblStatus.Text = "InitPlugin Error."; } }