// 导入工程数据 public bool ImportProj(string jsData) { try { ProjData = JsonMapper.ToObject <ProjData>(jsData); Edited = true; return(true); } catch (System.Exception) { return(false); } }
// 新建工程 public void NewProject(string filePath) { ProjData = new ProjData() { MapData = new MapData() { Name = "map_001", CellSize = 32, Cells = new Dictionary <string, Cell>() }, ScaleRate = 100, MapImgPath = filePath }; Edited = true; }