bin/Debug/Config.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using System.IO;
namespace AutoUpdate
{
public class Config
{
private bool enabled = true;
public bool Enabled { get { return enabled; } set { enabled = value; } }
private string serverUrl = "http://27.29.208.155/LDuploads";
public string ServerUrl { get { return serverUrl; } set { serverUrl = value; } }
private UpdateFileList updateFileList = new UpdateFileList();
public UpdateFileList UpdateFileList
{
get { return updateFileList; }
set { updateFileList = value; }
}
public static Config LoadConfig(string file)
{
XmlSerializer xs = new XmlSerializer(typeof(Config));
StreamReader sr = new StreamReader(file);
Config config = xs.Deserialize(sr) as Config;
sr.Close();
return config;
}
public void SaveConfig(string file)
{
XmlSerializer xs = new XmlSerializer(typeof(Config));
StreamWriter sw = new StreamWriter(file);
xs.Serialize(sw, this);
sw.Close();
}
}
public class UpdateFileList : List<LocalFile>
{
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。