AddPopup() public method

public AddPopup ( string name ) : CommandBarPopup
name string
return CommandBarPopup
示例#1
0
 private static void AddControl(CommandBarControls parentControls, XmlNode xmlNode, GetImageDelegate getImage)
 {
     if (xmlNode.Name == "popup")
     {
         string          controlName = xmlNode.Attributes["caption"].Value;
         object          before      = ReadControlBeforeAttribute(xmlNode);
         CommandBarPopup newPopup    = parentControls.AddPopup(controlName, before);
         ApplyControlAttributes(newPopup, xmlNode, getImage);
         AddControls(newPopup.Controls, xmlNode.ChildNodes, getImage);
     }
     else if (xmlNode.Name == "button")
     {
         object           before    = ReadControlBeforeAttribute(xmlNode);
         CommandBarButton newButton = parentControls.AddButton(before);
         ApplyControlAttributes(newButton, xmlNode, getImage);
     }
 }
示例#2
0
 private static void AddControl(CommandBarControls parentControls, XmlNode xmlNode, GetImageDelegate getImage)
 {
     if (xmlNode.Name == "popup")
     {
         string controlName = xmlNode.Attributes["caption"].Value;
         object before = ReadControlBeforeAttribute(xmlNode);
         CommandBarPopup newPopup = parentControls.AddPopup(controlName, before);
         ApplyControlAttributes(newPopup, xmlNode, getImage);
         AddControls(newPopup.Controls, xmlNode.ChildNodes, getImage);
     }
     else if (xmlNode.Name == "button")
     {
         object before = ReadControlBeforeAttribute(xmlNode);
         CommandBarButton newButton = parentControls.AddButton(before);
         ApplyControlAttributes(newButton, xmlNode, getImage);
     }
 }