Beispiel #1
0
 private void InitializeDialog(System.Workflow.Activities.Rules.RuleSet ruleSet)
 {
     this.InitializeComponent();
     this.conditionTextBox.PopulateAutoCompleteList += new EventHandler <AutoCompletionEventArgs>(this.PopulateAutoCompleteList);
     this.thenTextBox.PopulateAutoCompleteList      += new EventHandler <AutoCompletionEventArgs>(this.PopulateAutoCompleteList);
     this.elseTextBox.PopulateAutoCompleteList      += new EventHandler <AutoCompletionEventArgs>(this.PopulateAutoCompleteList);
     this.conditionTextBox.PopulateToolTipList      += new EventHandler <AutoCompletionEventArgs>(this.PopulateAutoCompleteList);
     this.thenTextBox.PopulateToolTipList           += new EventHandler <AutoCompletionEventArgs>(this.PopulateAutoCompleteList);
     this.elseTextBox.PopulateToolTipList           += new EventHandler <AutoCompletionEventArgs>(this.PopulateAutoCompleteList);
     this.reevaluationComboBox.Items.Add(Messages.ReevaluationNever);
     this.reevaluationComboBox.Items.Add(Messages.ReevaluationAlways);
     this.chainingBehaviourComboBox.Items.Add(Messages.Sequential);
     this.chainingBehaviourComboBox.Items.Add(Messages.ExplicitUpdateOnly);
     this.chainingBehaviourComboBox.Items.Add(Messages.FullChaining);
     base.HelpRequested     += new HelpEventHandler(this.OnHelpRequested);
     base.HelpButtonClicked += new CancelEventHandler(this.OnHelpClicked);
     if (ruleSet != null)
     {
         this.dialogRuleSet = ruleSet.Clone();
     }
     else
     {
         this.dialogRuleSet = new System.Workflow.Activities.Rules.RuleSet();
     }
     this.chainingBehaviourComboBox.SelectedIndex = (int)this.dialogRuleSet.ChainingBehavior;
     this.rulesListView.Select();
     foreach (Rule rule in this.dialogRuleSet.Rules)
     {
         this.AddNewItem(rule);
     }
     if (this.rulesListView.Items.Count > 0)
     {
         this.rulesListView.Items[0].Selected = true;
     }
     else
     {
         this.rulesListView_SelectedIndexChanged(this, new EventArgs());
     }
 }