示例#1
0
 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;
     }
 }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="sdrReader"></param>
        /// <returns></returns>
        internal static TValue SqlDataReaderToObject <TValue>(IDataReader sdrReader, BindingHandler <TValue> binding)
        {
            // GSB - 07032003 - Declara e inicializa objetos
            TValue objEntidade = default(TValue);

            // GSB - 07032003 - Varre os registros e converte o Data Reader em um Array de Entidades
            while (sdrReader.Read())
            {
                // GSB - 010072003 - Cria instância do tipo de negócio específico
                objEntidade = Activator.CreateInstance <TValue>();

                //((IBindingObject)objEntidade).Binding(sdrReader);
                binding(objEntidade, sdrReader);

                // GSB - 07032003 - Adiciona a nova entidade no Array
                break;
            }
            sdrReader.Close();
            return(objEntidade);
        }
        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;
            }
        }
示例#4
0
        public void Link(object viewElement, IEnumerable <LinkData> linkData, Action <object, object, string> createLinkAction)
        {
            if (!(viewElement is DataGrid dataGrid))
            {
                return;
            }

            foreach (LinkData data in linkData)
            {
                PropertyInfo pInfo = data.ContextMemberInfo as PropertyInfo;

                switch (data.ViewElementName)
                {
                case nameof(DataGrid.ItemsSource):
                    if (pInfo == null || !typeof(IEnumerable).IsAssignableFrom(pInfo.PropertyType))
                    {
                        throw new NotSupportedException($"The member info for the '{nameof(DataGrid.ItemsSource)}' link is not of type '{typeof(PropertyInfo)}' or the property is not of type '{typeof(IEnumerable)}'!");
                    }

                    foreach (DataGridColumn col in dataGrid.Columns)
                    {
                        createLinkAction.Invoke(col, data.Context, col.GetValue(FrameworkElement.NameProperty) as string);
                    }

                    BindingHandler.SetBinding(dataGrid, ItemsControl.ItemsSourceProperty, pInfo, data.Context);
                    break;

                case nameof(DataGrid.SelectedItem):
                    if (pInfo == null || typeof(IEnumerable).IsAssignableFrom(pInfo.PropertyType))
                    {
                        throw new NotSupportedException($"The member info for the '{nameof(DataGrid.SelectedItem)}' link is not of type '{typeof(PropertyInfo)}' or the property is of type '{typeof(IEnumerable)}'!");
                    }

                    BindingHandler.SetBinding(dataGrid, Selector.SelectedItemProperty, pInfo, data.Context);
                    break;

                default:
                    throw new NotSupportedException($"The property name '{data.ViewElementName}' is not supported by '{GetType().Name}'!");
                }
            }
        }
示例#5
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;
                xHandlerMappingStack.Visibility = Visibility.Collapsed;
                xHandlerTypeCombo.BindControl(mActivity, nameof(ErrorHandler.HandlerType));
            }
            else
            {
                BindingHandler.ObjFieldBinding(xErrorHandlerMappingCmb, ComboBox.SelectedValueProperty, mActivity, nameof(Activity.ErrorHandlerMappingType));
                xHandlerMappingStack.Visibility = Visibility.Visible;
                xHandlerTypeStack.Visibility    = Visibility.Collapsed;
            }
        }
        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);
                SelfHealingAutoCheckInSetting();
                break;

            case EventType.Next:
                mAutoRunWizard.ResetCLIContent = true;
                break;
            }
        }
示例#7
0
        public void Link(object viewElement, IEnumerable <LinkData> linkData, Action <object, object, string> createLinkAction)
        {
            if (!(viewElement is ListView listView))
            {
                return;
            }

            foreach (LinkData data in linkData)
            {
                PropertyInfo pInfo = data.ContextMemberInfo as PropertyInfo;

                switch (data.ViewElementName)
                {
                case nameof(ListView.ItemsSource):
                    BindingHandler.SetBinding(listView, ItemsControl.ItemsSourceProperty, pInfo, data.Context);

                    if (listView.View is GridView view)
                    {
                        //get the window to which the list view belongs to retrieve the information of the columns (to get the name)
                        //because gridviewcolumn is no framework element therefore retrieving the name of a column with .GetValue() does not work
                        //the x:Name creates fields with the columns and the specified name in the window. Therefore the window is needed to
                        //to get the name of the columns with reflection.
                        Window window = Window.GetWindow(listView);

                        foreach (GridViewColumn col in view.Columns)
                        {
                            createLinkAction(col, data.Context, GetColumnName(col, window));
                        }
                    }
                    break;

                case nameof(ListView.SelectedItem):
                    BindingHandler.SetBinding(listView, Selector.SelectedItemProperty, pInfo, data.Context);
                    break;

                default:
                    throw new NotSupportedException($"Property '{data.ViewElementName}' is not supported by {GetType().Name}!");
                }
            }
        }
