- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
public void GeneratXMLForChatServerControl()
{
List<ClassUsersList> List = GetUsersList();
System.IO.StreamWriter TextW = new System.IO.StreamWriter("Update_Settings.xml", false,System.Text.Encoding.GetEncoding("UTF-8"));
TextW.WriteLine("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
TextW.WriteLine("<General>");
foreach (ClassUsersList User in List)
{
User.Information = User.Information.Replace("<", "");
User.Information = User.Information.Replace(">", "");
User.Information = User.Information.Replace("&", "");
TextW.WriteLine("<Name>" + User.Information + "</Name>");
TextW.WriteLine("<Login>" + User.UIN + "</Login>");
TextW.WriteLine("<Password>" + User.Pwd + "</Password>");
TextW.WriteLine("<LocalPath>D:\\chat2\\" + User.UID + "\\</LocalPath>");
TextW.WriteLine("<UID>" + User.UID + "</UID>");
TextW.WriteLine("<UIN>" + User.UIN + "</UIN>");
TextW.WriteLine("<Lock>0</Lock>");
TextW.WriteLine("");
}
TextW.WriteLine("</General>");
TextW.Flush();
TextW.Close();
}