TheSwamp
Code Red => .NET => Topic started by: Bobby C. Jones on December 15, 2006, 08:30:18 AM
-
I'm working on a stand alone cui installer. In it I create a new workspace. I want to setup certain palettes in it, but when I access the DocakbleWindows collection of the workspace, it's allways empty. Anyone know how to get it to populate? This is my latest try, the Count is always a big fat useless 0.
CustomizationSection mainCuiCs = this.MainCui;
Workspace BobbysWorkSpace = new Workspace(mainCuiCs, "Bobby");
BobbysWorkSpace.DockableWindows.PopulateFromRegistry();
Console.WriteLine("Palettes.Count = {0}", BobbysWorkSpace.DockableWindows.Count.ToString());
-
Hi Bobby,
Is "Bobby" pre-existing ?
I think the second argument in the constructor is 'Workspace to Duplicate'
-
Nope ... I was wrong ..
The constructor just tests for the pre-existance, and changes the name if existing : ..
public Workspace(CustomizationSection parent, string name) : base(parent)
{
this.ConstructorGuts(this.Parent);
if (parent.Workspaces.IndexOfWorkspaceName(name) >= 0)
{
bool flag1 = false;
for (int num1 = 1; !flag1; num1++)
{
name = name + num1.ToString();
if (parent.Workspaces.IndexOfWorkspaceName(name) == -1)
{
flag1 = true;
}
}
}
this.Name = name;
}
-
Hi Bobby,
Is "Bobby" pre-existing ?
I think the second argument in the constructor is 'Workspace to Duplicate'
Hey Kerry,
Nope, it's new. This code will create the workspace. I can add my toolbars and pop menus to it, but there's not a single palette to be set up. So close, yet so far...