private void ProcessFilterSelection(IfConditionType ifConditionType) { BaseMailbox emailActivity = eventActivity as BaseMailbox; switch (ifConditionType) { case IfConditionType.Subject: emailActivity.Filter = FilterOption.Subject; emailActivity.FilterValue = this.ifParameterField.Text; break; case IfConditionType.From: emailActivity.Filter = FilterOption.From; emailActivity.FilterValue = this.ifParameterField.Text; break; case IfConditionType.To: emailActivity.Filter = FilterOption.To; emailActivity.FilterValue = this.ifParameterField.Text; break; case IfConditionType.CC: emailActivity.Filter = FilterOption.CC; emailActivity.FilterValue = this.ifParameterField.Text; break; case IfConditionType.Bcc: emailActivity.Filter = FilterOption.Bcc; emailActivity.FilterValue = this.ifParameterField.Text; break; } }
private void ConditionSelectionChanged(object sender, EventArgs e) { if (subjectRadioButton.Checked) { this.conditionSelectionLabel.Text = "If Subject Equals"; ifConditionTypeSelection = IfConditionType.Subject; } else if (fromRadioButton.Checked) { this.conditionSelectionLabel.Text = "If From Equals"; ifConditionTypeSelection = IfConditionType.From; } else if (toRadioButton.Checked) { this.conditionSelectionLabel.Text = "If To Equals"; ifConditionTypeSelection = IfConditionType.To; } else if (ccRadioButton.Checked) { this.conditionSelectionLabel.Text = "If CC Equals"; ifConditionTypeSelection = IfConditionType.CC; } else if (bccRadioButton.Checked) { this.conditionSelectionLabel.Text = "If BCC Equals"; ifConditionTypeSelection = IfConditionType.Bcc; } else { this.conditionSelectionLabel.Text = string.Empty; ifConditionTypeSelection = IfConditionType.None; } Size size = this.conditionSelectionLabel.Size; this.ifParameterLinkLabel.Location = new Point(conditionSelectionLabel.Location.X + size.Width, conditionSelectionLabel.Location.Y); if (string.IsNullOrEmpty(this.ifParameterLinkLabel.Text)) { this.ifParameterLinkLabel.Text = "Enter Text Here"; } BuildWorkflow(WizardStep.Folder); ResetButtons(); }
internal IfToken(Line line, TokenType tokenType) { if (line.Arguments == null) { throw new ArgumentException("Arguments List of Line is null!", nameof(line)); } var conditionName = line.Arguments[0]; if (!Utils.TryGetEnum <IfConditionType>(conditionName, out var conditionType)) { throw new OBMMScriptTokenizerException($"Unable to parse {conditionName} as IfConditionType!"); } ConditionType = conditionType; Arguments = line.Arguments.TakeLast(line.Arguments.Count - 1).ToList(); Type = tokenType; Not = Type == TokenType.IfNot; }
private void ConditionSelectionChanged(object sender, EventArgs e) { if (subjectRadioButton.Checked) { this.conditionSelectionLabel.Text = "If Subject Equals"; ifConditionTypeSelection = IfConditionType.Subject; } else if (fromRadioButton.Checked) { this.conditionSelectionLabel.Text = "If From Equals"; ifConditionTypeSelection = IfConditionType.From; } else if (toRadioButton.Checked) { this.conditionSelectionLabel.Text = "If To Equals"; ifConditionTypeSelection = IfConditionType.To; } else if (ccRadioButton.Checked) { this.conditionSelectionLabel.Text = "If CC Equals"; ifConditionTypeSelection = IfConditionType.CC; } else if (bccRadioButton.Checked) { this.conditionSelectionLabel.Text = "If BCC Equals"; ifConditionTypeSelection = IfConditionType.Bcc; } else { this.conditionSelectionLabel.Text = string.Empty; ifConditionTypeSelection = IfConditionType.None; } Size size = this.conditionSelectionLabel.Size; this.ifParameterLinkLabel.Location = new Point(conditionSelectionLabel.Location.X + size.Width, conditionSelectionLabel.Location.Y); if (string.IsNullOrEmpty(this.ifParameterLinkLabel.Text)) this.ifParameterLinkLabel.Text = "Enter Text Here"; BuildWorkflow(WizardStep.Folder); ResetButtons(); }