コード例 #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;
     }
 }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
        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;
            }
        }
コード例 #4
0
        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;
            }
        }
コード例 #5
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;
            }
        }
コード例 #6
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;
         }
         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;
     }
 }