Esempio n. 1
0
 void ValidateEdit(object sender, dynamic e)
 {
     if (_grid.Editor is ComboBox combo)
     {
         _tokens = new object[]
         {
             new TokenName(),
             ".EmulateEditCombo(",
             combo.SelectedIndex,
             ");"
         };
     }
     else if (_grid.Editor is TextBox text)
     {
         _tokens = new object[]
         {
             new TokenName(),
             ".EmulateEditText(",
             GenerateUtility.AdjustText(text.Text),
             ");"
         };
     }
     else if (_grid.Editor == null)
     {
         _tokens = new object[]
         {
             new TokenName(),
             ".EmulateEditCheck(",
             e.Checkbox.ToString() == "Checked" ? "true" : "false",
             ");"
         };
     }
     else
     {
         _tokens = null;
     }
 }
Esempio n. 2
0
 public override void Optimize(List <Sentence> code)
 {
     GenerateUtility.RemoveDuplicationFunction(this, code, "EmulateSelect");
 }