Exemplo n.º 1
0
 public void WizardEvent(WizardEventArgs WizardEventArgs)
 {
     switch (WizardEventArgs.EventType)
     {
     case EventType.Init:
         mAutoRunWizard = (AutoRunWizard)WizardEventArgs.Wizard;
         if (WorkSpace.Instance.Solution.SourceControl == null)
         {
             xDownloadsolutionCheckBox.IsEnabled = false;
             mAutoRunWizard.CliHelper.DownloadUpgradeSolutionFromSourceControl = false;
         }
         else
         {
             xDownloadsolutionCheckBox.IsEnabled = true;
             mAutoRunWizard.CliHelper.DownloadUpgradeSolutionFromSourceControl = true;
         }
         if (WorkSpace.Instance.Solution.ALMConfigs != null && WorkSpace.Instance.Solution.ALMConfigs.Count > 0)
         {
             xALMConfigCheckBox.IsEnabled = true;
         }
         else
         {
             xALMConfigCheckBox.IsEnabled = false;
             mAutoRunWizard.CliHelper.SetAlmConnectionDetails = false;
         }
         mAutoRunWizard.CliHelper.ShowAutoRunWindow = false;
         mAutoRunWizard.CliHelper.RunAnalyzer       = mAutoRunWizard.RunsetConfig.RunWithAnalyzer;
         BindingHandler.ObjFieldBinding(xDownloadsolutionCheckBox, CheckBox.IsCheckedProperty, mAutoRunWizard.CliHelper, nameof(CLIHelper.DownloadUpgradeSolutionFromSourceControl));
         BindingHandler.ObjFieldBinding(xALMConfigCheckBox, CheckBox.IsCheckedProperty, mAutoRunWizard.CliHelper, nameof(CLIHelper.SetAlmConnectionDetails));
         BindingHandler.ObjFieldBinding(xGingerRunEXEWindowShow, CheckBox.IsCheckedProperty, mAutoRunWizard.CliHelper, nameof(CLIHelper.ShowAutoRunWindow));
         BindingHandler.ObjFieldBinding(xRunAnalyzerCheckBox, CheckBox.IsCheckedProperty, mAutoRunWizard.CliHelper, nameof(CLIHelper.RunAnalyzer));
         xArtifactsPathTextBox.Init(mAutoRunWizard.mContext, mAutoRunWizard.AutoRunConfiguration, nameof(RunSetAutoRunConfiguration.ArtifactsPath), isVENeeded: false, isBrowseNeeded: true, browserType: Activities.UCValueExpression.eBrowserType.Folder);
         break;
     }
 }
Exemplo n.º 2
0
        private void InitTypeOptions()
        {
            GingerCore.General.FillComboItemsFromEnumType(xMappedTypeComboBox, typeof(eDataType));
            BindingHandler.ObjFieldBinding(xMappedTypeComboBox, ComboBox.SelectedValueProperty, this, nameof(MappedType));

            DisableAllTypeOptions();
        }
Exemplo n.º 3
0
        private void MappedTypePropertyChanged()
        {
            OnPropertyChanged(nameof(MappedType));

            //set relevant value control binding
            BindingOperations.ClearAllBindings(xVariablesComboBox);
            BindingOperations.ClearAllBindings(xOptionalValuesComboBox);
            BindingOperations.ClearAllBindings(xDSExpressionTxtbox);
            if (MappedType == eDataType.Variable.ToString())
            {
                BindingHandler.ObjFieldBinding(xVariablesComboBox, ComboBox.SelectedValueProperty, this, nameof(MappedValue));
            }
            else if (MappedType == eDataType.GlobalVariable.ToString())
            {
                BindingHandler.ObjFieldBinding(xOptionalValuesComboBox, ComboBox.SelectedValueProperty, this, nameof(MappedValueGUID));
            }
            else if (MappedType == eDataType.OutputVariable.ToString())
            {
                BindingHandler.ObjFieldBinding(xOptionalValuesComboBox, ComboBox.SelectedValueProperty, this, nameof(MappedValueGUID));
            }
            else if (MappedType == eDataType.ApplicationModelParameter.ToString())
            {
                BindingHandler.ObjFieldBinding(xOptionalValuesComboBox, ComboBox.SelectedValueProperty, this, nameof(MappedValueGUID));
            }
            else if (MappedType == eDataType.DataSource.ToString())
            {
                BindingHandler.ObjFieldBinding(xDSExpressionTxtbox, TextBox.TextProperty, this, nameof(MappedValue));
            }

            SetValueControlsData();

            SetValueControlsView();
        }
Exemplo n.º 4
0
        public ExportResultsToALMConfigPage(RunSetActionPublishToQC runSetActionPublishToQC)
        {
            InitializeComponent();
            Context context = new Context();

            if (runSetActionPublishToQC.VariableForTCRunName == null)
            {
                runSetActionPublishToQC.VariableForTCRunName = "GingerRun_{CS Exp=DateTime.Now}";
            }
            mPublishToALMConfig.AlmFields = runSetActionPublishToQC.AlmFields;
            VariableForTCRunName.Init(null, runSetActionPublishToQC, nameof(RunSetActionPublishToQC.VariableForTCRunName));
            BindingHandler.ObjFieldBinding(VariableForTCRunName, TextBox.TextProperty, runSetActionPublishToQC, nameof(RunSetActionPublishToQC.VariableForTCRunName));
            BindingHandler.ObjFieldBinding(UseVariableInTCRunNameCbx, CheckBox.IsCheckedProperty, runSetActionPublishToQC, nameof(RunSetActionPublishToQC.isVariableInTCRunUsed));
            BindingHandler.ObjFieldBinding(AttachActivitiesGroupReportCbx, CheckBox.IsCheckedProperty, runSetActionPublishToQC, nameof(RunSetActionPublishToQC.toAttachActivitiesGroupReport));
            xFilterByStatusDroplist.BindControl(runSetActionPublishToQC, nameof(RunSetActionPublishToQC.FilterStatus));
            xALMTypeCbx.Init(runSetActionPublishToQC, nameof(RunSetActionPublishToQC.PublishALMType),
                             GingerCore.General.GetEnumValuesForComboAndAddExtraValues(typeof(eALMType), new List <ComboEnumItem>()
            {
                new ComboEnumItem()
                {
                    text = RunSetActionPublishToQC.AlmTypeDefault, Value = RunSetActionPublishToQC.AlmTypeDefault
                }
            }), ComboBox.TextProperty);
            xALMTestSetLevelCbx.Init(runSetActionPublishToQC, nameof(RunSetActionPublishToQC.ALMTestSetLevel), Enum.GetValues(typeof(eALMTestSetLevel)).Cast <eALMTestSetLevel>().ToList(), ComboBox.SelectedValueProperty);
            xALMTestSetLevelCbx.ComboBox.SelectionChanged += xALMTestSetLevelCbx_SelectionChanged;
            xExportTypeCbx.Init(runSetActionPublishToQC, nameof(RunSetActionPublishToQC.ExportType), Enum.GetValues(typeof(eExportType)).Cast <eExportType>().ToList(), ComboBox.SelectedValueProperty);
            xTestSetFolderDestination.Init(context, runSetActionPublishToQC, nameof(RunSetActionPublishToQC.TestSetFolderDestination));
            xTestCaseFolderDestination.Init(context, runSetActionPublishToQC, nameof(RunSetActionPublishToQC.TestCaseFolderDestination));
            xExportTypeCbx.ComboBox.SelectionChanged += xExportTypeCbx_SelectionChanged;
            xALMTypeCbx.ComboBox.SelectionChanged    += xALMTypeCbx_SelectionChanged;
            xALMTestSetLevelCbx_SelectionChanged(this, null);
            xALMTypeCbx_SelectionChanged(this, null);
        }
        public void WizardEvent(WizardEventArgs WizardEventArgs)
        {
            switch (WizardEventArgs.EventType)
            {
            case EventType.Init:
                mAutoRunWizard = (AutoRunWizard)WizardEventArgs.Wizard;
                mAutoRunWizard.AutoRunShortcut.CreateShortcut   = false;
                mAutoRunWizard.AutoRunShortcut.ShortcutFileName = WorkSpace.Instance.Solution.Name + "-" + mAutoRunWizard.RunsetConfig.Name + " Execution";
                xShortcutPathTextbox.Init(mAutoRunWizard.mContext, mAutoRunWizard.AutoRunShortcut, nameof(RunSetAutoRunShortcut.ShortcutFolderPath), isVENeeded: false, isBrowseNeeded: true, browserType: Actions.UCValueExpression.eBrowserType.Folder);
                BindingHandler.ObjFieldBinding(xShortcutDescriptionTextBox, System.Windows.Controls.TextBox.TextProperty, mAutoRunWizard.AutoRunShortcut, nameof(RunSetAutoRunShortcut.ShortcutFileName));
                xDesktopRadioButton.IsChecked = true;
                mAutoRunWizard.CliHelper.ShowAutoRunWindow = false;
                mAutoRunWizard.AutoRunConfiguration.ParallelExecutionCount = 1;
                break;

            case EventType.Active:
                BindingHandler.ObjFieldBinding(xShortcutContentTextBox, System.Windows.Controls.TextBox.TextProperty, mAutoRunWizard.AutoRunShortcut, nameof(RunSetAutoRunShortcut.ShortcutContent), BindingMode: System.Windows.Data.BindingMode.OneWay);
                BindingHandler.ObjFieldBinding(xExecutionServiceUrlTextBox, System.Windows.Controls.TextBox.TextProperty, mAutoRunWizard.AutoRunConfiguration, nameof(RunSetAutoRunConfiguration.ExecutionServiceUrl));

                InitNumberPicker();

                ShowHideCommandPnl();
                if (mAutoRunWizard.AutoRunConfiguration.AutoRunEexecutorType == eAutoRunEexecutorType.Remote)
                {
                    xRequestExecutionYesRadioButton.IsChecked = true;
                    xExecutionServiceUrlTextBox.AddValidationRule(new ValidateURLFormat());
                }
                else
                {
                    xRequestExecutionNoRadioButton.IsChecked = true;
                    xExecutionServiceUrlTextBox.RemoveValidations(TextBox.TextProperty);
                }
                break;
            }
        }
