SS.Ynote.Classic.Core.Project.YnoteProject.Load C# (CSharp) Method

Load() public static method

Loads a Project
public static Load ( string file ) : YnoteProject
file string
return YnoteProject
        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;
        }
YnoteProject