private bool Save()
        {
            if (string.IsNullOrWhiteSpace(_path))
            {
                return SaveAs();
            }

            //Create the project model!
            var projectModel = new ProjectModel()
            {
                Slaves = new SlaveModel[]
                {
                    Slave.ToModel()
                }
            };

            //Save it!
            ProjectFactory.SaveProject(projectModel, _path);

            //We're clean
            _dirty.MarkClean();

            return true;
        }
        public static void SaveProject(ProjectModel project, string path)
        {
            var data = JsonConvert.SerializeObject(project);

            File.WriteAllText(path, data);
        }
예제 #3
0
        public static void SaveProject(ProjectModel project, string path)
        {
            var data = JsonConvert.SerializeObject(project);

            File.WriteAllText(path, data);
        }