private void ZoomCommandLinksBounds(ZoomBoundsInfo infos, C1CommandLinks commandLinks) { foreach (C1CommandLink commandLink in commandLinks) { if (commandLink.Command is C1CommandMenu) { C1CommandMenu commandMenu = commandLink.Command as C1CommandMenu; ZoomCommandLinksBounds(infos, commandMenu.CommandLinks); return; } } }
private void ZoomCommandLinksFont(ZoomFontInfo infos, C1CommandLinks commandLinks) { foreach (C1CommandLink commandLink in commandLinks) { if (commandLink.Command is C1CommandMenu) { C1CommandMenu commandMenu = commandLink.Command as C1CommandMenu; if (!SystemInformation.MenuFont.Equals(commandMenu.Font)) { commandMenu.Font = infos.Zoom(commandMenu.Font); } ZoomCommandLinksFont(infos, commandMenu.CommandLinks); continue; } } }
private void AddChildren(List <Control> controls, C1CommandLinks commandLinks) { foreach (C1CommandLink commandLink in commandLinks) { if (commandLink.Command is C1CommandMenu) { C1CommandMenu commandMenu = commandLink.Command as C1CommandMenu; AddChildren(controls, commandMenu.CommandLinks); continue; } else if (commandLink.Command is C1CommandControl) { C1CommandControl commandControl = commandLink.Command as C1CommandControl; if (commandControl.Control != null && !controls.Contains(commandControl.Control)) { controls.Add(commandControl.Control); } } } }