Hi, I don’t have an admin folder in my project and I defined these classes in the Definition.cs, but the Manufacturer and Version is displayed in the about section in the Management Client application ,although I checked EnvironmentType in Init function just for SmartClient. Because I need just load in the SmartClient.
What’s wrong here?
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;
using CallHandler.Background;
using CallHandler.Client;
using VideoOS.Platform;
using VideoOS.Platform.Background;
using VideoOS.Platform.Client;
namespace CallHandler
{
public class CallHandlerDefinition : PluginDefinition
{
private static Image _treeNodeImage;
private static Image _topTreeNodeImage;
private static CallHandlerBackgroundPlugin _backgroundPlugin;
private static bool _isInitialized = false;
private static readonly object _lock = new object();
internal static Guid CallHandlerPluginId = new Guid("e81234af-89bc-4f2a-bc5b-cf1f7a0b9d6a");
internal static Guid CallHandlerKind = new Guid("1a234fe6-bcde-4df2-9090-12abc3e4e567");
internal static Guid CallHandlerSidePanel = new Guid("fd9b4c12-ab34-4ebf-9123-cf5e4e90d123");
internal static Guid CallHandlerViewItemPlugin = new Guid("ba9c8d23-d456-47c8-90f7-6e3b1230f9a4");
internal static Guid CallHandlerSettingsPanel = new Guid("cf4b134e-bc5a-4b9f-8a6d-1f7e8123c0f8");
internal static Guid CallHandlerBackgroundPlugin = new Guid("f1e2d3c4-bc5f-4a9f-87d4-3c90ab5e123f");
internal static Guid CallHandlerWorkSpacePluginId = new Guid("d7e2c3b4-0105-4d9f-bc56-7d9f1e23c8f9");
internal static Guid CallHandlerWorkSpaceViewItemPluginId = new Guid("5c134d2f-5f12-4d8b-90d4-3b8123c9f6e5");
internal static Guid CallHandlerToolsOptionsDialog = new Guid("711923ab-1235-4f12-b9f4-c3850f7d3b4f");
internal static Guid MyCallHandlerId = new Guid("c3d5a124-1b23-4e9f-b9f7-484c5e9f7b23");
private List<BackgroundPlugin> _backgroundPlugins = new List<BackgroundPlugin>();
private Collection<SettingsPanelPlugin> _settingsPanelPlugins = new Collection<SettingsPanelPlugin>();
private List<ViewItemPlugin> _viewItemPlugin = new List<ViewItemPlugin>();
private List<SidePanelPlugin> _sidePanelPlugins = new List<SidePanelPlugin>();
private List<WorkSpacePlugin> _workSpacePlugins = new List<WorkSpacePlugin>();
static CallHandlerDefinition()
{
Assembly assembly = Assembly.GetExecutingAssembly();
string name = assembly.GetName().Name;
System.IO.Stream pluginStream = assembly.GetManifestResourceStream(name + ".Resources.CallHandler.bmp");
if (pluginStream != null)
_treeNodeImage = System.Drawing.Image.FromStream(pluginStream);
}
internal static Image TreeNodeImage
{
get { return _treeNodeImage; }
}
public override void Init()
{
try
{
if (EnvironmentManager.Instance.EnvironmentType != EnvironmentType.SmartClient)
{
return;
}
_topTreeNodeImage = VideoOS.Platform.UI.Util.ImageList.Images[VideoOS.Platform.UI.Util.PluginIx];
if (EnvironmentManager.Instance.EnvironmentType == EnvironmentType.SmartClient)
{
_workSpacePlugins.Add(new CallHandlerWorkSpacePlugin());
_viewItemPlugin.Add(new CallHandlerWorkSpaceViewItemPlugin());
_settingsPanelPlugins.Add(new CallHandlerSettingsPanelPlugin());
_backgroundPlugins.Add(new CallHandlerBackgroundPlugin());
}
}
catch (Exception ex)
{
MessageBox.Show($"Error in CallHandlerDefinition Init: {ex.Message}");
}
}