示例#8
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);
            }
        }
        public void Link(object viewElement, IEnumerable <LinkData> linkData, Action <object, object, string> createLinkAction)
        {
            if (!(viewElement is DataGridBoundColumn column))
            {
                return;
            }

            foreach (LinkData data in linkData)
            {
                PropertyInfo pInfo = data.ContextMemberInfo as PropertyInfo;

                switch (data.ViewElementName)
                {
                case nameof(DataGridBoundColumn.Binding):
                    column.Binding = BindingHandler.CreateBinding(pInfo);
                    break;

                default:
                    throw new NotSupportedException($"The property name '{data.ViewElementName}' is not supported by '{GetType().Name}'!");
                }
            }
        }
        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());
        }
示例#11
0
        public void Link(object viewElement, IEnumerable <LinkData> linkData, Action <object, object, string> createLinkAction)
        {
            if (!(viewElement is Label label))
            {
                return;
            }

            foreach (LinkData data in linkData)
            {
                PropertyInfo pInfo = data.ContextMemberInfo as PropertyInfo;

                switch (data.ViewElementName)
                {
                case nameof(Label.Content):
                    BindingHandler.SetBinding(label, ContentControl.ContentProperty, pInfo, data.Context);
                    break;

                default:
                    throw new NotSupportedException($"Property '{data.ViewElementName}' is not supported by {GetType().Name}!");
                }
            }
        }
示例#12
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();
        }
示例#13
0
        public void Link(object viewElement, IEnumerable <LinkData> linkData, Action <object, object, string> createLinkAction)
        {
            if (!(viewElement is UserControl userControl))
            {
                return;
            }

            _userControl = userControl;

            foreach (LinkData data in linkData)
            {
                PropertyInfo pInfo = data.ContextMemberInfo as PropertyInfo;

                switch (data.ViewElementName)
                {
                case nameof(UserControl.DataContext):
                    BindingHandler.SetBinding(userControl, FrameworkElement.DataContextProperty, pInfo, data.Context);
                    break;

                case nameof(UserControl.Visibility):
                    if (pInfo == null)
                    {
                        continue;
                    }

                    SetVisibilityState(pInfo, data.Context);

                    if (data.Context is INotifyPropertyChanged propertyChangedContext)
                    {
                        _propertyChangedHandler.AddNotifyPropertyChangedItem(propertyChangedContext, pInfo.Name,
                                                                             () => SetVisibilityState(pInfo, data.Context));
                    }
                    break;

                default:
                    throw new NotSupportedException($"The link for '{data.ViewElementName}' is not supported by '{GetType().Name}'!");
                }
            }
        }
示例#14
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;
            mBusinessFlow.Tags.CollectionChanged -= Tags_CollectionChanged;
            mBusinessFlow.Tags.CollectionChanged += Tags_CollectionChanged;
            mBusinessFlow.TargetApplications.CollectionChanged -= TargetApplications_CollectionChanged;
            mBusinessFlow.TargetApplications.CollectionChanged += TargetApplications_CollectionChanged;
            UpdateInfoSection();

            //Activities Tab Bindings
            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 && xDetailsTab.IsSelected)
            {
                mConfigurationsPage.UpdateBusinessFlow(mBusinessFlow);
            }
        }
        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;
                xPublishcheckbox.IsEnabled       = false;
            }

            BindingHandler.ObjFieldBinding(xNameTxtBox, TextBox.TextProperty, mBusinessFlow, nameof(BusinessFlow.Name));
            xShowIDUC.Init(mBusinessFlow);
            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);
            BindingHandler.ObjFieldBinding(xPublishcheckbox, CheckBox.IsCheckedProperty, mBusinessFlow, nameof(RepositoryItemBase.Publish));

            //// 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.ToList();
            xTargetsListBox.DisplayMemberPath = nameof(TargetApplication.AppName);
        }
