Example #1
0
        public string GetConfig(string name, ConfigType type)
        {
            string curPath = "";

            if (type.Equals(ConfigType.Camera))
            {
                curPath = string.Format("{0}.xml", GetResConfig(name, type));
            }
            else if (type.Equals(ConfigType.Map))
            {
                curPath = string.Format("{0}.xml", GetResConfig(name, type));
            }
            else if (type.Equals(ConfigType.Level))
            {
                curPath = string.Format("{0}.xml", GetResConfig(name, type));
            }
            else if (type.Equals(ConfigType.Table))
            {
                curPath = string.Format("{0}.txt", GetResConfig(name, type));
            }
            else if (type.Equals(ConfigType.Xml))
            {
                curPath = string.Format("{0}.xml", GetResConfig(name, type));
            }
            return(curPath);
        }
Example #2
0
 public string GetResConfig(string name, ConfigType type)
 {
     if (type.Equals(ConfigType.Table))
     {
         return(GetTableConfig(name));
     }
     return("");
 }
Example #3
0
 internal static dynamic GetCustomConfig(ConfigType configType, string configName = null)
 {
     if (configType.Equals(ConfigType.global))
     {
         if (globalFileConfig == null)
         {
             globalFileConfig = GetGlobalConfigFromFile();
         }
         return(GetObjectFromDotName(globalFileConfig, configName));
     }
     else if (configType.Equals(ConfigType.server))
     {
         if (serverFileConfig == null)
         {
             serverFileConfig = GetServerConfigFromFile();
         }
         return(GetObjectFromDotName(serverFileConfig, configName));
     }
     else
     {
         return(configName);
     }
 }
Example #4
0
 public override bool Equals(object obj)
 {
     return(obj == null || !(obj is Configuration) ? false : ConfigType.Equals(((Configuration)obj).ConfigType));
 }