/// <summary> /// Creates a button list. /// </summary> /// <param name="pnl"></param> /// <param name="pbds"></param> /// <returns></returns> public static List <PushButton> AddButtonList(this RibbonPanel pnl, IEnumerable <PushButtonData> pbds) { if (pnl == null) { throw new ArgumentNullException(nameof(pnl)); } if (pbds == null) { throw new ArgumentNullException(nameof(pbds)); } var results = new List <PushButton>(); pbds.ToList().ForEach(f => results.Add(pnl.AddButton(f))); return(results); }
public Result OnStartup(UIControlledApplication a) { RibbonPanel panel = ribbonPanel(a); PushButton button1 = panel.AddButton("Получить ПДФ", Resources.PDF, "ExportDWFX"); PushButton buttonPDFspec = panel.AddButton("ПДФ спец.", Resources.PDF, "ExportPDFspec"); PushButton buttonDWG = panel.AddButton("Получить DWG", Resources.dwgpic, "ExportDWG"); PushButton button2 = panel.AddButton("Смена номера", Resources.tudaSyda, "SheetNum"); PushButton button3 = panel.AddButton("Эл-ты помещ.", Resources.Peace, "RoomElements"); PushButton button4 = panel.AddButton("Отделка", Resources.Brush, "NovaFinishing"); PushButton button5 = panel.AddButton("Аннотации", Resources.MGN, "annot"); PushButton button6 = panel.AddButton("Металл", Resources.gear, "metall"); PushButton button7 = panel.AddButton("Спецификация", Resources.block, "grouping"); PushButton button8 = panel.AddButton("Отделочный слой", Resources.emptyHouse, "PerimetralWall"); PushButton button9 = panel.AddButton("СуперТест", Resources.block, "SuperTest"); PushButton buttonTest = panel.AddButton("Номер в отделку", Resources.fullHouse, "RNum2FWall"); PushButton buttonUniv = panel.AddButton("Всё", Resources.atom, "Universe"); PushButton buttonWLS = panel.AddButton("Стены 2021", Resources.plane, "WallLastStage"); PushButton buttonSPEC = panel.AddButton("Общая спецификация", Resources.block, "SPECA"); PushButton SetCurrentSpec = panel.AddButton("Спецификация - расчет", Resources.block, "SetCurrentSpec"); PushButton Hydpra = panel.AddButton("Гидравлический расчет", Resources.block, "Hydra"); PushButton newSpace = panel.AddButton("Пространства", Resources.block, "macros"); a.ApplicationClosing += a_ApplicationClosing; a.Idling += A_Idling; return(Result.Succeeded); }