//public bool CanSaveWorkspace() //{ // return Model != null; //} //public void SaveWorkspace() //{ // SaveData(); //} protected override bool LoadData() { string filepath = Filepath(); if (!File.Exists(filepath)) { GraphDesigner designer = new GraphDesigner().Default(); if (!DataService.TryWrite <GraphDesigner>(designer, out string error, filepath)) { OnFailure(error); } } bool b = DataService.TryRead <GraphDesigner>(filepath, out GraphDesigner model, out string message); if (!b) { OnFailure(message); } else { Model = model; } return(b); }
public Core() { _designer = new GraphDesigner(); _speedCalculator = new SpeedCalculator(); }