//TTT t=TTT.asdwqe; // Use this for initialization void Start() { //Debug.Log(t.GetType()+" "+t.ToString()); //AssetBundle ab= ResMgr.Ins.LoadAssetBundle("localization"); //TextAsset t= ab.LoadAsset<TextAsset>("localization"); //Debug.Log("1 "+t.text); //ab.Unload(false); //TextAsset t1 = ab.LoadAsset<TextAsset>("localization"); //Debug.Log("2 " + t1.text); //ResMgr2.Ins.LoadABAssetAsync("localization", "localization", (Material tx) => { // Debug.Log(tx.name); //}); //Debug.Log(ResMgr2.Ins.LoadABAsset<Material>("localization", "localization").name); //ResMgr.Ins.GetAsset("localization", "Localization", (TextAsset tx) => { // if (tx != null) { // Debug.Log(tx.text); // } //}); //string tx = "asdasd,123,!!!"; //string[] t = tx.Split(new char[] { ','},2); //for (int i = 0; i < t.Length; i++) { // Debug.Log(t[i]); //} Debug.Log(LocalizationMgr.Ins.Get("language_chinese")); ConfigDBReader.ReadAllCfg(() => { DBResPathCfg cfg = DBMgr.Ins.GetConfgDB <DBResPathCfg>(); Debug.Log(cfg.F_GetResPath(1)); }); }
public override void InitDB() { resDic = new Dictionary <int, CResPath>(); ConfigDBReader.ReadCfg <CResPath>(CResPath.tableName, (cfg) => { resDic[cfg.q_id] = cfg; }); }
/// <summary> /// конструктор с параметрами /// пример /// "postgres9.1gb.ua", "5432", "xgbua_x_exz", "cf4d55a7nm", "xgbua_x_exz" /// </summary> /// <param name="server">адрес сервера</param> /// <param name="port">порт</param> /// <param name="user">пользователь</param> /// <param name="password">пароль</param> /// <param name="database">база</param> public Connection() { try { ConfigDBReader cread = new ConfigDBReader(); DBSettingsModel settings = cread.DBReader(); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("Server = " + settings.server + "; Port = " + settings.port + "; User Id = " + settings.user + "; Password = "******"; Database = " + settings.database); this.string_connection = stringBuilder.ToString(); Console.WriteLine("DB add line succesfully!"); } catch (Exception ex) { Console.WriteLine("Error :" + ex.Message); } }