Exemplo n.º 6
0
        public DataSourceExportToExcel(ActDSTableElement actDSTableElement)
        {
            InitializeComponent();
            mActDSTableElement = actDSTableElement;

            if (mActDSTableElement.ExcelConfig == null)
            {
                mActDSTableElement.ExcelConfig = new ExportToExcelConfig();
            }
            SetFilePath();
            SetDataTable();
            SetSheetName();
            ExcelFilePath.Init(Context.GetAsContext(mActDSTableElement.Context), mActDSTableElement.ExcelConfig, nameof(ExportToExcelConfig.ExcelPath), true, true, UCValueExpression.eBrowserType.File, "xlsx");

            xExcelExportQuery.Init(Context.GetAsContext(mActDSTableElement.Context), mActDSTableElement.ExcelConfig, nameof(ExportToExcelConfig.ExportQueryValue), true);
            xExportSheetName.Init(Context.GetAsContext(mActDSTableElement.Context), mActDSTableElement.ExcelConfig, nameof(ExportToExcelConfig.ExcelSheetName), true);

            BindingHandler.ObjFieldBinding(xRdoByCustomExport, RadioButton.IsCheckedProperty, mActDSTableElement.ExcelConfig, nameof(ExportToExcelConfig.IsCustomExport));

            BindingHandler.ObjFieldBinding(xRdoByQueryExport, RadioButton.IsCheckedProperty, mActDSTableElement.ExcelConfig, nameof(ExportToExcelConfig.IsExportByQuery));

            BindingHandler.ObjFieldBinding(xExportWhereChkBox, CheckBox.IsCheckedProperty, mActDSTableElement.ExcelConfig, nameof(ExportToExcelConfig.ExportByWhere));

            ExcelFilePath.ValueTextBox.TextChanged     += ExcelFilePathTextBox_TextChanged;
            xExportSheetName.ValueTextBox.TextChanged  += ExcelSheetNameTextBox_TextChanged;
            xExcelExportQuery.ValueTextBox.TextChanged += ExcelExportQuery_ValueTextBox_TextChanged;

            if (mDataTable != null)
            {
                InitColumnListGrid(mDataTable.Columns);
            }

            SetConditionGridView();
            UpdateQueryValue();
        }
Exemplo n.º 7
0
        private void BindControlsToBusinessFlow()
        {
            //General Info Section Bindings
            BindingHandler.ObjFieldBinding(xNameTextBlock, TextBlock.TextProperty, mBusinessFlow, nameof(BusinessFlow.Name));
            BindingHandler.ObjFieldBinding(xNameTextBlock, TextBlock.ToolTipProperty, mBusinessFlow, nameof(BusinessFlow.Name));
            mBusinessFlow.PropertyChanged -= mBusinessFlow_PropertyChanged;
            mBusinessFlow.PropertyChanged += mBusinessFlow_PropertyChanged;
            UpdateDescription();

            //Activities Tab Bindings
            mBusinessFlow.AttachActivitiesGroupsAndActivities();
            mBusinessFlow.Activities.CollectionChanged -= Activities_CollectionChanged;
            mBusinessFlow.Activities.CollectionChanged += Activities_CollectionChanged;
            UpdateActivitiesTabHeader();
            if (mActivitiesPage != null && xActivitisTab.IsSelected)
            {
                mActivitiesPage.UpdateBusinessFlow(mBusinessFlow);
            }

            //Variables Tab Bindings
            mBusinessFlow.Variables.CollectionChanged -= Variables_CollectionChanged;
            mBusinessFlow.Variables.CollectionChanged += Variables_CollectionChanged;
            UpdateVariabelsTabHeader();
            if (mVariabelsPage != null && xVariablesTab.IsSelected)
            {
                mVariabelsPage.UpdateParent(mBusinessFlow);
            }

            //Configurations Tab Bindings
            if (mConfigurationsPage != null && xConfigurationsTab.IsSelected)
            {
                mConfigurationsPage.UpdateBusinessFlow(mBusinessFlow);
            }
        }
