private void Like_CheckedChanged(object sender, EventArgs e) { DisableValueFields(); Substring.Enabled = true; if (Visible) { Substring.Focus(); } }
private void OK_Click(object sender, EventArgs e) { if (BasicOp.Checked && Value.Text.Trim() == "") { XtraMessageBox.Show("Criteria value is missing", UmlautMobius.String, MessageBoxButtons.OK, MessageBoxIcon.None); Value.Focus(); return; } else if (InList.Checked && ValueList.Text.Trim() == "") { XtraMessageBox.Show("The list must contain one or more items", UmlautMobius.String, MessageBoxButtons.OK, MessageBoxIcon.None); ValueList.Focus(); return; } else if (Between.Checked && (Limit1.Text.Trim() == "" || Limit2.Text.Trim() == "")) { XtraMessageBox.Show("Between value is missing", UmlautMobius.String, MessageBoxButtons.OK, MessageBoxIcon.None); if (Limit1.Text.Trim() == "") { Limit1.Focus(); } else if (Limit2.Text.Trim() == "") { Limit2.Focus(); } return; } else if (Like.Checked && Substring.Text == "") { XtraMessageBox.Show("Substring value is missing", UmlautMobius.String, MessageBoxButtons.OK, MessageBoxIcon.None); Substring.Focus(); return; } else if (Within.Checked && WithinValue.Text == "") { XtraMessageBox.Show("Within value is missing", UmlautMobius.String, MessageBoxButtons.OK, MessageBoxIcon.None); WithinValue.Focus(); return; } if (!GetCriteria()) { return; } DialogResult = DialogResult.OK; this.Hide(); }
private void Criteria_Activated(object sender, EventArgs e) { DisableValueFields(); if (BasicOp.Checked) { Value.Enabled = true; if (Visible) { Value.Focus(); } } else if (InList.Checked) { ValueList.Enabled = true; ImportList.Enabled = true; EditList.Enabled = true; if (Visible) { ValueList.Focus(); } } else if (Between.Checked) { Limit1.Enabled = true; Limit2.Enabled = true; if (Visible) { Limit1.Focus(); } } else if (Like.Checked) { Substring.Enabled = true; if (Visible) { Substring.Focus(); } } else if (Within.Checked) { WithinValue.Enabled = true; WithinUnits.Enabled = true; if (Visible) { WithinValue.Focus(); } } else if (All.Checked) { All.Focus(); } else if (IsNotNull.Checked) { IsNotNull.Focus(); } else if (IsNull.Checked) { IsNull.Focus(); } else if (None.Checked) { None.Focus(); } }