示例#16
0
    // Update is called once per frame
    void Update()
    {
        PointerEventData ped = new PointerEventData(EventSystem.current);

        ped.position = Input.mousePosition;
        FindHovering <MercSlot>(out hoveringSlot, ped);
        FindHovering <MercTrayElement>(out hoveringElement, ped);

        if (dragging != null)
        {
            dragging.updatePositionToMouse();
        }

        if (hoveringElement != null)
        {
            bool overrideBindingPressed = Input.GetKey(overrideBinding);
            if (overrideBindingPressed)
            {
                KeyCode pressed = BindingHandler.getAnyPressed();
                if (pressed != KeyCode.None)
                {
                    BindingHandler.addBind(pressed, hoveringElement);
                }
            }
        }

        if (hoveringSlot != null)
        {
            foreach (MercTrayElement e in BindingHandler.getTriggeredElements())
            {
                if (e.waiting != null)
                {
                    e.waiting.Trigger(hoveringSlot);
                }
            }
        }
    }
示例#17
0
        public void Link(object viewElement, IEnumerable <LinkData> linkData, Action <object, object, string> createLinkAction)
        {
            if (!(viewElement is ComboBox comboBox))
            {
                return;
            }

            foreach (LinkData data in linkData)
            {
                PropertyInfo pInfo = data.ContextMemberInfo as PropertyInfo;

                switch (data.ViewElementName)
                {
                case nameof(ComboBox.ItemsSource):
                    if (pInfo == null)
                    {
                        continue;
                    }

                    BindingHandler.SetBinding(comboBox, ItemsControl.ItemsSourceProperty, pInfo, data.Context);
                    break;

                case nameof(ComboBox.SelectedItem):
                    if (pInfo == null)
                    {
                        continue;
                    }

                    BindingHandler.SetBinding(comboBox, Selector.SelectedValueProperty, pInfo, data.Context);
                    break;

                default:
                    throw new NotSupportedException($"The link for '{data.ViewElementName}' is not supported by '{GetType().Name}'!");
                }
            }
        }
 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;
         }
         mAutoRunWizard.CliHelper.ShowAutoRunWindow = false;
         mAutoRunWizard.CliHelper.RunAnalyzer       = true;
         BindingHandler.ObjFieldBinding(xDownloadsolutionCheckBox, CheckBox.IsCheckedProperty, mAutoRunWizard.CliHelper, nameof(CLIHelper.DownloadUpgradeSolutionFromSourceControl));
         BindingHandler.ObjFieldBinding(xGingerRunEXEWindowShow, CheckBox.IsCheckedProperty, mAutoRunWizard.CliHelper, nameof(CLIHelper.ShowAutoRunWindow));
         BindingHandler.ObjFieldBinding(xRunAnalyzerCheckBox, CheckBox.IsCheckedProperty, mAutoRunWizard.CliHelper, nameof(CLIHelper.RunAnalyzer));
         break;
     }
 }