Exemplo n.º 8
0
        private void SetItemMainView()
        {
            if (!mMainViewWasSet)
            {
                mItemIconField            = ListHelper.GetItemIconField();
                mItemIconTooltipField     = ListHelper.GetItemIconTooltipField();
                mItemNameField            = ListHelper.GetItemNameField();
                mItemNameExtentionField   = ListHelper.GetItemNameExtentionField();
                mItemExecutionStatusField = ListHelper.GetItemExecutionStatusField();
                mItemActiveField          = ListHelper.GetItemActiveField();

                this.Dispatcher.Invoke(() =>
                {
                    if (Item is RepositoryItemBase)
                    {
                        ((RepositoryItemBase)Item).PropertyChanged -= Item_PropertyChanged;
                        ((RepositoryItemBase)Item).PropertyChanged += Item_PropertyChanged;
                    }

                    if (!string.IsNullOrEmpty(mItemIconField))
                    {
                        BindingHandler.ObjFieldBinding(xItemIcon, ImageMakerControl.ImageTypeProperty, Item, mItemIconField, BindingMode: BindingMode.OneWay);
                    }
                    if (!string.IsNullOrEmpty(mItemIconTooltipField))
                    {
                        BindingHandler.ObjFieldBinding(xItemIcon, ImageMakerControl.ImageToolTipProperty, Item, mItemIconTooltipField, BindingMode: BindingMode.OneWay);
                    }

                    SetItemFullName();

                    SetItemUniqueIdentifier();

                    SetItemNotifications();

                    if (string.IsNullOrEmpty(mItemExecutionStatusField))
                    {
                        xItemStatusImage.Visibility = Visibility.Collapsed;
                        xItemStatusClm.Width        = new GridLength(0);
                    }
                    else
                    {
                        BindingHandler.ObjFieldBinding(xItemStatusImage, UcItemExecutionStatus.StatusProperty, Item, mItemExecutionStatusField);
                        xItemStatusClm.Width = new GridLength(25);
                    }

                    if (!string.IsNullOrEmpty(mItemActiveField))
                    {
                        System.Windows.Data.Binding b = new System.Windows.Data.Binding();
                        b.Source              = Item;
                        b.Path                = new PropertyPath(mItemActiveField);
                        b.Mode                = BindingMode.OneWay;
                        b.Converter           = new ActiveBackgroundColorConverter();
                        b.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
                        xListItemGrid.SetBinding(Grid.BackgroundProperty, b);
                    }
                });
            }

            mMainViewWasSet = true;
        }
Exemplo n.º 9
0
        private void BindControls()
        {
            if (mPageViewMode == Ginger.General.eRIPageViewMode.View)
            {
                xNameTxtBox.IsEnabled            = false;
                xDescriptionTxt.IsEnabled        = false;
                xTagsViewer.IsEnabled            = false;
                xRunDescritpion.IsEnabled        = false;
                xStatusComboBox.IsEnabled        = false;
                xCreatedByTextBox.IsEnabled      = false;
                xAutoPrecentageTextBox.IsEnabled = false;
                xTargetsListBox.IsEnabled        = false;
                xAddTargetBtn.IsEnabled          = false;
            }

            BindingHandler.ObjFieldBinding(xNameTxtBox, TextBox.TextProperty, mBusinessFlow, nameof(BusinessFlow.Name));
            BindingHandler.ObjFieldBinding(xDescriptionTxt, TextBox.TextProperty, mBusinessFlow, nameof(BusinessFlow.Description));
            xTagsViewer.Init(mBusinessFlow.Tags);
            xRunDescritpion.Init(mContext, mBusinessFlow, nameof(BusinessFlow.RunDescription));
            General.FillComboFromEnumObj(xStatusComboBox, mBusinessFlow.Status);
            BindingHandler.ObjFieldBinding(xStatusComboBox, ComboBox.TextProperty, mBusinessFlow, nameof(BusinessFlow.Status));
            BindingHandler.ObjFieldBinding(xCreatedByTextBox, TextBox.TextProperty, mBusinessFlow.RepositoryItemHeader, nameof(RepositoryItemHeader.CreatedBy));
            BindingHandler.ObjFieldBinding(xAutoPrecentageTextBox, TextBox.TextProperty, mBusinessFlow, nameof(BusinessFlow.AutomationPrecentage), System.Windows.Data.BindingMode.OneWay);

            //// Per source we can show specific source page info
            //if (mBusinessFlow.Source == BusinessFlow.eSource.Gherkin)
            //{
            //    SourceGherkinPage SGP = new SourceGherkinPage(mBusinessFlow);
            //    SourceFrame.Content = SGP;
            //}

            xTargetsListBox.ItemsSource       = mBusinessFlow.TargetApplications;
            xTargetsListBox.DisplayMemberPath = nameof(TargetApplication.AppName);
        }
Exemplo n.º 10
0
        private void SetItemExecutionOperations()
        {
            this.Dispatcher.Invoke(() =>
            {
                List <ListItemOperation> executionOperations = ListHelper.GetItemExecutionOperationsList(Item);
                if (executionOperations != null && executionOperations.Count > 0)
                {
                    xOperationsSplitter.Visibility         = Visibility.Visible;
                    xItemExecutionOperationsPnl.Visibility = Visibility.Visible;
                    foreach (ListItemOperation operation in executionOperations.Where(x => x.SupportedViews.Contains(ListHelper.PageViewMode)).ToList())
                    {
                        ucButton operationBtn = new ucButton();
                        operationBtn.SetValue(AutomationProperties.AutomationIdProperty, operation.AutomationID);
                        operationBtn.ButtonType          = Amdocs.Ginger.Core.eButtonType.ImageButton;
                        operationBtn.ButtonImageType     = operation.ImageType;
                        operationBtn.ToolTip             = operation.ToolTip;
                        operationBtn.Margin              = new Thickness(-5, 0, -5, 0);
                        operationBtn.ButtonImageHeight   = 15;
                        operationBtn.ButtonImageWidth    = 15;
                        operationBtn.ButtonFontImageSize = operation.ImageSize;
                        operationBtn.ButtonStyle         = (Style)FindResource("$ImageButtonStyle_Execution");

                        if (operation.ImageForeground == null)
                        {
                            //operationBtn.ButtonImageForground = (SolidColorBrush)FindResource("$BackgroundColor_DarkBlue");
                        }
                        else
                        {
                            operationBtn.ButtonImageForground = operation.ImageForeground;
                        }

                        if (operation.ImageBindingObject != null)
                        {
                            if (operation.ImageBindingConverter == null)
                            {
                                BindingHandler.ObjFieldBinding(operationBtn, ucButton.ButtonImageTypeProperty, operation.ImageBindingObject, operation.ImageBindingFieldName, BindingMode.OneWay);
                            }
                            else
                            {
                                BindingHandler.ObjFieldBinding(operationBtn, ucButton.ButtonImageTypeProperty, operation.ImageBindingObject, operation.ImageBindingFieldName, bindingConvertor: operation.ImageBindingConverter, BindingMode.OneWay);
                            }
                        }

                        operationBtn.Click += operation.OperationHandler;
                        operationBtn.Tag    = Item;

                        xItemExecutionOperationsPnl.Children.Add(operationBtn);
                    }
                }

                if (xItemExecutionOperationsPnl.Children.Count == 0)
                {
                    xOperationsSplitter.Visibility         = Visibility.Collapsed;
                    xItemExecutionOperationsPnl.Visibility = Visibility.Collapsed;
                }
            });
        }
        private void ShowHideEditPage(VariableBase variabelToEdit)
        {
            if (variabelToEdit != null)
            {
                xBackToListGrid.Visibility = Visibility.Visible;
                mVarBeenEdit = variabelToEdit;
                BindingHandler.ObjFieldBinding(xSelectedItemTitleText, TextBlock.TextProperty, mVarBeenEdit, nameof(VariableBase.Name));
                BindingHandler.ObjFieldBinding(xSelectedItemTitleText, TextBlock.ToolTipProperty, mVarBeenEdit, nameof(VariableBase.Name));

                bool showAsReadOnly = false;
                if (mPageViewMode == General.eRIPageViewMode.View)
                {
                    showAsReadOnly = true;
                    xEditAndValueChangeOperationsPnl.Visibility = Visibility.Collapsed;
                }
                else
                {
                    xEditAndValueChangeOperationsPnl.Visibility = Visibility.Visible;
                    BindingHandler.ObjFieldBinding(xResetValueBtn, ucButton.VisibilityProperty, mVarBeenEdit, nameof(VariableBase.SupportResetValue), bindingConvertor: new BooleanToVisibilityConverter(), BindingMode.OneWay);
                    BindingHandler.ObjFieldBinding(xAutoValueBtn, ucButton.VisibilityProperty, mVarBeenEdit, nameof(VariableBase.SupportAutoValue), bindingConvertor: new BooleanToVisibilityConverter(), BindingMode.OneWay);
                    mVarBeenEdit.SaveBackup();
                }

                if (mVariabelsParent is Solution)
                {
                    mVariabelEditPage = new VariableEditPage(mVarBeenEdit, mContext, showAsReadOnly, VariableEditPage.eEditMode.Global, parent: mVariabelsParent);
                }
                else if (mVariabelsParent is BusinessFlow)
                {
                    mVariabelEditPage = new VariableEditPage(mVarBeenEdit, mContext, showAsReadOnly, VariableEditPage.eEditMode.Default, parent: mVariabelsParent);
                }
                else if (mVariabelsParent is Activity)
                {
                    if (mPageViewMode == General.eRIPageViewMode.View)
                    {
                        mVariabelEditPage = new VariableEditPage(mVarBeenEdit, mContext, showAsReadOnly, VariableEditPage.eEditMode.View, parent: mVariabelsParent);
                    }
                    else if (mPageViewMode == General.eRIPageViewMode.SharedReposiotry)
                    {
                        mVariabelEditPage = new VariableEditPage(mVarBeenEdit, mContext, showAsReadOnly, VariableEditPage.eEditMode.SharedRepository);
                    }
                    else
                    {
                        mVariabelEditPage = new VariableEditPage(mVarBeenEdit, mContext, showAsReadOnly, VariableEditPage.eEditMode.Default, parent: mVariabelsParent);
                    }
                }
                xMainFrame.SetContent(mVariabelEditPage);
            }
            else
            {
                xBackToListGrid.Visibility = Visibility.Collapsed;
                mVariabelEditPage          = null;
                xMainFrame.SetContent(mVariabelsListView);
            }
        }
