Exemple #1
0
        protected override void OnAssetDataLoaded(CommeillFautAsset asset)
        {
            this._socialExchangeList       = new BindingListView <SocialExchangeDTO>((IList)null);
            gridSocialExchanges.DataSource = this._socialExchangeList;

            conditions = new ConditionSetView();
            conditionSetEditorControl.View = conditions;
            conditions.OnDataChanged      += ConditionSetView_OnDataChanged;


            this._socialExchangeList.DataSource = LoadedAsset.GetAllSocialExchanges().ToList();

            EditorTools.HideColumns(gridSocialExchanges, new[] {
                PropertyUtil.GetPropertyName <SocialExchangeDTO>(dto => dto.Id),
                PropertyUtil.GetPropertyName <SocialExchangeDTO>(dto => dto.StartingConditions)
            });



            if (this._socialExchangeList.Any())
            {
                var ra = LoadedAsset.GetSocialExchange(this._socialExchangeList.First().Id);
                UpdateConditions(ra);
            }
        }
Exemple #2
0
        protected void OnAssetDataLoaded()
        {
            attributionRules = new BindingListView <AttributionRuleDTO>((IList)null);
            dataGridViewAttributionRules.DataSource = this.attributionRules;

            _attRuleConditionSetEditor.View = conditions;

            conditions = new ConditionSetView();
            _attRuleConditionSetEditor.View = conditions;
            conditions.OnDataChanged       += ConditionSetView_OnDataChanged;
            attributionRules.DataSource     = _loadedAsset.GetAttributionRules().ToList();
            EditorTools.HideColumns(dataGridViewAttributionRules, new[] {
                PropertyUtil.GetPropertyName <AttributionRuleDTO>(o => o.Id)
            });
            EditorTools.UpdateFormTitle("Social Importance", _currentPath, this);
        }
Exemple #3
0
        protected override void OnAssetDataLoaded(SocialImportanceAsset asset)
        {
            attributionRules = new BindingListView <AttributionRuleDTO>((IList)null);
            dataGridViewAttributionRules.DataSource = this.attributionRules;

            _attRuleConditionSetEditor.View = conditions;

            conditions = new ConditionSetView();
            _attRuleConditionSetEditor.View = conditions;
            conditions.OnDataChanged       += ConditionSetView_OnDataChanged;
            attributionRules.DataSource     = LoadedAsset.GetAttributionRules().ToList();
            EditorTools.HideColumns(dataGridViewAttributionRules, new[] {
                PropertyUtil.GetPropertyName <AttributionRuleDTO>(o => o.Id),
                PropertyUtil.GetPropertyName <AttributionRuleDTO>(o => o.Conditions)
            });

            _wasModified = false;
        }
Exemple #4
0
        public void OnAssetDataLoaded()
        {
            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)
            });

            if (actionRules.Any())
            {
                var ra = _loadedAsset.GetActionRule(actionRules.First().Id);
                UpdateConditions(ra);
            }
            EditorTools.UpdateFormTitle("Emotional Decision Making", _currentFilePath, this);
        }
Exemple #5
0
        protected void OnAssetDataLoaded()
        {
            this._socialExchangeList       = new BindingListView <SocialExchangeDTO>((IList)null);
            gridSocialExchanges.DataSource = this._socialExchangeList;

            conditions = new ConditionSetView();
            conditionSetEditorControl.View = conditions;
            conditions.OnDataChanged      += ConditionSetView_OnDataChanged;

            this._socialExchangeList.DataSource = _loadedAsset.GetAllSocialExchanges().ToList();

            EditorTools.HideColumns(gridSocialExchanges, new[] {
                PropertyUtil.GetPropertyName <SocialExchangeDTO>(dto => dto.Id)
            });

            if (this._socialExchangeList.Any())
            {
                var ra = _loadedAsset.GetSocialExchange(this._socialExchangeList.First().Id);
                UpdateConditions(ra);
            }
            EditorTools.UpdateFormTitle("CiF-CK", _currentFilePath, this);
        }
Exemple #6
0
        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);
            }
        }
Exemple #7
0
        public AddInfluenceRule(SocialExchange _se, InfluenceRuleDTO dto)
        {
            InitializeComponent();

            _dto = dto;
            SE   = _se;

            conditions = new ConditionSetView();
            conditionSetEditorControl.View = conditions;
            //conditions.OnDataChanged += ConditionSetView_OnDataChanged;
            conditions.SetData(dto.Rule);

            if (dto != null)
            {
                valueFieldBox.Value = dto.Value;

                if (dto.Mode != null)
                {
                    modeNameField.Value = dto.Mode;
                }
            }

            buttonAdd.Text = (dto.Id == Guid.Empty) ? "Add" : "Update";
        }