Have our Management Client plugin appear within the Smart Client(workspace)?

We’re currently working on moving our focus from the Management Client to the Smart Client.

We already have a mature plugin in the MC however it has become important that it be available in the SC.

We’ve spent some time looking at how SC workspace plugins are formed and it’s pretty different.

Basically we have a Windows.Forms.UserControl form which we would like to see in a SC workspace.

To achieve this you should make a workspace plugin containing just a 1x1 view layout and then implement a ViewItem plugin containing your user control and put this in the workspace view.

Have a look at the Smart Client Workspace sample for inspiration: https://doc.developer.milestonesys.com/html/index.html?base=samples/scworkspace.html&tree=tree_1.html

So can something like this be done? Specifically using ViewAndLayoutItem.InsertViewItem instead of InsertViewItemPlugin

using System;
using System.Collections.Generic;
using System.Drawing;
using VideoOS.Platform;
using VideoOS.Platform.Client;
using VideoOS.Platform.Messaging;
using Message = VideoOS.Platform.Messaging.Message;
using Timer = System.Windows.Forms.Timer;
 
 
namespace OurPlug.Admin
{
    class OurPlugWorkSpacePlugin : WorkSpacePlugin
    {
        public static Guid SCWorkSpacePluginId = new Guid("5398caba-58cd-4603-af8f-423aaf0956f3");
        internal static string MilestoneHostName = "localhost";
        internal static ServerId serverId;
		
        public override void Init(){
            MilestoneHostName = serverId.ServerHostname;
            LoadProperties(true);
            ViewAndLayoutItem.InsertViewItem(0, new OurPlugItemManager(OurPlugDefinition.OurPlugKind, MilestoneHostName));
        }
 
        public override void Close(){}
 
 
        public override Guid Id{get {return SCWorkSpacePluginId;}
        }
 
        public override string Name{get{return OurPlugDefinition.ProductName;}}
 
 
        public override bool IsSetupStateSupported{get{return false;}}
    }
}

InsertViewItem can only be used if you have a configuration string for a camera. It cannot take an Item Manager as an argument. Please implement your own view item and use InsertViewItemPlugin in the same way as the SCWorkspace sample does it. Also remember to define the layout of the ViewAndLayoutItem.

Will we have to reimplement our already developed main UserControl as a ViewItemUserControl?

We thought to simply drag our UserControl into a ViewItemUserControl from the toolbox but it did not work.

The ViewItemUserControl is just a standard WinForms user control so you can use standard control embedding. We are doing that a lot, so I cannot see why it should not work for you.