Exemplo n.º 12
0
        private void BindControls()
        {
            //Details Tab Bindings
            xRunDescritpion.Init(mContext, mActivity, nameof(Activity.RunDescription));
            xRunOptionCombo.BindControl(mActivity, nameof(Activity.ActionRunOption));
            xSharedRepoInstanceUC.Init(mActivity, mContext.BusinessFlow);
            GingerCore.General.FillComboFromEnumObj(xErrorHandlerMappingCmb, mActivity.ErrorHandlerMappingType);
            xTagsViewer.Init(mActivity.Tags);
            xShowIDUC.Init(mActivity);
            BindingHandler.ObjFieldBinding(xActivityNameTxtBox, TextBox.TextProperty, mActivity, nameof(Activity.ActivityName));
            BindingHandler.ObjFieldBinding(xActivityDescriptionTxt, TextBox.TextProperty, mActivity, nameof(Activity.Description));
            BindingHandler.ObjFieldBinding(xExpectedTxt, TextBox.TextProperty, mActivity, nameof(Activity.Expected));
            BindingHandler.ObjFieldBinding(xScreenTxt, TextBox.TextProperty, mActivity, nameof(Activity.Screen));
            xAutomationStatusCombo.BindControl(mActivity, nameof(Activity.AutomationStatus));
            BindingHandler.ObjFieldBinding(xMandatoryActivityCB, CheckBox.IsCheckedProperty, mActivity, nameof(Activity.Mandatory));
            BindingHandler.ObjFieldBinding(xPublishcheckbox, CheckBox.IsCheckedProperty, mActivity, nameof(Activity.Publish));
            if (mContext != null && mContext.BusinessFlow != null)
            {
                xTargetApplicationComboBox.ItemsSource = mContext.BusinessFlow.TargetApplications;
            }
            else
            {
                xTargetApplicationComboBox.ItemsSource = WorkSpace.Instance.Solution.GetSolutionTargetApplications();
            }
            xTargetApplicationComboBox.SelectedValuePath = nameof(TargetApplication.AppName);
            xTargetApplicationComboBox.DisplayMemberPath = nameof(TargetApplication.AppName);
            BindingHandler.ObjFieldBinding(xTargetApplicationComboBox, ComboBox.SelectedValueProperty, mActivity, nameof(Activity.TargetApplication));

            if (mActivity.GetType() == typeof(ErrorHandler))
            {
                xHandlerTypeStack.Visibility = Visibility.Visible;
                xHandlerPostExecutionActionStack.Visibility = Visibility.Visible;
                xHandlerPostExecutionCombo.BindControl(mActivity, nameof(ErrorHandler.ErrorHandlerPostExecutionAction));

                xHandlerTriggerOnStackPanel.Visibility = Visibility.Visible;
                xHandlerTriggerOnCombo.BindControl(mActivity, nameof(ErrorHandler.TriggerType));

                xHandlerMappingStack.Visibility = Visibility.Collapsed;
                xHandlerTypeCombo.BindControl(mActivity, nameof(ErrorHandler.HandlerType));
            }
            else if (mActivity.GetType() == typeof(CleanUpActivity))
            {
                xHandlerTypeStack.Visibility    = Visibility.Collapsed;
                xHandlerMappingStack.Visibility = Visibility.Collapsed;
            }
            else
            {
                BindingHandler.ObjFieldBinding(xErrorHandlerMappingCmb, ComboBox.SelectedValueProperty, mActivity, nameof(Activity.ErrorHandlerMappingType));
                xHandlerMappingStack.Visibility             = Visibility.Visible;
                xHandlerTypeStack.Visibility                = Visibility.Collapsed;
                xHandlerTriggerOnStackPanel.Visibility      = Visibility.Collapsed;
                xHandlerPostExecutionActionStack.Visibility = Visibility.Collapsed;
            }
        }
 private void SelfHealingAutoCheckInSetting()
 {
     if (mAutoRunWizard.RunsetConfig.SelfHealingConfiguration.ReprioritizePOMLocators || mAutoRunWizard.RunsetConfig.SelfHealingConfiguration.AutoUpdateApplicationModel)
     {
         xSelfHealinAutoCheckInConfigCheckBox.Visibility = System.Windows.Visibility.Visible;
         BindingHandler.ObjFieldBinding(xSelfHealinAutoCheckInConfigCheckBox, CheckBox.IsCheckedProperty, mAutoRunWizard.RunsetConfig.SelfHealingConfiguration, nameof(SelfHealingConfig.SaveChangesInSourceControl));
     }
     else
     {
         xSelfHealinAutoCheckInConfigCheckBox.Visibility = System.Windows.Visibility.Collapsed;
     }
 }
