Exemplo n.º 1
0
        private void ConditionSetView_OnDataChanged()
        {
            var selectedRule = EditorTools.GetSelectedDtoFromTable <SocialExchangeDTO>(gridSocialExchanges);

            if (selectedRule == null)
            {
                return;
            }
            selectedRule.StartingConditions = conditions.GetData();
            LoadedAsset.AddOrUpdateExchange(selectedRule);

            SetModified();
        }
Exemplo n.º 2
0
        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);
            }
        }