Beispiel #1
0
 internal MenuItem(MenuKind menuKind, ContextMenu contextMenu)
 {
     this.IsRootItem = false;
     this.menuKind = menuKind;
     this.contextMenu = contextMenu;
     this.MenuItems = new List<MenuItem>();
 }
Beispiel #2
0
 public MenuItem(MenuKind menuKind, ContextMenu contextMenu)
 {
     this.IsRootItem  = false;
     this.menuKind    = menuKind;
     this.contextMenu = contextMenu;
     this.MenuItems   = new List <MenuItem>();
 }
Beispiel #3
0
 internal MenuItem(MenuItem fatherItem, MenuKind menuKind, ContextMenu contextMenu)
 {
     this.IsRootItem  = false;
     this.fatherItem  = fatherItem;
     this.menuKind    = menuKind;
     this.contextMenu = contextMenu;
     this.MenuItems   = new List <MenuItem>();
 }
 internal void LoadFromXmlNode(XmlNode rootNode)
 {
     foreach (XmlNode node in rootNode)
     {
         MenuKind item = new MenuKind(this);
         item.LoadFromXmlNode(node);
         this.MenuKinds.Add(item);
     }
 }
 internal void SetMenuKindByName(string Name)
 {
     this.menuToDisplay = this.GetMenuKindByName(Name);
     if (this.menuToDisplay != null)
     {
         this.RefreshAllItemsVisible();
         if (this.menuToDisplay.VisibleCount == 0)
         {
             this.Result    = ContextMenuResult.None;
             this.IsShowing = false;
         }
         this.RefreshAllItemsDisplayName();
         if (this.HelpPlugin != null)
         {
             this.HelpPlugin.SetButtonSize(new Point(this.menuToDisplay.ItemHeight, this.menuToDisplay.ItemHeight));
         }
     }
 }
 internal void LoadFromXmlNode(XmlNode rootNode)
 {
     foreach (XmlNode node in rootNode)
     {
         MenuKind item = new MenuKind(this);
         item.LoadFromXmlNode(node);
         this.MenuKinds.Add(item);
     }
 }
 internal void SetMenuKindByName(string Name)
 {
     this.menuToDisplay = this.GetMenuKindByName(Name);
     if (this.menuToDisplay != null)
     {
         this.RefreshAllItemsVisible();
         if (this.menuToDisplay.VisibleCount == 0)
         {
             this.Result = ContextMenuResult.None;
             this.IsShowing = false;
         }
         this.RefreshAllItemsDisplayName();
         if (this.HelpPlugin != null)
         {
             this.HelpPlugin.SetButtonSize(new Point(this.menuToDisplay.ItemHeight, this.menuToDisplay.ItemHeight));
         }
     }
 }