Exemple #1
0
        /// <summary>
        /// 根据名称以及模组获得对应信息
        /// </summary>
        /// <param name="module"></param>
        /// <param name="feederName"></param>
        /// <returns></returns>
        public FeederConfig GetFeederConfig(Module module, string feederName)
        {
            FeederConfig config = new FeederConfig();
            SerializableHelper <FeederConfig> helper = new SerializableHelper <FeederConfig>(config);

            return(helper.DeJsonSerialize(PathDefine.sPathFeeder + $"{CommonHelper.GetEnumDescription(typeof(Module), module)}//{feederName}.json"));
        }
Exemple #2
0
 public void RemoveFeederConfig(FeederConfig feederConfig)
 {
     File.Delete(PathDefine.sPathFeeder + $"{CommonHelper.GetEnumDescription(typeof(Module), feederConfig.Module)}//{feederConfig.FeederName}.json");
 }
Exemple #3
0
        /// <summary>
        /// 保存Feeder信息,并自动更新到Feeder 上
        /// </summary>
        /// <param name="feederConfig"></param>
        public void SaveFeederConfig(FeederConfig feederConfig)
        {
            SerializableHelper <FeederConfig> helper = new SerializableHelper <FeederConfig>(feederConfig);

            helper.JsonSerialize(PathDefine.sPathFeeder + $"{CommonHelper.GetEnumDescription(typeof(Module),feederConfig.Module)}//{feederConfig.FeederName}.json");
        }