public void AddOutputMenuItem(string outwindowname)
{
DashBoardItem item = new DashBoardItem();
item.Command = new SelectOutputWindowCommand();
UAMenuCommand uamc = new UAMenuCommand(); //01Aug2012. There was no 'new' before
uamc.commandformat = outwindowname;//window name is key. Action shud b taken on this.
uamc.commandoutputformat = ""; uamc.commandtemplate = ""; uamc.commandtype = "";
item.CommandParameter = uamc;
item.isGroup = false;
item.Name = outwindowname;//this should also be the key
foreach (MenuItem output_menu in allOutputMenus)
{
if (output_menu.Header.ToString() == "Output")
{
output_menu.Items.Add(CreateItem(item));
}
}
CheckOutputMenuItem(outwindowname);//putting a check or alphabet to show which one is active
}