@jetdv Sir, I watched the Build Command series on your YouTube channel and I created 2 extensions. But just one extension shows up under view tab.
I tried to rename the 2º extension to avoid conflicts names, but it is not showing.
1º Extension;
using System; using System.Collections.Generic; using System.Collections; using System.IO; using System.Text; using System.Threading.Tasks; using System.Globalization; using System.Drawing; using System.Runtime; using System.Xml; using System.Windows.Forms; using ScriptPortal.Vegas; namespace CCTest { public class CCTestDock : DockableControl { private CCTest.CCMainForm myform = null; public CCTestDock() : base("CCTestInternal") { this.DisplayName = "SAT"; } public override DockWindowStyle DefaultDockWindowStyle { get { return DockWindowStyle.Docked; } } public override Size DefaultFloatingSize { get { return new Size(640, 480); } } protected override void OnLoad(EventArgs args) { myform = new CCTest.CCMainForm(myVegas); myform.Dock = DockStyle.Fill; this.Controls.Add(myform); } protected override void OnClosed(EventArgs args) { base.OnClosed(args); } } } public class CCTestCCM : ICustomCommandModule { public Vegas myVegas = null; CustomCommand CCM = new CustomCommand(CommandCategory.View, "CCTest"); public void InitializeModule(Vegas vegas) { myVegas = vegas; CCM.MenuItemName = "SAT for Vegas Pro"; } public ICollection GetCustomCommands() { CCM.MenuPopup += this.HandlePICmdMenuPopup; CCM.Invoked += this.HandlePICmdInvoked; CustomCommand[] cmds = new CustomCommand[] { CCM }; return cmds; } void HandlePICmdMenuPopup(Object sender, EventArgs args) { CCM.Checked = myVegas.FindDockView("CCTestInternal"); } void HandlePICmdInvoked(Object sender, EventArgs args) { if (!myVegas.ActivateDockView("CCTestInternal")) { CCTest.CCTestDock CCMDock = new CCTest.CCTestDock(); CCMDock.AutoLoadCommand = CCM; CCMDock.PersistDockWindowState = true; myVegas.LoadDockView(CCMDock); } } }
2º Extension;
using System; using System.Collections.Generic; using System.Collections; using System.IO; using System.Text; using System.Threading.Tasks; using System.Globalization; using System.Drawing; using System.Runtime; using System.Xml; using System.Windows.Forms; using ScriptPortal.Vegas; namespace CCTestProduction { namespace CCTestProduction { public class CCTestProductionDock : DockableControl { private CCMainTestProduction myform = null; // Reference to the updated UserControl public CCTestProductionDock() : base("CCTestProductionLine") { this.DisplayName = "Production Line"; } public override DockWindowStyle DefaultDockWindowStyle { get { return DockWindowStyle.Docked; } // Sets the default docking style } public override Size DefaultFloatingSize { get { return new Size(640, 480); } // Sets the default floating size } protected override void OnLoad(EventArgs args) { // Create an instance of the updated UserControl myform = new CCMainTestProduction(myVegas); myform.Dock = DockStyle.Fill; // Fill the dockable control with the UserControl this.Controls.Add(myform); // Add the UserControl to the dockable control } protected override void OnClosed(EventArgs args) { base.OnClosed(args); // Call the base class implementation on close } } public class CCTestCCM : ICustomCommandModule { public Vegas myVegas = null; CustomCommand CCM = new CustomCommand(CommandCategory.View, "Production"); public void InitializeModule(Vegas vegas) { myVegas = vegas; CCM.MenuItemName = "SAT - Production Line"; // Menu item name for the custom command } public ICollection GetCustomCommands() { CCM.MenuPopup += this.HandlePICmdMenuPopup; // Subscribe to menu popup event CCM.Invoked += this.HandlePICmdInvoked; // Subscribe to invoked event CustomCommand[] cmds = new CustomCommand[] { CCM }; // Create an array of commands return cmds; } void HandlePICmdMenuPopup(Object sender, EventArgs args) { CCM.Checked = myVegas.FindDockView("CCTestProductionLine"); // Check if the dock view is active } void HandlePICmdInvoked(Object sender, EventArgs args) { if (!myVegas.ActivateDockView("CCTestProductionLine")) // Try to activate the dock view { CCTestProductionDock CCMDock = new CCTestProductionDock(); // Create an instance of the dockable control CCMDock.AutoLoadCommand = CCM; // Set the auto-load command CCMDock.PersistDockWindowState = true; // Enable persistent dock window state myVegas.LoadDockView(CCMDock); // Load the dockable view } } } } }
Please, Sir, Why I can not see both extensions under view tab? I'm only seeing one.