protected override void RefreshView(ActionBase value) { ActionFetchText action = (ActionFetchText)value; arrayCombox.DataSource = value.VariableModel.OfType <ActionVariable>().Select(c => c.Name).ToArray(); arrayCombox.SelectedItem = action.ObjectName; }
private void SetPropertyName(ActionFetchText action) { if (attrCombox.Text == "Text" || attrCombox.Text == "Html") { action.PropertyName = attrCombox.Text; } else { action.PropertyName = propertyTextbox.Text; } }
private void ruleButton_Click(object sender, EventArgs e) { ActionFetchText action = (ActionFetchText)base.Action; SetPropertyName(action); StringRegexForm regex = new StringRegexForm(action.Pattern, action.GetDefaultValue()); if (regex.ShowDialog() == System.Windows.Forms.DialogResult.OK) { action.Pattern = regex.Pattern; } }
void arrayCombox_SelectedIndexChanged(object sender, EventArgs e) { ActionFetchText action = (ActionFetchText)base.Action; if (arrayCombox.SelectedItem != null) { ActionVariable var1 = action.VariableModel.Find(arrayCombox.SelectedItem.ToString()); methodComboBox1.Enabled = false; if (var1 is ActionTableVariable) { methodComboBox1.Enabled = true; } } }