mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 20:36:33 +01:00
CP-38529: Make PluginManager
public in MainWindow.cs
To allow to open the Options page from other forms Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
This commit is contained in:
parent
3956502063
commit
495dcd66d4
4
XenAdmin/MainWindow.Designer.cs
generated
4
XenAdmin/MainWindow.Designer.cs
generated
@ -15,7 +15,7 @@ namespace XenAdmin
|
||||
{
|
||||
Program.Exiting = true;
|
||||
|
||||
pluginManager.PluginsChanged -= pluginManager_PluginsChanged;
|
||||
PluginManager.PluginsChanged -= pluginManager_PluginsChanged;
|
||||
UnRegisterEvents();
|
||||
|
||||
if (disposing)
|
||||
@ -23,7 +23,7 @@ namespace XenAdmin
|
||||
if (components != null)
|
||||
components.Dispose();
|
||||
|
||||
pluginManager.Dispose();
|
||||
PluginManager.Dispose();
|
||||
|
||||
log.Debug("MainWindow disposing of license timer");
|
||||
if (licenseTimer != null)
|
||||
|
@ -128,7 +128,7 @@ namespace XenAdmin
|
||||
|
||||
private static readonly System.Windows.Forms.Timer CheckForUpdatesTimer = new System.Windows.Forms.Timer();
|
||||
|
||||
private readonly PluginManager pluginManager;
|
||||
public readonly PluginManager PluginManager;
|
||||
private readonly ContextMenuBuilder contextMenuBuilder;
|
||||
|
||||
private readonly LicenseManagerLauncher licenseManagerLauncher;
|
||||
@ -220,11 +220,11 @@ namespace XenAdmin
|
||||
CommandLineArgType = argType;
|
||||
CommandLineParam = args;
|
||||
|
||||
pluginManager = new PluginManager();
|
||||
pluginManager.PluginsChanged += pluginManager_PluginsChanged;
|
||||
pluginManager.LoadPlugins();
|
||||
contextMenuBuilder = new ContextMenuBuilder(pluginManager, this);
|
||||
((WinformsXenAdminConfigProvider) XenAdminConfigManager.Provider).PluginManager = pluginManager;
|
||||
PluginManager = new PluginManager();
|
||||
PluginManager.PluginsChanged += pluginManager_PluginsChanged;
|
||||
PluginManager.LoadPlugins();
|
||||
contextMenuBuilder = new ContextMenuBuilder(PluginManager, this);
|
||||
((WinformsXenAdminConfigProvider) XenAdminConfigManager.Provider).PluginManager = PluginManager;
|
||||
|
||||
FormFontFixer.Fix(this);
|
||||
|
||||
@ -634,7 +634,7 @@ namespace XenAdmin
|
||||
|
||||
if (result && dlg.IsCheckBoxChecked)
|
||||
{
|
||||
using (var dialog = new OptionsDialog(pluginManager))
|
||||
using (var dialog = new OptionsDialog(PluginManager))
|
||||
{
|
||||
dialog.SelectConnectionOptionsPage();
|
||||
dialog.ShowDialog(this);
|
||||
@ -1190,7 +1190,7 @@ namespace XenAdmin
|
||||
}
|
||||
|
||||
selectedTabs.Remove(o);
|
||||
pluginManager.DisposeURLs(o);
|
||||
PluginManager.DisposeURLs(o);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1578,7 +1578,7 @@ namespace XenAdmin
|
||||
consoleFeatures = new List<TabPageFeature>();
|
||||
otherFeatures = new List<TabPageFeature>();
|
||||
|
||||
var plugins = pluginManager.Plugins;
|
||||
var plugins = PluginManager.Plugins;
|
||||
foreach (var p in plugins)
|
||||
{
|
||||
var features = p.Features;
|
||||
@ -1703,7 +1703,7 @@ namespace XenAdmin
|
||||
bool itemAdded = false;
|
||||
|
||||
// add plugin items for this menu at insertIndex
|
||||
foreach (PluginDescriptor plugin in pluginManager.Plugins)
|
||||
foreach (PluginDescriptor plugin in PluginManager.Plugins)
|
||||
{
|
||||
if (!plugin.Enabled)
|
||||
continue;
|
||||
@ -2118,7 +2118,7 @@ namespace XenAdmin
|
||||
|
||||
private void UpdateTabePageFeatures()
|
||||
{
|
||||
var plugins = pluginManager.Plugins;
|
||||
var plugins = PluginManager.Plugins;
|
||||
foreach (var p in plugins)
|
||||
{
|
||||
var features = p.Features;
|
||||
@ -2689,7 +2689,7 @@ namespace XenAdmin
|
||||
|
||||
private void preferencesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (var dialog = new OptionsDialog(pluginManager))
|
||||
using (var dialog = new OptionsDialog(PluginManager))
|
||||
dialog.ShowDialog(this);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user