public static Setting Deserialize()
{
var assemblylocation = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
var configpath = Path.Combine(string.IsNullOrEmpty(assemblylocation) ? "" : assemblylocation, CONFIGFILE);
string config = "";
using (var s = new StreamReader(configpath, Encoding.ASCII, false))
{
config = s.ReadToEnd();
s.Close();
}
var ret = JsonSerializer<Setting>.DeSerialize(config);
ret.BackgroundImageAbsolutePath = ToFullPath(ret.BackgroundImageAbsolutePath);
ret.BackgroundImagesDirectoryAbsolutePath = ToFullPath(ret.BackgroundImagesDirectoryAbsolutePath);
return ret;
}