private void dataGridViewReactiveActions_RowEnter(object sender, DataGridViewCellEventArgs e) { var reaction = ((ObjectView <ActionRuleDTO>)dataGridViewReactiveActions.Rows[e.RowIndex].DataBoundItem).Object; selectedActionId = reaction.Id; var ra = LoadedAsset.GetActionRule(selectedActionId); UpdateConditions(ra); }
protected override void OnAssetDataLoaded(EmotionalDecisionMakingAsset asset) { conditionSetView = new ConditionSetView(); conditionSetEditor.View = conditionSetView; conditionSetView.OnDataChanged += conditionSetView_OnDataChanged; actionRules.DataSource = LoadedAsset.GetAllActionRules().ToList(); dataGridViewReactiveActions.Columns[PropertyUtil.GetPropertyName <ActionRuleDTO>(dto => dto.Priority)].DisplayIndex = 3; EditorTools.HideColumns(dataGridViewReactiveActions, new[] { PropertyUtil.GetPropertyName <ActionRuleDTO>(d => d.Id), PropertyUtil.GetPropertyName <ActionRuleDTO>(d => d.Conditions) }); if (actionRules.Any()) { var ra = LoadedAsset.GetActionRule(actionRules.First().Id); UpdateConditions(ra); } }