示例#19
0
        private void SetListExtraOperations()
        {
            List <ListItemOperation> extraOperations = mListViewHelper.GetListExtraOperations();

            if (extraOperations != null && extraOperations.Count > 0)
            {
                xListExtraOperationsMenu.Visibility = Visibility.Visible;
                foreach (ListItemOperation operation in extraOperations.Where(x => x.SupportedViews.Contains(mListViewHelper.PageViewMode)).ToList())
                {
                    MenuItem menuitem = new MenuItem();
                    menuitem.Style = (Style)FindResource("$MenuItemStyle");
                    ImageMakerControl iconImage = new ImageMakerControl();
                    iconImage.ImageType = operation.ImageType;
                    iconImage.SetAsFontImageWithSize = operation.ImageSize;
                    iconImage.HorizontalAlignment    = HorizontalAlignment.Left;
                    menuitem.Icon    = iconImage;
                    menuitem.Header  = operation.Header;
                    menuitem.ToolTip = operation.ToolTip;

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

                    if (operation.ImageBindingObject != null)
                    {
                        if (operation.ImageBindingConverter == null)
                        {
                            BindingHandler.ObjFieldBinding(iconImage, ImageMaker.ContentProperty, operation.ImageBindingObject, operation.ImageBindingFieldName, BindingMode.OneWay);
                        }
                        else
                        {
                            BindingHandler.ObjFieldBinding(iconImage, ImageMaker.ContentProperty, operation.ImageBindingObject, operation.ImageBindingFieldName, bindingConvertor: operation.ImageBindingConverter, BindingMode.OneWay);
                        }
                    }

                    menuitem.Click += operation.OperationHandler;

                    menuitem.Tag = xListView.ItemsSource;

                    if (string.IsNullOrEmpty(operation.Group))
                    {
                        ((MenuItem)(xListExtraOperationsMenu.Items[0])).Items.Add(menuitem);
                    }
                    else
                    {
                        //need to add to Group
                        bool addedToGroup = false;
                        foreach (MenuItem item in ((MenuItem)(xListExtraOperationsMenu.Items[0])).Items)
                        {
                            if (item.Header.ToString() == operation.Group)
                            {
                                //adding to existing group
                                item.Items.Add(menuitem);
                                addedToGroup = true;
                                break;
                            }
                        }
                        if (!addedToGroup)
                        {
                            //creating the group and adding
                            MenuItem groupMenuitem = new MenuItem();
                            groupMenuitem.Style = (Style)FindResource("$MenuItemStyle");
                            ImageMakerControl groupIconImage = new ImageMakerControl();
                            groupIconImage.ImageType = operation.GroupImageType;
                            groupIconImage.SetAsFontImageWithSize = operation.ImageSize;
                            groupIconImage.HorizontalAlignment    = HorizontalAlignment.Left;
                            groupMenuitem.Icon    = groupIconImage;
                            groupMenuitem.Header  = operation.Group;
                            groupMenuitem.ToolTip = operation.Group;
                            ((MenuItem)(xListExtraOperationsMenu.Items[0])).Items.Add(groupMenuitem);
                            groupMenuitem.Items.Add(menuitem);
                        }
                    }
                }
            }

            if (((MenuItem)(xListExtraOperationsMenu.Items[0])).Items.Count == 0)
            {
                xListExtraOperationsMenu.Visibility = Visibility.Collapsed;
            }
        }
        private void SetBindingHandlerSettings(InputDeviceTree dev, IOutputMode outputMode, BindingSettings settings, TabletReference tabletReference)
        {
            string group          = dev.Properties.Name;
            var    bindingHandler = new BindingHandler(outputMode);

            var    bindingServiceProvider = new ServiceManager();
            object?pointer = outputMode switch
            {
                AbsoluteOutputMode absoluteOutputMode => absoluteOutputMode.Pointer,
                RelativeOutputMode relativeOutputMode => relativeOutputMode.Pointer,
                  _ => null
            };

            if (pointer is IMouseButtonHandler mouseButtonHandler)
            {
                bindingServiceProvider.AddService(() => mouseButtonHandler);
            }

            var tip = bindingHandler.Tip = new ThresholdBindingState
            {
                Binding = settings.TipButton?.Construct <IBinding>(bindingServiceProvider, tabletReference),

                ActivationThreshold = settings.TipActivationThreshold
            };

            if (tip.Binding != null)
            {
                Log.Write(group, $"Tip Binding: [{tip.Binding}]@{tip.ActivationThreshold}%");
            }

            var eraser = bindingHandler.Eraser = new ThresholdBindingState
            {
                Binding             = settings.EraserButton?.Construct <IBinding>(bindingServiceProvider, tabletReference),
                ActivationThreshold = settings.EraserActivationThreshold
            };

            if (eraser.Binding != null)
            {
                Log.Write(group, $"Eraser Binding: [{eraser.Binding}]@{eraser.ActivationThreshold}%");
            }

            if (settings.PenButtons != null && settings.PenButtons.Any(b => b?.Path != null))
            {
                SetBindingHandlerCollectionSettings(bindingServiceProvider, settings.PenButtons, bindingHandler.PenButtons, tabletReference);
                Log.Write(group, $"Pen Bindings: " + string.Join(", ", bindingHandler.PenButtons.Select(b => b.Value?.Binding)));
            }

            if (settings.AuxButtons != null && settings.AuxButtons.Any(b => b?.Path != null))
            {
                SetBindingHandlerCollectionSettings(bindingServiceProvider, settings.AuxButtons, bindingHandler.AuxButtons, tabletReference);
                Log.Write(group, $"Express Key Bindings: " + string.Join(", ", bindingHandler.AuxButtons.Select(b => b.Value?.Binding)));
            }

            if (settings.MouseButtons != null && settings.MouseButtons.Any(b => b?.Path != null))
            {
                SetBindingHandlerCollectionSettings(bindingServiceProvider, settings.MouseButtons, bindingHandler.MouseButtons, tabletReference);
                Log.Write(group, $"Mouse Button Bindings: [" + string.Join("], [", bindingHandler.MouseButtons.Select(b => b.Value?.Binding)) + "]");
            }

            var scrollUp = bindingHandler.MouseScrollUp = new BindingState
            {
                Binding = settings.MouseScrollUp?.Construct <IBinding>(bindingServiceProvider, tabletReference)
            };

            var scrollDown = bindingHandler.MouseScrollDown = new BindingState
            {
                Binding = settings.MouseScrollDown?.Construct <IBinding>(bindingServiceProvider, tabletReference)
            };

            if (scrollUp.Binding != null || scrollDown.Binding != null)
            {
                Log.Write(group, $"Mouse Scroll: Up: [{scrollUp?.Binding}] Down: [{scrollDown?.Binding}]");
            }
        }
