private void NewExecute(object obj) { var temp = new SimpleModel(); SideBar.AddItem(temp); SideBar.SelectedItem = temp; SelectedNodeModel = new NodeModel(); SelectedGraph = GraphModels.FirstOrDefault(); SaveCommand.NotifyCanExecuteChanged(); }
private async void SelectExecute(SimpleModel obj) { if (obj != null && obj.Id != 0) { var result = await _nodeService.GetByIdAsync(obj.Id); if (result.Succeed) { SelectedNodeModel = result.Value; SelectedGraph = GraphModels.FirstOrDefault(x => x.Id == SelectedNodeModel.GraphId); } else { await ShowMessage(result.ErrorMessage); } } SaveCommand.NotifyCanExecuteChanged(); }