private void ConditionSetView_OnDataChanged() { var selectedRule = EditorTools.GetSelectedDtoFromTable <SocialExchangeDTO>(gridSocialExchanges); if (selectedRule == null) { return; } selectedRule.StartingConditions = conditions.GetData(); LoadedAsset.AddOrUpdateExchange(selectedRule); SetModified(); }
private void buttonDuplicateSE_Click(object sender, EventArgs e) { var r = EditorTools.GetSelectedDtoFromTable <SocialExchangeDTO>( this.gridSocialExchanges); if (r != null) { r.Id = Guid.Empty; var newRuleId = LoadedAsset.AddOrUpdateExchange(r); _socialExchangeList.DataSource = LoadedAsset.GetAllSocialExchanges().ToList(); EditorTools.HighlightItemInGrid <SocialExchangeDTO>(gridSocialExchanges, newRuleId); } }