Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
 static void Main()
 {
     I18nUtilsEx.init4I18N();
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     //Application.Run(new SysLogUtilsForm());
     Application.Run(new PathForm());
     //Application.Run(new MainForm());
     //Application.Run(new FLControlBaseTest());
     //Application.Run(new FLBtnTest());
 }
Пример #5
0
        private void m_comboBoxLan_SelectedIndexChanged(object sender, EventArgs e)
        {
            //var strLan = I18nUtilsEx.getLanName();
            //var strSelect = (string)this.m_comboBoxLan.SelectedItem;
            //if (strSelect != strLan)
            //{
            //    I18nUtilsEx.setLanNameEx(strSelect);
            //}
            var strSelect = (string)this.m_comboBoxLan.SelectedItem;

            I18nUtilsEx.setLanNameEx(strSelect);
        }
Пример #6
0
        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);
        }
Пример #7
0
        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);
        }
Пример #8
0
 private void LanForm_Load(object sender, EventArgs e)
 {
     this.m_labelLanTip.Text = I18nUtilsEx.getStrFromApp("lan");
 }
Пример #9
0
 private void _lanInit()
 {
     this.m_labelLanTip.Text         = I18nUtilsEx.getStrFromApp("lan");
     this.m_comboBoxLan.SelectedItem = I18nUtilsEx.getLanName();
 }