Exemplo n.º 14
0
        public void SetListOperations()
        {
            List <ListItemOperation> listOperations = mListViewHelper.GetListOperations();

            if (listOperations != null && listOperations.Count > 0)
            {
                xListOperationsPnl.Visibility = Visibility.Visible;

                foreach (ListItemOperation operation in listOperations.Where(x => x.SupportedViews.Contains(mListViewHelper.PageViewMode)).ToList())
                {
                    ucButton operationBtn = new ucButton();
                    operationBtn.ButtonType          = Amdocs.Ginger.Core.eButtonType.CircleImageButton;
                    operationBtn.ButtonImageType     = operation.ImageType;
                    operationBtn.ToolTip             = operation.ToolTip;
                    operationBtn.Margin              = new Thickness(-2, 0, -2, 0);
                    operationBtn.ButtonImageHeight   = 16;
                    operationBtn.ButtonImageWidth    = 16;
                    operationBtn.ButtonFontImageSize = operation.ImageSize;

                    if (operation.ImageForeground == null)
                    {
                        //operationBtn.ButtonImageForground = (SolidColorBrush)FindResource("$BackgroundColor_DarkBlue");
                    }
                    else
                    {
                        operationBtn.ButtonImageForground = operation.ImageForeground;
                    }

                    if (operation.ImageBindingObject != null)
                    {
                        if (operation.ImageBindingConverter == null)
                        {
                            BindingHandler.ObjFieldBinding(operationBtn, ucButton.ButtonImageTypeProperty, operation.ImageBindingObject, operation.ImageBindingFieldName, BindingMode.OneWay);
                        }
                        else
                        {
                            BindingHandler.ObjFieldBinding(operationBtn, ucButton.ButtonImageTypeProperty, operation.ImageBindingObject, operation.ImageBindingFieldName, bindingConvertor: operation.ImageBindingConverter, BindingMode.OneWay);
                        }
                    }

                    operationBtn.Click += operation.OperationHandler;
                    operationBtn.Tag    = xListView.ItemsSource;

                    xListOperationsPnl.Children.Add(operationBtn);
                }
            }

            if (xListOperationsPnl.Children.Count == 0)
            {
                xListOperationsPnl.Visibility = Visibility.Collapsed;
            }
        }
Exemplo n.º 15
0
        private void SetControls()
        {
            BindingHandler.ObjFieldBinding(xRunAnalyzerChkbox, CheckBox.IsCheckedProperty, mRunSetConfig, nameof(RunSetConfig.RunWithAnalyzer));
            BindingHandler.ObjFieldBinding(xStopRunnersExecutionOnFailureChkbox, CheckBox.IsCheckedProperty, mRunSetConfig, nameof(RunSetConfig.StopRunnersOnFailure));

            if (mRunSetConfig.RunModeParallel)
            {
                xParallelOptionRdBtn.IsChecked = true;
            }
            else
            {
                xSequentiallyOptionRdBtn.IsChecked = true;
            }
        }
        public void WizardEvent(WizardEventArgs WizardEventArgs)
        {
            switch (WizardEventArgs.EventType)
            {
            case EventType.Init:
                mAutoRunWizard = (AutoRunWizard)WizardEventArgs.Wizard;

                BindingHandler.ObjFieldBinding(xConfigurationNameTextBox, System.Windows.Controls.TextBox.TextProperty, mAutoRunWizard.AutoRunConfiguration, nameof(RunSetAutoRunConfiguration.ConfigName));
                xConfigurationPathTextbox.Init(mAutoRunWizard.mContext, mAutoRunWizard.AutoRunConfiguration, nameof(RunSetAutoRunConfiguration.ConfigFileFolderPath), isVENeeded: false, isBrowseNeeded: true, browserType: Actions.UCValueExpression.eBrowserType.Folder);
                xParametersRadioButton.IsChecked = true;
                mAutoRunWizard.AutoRunConfiguration.AutoRunEexecutorType = eAutoRunEexecutorType.Run;
                BindingHandler.ObjFieldBinding(xCLIContentTextBox, TextBox.TextProperty, mAutoRunWizard.AutoRunConfiguration, nameof(mAutoRunWizard.AutoRunConfiguration.CLIContent), BindingMode: System.Windows.Data.BindingMode.TwoWay);
                mAutoRunWizard.AutoRunConfiguration.CLIContent = mAutoRunWizard.AutoRunConfiguration.GetCLIContent();
                mTempCLIContent = mAutoRunWizard.AutoRunConfiguration.CLIContent;
                break;

            case EventType.Active:
                if (mAutoRunWizard.AutoRunConfiguration.AutoRunEexecutorType != eAutoRunEexecutorType.Run)
                {
                    xCLIContentTextBox.AddValidationRule(new ValidateJsonFormat());
                }
                ResetCLIContent(mAutoRunWizard.ResetCLIContent);
                ShowHelp();
                ShowContent();
                break;

            case EventType.Prev:
                if (mTempCLIContent != mAutoRunWizard.AutoRunConfiguration.CLIContent && WizardEventArgs.Wizard.GetCurrentPage().Page == this && Reporter.ToUser(eUserMsgKey.RunsetAutoConfigBackWarn, "Configuartions customizations will be lost,do you want to go back?") == eUserMsgSelection.No)
                {
                    WizardEventArgs.CancelEvent = true;
                }
                else if (WizardEventArgs.Wizard.GetCurrentPage().Page == this && mTempCLIContent != mAutoRunWizard.AutoRunConfiguration.CLIContent)
                {
                    WizardEventArgs.CancelEvent = false;
                    ResetCLIContent(mAutoRunWizard.ResetCLIContent = true);
                    mTempCLIContent = mAutoRunWizard.AutoRunConfiguration.CLIContent;
                    ShowContent();
                }
                else
                {
                    WizardEventArgs.CancelEvent = false;
                }
                break;

            case EventType.LeavingForNextPage:
                mAutoRunWizard.ResetCLIContent = false;
                break;
            }
        }
Exemplo n.º 17
0
        private void SetGroupNotifications(DockPanel panel)
        {
            this.Dispatcher.Invoke(() =>
            {
                if (panel.Tag != null)
                {
                    List <ListItemNotification> notifications = mListViewHelper.GetItemGroupNotificationsList(panel.Tag.ToString());
                    if (notifications != null && notifications.Count > 0)
                    {
                        panel.Visibility = Visibility.Visible;
                        foreach (ListItemNotification notification in notifications)
                        {
                            ImageMakerControl itemInd = new ImageMakerControl();
                            itemInd.SetValue(AutomationProperties.AutomationIdProperty, notification.AutomationID);
                            itemInd.ImageType = notification.ImageType;
                            itemInd.ToolTip   = notification.ToolTip;
                            itemInd.Margin    = new Thickness(3, 0, 3, 0);
                            itemInd.Height    = 16;
                            itemInd.Width     = 16;
                            itemInd.SetAsFontImageWithSize = notification.ImageSize;

                            if (notification.ImageForeground == null)
                            {
                                itemInd.ImageForeground = System.Windows.Media.Brushes.LightPink;
                            }
                            else
                            {
                                itemInd.ImageForeground = notification.ImageForeground;
                            }

                            if (notification.BindingConverter == null)
                            {
                                BindingHandler.ObjFieldBinding(itemInd, ImageMakerControl.VisibilityProperty, notification.BindingObject, notification.BindingFieldName, BindingMode.OneWay);
                            }
                            else
                            {
                                BindingHandler.ObjFieldBinding(itemInd, ImageMakerControl.VisibilityProperty, notification.BindingObject, notification.BindingFieldName, bindingConvertor: notification.BindingConverter, BindingMode.OneWay);
                            }

                            panel.Children.Add(itemInd);
                        }
                    }
                    else
                    {
                        panel.Visibility = Visibility.Collapsed;
                    }
                }
            });
        }
