public override void SetContext(StepEditContext context, EmailNotification notification) { base.SetContext(context, notification); cbSmtpPresets.DataSource = Enum.GetValues(typeof(SMTPPresets)); if (notification.SmtpHost != null && notification.SmtpHost.ToLower() == "smtp.gmail.com" && notification.SmtpPort == 587 && notification.UseSSL) { cbSmtpPresets.SelectedItem = SMTPPresets.Gmail; } else { cbSmtpPresets.SelectedItem = SMTPPresets.Custom; } txtSmtpHost.Text = notification.SmtpHost; nudSmtpPort.Value = notification.SmtpPort; cbSmtpSSL.Checked = notification.UseSSL; txtSmtpUsername.Text = notification.SmtpUsername; txtSmtpPassword.Text = notification.SmtpPassword; txtFromAddress.Text = notification.FromAddress; txtFromAddressDisplayName.Text = notification.FromAddressDisplayName; txtToAddresses.Text = String.Join("; ", notification.ToAddresses); }
public override void SetContext(StepEditContext context) { base.SetContext(context); setValueSelector.SetContext(Step.Mode, m_ElementIdentifier, Step.AttributeName); setValueEditor.SetContext(StepEditContext.StateVariables, Step.Value, Step.TrimVariableValueWhitespace); }
public override void SetContext(StepEditContext context) { base.SetContext(context); urlEditor.SetContext(StepEditContext.StateVariables, Step.URL, Step.TrimVariableValueWhitespace); cbWaitType.SelectedValue = Step.WaitType; }
public override void SetContext(StepEditContext context) { base.SetContext(context); m_Notifications = Step.Notifications.Select(n => n.Clone()).ToList(); zRefreshNotifications(); messageEditor.SetContext(StepEditContext.StateVariables, Step.Message, Step.TrimVariableValueWhitespace); }
public override void SetContext(StepEditContext context) { base.SetContext(context); m_Iteration = Step.Iteration; if (m_Iteration != null) { cbIteration.SelectedValue = m_Iteration.GetType(); } }
public override void SetContext(StepEditContext context, TableResultMapping mapping) { base.SetContext(context, mapping); txtObjectClassName.Text = mapping.ObjectSetClassName; cbListName.BindEditableStateVariables(context.StateVariables.Lists(), mapping.ObjectSetListName, true); cbPersistList.Checked = mapping.PersistenceMode == PersistenceMode.Persisted; cbIncludeInXML.Checked = mapping.IncludeInXML; m_TableResultMapping = mapping.TableMapping.Select(trm => trm.Clone()).ToList(); zRefreshTableResults(); }
public static StepEditor GetResultMappingEditor(StepEditContext context, ResultMapping resultMapping) { if (resultMapping is ScalarResultMapping) { return(new ScalarResultMappingEditor(context, (ScalarResultMapping)resultMapping)); } if (resultMapping is TableResultMapping) { return(new TableResultMappingEditor(context, (TableResultMapping)resultMapping)); } throw new NotSupportedException(); }
public GetValueSuggestor(StepEditContext stepEditContext, ElementIdentifier elementIdentifier, ElementValueMode elementValueMode, string attributeName) : this() { m_StepEditContext = stepEditContext; GroupStep parentGroupStep = AutomationUtils.GetParentGroupStep(m_StepEditContext.Sequence, m_StepEditContext.Step); if (parentGroupStep != null && parentGroupStep.Iteration != null && parentGroupStep.Iteration is ElementSetIteration) { m_GroupStepEditContext = new StepEditContext(parentGroupStep, m_StepEditContext.Sequence, m_StepEditContext.StepIndex, m_StepEditContext.StateVariables); } m_ElementIdentifier = elementIdentifier; m_ElementValueMode = elementValueMode; m_AttributeName = attributeName; }
public static StepEditor GetNotificationEditor(StepEditContext context, Notification notification) { if (notification is EmailNotification) { return(new EmailNotificationEditor(context, (EmailNotification)notification)); } if (notification is SMSNotification) { return(new SMSNotificationEditor(context, (SMSNotification)notification)); } if (notification is PopupNotification) { return(new PopupNotificationEditor(context, (PopupNotification)notification)); } throw new NotSupportedException(); }
public override void SetContext(StepEditContext context) { base.SetContext(context); m_ElementIdentifier = Step.Element != null?ElementIdentifier.Copy(Step.Element) : new ElementIdentifier(); txtElementPath.Text = m_ElementIdentifier.PrimaryIdentifier; rbStaticElement.Checked = Step.ElementType == ElementType.Static; rbDynamicElement.Checked = Step.ElementType == ElementType.Dynamic; ipPollingTimeout.Enabled = rbDynamicElement.Checked; if (rbDynamicElement.Checked && Step.PollingTimeout != null) { ipPollingTimeout.SetValue(Step.PollingTimeout.Value); } else { ipPollingTimeout.SetValue(TimeSpan.FromSeconds(5)); } }
public override void SetContext(StepEditContext context, SMSNotification notification) { base.SetContext(context, notification); cbTextbeltPresets.DataSource = Enum.GetValues(typeof(TextbeltPresets)); if (notification.TextbeltAPIURL != null && notification.TextbeltAPIURL.ToLower() == "http://textbelt.com/text") { cbTextbeltPresets.SelectedItem = TextbeltPresets.Paid; } else { cbTextbeltPresets.SelectedItem = TextbeltPresets.Custom; } txtTextbeltAPIURL.Text = notification.TextbeltAPIURL; txtTextbeltAPIKey.Text = notification.TextbeltAPIKey; txtNumbers.Text = String.Join("; ", notification.Numbers); }
public static StepEditor GetIterationEditor(StepEditContext context, Iteration iteration) { if (iteration is FixedIteration) { return(new FixedIterationEditor(context, (FixedIteration)iteration)); } if (iteration is ConditionalIteration) { return(new ConditionalIterationEditor(context, (ConditionalIteration)iteration)); } if (iteration is ElementSetIteration) { return(new ElementSetIterationEditor(context, (ElementSetIteration)iteration)); } if (iteration is DataSetIteration) { return(new DataSetIterationEditor(context, (DataSetIteration)iteration)); } throw new NotSupportedException(); }
public override void SetContext(StepEditContext context) { base.SetContext(context); cbConnectionType.SelectedItem = Step.ConnectionType; txtConnectionString.Text = Step.ConnectionString; cbCommandType.SelectedItem = Step.CommandType; commandEditor.SetContext(StepEditContext.StateVariables, Step.Command, Step.TrimVariableValueWhitespace); m_InputParameterMapping = Step.InputParameterMapping.Select(pm => pm.Clone()).ToList(); zRefreshInputParameters(); m_OutputParameterMapping = Step.OutputParameterMapping.Select(pm => pm.Clone()).ToList(); zRefreshOutputParameters(); m_ResultMapping = Step.ResultMapping; if (m_ResultMapping != null) { cbResultType.SelectedValue = m_ResultMapping.GetType(); } }
public override void SetContext(StepEditContext context) { base.SetContext(context); cbVariableName.BindEditableStateVariables(context.StateVariables.Primitives(), Step.StateVariable); cbPersistVariable.Checked = Step.PersistenceMode == PersistenceMode.Persisted; getValueSelector.SetContext(Step.Mode, m_ElementIdentifier, Step.AttributeName); rbXMLElement.Checked = Step.XMLFieldOutputMode == XMLFieldOutputMode.Element; rbXMLAttribute.Checked = Step.XMLFieldOutputMode == XMLFieldOutputMode.Attribute; rbXMLNone.Checked = Step.XMLFieldOutputMode == XMLFieldOutputMode.None; m_NormalizationRules = Step.NormalizationRules.Select(nr => nr.Clone()).ToList(); zRefreshNormalizationRules(); cbUseNormalizationDefault.Checked = Step.UseNormalizationDefault; txtNormalizationDefault.Enabled = Step.UseNormalizationDefault; if (Step.UseNormalizationDefault && !String.IsNullOrEmpty(Step.NormalizationDefault)) { txtNormalizationDefault.Text = Step.NormalizationDefault; } }
public static StepEditor GetStepEditor(StepEditContext context) { if (context.Step is NavigateStep) { return(new NavigateStepEditor(context)); } if (context.Step is ClickStep) { return(new ClickStepEditor(context)); } if (context.Step is GetValueStep) { return(new GetValueStepEditor(context)); } if (context.Step is SetValueStep) { return(new SetValueStepEditor(context)); } if (context.Step is GroupStep) { return(new GroupStepEditor(context)); } if (context.Step is NotifyStep) { return(new NotifyStepEditor(context)); } if (context.Step is DatabaseStep) { return(new DatabaseStepEditor(context)); } if (context.Step is WaitStep) { return(new WaitStepEditor(context)); } throw new NotSupportedException(); }
public override void SetContext(StepEditContext context, ElementSetIteration iteration) { base.SetContext(context, iteration); m_ContainerIdentifier = this.Target.ElementSetContainer; if (m_ContainerIdentifier != null) { txtElementSetContainer.Text = m_ContainerIdentifier.PrimaryIdentifier; btnEdit.Enabled = true; } rbStaticElement.Checked = this.Target.ElementType == ElementType.Static; rbDynamicElement.Checked = this.Target.ElementType == ElementType.Dynamic; ipPollingTimeout.Enabled = rbDynamicElement.Checked; if (rbDynamicElement.Checked && this.Target.PollingTimeout != null) { ipPollingTimeout.SetValue(this.Target.PollingTimeout.Value); } else { ipPollingTimeout.SetValue(TimeSpan.FromSeconds(5)); } if (this.Target.ObjectSetClassName != null) { txtObjectClassName.Text = this.Target.ObjectSetClassName; } if (this.Target.ObjectSetScopeName != null) { txtScopeName.Text = this.Target.ObjectSetScopeName; } cbListName.BindEditableStateVariables(this.StepEditContext.StateVariables.Lists(), this.Target.ObjectSetListName, true); cbPersistList.Checked = iteration.PersistenceMode == PersistenceMode.Persisted; cbIncludeInXML.Checked = iteration.IncludeInXML; }
public override void SetContext(StepEditContext context, DataSetIteration iteration) { base.SetContext(context, iteration); m_Loading = true; cbListVariableList.DataSource = context.StateVariables.Lists(); if (iteration.ObjectSetListName != null) { cbListVariableList.Text = iteration.ObjectSetListName; } if (iteration.ObjectSetClassName != null) { cbObjectClassList.Text = iteration.ObjectSetClassName; } else { cbObjectClassList.Text = "[Any]"; } if (this.Target.ObjectSetScopeName != null) { txtScopeName.Text = this.Target.ObjectSetScopeName; } m_Loading = false; }
public SMSNotificationEditor(StepEditContext context, SMSNotification notification) : this() { this.SetContext(context, notification); }
public ElementSetIterationEditor(StepEditContext context, ElementSetIteration iteration) : this() { this.SetContext(context, iteration); }
public virtual void SetContext(StepEditContext context) { this.StepEditContext = context; }
public DataSetIterationEditor(StepEditContext context, DataSetIteration iteration) : this() { this.SetContext(context, iteration); }
public WaitStepEditor(StepEditContext context) : this() { this.SetContext(context); }
public override void SetContext(StepEditContext context) { base.SetContext(context); ipWaitDuration.SetValue(Step.Duration); }
public NotifyStepEditor(StepEditContext context) : this() { this.SetContext(context); }
public NavigateStepEditor(StepEditContext context) : this() { this.SetContext(context); }
public FixedIterationEditor(StepEditContext context, FixedIteration iteration) : this() { this.SetContext(context, iteration); }
public override void SetContext(StepEditContext context, FixedIteration iteration) { base.SetContext(context, iteration); nudNumberOfIterations.Value = this.Target.Iterations; }
public override void SetContext(StepEditContext context) { base.SetContext(context); }
public GroupStepEditor(StepEditContext context) : this() { this.SetContext(context); }
public TableResultMappingEditor(StepEditContext context, TableResultMapping mapping) : this() { this.SetContext(context, mapping); }