示例#21
0
        public static TValue SqlDataReaderToObject <TValue>(string instanceDb, string storedProcedureName, BindingHandler <TValue> binding, params object[] parameterValues)
        {
            Database  db             = null;
            DbCommand commandWrapper = null;

            db = DatabaseFactory.CreateDatabase(instanceDb);
            TValue returnValue;

            using (commandWrapper = db.GetStoredProcCommand(storedProcedureName, parameterValues))
            {
                returnValue = SqlHelperFactory.SqlDataReaderToObject <TValue>(db.ExecuteReader(commandWrapper), binding);
            }
            return(returnValue);
        }
 private void ShowWidgetsElementCheckBox()
 {
     xWidgetElementCheckBox.Visibility = Visibility.Visible;
     BindingHandler.ActInputValueBinding(xWidgetElementCheckBox, CheckBox.IsCheckedProperty, mAction.GetOrCreateInputParam(Fields.IsWidgetsElement, "false"), new InputValueToBoolConverter());
 }
示例#23
0
 public override void HandleReport(IDeviceReport report)
 {
     base.HandleReport(report);
     BindingHandler.HandleBinding(Tablet, report);
 }
示例#24
0
        public static List <TValue> GetListDB <TValue>(string instanceDb, string storedProcedureName, BindingHandler <TValue> binding, object[] parameterValues, ParameterOutputHandler parameterOutput)
        {
            if (log.IsInfoEnabled)
            {
                log.InfoFormat("GetListDB(instanceDb:{0}, storedProcedureName:{1})", instanceDb, storedProcedureName);
            }
            Database  db             = null;
            DbCommand commandWrapper = null;

            db = DatabaseFactory.CreateDatabase(instanceDb);
            List <TValue> returnValue = null;

            using (commandWrapper = db.GetStoredProcCommand(storedProcedureName, parameterValues))
            {
                if (binding == null)
                {
                    returnValue = SqlHelperFactory.SqlDataReaderToList <TValue>(db.ExecuteReader(commandWrapper));
                }
                else
                {
                    returnValue = SqlHelperFactory.SqlDataReaderToList <TValue>(db.ExecuteReader(commandWrapper), binding);
                }
                if (parameterOutput != null)
                {
                    parameterOutput(db, commandWrapper);
                }
            }
            return(returnValue);
        }
