public static string GetLastLoginUser() { string UserNo = ""; string fileName = "ipConfig.xml"; if (!System.IO.File.Exists(fileName)) { UserNo = ""; } else { xmlDoc xmldoc = new xmlDoc(); if (xmldoc.LoadXmlFile(fileName)) { UserNo = xmldoc.readByNodeName("UserNo"); } } return(UserNo); }
public static string GetSettingUser() { string fileName = "ipConfig.xml"; if (!System.IO.File.Exists(fileName)) { return(""); } else { xmlDoc xmldoc = new xmlDoc(); if (xmldoc.LoadXmlFile(fileName)) { return(xmldoc.readByNodeName("User_ID")); } else { return(""); } } }
public static void GetServerInfo() { MD5Cls md5Cls = new MD5Cls(); string fileName = "ipConfig.xml"; if (!System.IO.File.Exists(fileName)) { return; } else { xmlDoc xmldoc = new xmlDoc(); if (xmldoc.LoadXmlFile(fileName)) { ServerIP = xmldoc.readByNodeName("ServerIP"); User_ID = xmldoc.readByNodeName("User_ID"); User_Pwd = md5Cls.MD5Decrypt(xmldoc.readByNodeName("User_Pwd"), xmldoc.readByNodeName("Key")); //md5Cls.MD5Decrypt(xmldoc.readByNodeName("User_Pwd"), xmldoc.readByNodeName("Key")) } } }
private void Login_Load(object sender, EventArgs e) { ServerInfo.GetServerInfo(); string fileName = "user.xml"; if (!System.IO.File.Exists(fileName)) { return; } else { xmlDoc xmldoc = new xmlDoc(); if (xmldoc.LoadXmlFile(fileName)) { this.textBox1.Text = xmldoc.readByNodeName("User_Num"); if (xmldoc.readByNodeName("User_Pwd") != "") { this.textBox2.Text = md5Cls.MD5Decrypt(xmldoc.readByNodeName("User_Pwd"), xmldoc.readByNodeName("Key")); this.checkBox1.Checked = true; } } } }