/// <summary> /// Registers a control with the control host service</summary> /// <param name="controlHostService">Control host service</param> /// <param name="control">Control</param> /// <param name="name">Control name</param> /// <param name="description">Control description</param> /// <param name="group">Initial location of control on main form</param> /// <param name="id">Unique ID for control</param> /// <param name="client">Client that owns control, or null</param> /// <returns>IControlInfo for registered control</returns> public static IControlInfo RegisterControl( this IControlHostService controlHostService, object control, string name, string description, Sce.Atf.Applications.StandardControlGroup group, string id, IControlHostClient client) { var def = new ControlDef() { Name = name, Description = description, Group = group, Id = id }; return controlHostService.RegisterControl(def, control, client); }
/// <summary> /// Constructor</summary> /// <param name="name">Control's name, which may be displayed as the title of /// the hosting control or form</param> /// <param name="description">Control's description, which may be displayed as /// a tooltop when hovering over the control</param> /// <param name="id">Unique ID for the control</param> /// <param name="group">Initial control group for the control</param> /// <param name="imageKey">The control's image, which may be displayed on the /// hosting control or form</param> /// <param name="dockContent">The IDockContent representing the control</param> /// <param name="client">The client that registered this control</param> public ControlInfo(string name, string description, string id, Sce.Atf.Applications.StandardControlGroup group, object imageKey, IDockContent dockContent, IControlHostClient client) { Requires.NotNullOrEmpty(id, "id"); Requires.NotNull(dockContent, "dockContent"); Requires.NotNull(client, "client"); DockContent = dockContent; dockContent.PropertyChanged += DockContent_PropertyChanged; Name = name; Description = description; Id = id; Group = group; ImageSourceKey = imageKey; Client = client; }
/// <summary> /// Constructor</summary> /// <param name="name">Control's name, which may be displayed as the title of /// the hosting control or form</param> /// <param name="description">Control's description, which may be displayed as /// a tooltop when hovering over the control</param> /// <param name="id">Unique ID for the control</param> /// <param name="group">Initial control group for the control</param> /// <param name="dockContent">The IDockContent representing the control</param> /// <param name="client">The client that registered this control</param> public ControlInfo(string name, string description, string id, Sce.Atf.Applications.StandardControlGroup group, IDockContent dockContent, IControlHostClient client) : this(name, description, id, group, null, dockContent, client) { }