Esempio n. 1
0
        // Raised when a value is calculated:
        private void calculator_ValueSet(object sender, QuickValueSetEventArgs e)
        {
            //	if(e.Action == FormulaInfoSetAction.CalculatedValueSet)
            {
                switch (e.Key)
                {
                case "A":
                    this.txtA.Text = this.calculator[e.Key].ToString();
                    break;

                case "B":
                    this.txtB.Text = this.calculator[e.Key].ToString();
                    break;

                case "C":
                    this.txtC.Text = this.calculator[e.Key].ToString();
                    break;

                case "D":
                    this.txtD.Text = this.calculator[e.Key].ToString();
                    break;

                default:
                    break;
                }
            }
        }
Esempio n. 2
0
 ////Used to autoset the value back to the control.
 private void CalcQuickValueSet(object sender, QuickValueSetEventArgs e)
 {
     if (NameToControlMap.ContainsKey(e.Key))
     {
         Control c = this.NameToControlMap[e.Key] as Control;
         if (c.GetType() == typeof(TextBox))
         {
             (c as TextBox).Text = e.Value;
         }
         else if (c.GetType() == typeof(ComboBox))
         {
             (c as ComboBox).Text = e.Value;
         }
     }
 }