Exemplo n.º 18
0
        private void BindRadioButtons()
        {
            mDeviceAutoScreenshotRefreshMode = mAgent.GetOrCreateParam(nameof(GenericAppiumDriver.DeviceAutoScreenshotRefreshMode), eAutoScreenshotRefreshMode.Live.ToString());
            BindingHandler.ObjFieldBinding(xLiveRdBtn, RadioButton.IsCheckedProperty, mDeviceAutoScreenshotRefreshMode, nameof(DriverConfigParam.Value), bindingConvertor: new RadioBtnEnumConfigConverter(), converterParameter: eAutoScreenshotRefreshMode.Live.ToString());
            BindingHandler.ObjFieldBinding(xPostOperationRdBtn, RadioButton.IsCheckedProperty, mDeviceAutoScreenshotRefreshMode, nameof(DriverConfigParam.Value), bindingConvertor: new RadioBtnEnumConfigConverter(), converterParameter: eAutoScreenshotRefreshMode.PostOperation.ToString());
            BindingHandler.ObjFieldBinding(xDisabledRdBtn, RadioButton.IsCheckedProperty, mDeviceAutoScreenshotRefreshMode, nameof(DriverConfigParam.Value), bindingConvertor: new RadioBtnEnumConfigConverter(), converterParameter: eAutoScreenshotRefreshMode.Disabled.ToString());

            mDevicePlatformType = mAgent.GetOrCreateParam(nameof(GenericAppiumDriver.DevicePlatformType));
            BindingHandler.ObjFieldBinding(xAndroidRdBtn, RadioButton.IsCheckedProperty, mDevicePlatformType, nameof(DriverConfigParam.Value), bindingConvertor: new RadioBtnEnumConfigConverter(), converterParameter: eDevicePlatformType.Android.ToString());
            BindingHandler.ObjFieldBinding(xIOSRdBtn, RadioButton.IsCheckedProperty, mDevicePlatformType, nameof(DriverConfigParam.Value), bindingConvertor: new RadioBtnEnumConfigConverter(), converterParameter: eDevicePlatformType.iOS.ToString());

            mAppType = mAgent.GetOrCreateParam(nameof(GenericAppiumDriver.AppType));
            BindingHandler.ObjFieldBinding(xNativeHybRdBtn, RadioButton.IsCheckedProperty, mAppType, nameof(DriverConfigParam.Value), bindingConvertor: new RadioBtnEnumConfigConverter(), converterParameter: eAppType.NativeHybride.ToString());
            BindingHandler.ObjFieldBinding(xWebRdBtn, RadioButton.IsCheckedProperty, mAppType, nameof(DriverConfigParam.Value), bindingConvertor: new RadioBtnEnumConfigConverter(), converterParameter: eAppType.Web.ToString());
        }
Exemplo n.º 19
0
        private void ShowHideEditPage(Act actionToEdit)
        {
            if (actionToEdit != null)
            {
                xBackToListGrid.Visibility = Visibility.Visible;
                mActionBeenEdit            = actionToEdit;
                mActionBeenEdit.Context    = mContext;
                BindingHandler.ObjFieldBinding(xSelectedItemTitleText, TextBlock.TextProperty, mActionBeenEdit, nameof(Act.Description));
                BindingHandler.ObjFieldBinding(xSelectedItemTitleText, TextBlock.ToolTipProperty, mActionBeenEdit, nameof(Act.Description));
                if (mPageViewMode == Ginger.General.eRIPageViewMode.View)
                {
                    xEditAndRunOperationsPnl.Visibility = Visibility.Collapsed;
                }
                else
                {
                    xEditAndRunOperationsPnl.Visibility = Visibility.Visible;
                    mActionBeenEdit.SaveBackup();
                    BindingHandler.ObjFieldBinding(xActiveBtn, ucButton.ButtonImageTypeProperty, mActionBeenEdit, nameof(Act.Active), bindingConvertor: new ActiveImageTypeConverter(), BindingMode.OneWay);
                    BindingHandler.ObjFieldBinding(xBreakPointMenuItemIcon, ImageMaker.ContentProperty, mActionBeenEdit, nameof(Act.BreakPoint), bindingConvertor: new ActiveImageTypeConverter(), BindingMode.OneWay);
                }

                mActionEditPage = new ActionEditPage(mActionBeenEdit, mPageViewMode);
                xMainFrame.SetContent(mActionEditPage);
                if (ShiftToActionEditEvent != null)
                {
                    ShiftToActionEditEvent.Invoke(this, null);
                }
            }
            else
            {
                xBackToListGrid.Visibility = Visibility.Collapsed;
                mActionBeenEdit            = null;
                if (mActionEditPage != null)
                {
                    mActionEditPage.ClearPageBindings();
                    mActionEditPage.KeepAlive = false;
                    mActionEditPage           = null;
                    //GC.Collect();
                }
                xMainFrame.SetContent(mActionsListView);
                mActionsListView.ScrollToViewCurrentItem();

                if (ShiftToActionsListEvent != null)
                {
                    ShiftToActionsListEvent.Invoke(this, null);
                }
            }
        }
        public void WizardEvent(WizardEventArgs WizardEventArgs)
        {
            switch (WizardEventArgs.EventType)
            {
            case EventType.Init:
                mAutoRunWizard = (AutoRunWizard)WizardEventArgs.Wizard;
                BindingHandler.ObjFieldBinding(xConfigurationNameTextBox, System.Windows.Controls.TextBox.TextProperty, mAutoRunWizard.AutoRunConfiguration, nameof(RunSetAutoRunConfiguration.ConfigName));
                xConfigurationPathTextbox.Init(mAutoRunWizard.mContext, mAutoRunWizard.AutoRunConfiguration, nameof(RunSetAutoRunConfiguration.ConfigFileFolderPath), isVENeeded: false, isBrowseNeeded: true, browserType: Actions.UCValueExpression.eBrowserType.Folder);
                xConfigRadioButton.IsChecked = true;
                break;

            case EventType.Active:
                ShowHelp();
                ShowContent();
                break;
            }
        }
