private void lbOverlayList_SelectedValueChanged(object sender, EventArgs e) { if (!this.DisableChangeEvent) { string str; SelectFormula.ParamToTextBox((string)this.lbOverlayList.SelectedItem, new TextBox[] { this.tbP1, this.tbP2, this.tbP3, this.tbP4 }, out str); } }
public static string Select(string Default) { try { SelectFormula formula = new SelectFormula(); formula.SetFormula(Default); if (formula.ShowDialog() == DialogResult.OK) { return(formula.GetFormula()); } } catch { } return(""); }
private void tbP4_Leave(object sender, EventArgs e) { string str = SelectFormula.TextBoxToParam((string)this.lbOverlayList.SelectedItem, new TextBox[] { this.tbP1, this.tbP2, this.tbP3, this.tbP4 }); if (str != "") { this.DisableChangeEvent = true; try { this.lbOverlayList.Items[this.lbOverlayList.SelectedIndex] = str; } finally { this.DisableChangeEvent = false; } } }