public static YnoteProject Load(string file)
{
if (!File.Exists(file))
{
MessageBox.Show("Cannot Read Project \n" + file, null, MessageBoxButtons.OK, MessageBoxIcon.Error);
return null;
}
string json = File.ReadAllText(file);
var proj = JsonConvert.DeserializeObject<YnoteProject>(json);
proj.FilePath = file;
return proj;
}