static public ConfigClass GetConfig() { ConfigClass conf; StreamReader reader = new StreamReader(@"..\..\Config.json"); String str = reader.ReadToEnd(); reader.Close(); if (str == "" || str == null) { conf = new ConfigClass(@"D:\E-Solution\WebGiamSatSanLuongDien\DocDuLieuCongTo\TestTheoDoi", @"D:\E-Solution\WebGiamSatSanLuongDien\DocDuLieuCongTo\TestChuyen", true); SetConfig(conf); } else { conf = JsonConvert.DeserializeObject <ConfigClass>(str); } return(conf); }
static public ConfigClass GetConfig() { ConfigClass conf; StreamReader reader = new StreamReader(Environment.CurrentDirectory + "\\Config.json"); String str = reader.ReadToEnd(); reader.Close(); if (str == "" || str == null) { conf = new ConfigClass(@"C:\SLCTO\ESMETERING", @"C:\SLCTO\ESMR", true); SetConfig(conf); } else { conf = JsonConvert.DeserializeObject <ConfigClass>(str); } return(conf); }