Exemplo n.º 1
0
        /// <summary>
        /// 保存配置类实例
        /// </summary>
        /// <returns></returns>
        public static bool SaveConfig(ScriptEventConfigInfo scripteventconfiginfo)
        {
            ScriptEventConfigFileManager scfm = new ScriptEventConfigFileManager();

            ScriptEventConfigFileManager.ConfigInfo = scripteventconfiginfo;
            return(scfm.SaveConfig());
        }
Exemplo n.º 2
0
 /// <summary>
 /// 返回配置类实例
 /// </summary>
 /// <returns></returns>
 public static ScheduleConfigInfo LoadConfig()
 {
     try
     {
         ConfigInfo = DefaultConfigFileManager.LoadConfig(ref m_fileoldchange, ConfigFilePath, ConfigInfo, true);
     }
     catch
     {
         if (!File.Exists(ConfigFilePath))
         {
             ScriptEventConfigFileManager secf = new ScriptEventConfigFileManager();
             secf.SaveConfig(ConfigFilePath, ConfigInfo);
         }
     }
     return(ConfigInfo as ScheduleConfigInfo);
 }
Exemplo n.º 3
0
        /// <summary>
        /// 返回配置类实例
        /// </summary>
        /// <returns></returns>
        public static ScriptEventConfigInfo LoadConfig()
        {
            try
            {
                ConfigInfo = DefaultConfigFileManager.LoadConfig(ref m_fileoldchange, ConfigFilePath, ConfigInfo, false);
            }
            catch
            {
                if (!File.Exists(ConfigFilePath))
                {
                    ScriptEventConfigFileManager secf = new ScriptEventConfigFileManager();
                    secf.SaveConfig(ConfigFilePath, ConfigInfo);
                }
            }

            return ConfigInfo as ScriptEventConfigInfo;
        }
Exemplo n.º 4
0
 /// <summary>
 /// 保存配置类实例
 /// </summary>
 /// <returns></returns>
 public static bool SaveConfig(ScriptEventConfigInfo scripteventconfiginfo)
 {
     ScriptEventConfigFileManager scfm = new ScriptEventConfigFileManager();
     ScriptEventConfigFileManager.ConfigInfo = scripteventconfiginfo;
     return scfm.SaveConfig();
 }
Exemplo n.º 5
0
 /// <summary>
 /// 获取配置类实例
 /// </summary>
 /// <returns></returns>
 public static ScriptEventConfigInfo GetConfig()
 {
     return(ScriptEventConfigFileManager.LoadConfig());
 }