private void OnSimulateCanalCommandExecuted(string obj) { Task <CanalData> task = CanalServiceAgent.ExecuteCanalSimulationAsync(); task.Wait(); CanalData = task.Result; ActiveCanalGeometryData = CanalData.GetCanalGeometryData(CanalData.Canal.CanalStretches.Select(cs => cs.Id).FirstOrDefault()); RaisePropertiesChanged(); }
private void OnLoadCanalCommandExecuted(string obj) { OpenFileDialog openFileDialog = new OpenFileDialog(); if (openFileDialog.ShowDialog() == true) { // C:\Users\rbo\Documents\ScienceAndMaths string file = openFileDialog.FileName; ICanal canal = ConfigurationServiceAgent.LoadCanalConfiguration(file); CanalData = new CanalData(canal); ActiveCanalGeometryData = CanalData.GetCanalGeometryData(CanalData.Canal.CanalStretches.Select(cs => cs.Id).FirstOrDefault()); RaisePropertiesChanged(); } }