Exemplo n.º 21
0
        public AgentEditPage(Agent agent)
        {
            InitializeComponent();

            if (agent != null)
            {
                mAgent = agent;

                xShowIDUC.Init(mAgent);
                GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xAgentNameTextBox, TextBox.TextProperty, mAgent, nameof(Agent.Name));
                GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xDescriptionTextBox, TextBox.TextProperty, mAgent, nameof(Agent.Notes));
                GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xAgentTypelbl, Label.ContentProperty, mAgent, nameof(Agent.AgentType));
                BindingHandler.ObjFieldBinding(xPublishcheckbox, CheckBox.IsCheckedProperty, mAgent, nameof(RepositoryItemBase.Publish));
                TagsViewer.Init(mAgent.Tags);

                if (mAgent.AgentType == eAgentType.Driver)
                {
                    mOriginalPlatformType = mAgent.Platform;
                    mOriginalDriverType   = mAgent.DriverType.ToString();

                    xPlatformTxtBox.Text = mOriginalPlatformType.ToString();
                    SetDriverInformation();
                    GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xDriverTypeComboBox, ComboBox.TextProperty, mAgent, nameof(Agent.DriverType));
                    xDriverTypeComboBox.SelectionChanged += driverTypeComboBox_SelectionChanged;
                }
                else//Plugin
                {
                    xDriverConfigPnl.Visibility = Visibility.Collapsed;
                    xPluginConfigPnl.Visibility = Visibility.Visible;

                    // Plugin combo
                    xPluginIdComboBox.ItemsSource       = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <PluginPackage>();
                    xPluginIdComboBox.DisplayMemberPath = nameof(PluginPackage.PluginId);
                    xPluginIdComboBox.BindControl(mAgent, nameof(Agent.PluginId));
                }
                if (mAgent.AgentType == eAgentType.Driver)
                {
                    xAgentConfigFrame.SetContent(new AgentDriverConfigPage(mAgent));
                }
                else
                {
                    // xAgentConfigFrame.SetContent(new NewAgentDriverConfigPage(mAgent));
                    xAgentConfigFrame.SetContent(new AgentDriverConfigPage(mAgent));
                }
            }
        }
        public RunSetActionDeliveryMethodConfigPage(Email email)
        {
            InitializeComponent();
            Context context = new Context()
            {
                Environment = WorkSpace.Instance.RunsetExecutor.RunsetExecutionEnvironment
            };

            xSMTPMailHostTextBox.Init(context, email, nameof(Email.SMTPMailHost));
            BindingHandler.ObjFieldBinding(xSMTPPortTextBox, TextBox.TextProperty, email, nameof(Email.SMTPPort));
            xSMTPUserTextBox.Init(context, email, nameof(Email.SMTPUser));
            BindingHandler.ObjFieldBinding(xSMTPPassTextBox, TextBox.TextProperty, email, nameof(Email.SMTPPass));
            GingerCore.General.FillComboFromEnumObj(xEmailMethodComboBox, email.EmailMethod);
            BindingHandler.ObjFieldBinding(xEmailMethodComboBox, ComboBox.SelectedValueProperty, email, nameof(Email.EmailMethod));
            BindingHandler.ObjFieldBinding(xcbEnableSSL, CheckBox.IsCheckedProperty, email, nameof(Email.EnableSSL));
            BindingHandler.ObjFieldBinding(xcbConfigureCredential, CheckBox.IsCheckedProperty, email, nameof(Email.ConfigureCredential));
        }
        private void XDynamicRadioButton_Checked(object sender, RoutedEventArgs e)
        {
            if (mCLIDynamicFile == null)
            {
                mCLIDynamicFile = new CLIDynamicFile(CLIDynamicFile.eFileType.JSON);
                GingerCore.General.FillComboFromEnumObj(xDynamicFileTypeCombo, mCLIDynamicFile.FileType);
                BindingHandler.ObjFieldBinding(xDynamicFileTypeCombo, ComboBox.TextProperty, mCLIDynamicFile, nameof(CLIDynamicFile.FileType));
            }

            if (mAutoRunWizard != null)
            {
                mAutoRunWizard.AutoRunConfiguration.SelectedCLI = mCLIDynamicFile;
                ShowHelp();
                ShowContent();
            }

            xConfigFileSettingsPnl.Visibility = Visibility.Visible;
        }
Exemplo n.º 24
0
        public AppsListPage(ProjEnvironment env)
        {
            InitializeComponent();

            AppEnvironmnet = env;
            //Set grid look and data
            SetGridView();
            SetGridData();

            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(EnvNameTextBox, TextBox.TextProperty, env, ProjEnvironment.Fields.Name);
            xShowIDUC.Init(AppEnvironmnet);
            BindingHandler.ObjFieldBinding(xPublishcheckbox, CheckBox.IsCheckedProperty, AppEnvironmnet, nameof(RepositoryItemBase.Publish));


            grdApps.btnAdd.AddHandler(Button.ClickEvent, new RoutedEventHandler(AddApp));
            grdApps.AddToolbarTool("@Share_16x16.png", "Add Selected Applications to All Environments", new RoutedEventHandler(AddAppsToOtherEnvironments));

            TagsViewer.Init(AppEnvironmnet.Tags);
        }
Exemplo n.º 25
0
        private void SetItemNotifications()
        {
            this.Dispatcher.Invoke(() =>
            {
                List <ListItemNotification> notifications = ListHelper.GetItemNotificationsList(Item);
                if (notifications != null)
                {
                    foreach (ListItemNotification notification in notifications)
                    {
                        ImageMakerControl itemInd = new ImageMakerControl();
                        itemInd.SetValue(AutomationProperties.AutomationIdProperty, notification.AutomationID);
                        itemInd.ImageType = notification.ImageType;
                        itemInd.ToolTip   = notification.ToolTip;
                        itemInd.Margin    = new Thickness(3, 0, 3, 0);
                        itemInd.Height    = 16;
                        itemInd.Width     = 16;
                        itemInd.SetAsFontImageWithSize = notification.ImageSize;

                        if (notification.ImageForeground == null)
                        {
                            itemInd.ImageForeground = System.Windows.Media.Brushes.LightPink;
                        }
                        else
                        {
                            itemInd.ImageForeground = notification.ImageForeground;
                        }

                        if (notification.BindingConverter == null)
                        {
                            BindingHandler.ObjFieldBinding(itemInd, ImageMakerControl.VisibilityProperty, notification.BindingObject, notification.BindingFieldName, BindingMode.OneWay);
                        }
                        else
                        {
                            BindingHandler.ObjFieldBinding(itemInd, ImageMakerControl.VisibilityProperty, notification.BindingObject, notification.BindingFieldName, bindingConvertor: notification.BindingConverter, BindingMode.OneWay);
                        }

                        xItemNotificationsPnl.Children.Add(itemInd);
                        xItemNotificationsClm.Width = new GridLength(xItemNotificationsClm.Width.Value + itemInd.Width + 10);
                    }
                }
            });
        }
 public void WizardEvent(WizardEventArgs WizardEventArgs)
 {
     mWizard = (AddActivityWizard)WizardEventArgs.Wizard;
     switch (WizardEventArgs.EventType)
     {
     case EventType.Init:
         if (mWizard.ActivitiesGroupPreSet == false)
         {
             xGroupComboBox.ItemsSource       = mWizard.Context.BusinessFlow.ActivitiesGroups;
             xGroupComboBox.DisplayMemberPath = nameof(ActivitiesGroup.Name);
             BindingHandler.ObjFieldBinding(xGroupComboBox, ComboBox.SelectedItemProperty, mWizard, nameof(AddActivityWizard.ParentActivitiesGroup));
         }
         else
         {
             xGroupPanel.Visibility = Visibility.Collapsed;
         }
         xRegularType.IsChecked = true;
         break;
     }
 }
Exemplo n.º 27
0
        public void WizardEvent(WizardEventArgs WizardEventArgs)
        {
            switch (WizardEventArgs.EventType)
            {
            case EventType.Init:
                mAutoRunWizard = (AutoRunWizard)WizardEventArgs.Wizard;
                mAutoRunWizard.AutoRunShortcut.CreateShortcut   = true;
                mAutoRunWizard.AutoRunShortcut.ShortcutFileName = WorkSpace.Instance.Solution.Name + "-" + mAutoRunWizard.RunsetConfig.Name + " Execution";
                xExecuterPathTextbox.Init(mAutoRunWizard.mContext, mAutoRunWizard.AutoRunShortcut, nameof(RunSetAutoRunShortcut.ExecuterFolderPath), isVENeeded: false, isBrowseNeeded: true, browserType: Actions.UCValueExpression.eBrowserType.Folder);
                xShortcutPathTextbox.Init(mAutoRunWizard.mContext, mAutoRunWizard.AutoRunShortcut, nameof(RunSetAutoRunShortcut.ShortcutFolderPath), isVENeeded: false, isBrowseNeeded: true, browserType: Actions.UCValueExpression.eBrowserType.Folder);
                BindingHandler.ObjFieldBinding(xShortcutDescriptionTextBox, System.Windows.Controls.TextBox.TextProperty, mAutoRunWizard.AutoRunShortcut, nameof(RunSetAutoRunShortcut.ShortcutFileName));
                xGingerEXERadioButton.IsChecked = true;
                xDesktopRadioButton.IsChecked   = true;
                break;

            case EventType.Active:
                BindingHandler.ObjFieldBinding(xShortcutContentTextBox, System.Windows.Controls.TextBox.TextProperty, mAutoRunWizard.AutoRunShortcut, nameof(RunSetAutoRunShortcut.ShortcutContent), BindingMode: System.Windows.Data.BindingMode.OneWay);
                break;
            }
        }
