public void OpenSetting()
        {
            List <System.Windows.Forms.InputLanguage> list = new List <System.Windows.Forms.InputLanguage>();

            foreach (System.Windows.Forms.InputLanguage val in System.Windows.Forms.InputLanguage.InstalledInputLanguages)
            {
                list.Add(val);
            }
            ((IfrmSetting)iBaseView["FrmSetting"]).languageList   = list;
            ((IfrmSetting)iBaseView["FrmSetting"]).inputMethod_CH = CustomConfigManager.GetInputMethod(EN_CH.CH);
            ((IfrmSetting)iBaseView["FrmSetting"]).inputMethod_EN = CustomConfigManager.GetInputMethod(EN_CH.EN);

            //打印机
            ManagementObjectSearcher   query;
            ManagementObjectCollection queryCollection;
            string _classname = "SELECT * FROM Win32_Printer";

            query           = new ManagementObjectSearcher(_classname);
            queryCollection = query.Get();
            ((IfrmSetting)iBaseView["FrmSetting"]).loadPrinter(queryCollection, CustomConfigManager.GetPrinter(0), CustomConfigManager.GetPrinter(1), CustomConfigManager.GetPrinter(2));
            //消息
            ((IfrmSetting)iBaseView["FrmSetting"]).runacceptMessage   = CustomConfigManager.GetrunacceptMessage() == 1 ? true : false;
            ((IfrmSetting)iBaseView["FrmSetting"]).displayWay         = CustomConfigManager.GetDisplayWay() == 1 ? true : false;
            ((IfrmSetting)iBaseView["FrmSetting"]).setbackgroundImage = CustomConfigManager.GetBackgroundImage();
            ((IfrmSetting)iBaseView["FrmSetting"]).mainStyle          = CustomConfigManager.GetMainStyle();
            ((System.Windows.Forms.Form)iBaseView["FrmSetting"]).ShowDialog();
        }
Exemplo n.º 2
0
        void _control_Enter(object sender, EventArgs e)
        {
            Control       ctl             = (Control)sender;
            FormItem      item            = itemlist.Find(x => x.controlItem.Equals(ctl));
            int           index           = CustomConfigManager.GetInputMethod(item.inputMethod);
            InputLanguage currentLanguage = InputLanguage.InstalledInputLanguages[index];

            InputLanguage.CurrentInputLanguage = currentLanguage;
        }
Exemplo n.º 3
0
        /// <summary>
        /// 填充数据,获取报表
        /// </summary>
        /// <param name="reportFile">报表文件</param>
        /// <param name="printerIndex">打印机索引</param>
        /// <param name="para">报表参数</param>
        /// <param name="datasource">报表数据源</param>
        /// <returns></returns>
        public static GridReport GetReport(string reportFile, int printerIndex, Dictionary <string, Object> para, DataTable datasource)
        {
            reportFile = EFWCoreLib.CoreFrame.Init.AppGlobal.AppRootPath + @"Report\\" + reportFile;
            //报表文件不存在创建空的报表格式
            GridReport report = new GridReport(reportFile, para, datasource);

            report.Report.Printer.PrinterName = CustomConfigManager.GetPrintName(printerIndex);
            return(report);
        }
Exemplo n.º 4
0
        public static IDBHelper CreateInstance()
        {
            string reflectionConfig = CustomConfigManager.GetConfig("ReflectionConfig");
            //typeName 命名空间名+类名
            string typeName = reflectionConfig.Split(",")[0];
            string dllName  = reflectionConfig.Split(",")[1];

            //Assembly assembly = Assembly.Load(dllName); //Dll名称,不需要后缀
            Assembly assembly = Assembly.LoadFrom(dllName); //dll名称(需要后缀)
            Type     type     = assembly.GetType(typeName);
            object   obj      = Activator.CreateInstance(type);

            return(obj as IDBHelper);
        }
Exemplo n.º 5
0
        public static IDBHelper getClass()
        {
            string ReflictionConfig  = CustomConfigManager.GetConfig("ReflictionConfig");
            var    ReflictionConfigS = ReflictionConfig.Split(",");
            //获取数据清单metadata
            Assembly assembly3 = Assembly.LoadFrom($"{ReflictionConfigS[0]}"); //dll名称(需要后缀)
            ///2.获取类型
            Type type = assembly3.GetType($"{ReflictionConfigS[1]}");
            //创建实例
            object obj = Activator.CreateInstance(type);

            //类型转换。
            return(obj as IDBHelper);
        }
        public override void Init()
        {
            frmlogin = (IfrmLogin)iBaseView["FrmLogin"];

            int mainStyle = CustomConfigManager.GetMainStyle();

            if (mainStyle == 0)
            {
                frmmain = (IfrmMain)iBaseView["FrmMain"];
            }
            else
            {
                frmmain = (IfrmMain)iBaseView["FrmMainRibbon"];
            }

            DebugLogin();
        }
        //private Form _frmsplash;

        //public Form Frmsplash
        //{
        //    get { return _frmsplash; }
        //    set { _frmsplash = value; }
        //}

        public override void Init()
        {
            frmlogin = (IfrmLogin)iBaseView["FrmLogin"];

            int mainStyle = CustomConfigManager.GetMainStyle();

            if (mainStyle == 0)
            {
                frmmain = (IfrmMain)iBaseView["FrmMain"];
            }
            else
            {
                frmmain = (IfrmMain)iBaseView["FrmMainRibbon"];
            }

            //创建连接
            EFWCoreLib.WcfFrame.ClientLinkManage.CreateConnection("MainFrame.Service");
        }
