public static BarButtonItem initComplexBtnItem(int strId, string strName, string strText, RibbonItemStyles eStyle, string strFilePathSvg, ItemClickEventHandler oCallback4Click, RibbonControl oParentSuper, BarSubItem oParent4ComplexBtn) { var oComplexBtnItem = new BarButtonItem(); //set props oComplexBtnItem.Id = strId; oComplexBtnItem.Name = strName; var strLan = I18nUtilsEx.getStrFromApp(strName); oComplexBtnItem.Caption = String.IsNullOrEmpty(strLan) ? strText : strLan; oComplexBtnItem.RibbonStyle = eStyle; oComplexBtnItem.ImageOptions.SvgImage = SvgImage.FromFile(strFilePathSvg); oComplexBtnItem.ItemClick += oCallback4Click; //add to parent oParentSuper.Items.Add(oComplexBtnItem); oParent4ComplexBtn.LinksPersistInfo.Add(new LinkPersistInfo(oComplexBtnItem)); return(oComplexBtnItem); }
public static BarButtonItem initMenuBtnItem(int strId, string strName, string strText, RibbonItemStyles eStyle, string strFilePathSvg, ItemClickEventHandler oCallback4Click, RibbonControl oParentSuper, PopupMenu oParent4MenuBtnItemContainer) { var oMenuItem = new BarButtonItem(); //set props oMenuItem.Id = strId; oMenuItem.Name = strName; var strLan = I18nUtilsEx.getStrFromApp(strName); oMenuItem.Caption = String.IsNullOrEmpty(strLan) ? strText : strLan; oMenuItem.RibbonStyle = eStyle; oMenuItem.ImageOptions.SvgImage = SvgImage.FromFile(strFilePathSvg); oMenuItem.ItemClick += oCallback4Click; //add to parent oParentSuper.Items.Add(oMenuItem); oParent4MenuBtnItemContainer.ItemLinks.Add(oMenuItem); return(oMenuItem); }
public static BarButtonItem initSimpleBtn(int strId, string strName, string strText, RibbonItemStyles eStyle, string strFilePathSvg, ItemClickEventHandler oCallback4Click, RibbonControl oParentSuper, RibbonPageGroup oParent4Group) { var oButton = new BarButtonItem(); //set props oButton.Id = strId; oButton.Name = strName; var strLan = I18nUtilsEx.getStrFromApp(strName); oButton.Caption = String.IsNullOrEmpty(strLan) ? strText : strLan; oButton.RibbonStyle = eStyle; oButton.ImageOptions.SvgImage = SvgImage.FromFile(strFilePathSvg); oButton.ItemClick += oCallback4Click; //add to parent oParentSuper.Items.Add(oButton); oParent4Group.ItemLinks.Add(oButton); return(oButton); }
public static RibbonPageGroup initGroup(string strName, string strText, RibbonPage oPage) { var oGroup = new RibbonPageGroup(); //set props oGroup.Name = strName; var strLan = I18nUtilsEx.getStrFromApp(strName); oGroup.Text = String.IsNullOrEmpty(strLan) ? strText : strLan; //add to parent oPage.Groups.Add(oGroup); return(oGroup); }
public static BarSubItem initComplexBtn(int strId, string strName, string strText, RibbonItemStyles eStyle, string strFilePathSvg, RibbonControl oParentSuper, RibbonPageGroup oParent4Group) { var oComplexBtn = new BarSubItem(); //set props oComplexBtn.Id = strId; oComplexBtn.Name = strName; var strLan = I18nUtilsEx.getStrFromApp(strName); oComplexBtn.Caption = String.IsNullOrEmpty(strLan) ? strText : strLan; oComplexBtn.RibbonStyle = eStyle; oComplexBtn.ImageOptions.SvgImage = SvgImage.FromFile(strFilePathSvg); //add to parent oParentSuper.Items.Add(oComplexBtn); oParent4Group.ItemLinks.Add(oComplexBtn); return(oComplexBtn); }
private void LanForm_Load(object sender, EventArgs e) { this.m_labelLanTip.Text = I18nUtilsEx.getStrFromApp("lan"); }
private void _lanInit() { this.m_labelLanTip.Text = I18nUtilsEx.getStrFromApp("lan"); this.m_comboBoxLan.SelectedItem = I18nUtilsEx.getLanName(); }