示例#25
0
        /// <summary>
        ///
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="instanceDb"></param>
        /// <param name="storedProcedureName"></param>
        /// <param name="parameterValues"></param>
        /// <returns></returns>
        public static Dictionary <TKey, TValue> GetDictionaryDB <TKey, TValue>(string instanceDb, string storedProcedureName, BindingHandler <TValue> binding, params object[] parameterValues)
        {
            if (log.IsInfoEnabled)
            {
                log.InfoFormat("GetDictionaryDB(instanceDb:{0}, storedProcedureName:{1})", instanceDb, storedProcedureName);
            }
            Database  db             = null;
            DbCommand commandWrapper = null;

            db = DatabaseFactory.CreateDatabase(instanceDb);
            Dictionary <TKey, TValue> returnValue = null;

            using (commandWrapper = db.GetStoredProcCommand(storedProcedureName, parameterValues))
            {
                returnValue = SqlHelperFactory.SqlDataReaderToDictionary <TKey, TValue>(db.ExecuteReader(commandWrapper), binding);
            }
            return(returnValue);
        }
示例#26
0
        /// </summary>
        /// <param name="sdrReader"></param>
        /// <param name="objTipo"></param>
        /// <returns></returns>
        public static Dictionary <TKey, TValue> SqlDataReaderToDictionary <TKey, TValue>(IDataReader sdrReader, BindingHandler <TValue> binding)
        {
            Dictionary <TKey, TValue> arrDict = new Dictionary <TKey, TValue>();

            TValue objEntidade;

            while (sdrReader.Read())
            {
                objEntidade = Activator.CreateInstance <TValue>();

                //((IBindingObject)objEntidade).Binding(sdrReader);
                binding(objEntidade, sdrReader);

                arrDict[(TKey)((IKeyItemCacheFactory)objEntidade).Key] = objEntidade;
            }
            sdrReader.Close();
            return(arrDict);
        }
        public Page GetConfigPage(List <ElementConfigControl> configControlsList)
        {
            StackPanel dynamicPanel = new StackPanel {
                Orientation = Orientation.Horizontal, HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Center
            };

            UserControlsLib.UCComboBox comboBox;
            Label elementLabel;
            Page  dynamicPage = new Page();

            foreach (ElementConfigControl element in configControlsList)
            {
                if (element.ControlType == eElementType.ComboBox)
                {
                    elementLabel = CretateLabel(element);
                    comboBox     = CreateComboBox(element);

                    comboBox.Init(mAction.GetOrCreateInputParam(element.BindedString), isVENeeded: true, context: Context.GetAsContext(mAction.Context));
                    ((Ginger.UserControlsLib.UCComboBox)comboBox).ComboBox.ItemsSource = element.PossibleValues;
                    if (mAction.ElementLocateBy == eLocateBy.POMElement)
                    {
                        ((Ginger.UserControlsLib.UCComboBox)comboBox).ComboBox.SelectedValue = element.DefaultValue;
                        comboBox.ComboBoxObject.Style = this.FindResource("$FlatEditInputComboBoxStyle") as Style;
                    }
                    dynamicPanel.Children.Add(elementLabel);
                    dynamicPanel.Children.Add(comboBox);
                }
                else if (element.ControlType == eElementType.TextBox)
                {
                    elementLabel = CretateLabel(element);
                    UCValueExpression txtBox = CreateTextBox(element);

                    txtBox.Init(Context.GetAsContext(mAction.Context), mAction.GetOrCreateInputParam(element.BindedString), isVENeeded: true);
                    ((Ginger.Actions.UCValueExpression)txtBox).ValueTextBox.Text = element.PossibleValues.ElementAt(0);
                    dynamicPanel.Children.Add(elementLabel);
                    dynamicPanel.Children.Add(txtBox);
                }
                else if (element.ControlType == eElementType.CheckBox)
                {
                    CheckBox dyanamicCheckBox = new CheckBox();
                    dyanamicCheckBox.Content             = element.Title;
                    dyanamicCheckBox.HorizontalAlignment = HorizontalAlignment.Left;
                    dyanamicCheckBox.VerticalAlignment   = VerticalAlignment.Center;
                    dyanamicCheckBox.IsChecked           = false;
                    dyanamicCheckBox.Width  = 100;
                    dyanamicCheckBox.Margin = new Thickness()
                    {
                        Left = 5
                    };

                    if (element.ElementEvent != null)
                    {
                        dyanamicCheckBox.Click += new RoutedEventHandler(element.ElementEvent);
                    }
                    BindingHandler.ActInputValueBinding(dyanamicCheckBox, CheckBox.IsCheckedProperty, mAction.GetOrCreateInputParam(element.BindedString, "false"));
                    dynamicPanel.Children.Add(dyanamicCheckBox);
                }
            }
            dynamicPage.Content = dynamicPanel;
            return(dynamicPage);
        }