Exemplo n.º 28
0
        private void BindConfigurationsFields()
        {
            mAppiumServer = mAgent.GetOrCreateParam(nameof(GenericAppiumDriver.AppiumServer), @"http://127.0.0.1:4723/wd/hub");
            //BindingHandler.ObjFieldBinding(xServerURLTextBox, TextBox.TextProperty, mAppiumServer, nameof(DriverConfigParam.Value));
            xServerURLTextBox.Init(null, mAppiumServer, nameof(DriverConfigParam.Value));
            BindingHandler.ObjFieldBinding(xServerURLTextBox, TextBox.ToolTipProperty, mAppiumServer, nameof(DriverConfigParam.Description));

            BindingHandler.ObjFieldBinding(xLoadDeviceWindow, CheckBox.IsCheckedProperty, mAgent.GetOrCreateParam(nameof(GenericAppiumDriver.LoadDeviceWindow), "true"), nameof(DriverConfigParam.Value), bindingConvertor: new CheckboxConfigConverter());

            DriverConfigParam proxy = mAgent.GetOrCreateParam(nameof(GenericAppiumDriver.Proxy));

            xProxyTextBox.Init(null, proxy, nameof(DriverConfigParam.Value));
            BindingHandler.ObjFieldBinding(xProxyTextBox, TextBox.ToolTipProperty, proxy, nameof(DriverConfigParam.Description));
            xUseProxyChkBox.IsChecked = !string.IsNullOrEmpty(proxy.Value);

            mApplitoolKey = mAgent.GetOrCreateParam(nameof(GenericAppiumDriver.ApplitoolsViewKey));
            xApplitoolKeyTxtBox.Init(null, mApplitoolKey, nameof(DriverConfigParam.Value));
            BindingHandler.ObjFieldBinding(xApplitoolKeyTxtBox, TextBox.ToolTipProperty, mApplitoolKey, nameof(DriverConfigParam.Description));

            mApplitoolURL = mAgent.GetOrCreateParam(nameof(GenericAppiumDriver.ApplitoolsServerUrl));
            xApplitoolURLTxtBox.Init(null, mApplitoolURL, nameof(DriverConfigParam.Value));
            BindingHandler.ObjFieldBinding(xApplitoolURLTxtBox, TextBox.ToolTipProperty, mApplitoolURL, nameof(DriverConfigParam.Description));


            xLoadTimeoutTxtbox.Init(null, mAgent.GetOrCreateParam(nameof(GenericAppiumDriver.DriverLoadWaitingTime)), nameof(DriverConfigParam.Value));
            BindingHandler.ObjFieldBinding(xLoadTimeoutTxtbox, TextBox.ToolTipProperty, mAgent.GetOrCreateParam(nameof(GenericAppiumDriver.DriverLoadWaitingTime)), nameof(DriverConfigParam.Description));

            BindingHandler.ObjFieldBinding(xAutoUpdateCapabiltiies, CheckBox.IsCheckedProperty, mAgent.GetOrCreateParam(nameof(GenericAppiumDriver.AutoSetCapabilities), "true"), nameof(DriverConfigParam.Value), bindingConvertor: new CheckboxConfigConverter());

            BindRadioButtons();

            mAppiumCapabilities = mAgent.GetOrCreateParam(nameof(GenericAppiumDriver.AppiumCapabilities));
            if (mAppiumCapabilities.MultiValues == null || mAppiumCapabilities.MultiValues.Count == 0)
            {
                mAppiumCapabilities.MultiValues = new ObservableList <DriverConfigParam>();
                AutoSetCapabilities(true);
            }
            SetCapabilitiesGridView();
        }
Exemplo n.º 29
0
        private void BindControlsToActivity()
        {
            if (mPageViewMode != Ginger.General.eRIPageViewMode.View)
            {
                mActivity.SaveBackup();
            }

            //General Info Section Bindings
            BindingHandler.ObjFieldBinding(xNameTextBlock, TextBlock.TextProperty, mActivity, nameof(Activity.ActivityName));
            BindingHandler.ObjFieldBinding(xNameTextBlock, TextBlock.ToolTipProperty, mActivity, nameof(Activity.ActivityName));
            mActivity.PropertyChanged -= mActivity_PropertyChanged;
            mActivity.PropertyChanged += mActivity_PropertyChanged;
            UpdateDescription();
            xSharedRepoInstanceUC.Init(mActivity, mContext.BusinessFlow);

            //Actions Tab Bindings
            mActivity.Acts.CollectionChanged -= Acts_CollectionChanged;
            mActivity.Acts.CollectionChanged += Acts_CollectionChanged;
            UpdateActionsTabHeader();
            if (mActionsPage != null && xActionsTab.IsSelected)
            {
                mActionsPage.UpdateActivity(mActivity);
            }

            //Variables Tab Bindings
            mActivity.Variables.CollectionChanged -= Variables_CollectionChanged;
            mActivity.Variables.CollectionChanged += Variables_CollectionChanged;
            UpdateVariabelsTabHeader();
            if (mVariabelsPage != null && xVariablesTab.IsSelected)
            {
                mVariabelsPage.UpdateParent(mActivity);
            }

            //Configurations Tab Bindings
            if (mConfigurationsPage != null && xConfigurationsTab.IsSelected)
            {
                mConfigurationsPage.UpdateActivity(mActivity);
            }
        }
        private void XDynamicRadioButton_Checked(object sender, RoutedEventArgs e)
        {
            if (mCLIDynamicFile == null)
            {
                mCLIDynamicFile = new CLIDynamicFile(CLIDynamicFile.eFileType.JSON);
                GingerCore.General.FillComboFromEnumObj(xDynamicFileTypeCombo, mCLIDynamicFile.FileType);
                BindingHandler.ObjFieldBinding(xDynamicFileTypeCombo, ComboBox.TextProperty, mCLIDynamicFile, nameof(CLIDynamicFile.FileType));
            }

            if (mAutoRunWizard != null)
            {
                mAutoRunWizard.AutoRunConfiguration.SelectedCLI          = mCLIDynamicFile;
                mAutoRunWizard.AutoRunConfiguration.AutoRunEexecutorType = eAutoRunEexecutorType.DynamicFile;

                ShowHelp();
                ResetCLIContent(mAutoRunWizard.ResetCLIContent = true);
                ShowContent();
            }
            xConfigFileSettingsPnl.Visibility = Visibility.Visible;
            xDynamicFileTypeCombo.Visibility  = Visibility.Collapsed;
            xCLIContentTextBox.AddValidationRule(new ValidateJsonFormat());
        }