Example #1
0
 public bool SelectionValidation(ParameterItemListValueVm value)
 {
     if (ExecuteScript())
     {
         return(true);
     }
     Result = EnumResult.Fail; return(false);
 }
Example #2
0
        private void CbParamValue_SelectionChangeCommitted(object sender, EventArgs e)
        {
            Result = EnumResult.Pass;
            var cb = (ComboBox)sender;

            if (!_objParamItem.SelectionValidation((ParameterItemListValueVm)CbParamValue.SelectedItem))
            {
                ReturnMsgVm = _objParamItem.ReturnMsg;
                ObjControlBuilder.DisplayLabel(LblMsg, _objParamItem.ReturnMsg);
                Result = EnumResult.Fail;
                cb.Select();
                return;
            }
            ParameterItemListValueVm data = (ParameterItemListValueVm)CbParamValue.SelectedItem;

            _objParamItem.AddParamItemValue(data.name, data.value, true);
            Debug.Print("ItemListBox SelectedIndexChanged");
            Result = EnumResult.Pass;
            RaiseFinishEvent(this, new CustomReturnEventArgs {
                ReturnEvent = e
            });
        }