/// <summary> /// Called by CKAN at load to set up the plugin. /// </summary> public override void Initialize() { // Give the tab a name and set the text that will show to the user. var tabPage = new TabPage { Name = "CKANPlugin", Text = "CKAN Plugin" }; // Set the user control from this mod to fill then add to the tab. _mUi = new PluginUI { Dock = DockStyle.Fill }; tabPage.Controls.Add(_mUi); // Setup the callback, and add the tab to the CKAN tab controller. // Uses the name given for the tab above when the tabPage was created. Main.modChangedCallback += _mUi.OnModChanged; Main.Instance.m_TabController.m_TabPages.Add("CKANPlugin", tabPage); Main.Instance.m_TabController.ShowTab("CKANPlugin", 1, false); }