public static void CreateWindow(Plugin pl) { pl.Checked = true; PluginForm f = new PluginForm(pl); if (!FormList.Contains(pl)) { FormList.Add(pl, f); f.Show(); } }
private void OpenPlugins(object?sender, EventArgs e) { Debug.Assert(_application.Uploaders.Loaded); var pluginsModel = new PluginFormModel( _application.Uploaders.GetMetadata(), _application.Uploaders.Plugins.PluginDirectory ); var form = new PluginForm(pluginsModel); form.Show(); }
/// <summary> /// Add a tabbed form to the tabbed window (if the plugin type is /// PLUGIN_TYPE.DOCKED_TAB /// or /// PLUGIN_TYPE.BOTH_DOCKED_AND_MENU /// </summary> /// <param name="pPPLMain"></param> public void AddForm(PPL_Lib.PPLMain pPPLMain) { cPPLMain = pPPLMain; cForm = new PluginForm(); Guid guid = new Guid(0x123eb510, 0xadcc, 0x4338, 0xa8, 0x12, 0x67, 0x6f, 0x32, 0xdb, 0x1e, 0x1e); cForm.cGuid = guid; cPPLMain.cDockedPanels.Add(cForm.cGuid.ToString(), cForm); foreach (Control ctrl in cPPLMain.Controls) { if (ctrl is WeifenLuo.WinFormsUI.Docking.DockPanel) { cForm.Show(ctrl as WeifenLuo.WinFormsUI.Docking.DockPanel, WeifenLuo.WinFormsUI.Docking.DockState.Document); } } cForm.Show(); }