Exemplo n.º 8
0
        public static ILooger GetLogger(string layoutName)
        {
            Level level = Level.None;

            LoggerConfigSection getsection = CustomConfigManager.LoggerConfigSection();

            if (getsection == null)
            {
                return(new Looger(level, null));
            }

            LoggerConfigElement findelement = getsection.Loggers[layoutName];

            if (findelement == null)
            {
                return(new Looger(level, null));
            }

            Enum.TryParse(findelement.Level, out level);

            return(new Looger(level, findelement));
        }
Exemplo n.º 9
0
        //打开首页
        public void ShowForm(Form form, string menuName, string menuId)
        {
            int index = this.barMainContainer.Items.IndexOf(menuId);

            if (index < 0)
            {
                if (form != null)
                {
                    //List<DockContainerItem> listitem = new List<DockContainerItem>();

                    //CloseTab delegateCloseTable = delegate()
                    //{
                    //    foreach (DockContainerItem item in listitem)
                    //        barMainContainer.CloseDockTab(item);
                    //};

                    barMainContainer.BeginInit();
                    int displayWay = CustomConfigManager.GetDisplayWay();//显示方式 0 标准 1全屏
                    if (displayWay == 1)
                    {
                        form.Dock = DockStyle.Fill;
                    }
                    form.Size            = new Size(1000, 600);
                    form.FormBorderStyle = FormBorderStyle.None;
                    form.TopLevel        = false;
                    if (this.barMainContainer.Width > form.Width)
                    {
                        form.Location = new Point((barMainContainer.Width - form.Width) / 2, 0);
                    }
                    else
                    {
                        form.Location = new Point(0, 0);
                    }
                    form.Show();

                    PanelDockContainer panelDockMain = new PanelDockContainer();
                    panelDockMain.Dock = DockStyle.Fill;
                    panelDockMain.Controls.Add(form);
                    panelDockMain.Location            = new System.Drawing.Point(3, 28);
                    panelDockMain.Style.Alignment     = System.Drawing.StringAlignment.Center;
                    panelDockMain.Style.GradientAngle = 90;
                    panelDockMain.BackColor           = Color.FromArgb(227, 239, 255);
                    panelDockMain.AutoScroll          = true;



                    DockContainerItem item = new DockContainerItem(form.Text);
                    item.Text    = menuName;
                    item.Name    = menuId;
                    item.Control = panelDockMain;
                    item.Visible = true;
                    item.Tag     = form;//绑定界面对象
                    //item.Image = GetButtonImage(btnImage);
                    //listitem.Add(item);

                    item.VisibleChanged += new EventHandler(item_VisibleChanged);
                    //this.barMainContainer.Controls.Add(panelDockMain);
                    this.barMainContainer.Items.Add(item);
                    this.barMainContainer.SelectedDockContainerItem = item;

                    barMainContainer.EndInit();

                    this.barMainContainer.Show();

                    if (form is BaseFormBusiness)
                    {
                        (form as BaseFormBusiness).ExecOpenWindowBefore(form, null);
                    }
                }
            }
            else
            {
                this.barMainContainer.SelectedDockContainerItem = (DockContainerItem)this.barMainContainer.Items[index];
                string formname = ((DockContainerItem)this.barMainContainer.Items[index]).Tag.GetType().Name;
                if (formname == "FrmWebBrowser")
                {
                    IfrmWebBrowserView webbrowser = (IfrmWebBrowserView)((DockContainerItem)this.barMainContainer.Items[index]).Tag;
                    webbrowser.NavigateUrl();//重新加载网址
                }
            }
        }
 public void SaveSetting()
 {
     ((System.Windows.Forms.Form)iBaseView["FrmSetting"]).Close();
     CustomConfigManager.SaveConfig(((IfrmSetting)iBaseView["FrmSetting"]).inputMethod_EN, ((IfrmSetting)iBaseView["FrmSetting"]).inputMethod_CH, ((IfrmSetting)iBaseView["FrmSetting"]).printfirst, ((IfrmSetting)iBaseView["FrmSetting"]).printsecond, ((IfrmSetting)iBaseView["FrmSetting"]).printthree, ((IfrmSetting)iBaseView["FrmSetting"]).runacceptMessage ? 1 : 0, ((IfrmSetting)iBaseView["FrmSetting"]).displayWay ? 1 : 0, ((IfrmSetting)iBaseView["FrmSetting"]).setbackgroundImage, ((IfrmSetting)iBaseView["FrmSetting"]).mainStyle);
 }
 public string GetBackGroundImage()
 {
     return(CustomConfigManager.GetBackgroundImage());
 }