コード例 #1
0
 private void lbOverlayList_SelectedValueChanged(object sender, System.EventArgs e)
 {
     if (!DisableChangeEvent)
     {
         string FormulaName;
         SelectParameter.ParamToTextBox(
             (string)lbOverlayList.SelectedItem,
             new TextBox[] { tbP1, tbP2, tbP3, tbP4 },
             out FormulaName);
     }
 }
コード例 #2
0
 /// <summary>
 /// Show select parameter dialog
 /// </summary>
 /// <param name="Default">Default parameters</param>
 /// <returns>Selected parameters, separated by comma</returns>
 public static string ShowForm(string Default)
 {
     try
     {
         SelectParameter sp = new SelectParameter();
         sp.SetFormula(Default);
         if (sp.ShowDialog() == DialogResult.OK)
         {
             return(sp.GetFormula());
         }
     }
     catch
     {
     }
     return("");
 }
コード例 #3
0
        private void tbP4_Leave(object sender, System.EventArgs e)
        {
            string s = SelectParameter.TextBoxToParam((string)lbOverlayList.SelectedItem,
                                                      new TextBox[] { tbP1, tbP2, tbP3, tbP4 });

            if (s != "")
            {
                DisableChangeEvent = true;
                try
                {
                    lbOverlayList.Items[lbOverlayList.SelectedIndex] = s;
                }
                finally
                {
                    DisableChangeEvent = false;
                }
            }
        }