Esempio n. 1
0
 /// <summary>
 /// 构造读取同一路径的配置工厂
 /// </summary>
 /// <param name="ConfigFolder"></param>
 /// <param name="ConfigObj"></param>
 ///  <param name="Obser"></param>
 public ConfigFactory(string ConfigFolder, ILemonEnvironment ConfigObj, Lemonade.Frame.Design.IObserver Obser)
 {
     this.configfolder = ConfigFolder;
     this.config       = ConfigObj;
     this.obser        = Obser;
     InsConfig();
 }
Esempio n. 2
0
        /// <summary>
        /// 获取连接字符串
        /// </summary>
        /// <returns></returns>
        public string GetConnectString()
        {
            ILemonEnvironment config = LemonEnvironment.GetInstance();

            return(config.BllConfig.GetConfig <ILemonEnvironment>().DatabaseConn);
            //return "";
        }
Esempio n. 3
0
        /// <summary>
        /// 框架版本
        /// </summary>
        protected virtual void LemonadeVersion()
        {
            this.listBox2.Items.Clear();
            ILemonEnvironment           envir  = LemonEnvironment.GetInstance();
            Dictionary <string, string> asmdic = new Dictionary <string, string>();

            this.SetValue(envir.ActionsManager, ref asmdic);
            this.SetValue(envir.CSFMain, ref asmdic);
            this.SetValue(envir.Guardian, ref asmdic);
            this.SetValue(envir.MenuItemFactory, ref asmdic);
            this.SetValue(envir.ModuleHandles, ref asmdic);
            this.SetValue(envir.ModuleManager, ref asmdic);
            this.SetValue(envir.SwapPool, ref asmdic);
            this.SetValue(envir.ToolsBarManager, ref asmdic);
            this.SetValue(envir.UIManager, ref asmdic);
            //foreach (ModuleInfo info in Lemon.ModuleInfos)
            //{

            //    string name = envir.ActionsManager.GetType().Name;
            //    string version = envir.ActionsManager.GetType().Assembly.GetName().Version.ToString();
            //    if (!asmdic.ContainsKey(name))
            //    {
            //        asmdic.Add(name, version);
            //    }
            //}
            foreach (string kname in asmdic.Keys)
            {
                this.listBox2.Items.Add(kname + "    " + asmdic[kname].ToString());
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 创建系统配置
        /// </summary>
        public virtual ILemonEnvironment DeployConfig()
        {
            ILemonEnvironment sysconfig = LemonEnvironment.GetInstance();

            Lemonade.Frame.BLL.IConfigFactory configsetup = new Lemonade.Frame.BLL.ConfigFactory(AppDomain.CurrentDomain.BaseDirectory + "\\config\\", sysconfig, this.displayFrm);
            configsetup.Processing();
            return(sysconfig);
        }
Esempio n. 5
0
 /// <summary>
 /// 处理过程
 /// </summary>
 public virtual void Processing()
 {
     AddMessageBus();
     Debug.WriteLine("启动处理过程 " + Thread.CurrentThread.ManagedThreadId.ToString());
     this.SysConfig         = DeployConfig();
     this.SysConfig.CSFMain = (IMainForm)this.systemFrm;
     ((Lemonade.Frame.IMainForm) this.systemFrm).Envir = this.SysConfig;
     Prepose();
     this.systemFrm.StartProcess();
     this.systemFrm.Finish();
     this.RemoveMessageBus();
 }
Esempio n. 6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="FileFullName"></param>
 /// <param name="EnvirObj"></param>
 public ConfigPart(string FileFullName, ILemonEnvironment EnvirObj)
 {
     this.configXml = new XmlHelper(FileFullName);
     this.Envir     = EnvirObj;
 }
Esempio n. 7
0
 /// <summary>
 /// 系统配置
 /// </summary>
 public Setting(string FileFullName, ILemonEnvironment ConfigObj)
     : base(FileFullName, ConfigObj)
 {
 }