public ActBrowserElementEditPage(ActBrowserElement act) { InitializeComponent(); mAct = act; if (act.Platform == ePlatformType.NA) { act.Platform = GetActionPlatform(); } mPlatform = PlatformInfoBase.GetPlatformImpl(act.Platform); List <ActBrowserElement.eControlAction> supportedControlActions = mPlatform.GetPlatformBrowserControlOperations(); //validate operation is valid if (supportedControlActions.Contains(mAct.ControlAction) == false) { mAct.ControlAction = supportedControlActions[0]; } //bind controls GingerCore.General.FillComboFromEnumObj(xControlActionComboBox, mAct.ControlAction, supportedControlActions.Cast <object>().ToList()); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xControlActionComboBox, ComboBox.SelectedValueProperty, mAct, ActBrowserElement.Fields.ControlAction); ValueUC.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam("Value")); xLocateValueVE.BindControl(Context.GetAsContext(mAct.Context), mAct, Act.Fields.LocateValue); xGotoURLTypeRadioButton.Init(typeof(ActBrowserElement.eGotoURLType), xGotoURLTypeRadioButtonPnl, mAct.GetOrCreateInputParam(ActBrowserElement.Fields.GotoURLType, ActBrowserElement.eGotoURLType.Current.ToString())); xURLSrcRadioButton.Init(typeof(ActBrowserElement.eURLSrc), xURLSrcRadioButtonPnl, mAct.GetOrCreateInputParam(ActBrowserElement.Fields.URLSrc, ActBrowserElement.eURLSrc.Static.ToString()), URLSrcRadioButton_Clicked); xElementLocateByComboBox.BindControl(mAct, Act.Fields.LocateBy); xImplicitWaitVE.BindControl(Context.GetAsContext(mAct.Context), mAct, ActBrowserElement.Fields.ImplicitWait); SetVisibleControlsForAction(); }
public ActBrowserElementEditPage(ActBrowserElement act) { InitializeComponent(); mAct = act; if (act.Platform == ePlatformType.NA) { act.Platform = GetActivityPlatform(); } mPlatform = PlatformInfoBase.GetPlatformImpl(act.Platform); List <ActBrowserElement.eControlAction> supportedControlActions = mPlatform.GetPlatformBrowserControlOperations(); //bind controls App.FillComboFromEnumVal(xControlActionComboBox, mAct.ControlAction, supportedControlActions.Cast <object>().ToList()); App.ObjFieldBinding(xControlActionComboBox, ComboBox.SelectedValueProperty, mAct, ActBrowserElement.Fields.ControlAction); ValueUC.Init(mAct.GetOrCreateInputParam("Value")); xLocateValueVE.BindControl(mAct, Act.Fields.LocateValue); xGotoURLTypeRadioButton.Init(typeof(ActBrowserElement.eGotoURLType), xGotoURLTypeRadioButtonPnl, mAct.GetOrCreateInputParam(ActBrowserElement.Fields.GotoURLType, ActBrowserElement.eGotoURLType.Current.ToString())); xElementLocateByComboBox.BindControl(mAct, Act.Fields.LocateBy); xImplicitWaitVE.BindControl(mAct, ActBrowserElement.Fields.ImplicitWait); SetVisibleControlsForAction(); }
public ActBrowserElementEditPage(ActBrowserElement act) { InitializeComponent(); mAct = act; //TODO: use .Fields App.FillComboFromEnumVal(ControlActionComboBox, mAct.ControlAction); App.ObjFieldBinding(ControlActionComboBox, ComboBox.SelectedValueProperty, mAct, ActBrowserElement.Fields.ControlAction); ValueUC.Init(mAct.GetOrCreateInputParam("Value")); LocateValueVE.BindControl(mAct, Act.Fields.LocateValue); GotoURLTypeRadioButton.Init(typeof(ActBrowserElement.eGotoURLType), GotoURLRadioButton, mAct.GetOrCreateInputParam(ActBrowserElement.Fields.GotoURLType, ActBrowserElement.eGotoURLType.Current.ToString())); ElementLocateByComboBox.BindControl(mAct, Act.Fields.LocateBy); ImplicitWaitVE.BindControl(mAct, ActBrowserElement.Fields.ImplicitWait); SetVisibleControlsForAction(); }