public IniDataFmt GetGropPara(string _path) { IniDataFmt data = new IniDataFmt() { IP = "", Path = "", Browser = "" }; folderPath = ""; string sPath = System.Reflection.Assembly.GetAssembly(this.GetType()).Location; char delimiterChars = '\\'; string[] words = sPath.Split(delimiterChars); for (int i = 0; i < words.Length - 1; i++) { folderPath = folderPath + words[i] + "\\"; } if (File.Exists(folderPath + "\\" + filename)) { using (ExecuteIniClass IniFile = new ExecuteIniClass(Path.Combine(folderPath, filename))) { data.IP = IniFile.getKeyValue("Dev", "IP"); data.Path = IniFile.getKeyValue("Dev", "Path"); data.Browser = IniFile.getKeyValue("Dev", "Browser"); } } return(data); }
public string GetPara(string _path) { string resPath = "", folderPath = ""; string sPath = System.Reflection.Assembly.GetAssembly(this.GetType()).Location; char delimiterChars = '\\'; string[] words = sPath.Split(delimiterChars); for (int i = 0; i < words.Length - 1; i++) { folderPath = folderPath + words[i] + "\\"; } if (File.Exists(folderPath + "\\" + filename)) { using (ExecuteIniClass IniFile = new ExecuteIniClass(Path.Combine(folderPath, filename))) { resPath = IniFile.getKeyValue("Dev", "IP"); } } return(resPath); }