public void UpdateRunnerInfo()
        {
            //name
            xRunnerNameTxtBlock.Text = mExecutorEngine.GingerRunner.Name;

            //App-Agents
            mExecutorEngine.UpdateApplicationAgents();
            xRunnerInfoTextBlock.Text = string.Empty;
            TextBlockHelper TBH = new TextBlockHelper(xRunnerInfoTextBlock);
            bool            appAgentsMappingExist = false;

            foreach (ApplicationAgent appAgent in mExecutorEngine.GingerRunner.ApplicationAgents)
            {
                if (WorkSpace.Instance.Solution.ApplicationPlatforms.Where(x => x.AppName == appAgent.AppName && x.Platform == ePlatformType.NA).FirstOrDefault() != null)
                {
                    continue;
                }
                TBH.AddText(LimitstringLength(appAgent.AppName, 10));
                TBH.AddText(" > ");
                TBH.AddText(LimitstringLength(appAgent.AgentName, 10));
                TBH.AddLineBreak();
                appAgentsMappingExist = true;
            }

            if (appAgentsMappingExist && xConfigButton.IsLoaded && ExecutorEngine.BusinessFlows.Count == 1)
            {
                App.MainWindow.AddHelpLayoutToShow("RunsetPage_RunnerConfigHelp", xConfigButton, "Click here to configure all Runner execution settings like: mapped Agents, selected Environment, etc.");
            }
        }
Beispiel #2
0
        public GingerRunnerConfigurationsPage(GingerExecutionEngine runner, ePageViewMode pageViewMode, Context context)
        {
            InitializeComponent();

            mRunner       = runner;
            mPageViewMode = pageViewMode;
            mContext      = context;

            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xNameTextBox, TextBox.TextProperty, mRunner.GingerRunner, nameof(GingerRunner.Name));
            xShowIDUC.Init(mRunner.GingerRunner);

            mRunner.UpdateApplicationAgents();
            if (mPageViewMode == ePageViewMode.AutomatePage)
            {
                xAppAgentsMappingFrame.Content = new ApplicationAgentsMapPage(mRunner, mContext);
            }
            else
            {
                xAppAgentsMappingFrame.Content = new ApplicationAgentsMapPage(mRunner, mContext, false);
            }

            List <int> waitOptions = new List <int>()
            {
                0, 1, 2, 3, 4, 5
            };

            xAutoWaitComboBox.ItemsSource = waitOptions;
            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xAutoWaitComboBox, ComboBox.SelectedValueProperty, mRunner.GingerRunner, nameof(GingerRunner.AutoWait));

            GingerCore.General.FillComboFromEnumObj(xRunOptionComboBox, mRunner.GingerRunner.RunOption);
            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xRunOptionComboBox, ComboBox.SelectedValueProperty, mRunner.GingerRunner, nameof(GingerRunner.RunOption));

            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xSimulationMode, CheckBox.IsCheckedProperty, mRunner.GingerRunner, nameof(GingerRunner.RunInSimulationMode));

            SetEnvironments();
            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xUseSpecificEnvChkbox, CheckBox.IsCheckedProperty, mRunner.GingerRunner, nameof(GingerRunner.UseSpecificEnvironment));
            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xSpecificEnvComboBox, ComboBox.SelectedItemProperty, mRunner.GingerRunner, nameof(GingerRunner.ProjEnvironment));
            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xSpecificEnvComboBox, ComboBox.SelectedValueProperty, mRunner.GingerRunner, nameof(GingerRunner.SpecificEnvironmentName));


            xExecutionTags.Init(mRunner.GingerRunner.FilterExecutionTags);
            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xExecutionTagsChkbox, CheckBox.IsCheckedProperty, mRunner.GingerRunner, nameof(GingerRunner.FilterExecutionByTags));

            if (mPageViewMode == ePageViewMode.AutomatePage)
            {
                xNamePnl.Visibility             = Visibility.Collapsed;
                xRunOptionPnl.Visibility        = Visibility.Collapsed;
                xUseSpecificEnvChkbox.IsEnabled = false;
            }
        }