protected override string OnRenameInternal(object ruleObject)
 {
     RuleSet item = ruleObject as RuleSet;
     using (RenameRuleObjectDialog dialog = new RenameRuleObjectDialog(base.Activity.Site, item.Name, new RenameRuleObjectDialog.NameValidatorDelegate(this.IsUniqueName), this))
     {
         if ((dialog.ShowDialog(this) == DialogResult.OK) && (dialog.RuleObjectName != item.Name))
         {
             this.ruleSetCollection.Remove(item);
             item.Name = dialog.RuleObjectName;
             this.ruleSetCollection.Add(item);
             return dialog.RuleObjectName;
         }
     }
     return null;
 }
Esempio n. 2
0
        protected override string OnRenameInternal(object ruleObject)
        {
            RuleExpressionCondition item = ruleObject as RuleExpressionCondition;

            using (RenameRuleObjectDialog dialog = new RenameRuleObjectDialog(base.Activity.Site, item.Name, new RenameRuleObjectDialog.NameValidatorDelegate(this.IsUniqueName), this))
            {
                if ((dialog.ShowDialog(this) == DialogResult.OK) && (dialog.RuleObjectName != item.Name))
                {
                    this.declarativeConditionCollection.Remove(item);
                    item.Name = dialog.RuleObjectName;
                    this.declarativeConditionCollection.Add(item);
                    return(dialog.RuleObjectName);
                }
            }
            return(null);
        }
Esempio n. 3
0
        protected override string OnRenameInternal(object ruleObject)
        {
            RuleSet ruleSet = ruleObject as RuleSet;

            using (RenameRuleObjectDialog dlg = new RenameRuleObjectDialog(this.Activity.Site, ruleSet.Name, new RenameRuleObjectDialog.NameValidatorDelegate(IsUniqueName), this))
            {
                if ((dlg.ShowDialog(this) == DialogResult.OK) && (dlg.RuleObjectName != ruleSet.Name))
                {
                    this.ruleSetCollection.Remove(ruleSet);
                    ruleSet.Name = dlg.RuleObjectName;
                    this.ruleSetCollection.Add(ruleSet);
                    return(dlg.RuleObjectName);
                }
            }
            return(null);
        }
        protected override string OnRenameInternal(object ruleObject)
        {
            RuleSet ruleSet = ruleObject as RuleSet;

            using (RenameRuleObjectDialog dlg = new RenameRuleObjectDialog(this.Activity.Site, ruleSet.Name, new RenameRuleObjectDialog.NameValidatorDelegate(IsUniqueName), this))
            {
                if ((dlg.ShowDialog(this) == DialogResult.OK) && (dlg.RuleObjectName != ruleSet.Name))
                {
                    this.ruleSetCollection.Remove(ruleSet);
                    ruleSet.Name = dlg.RuleObjectName;
                    this.ruleSetCollection.Add(ruleSet);
                    return dlg.RuleObjectName;
                }
            }
            return null;
        }
        protected override string OnRenameInternal(object ruleObject)
        {
            RuleExpressionCondition declarativeRuleDefinition = ruleObject as RuleExpressionCondition;

            using (RenameRuleObjectDialog dlg = new RenameRuleObjectDialog(this.Activity.Site, declarativeRuleDefinition.Name, new RenameRuleObjectDialog.NameValidatorDelegate(IsUniqueName), this))
            {
                if ((dlg.ShowDialog(this) == DialogResult.OK) && (dlg.RuleObjectName != declarativeRuleDefinition.Name))
                {
                    this.declarativeConditionCollection.Remove(declarativeRuleDefinition);
                    declarativeRuleDefinition.Name = dlg.RuleObjectName;
                    this.declarativeConditionCollection.Add(declarativeRuleDefinition);
                    return dlg.RuleObjectName;
                }
            }
            return null;
        }