示例#28
0
 /// <summary>
 ///
 /// </summary>
 /// <typeparam name="TValue"></typeparam>
 /// <param name="instanceDb"></param>
 /// <param name="storedProcedureName"></param>
 /// <param name="binding"></param>
 /// <param name="parameterValues"></param>
 /// <returns></returns>
 public static TValue GetObjectDB <TValue>(string instanceDb, string storedProcedureName, BindingHandler <TValue> binding, params object[] parameterValues)
 {
     if (log.IsInfoEnabled)
     {
         log.InfoFormat("GetObjectDB(instanceDb:{0}, storedProcedureName:{1})", instanceDb, storedProcedureName);
     }
     return(SqlHelperFactory.SqlDataReaderToObject <TValue>(instanceDb, storedProcedureName, binding, parameterValues));
 }
        /*
         * private void Action_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
         * {
         *  if (e.PropertyName == nameof(Act.Status))
         *  {
         *      this.Dispatcher.Invoke(() =>
         *      {
         *          xExecutionStatusIcon.Status = mAction.Status.Value;
         *
         *          if (mAction.Status.Value == Amdocs.Ginger.CoreNET.Execution.eRunStatus.Running)
         *          {
         *              xRunActBtn.IsEnabled = false;
         *              xRunActBtn.Opacity = 0.4;
         *          }
         *          else
         *          {
         *              xRunActBtn.IsEnabled = true;
         *              xRunActBtn.Opacity = 1;
         *          }
         *
         *          string returnVals = GetAllRetVals(mAction);
         *
         *          if (!string.IsNullOrEmpty(mAction.Error))
         *          {
         *              xErrorTxtBlock.Visibility = Visibility.Visible;
         *              xErrorTxtBlock.Text += mAction.Error;
         *          }
         *          else
         *          {
         *              xErrorTxtBlock.Visibility = Visibility.Collapsed;
         *              xErrorTxtBlock.Text = "Error : ";
         *          }
         *
         *          if (string.IsNullOrEmpty(mAction.ExInfo) == false)
         *          {
         *              xExecInfoTxtBlock.Visibility = Visibility.Visible;
         *              xExecInfoTxtBlock.Text += mAction.ExInfo;
         *          }
         *          else
         *          {
         *              xExecInfoTxtBlock.Visibility = Visibility.Collapsed;
         *              xExecInfoTxtBlock.Text = "Execution Info : ";
         *          }
         *
         *          if (!string.IsNullOrEmpty(returnVals))
         *          {
         *              xExecInfoTxtBlock.Visibility = Visibility.Visible;
         *              xExecInfoTxtBlock.Text += Environment.NewLine + "Return Values : " + returnVals;
         *          }
         *          else
         *          {
         *
         *          }
         *      });
         *  }
         *
         *  if (e.PropertyName == nameof(Act.ReturnValues))
         *  {
         *  }
         * }
         */

        void SetPlatformBasedUIUpdates()
        {
            if (IsLegacyPlatform)
            {
                if (mPlatform.PlatformType().Equals(ePlatformType.Web) || (mPlatform.PlatformType().Equals(ePlatformType.Java) && !mElementInfo.ElementType.Contains("JEditor")))
                {
                    //TODO: J.G: Remove check for element type editor and handle it in generic way in all places
                    AvailableActions = mPlatform.GetPlatformElementActions(mElementInfo);
                }
                else
                {                                                                                                  // this "else" is temporary. Currently only ePlatformType.Web is overided
                    AvailableActions = ((IWindowExplorerTreeItem)mCurrentControlTreeViewItem).GetElementActions(); // case will be removed once all platforms will be overrided
                }

                if (AvailableActions.CurrentItem == null && AvailableActions.Count > 0)
                {
                    AvailableActions.CurrentItem = AvailableActions[0];
                }

                DefaultAction = (Act)AvailableActions.CurrentItem;
                xActEditPageFrame.Visibility = Visibility.Collapsed;

                xOperationsScrollView.Visibility = Visibility.Visible;

                InitActionsGrid();
                InitLocatorsGrid();

                InitOutputValuesGrid();

                BindingHandler.ObjFieldBinding(xErrorTxtBlock, TextBlock.TextProperty, DefaultAction, nameof(Act.Error));
                BindingHandler.ObjFieldBinding(xExecInfoTxtBlock, TextBlock.TextProperty, DefaultAction, nameof(Act.ExInfo));
                BindingHandler.ObjFieldBinding(xOutputValuesGrid, DataGrid.ItemsSourceProperty, DefaultAction, nameof(Act.ReturnValues));
                BindingHandler.ObjFieldBinding(xOutputValuesGrid, IsVisibleProperty, DefaultAction, nameof(Act.ReturnValues), new OutPutValuesCountConverter());
                //BindingHandler.ObjFieldBinding(xActExecutionDetails, Expander.IsExpandedProperty, mAction, Convert.ToString(mAction.Status.Value == Amdocs.Ginger.CoreNET.Execution.eRunStatus.Passed || mAction.Status.Value == Amdocs.Ginger.CoreNET.Execution.eRunStatus.Failed), new CheckboxConfigConverter());
            }
            else
            {
                DefaultAction.Context = mContext;

                if (mPlatform.PlatformType().Equals(ePlatformType.Java) && mElementInfo.ElementType.Contains("JEditor"))
                {
                    ActInputValue inputPar = DefaultAction.GetOrCreateInputParam(ActUIElement.Fields.IsWidgetsElement);
                    if (inputPar != null && inputPar.Value == "true")
                    {
                        mElementInfo.ElementTypeEnum = eElementType.EditorPane;
                        (DefaultAction as ActUIElement).ElementType = eElementType.EditorPane;
                        inputPar.Value = "false";
                    }
                }

                (DefaultAction as ActUIElement).ElementData = mElementInfo.GetElementData();
                DefaultAction.Description = string.Format("{0} : {1} - {2}", (DefaultAction as ActUIElement).ElementAction, mElementInfo.ElementTypeEnum.ToString(), mElementInfo.ElementName);
                SetActionDetails(DefaultAction);
                actEditPage = new ActionEditPage(DefaultAction, General.eRIPageViewMode.Explorer);

                xActEditPageFrame.Visibility = Visibility.Visible;

                xActEditPageFrame.Content = actEditPage;

                xOperationsScrollView.Visibility = Visibility.Collapsed;
            }

            //BindingHandler.ObjFieldBinding(xExecutionStatusIcon, UcItemExecutionStatus.StatusProperty, mAction, nameof(Act.Status));
            InitDataPage();
        }
示例#30
0
        ///
        /// </summary>
        /// <param name="sdrReader"></param>
        /// <param name="objTipo"></param>
        /// <returns></returns>
        public static List <TValue> SqlDataReaderToList <TValue>(IDataReader sdrReader, BindingHandler <TValue> binding)
        {
            // GSB - 07032003 - Declara e inicializa objetos
            List <TValue> arrLista = new List <TValue>();

            TValue objEntidade;

            // GSB - 07032003 - Varre os registros e converte o Data Reader em um Array de Entidades
            while (sdrReader.Read())
            {
                // GSB - 010072003 - Cria instância do tipo de negócio específico
                objEntidade = Activator.CreateInstance <TValue>();

                binding(objEntidade, sdrReader);

                // GSB - 07032003 - Adiciona a nova entidade no Array
                arrLista.Add(objEntidade);
            }
            sdrReader.Close();
            // GSB - 07032003 - Retorna o array list para quem chamou.
            return(arrLista);
        }