private void SetLocateValueControls() { if (xElementLocateByComboBox.SelectedItem == null) { xLocateValueVE.Visibility = System.Windows.Visibility.Visible; xLocateValueEditFrame.Visibility = System.Windows.Visibility.Collapsed; return; } else { mAct.LocateBy = (eLocateBy)((ComboEnumItem)xElementLocateByComboBox.SelectedItem).Value; } eLocateBy SelectedLocType = (eLocateBy)((ComboEnumItem)xElementLocateByComboBox.SelectedItem).Value; switch (SelectedLocType) { case eLocateBy.POMElement: xLocateValueVE.Visibility = System.Windows.Visibility.Collapsed; xLocateValueEditFrame.Visibility = System.Windows.Visibility.Visible; Page p = new LocateByPOMElementPage(Context.GetAsContext(mAct.Context), null, null, mAct, nameof(ActBrowserElement.LocateValue)); xLocateValueEditFrame.Content = p; break; default: xLocateValueVE.Visibility = System.Windows.Visibility.Visible; xLocateValueEditFrame.Visibility = System.Windows.Visibility.Collapsed; break; } }
private void SetLocateValueControls() { if (xElementLocateByComboBox.SelectedItem == null) { xLocateValueVE.Visibility = System.Windows.Visibility.Visible; xLocateValueEditFrame.Visibility = System.Windows.Visibility.Collapsed; return; } eLocateBy SelectedLocType = (eLocateBy)((GingerCore.General.ComboEnumItem)xElementLocateByComboBox.SelectedItem).Value; switch (SelectedLocType) { case eLocateBy.POMElement: xLocateValueVE.Visibility = System.Windows.Visibility.Collapsed; xLocateValueEditFrame.Visibility = System.Windows.Visibility.Visible; Page p = new LocateByPOMElementPage(mAct); xLocateValueEditFrame.Content = p; break; default: xLocateValueVE.Visibility = System.Windows.Visibility.Visible; xLocateValueEditFrame.Visibility = System.Windows.Visibility.Collapsed; break; } }
private void Init(WizardEventArgs WizardEventArgs) { mWizard.DefaultTargetAppChecked = Convert.ToBoolean(xChkDefaultTargetApp.IsChecked); LocateByPOMElementPage locateByPOMElementPage = new LocateByPOMElementPage(mWizard.Context, null, nameof(ActUIElement.ElementType), mWizard, nameof(mWizard.SelectedPOMObjectName), true); xLocateValueEditFrame.Content = locateByPOMElementPage; DataContext = mWizard; BindTargetApplication(); }
//private void AddSelectedPOM(List<object> selectedPOMs) //{ // if (selectedPOMs != null && selectedPOMs.Count > 0) // { // foreach (ApplicationPOMModel pom in selectedPOMs) // { // if (mPomModels.Contains(pom) == false) // { // mPomModels.Add(pom); // } // } // } //} //private void MApplicationPOMSelectionPage_SelectionDone(object sender, SelectionTreeEventArgs e) //{ // AddSelectedPOM(e.SelectedItems); //} //private void POMsComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) //{ //} private void xIntegratePOMChkBox_Checked(object sender, RoutedEventArgs e) { if (locateByPOMElementPage == null) { ActUIElement act = new ActUIElement(); locateByPOMElementPage = new LocateByPOMElementPage(context, act, nameof(ActUIElement.ElementType), act, nameof(ActUIElement.ElementLocateValue), true); locateByPOMElementPage.SelectPOM_Click(sender, e); locateByPOMElementPage.POMChangedPageEvent += LocateByPOMElementPage_POMChangedPageEvent; SelectedPOM = locateByPOMElementPage.SelectedPOM; //xPOMSelectionFrame.Content = locateByPOMElementPage; } //xPOMSelectionFrame.Visibility = Visibility.Visible; }
void ShowPOMSelection() { if (locateByPOMElementPage == null) { ActUIElement act = new ActUIElement(); locateByPOMElementPage = new LocateByPOMElementPage(Context, act, nameof(ActUIElement.ElementType), act, nameof(ActUIElement.ElementLocateValue), true); locateByPOMElementPage.SelectPOM_Click(this, null); locateByPOMElementPage.POMChangedPageEvent += LocateByPOMElementPage_POMChangedPageEvent; SelectedPOM = locateByPOMElementPage.SelectedPOM; xPOMSelectionFrame.Content = locateByPOMElementPage; POMSelectionPending = false; } xPOMSelectionFrame.Visibility = Visibility.Visible; }
private void SetLocateValueFrame() { LocateByPOMElementPage locateByPOMElementPage = new LocateByPOMElementPage(Context.GetAsContext(mAct.Context), mAct, null, mAct, nameof(ActBrowserElement.Fields.PomGUID), true); xPOMUrlFrame.Content = locateByPOMElementPage; }