コード例 #1
0
        internal override void HandleValueChanged(TreeListNode node, TreeListColumn column, string value)
        {
            //check if a change value of a formula or condition requires to add new footnotes (e.g. user selected amount#x1 in itelli -> #x_amount needs to be added)
            Dictionary <KeyValuePair <string, string>, DefinitionAdmin.Par> footnoteParametersToAdd = ParameterValidation.GetFootnoteParametersToAdd(node, ref value);
            ActionGroup editActions = new ActionGroup();

            foreach (KeyValuePair <string, string> footnoteParameterToAdd in footnoteParametersToAdd.Keys)
            {
                editActions.AddAction(new AddParameterAction(node, footnoteParameterToAdd.Key, footnoteParametersToAdd[footnoteParameterToAdd], footnoteParameterToAdd.Value));
            }

            editActions.AddAction(new ChangeParameterValueAction(node, column, value)); //change formula/condition itself

            _mainForm.PerformAction(editActions,                                        //peform all necessary changes
                                    footnoteParametersToAdd.Count > 0,                  //update nodes only if parameters added
                                    false,                                              //no update of columns
                                    node.ParentNode);                                   //performance optimisation Aug 13: update only the concerned function instead of the whole tree
        }