public void WizardEvent(WizardEventArgs WizardEventArgs)
        {
            switch (WizardEventArgs.EventType)
            {
            case EventType.Init:
                // keep ref to wizard
                mWizard = (MyWizard)WizardEventArgs.Wizard;
                // Bind Name
                xNameTextBox.BindControl(mWizard.myWizardItem, nameof(MyWizardItem.Name));
                // Add validation rules
                // xNameTextBox.AddValidationRule(ValidationRule ());
                // focus to Name
                xNameTextBox.Focus();

                //xAgentDescriptionTextBox.BindControl(mWizard.Agent, nameof(Agent.Notes));
                //xAgentTagsViewer.Init(mWizard.Agent.Tags);

                //xPlatformTypeComboBox.SelectionChanged += xPlatformTypeComboBox_SelectionChanged;
                //GingerCore.General.FillComboFromEnumObj(xPlatformTypeComboBox, mWizard.Agent.Platform);
                //xPlatformTypeComboBox.SelectedIndex = 0;

                //xDriverTypeComboBox.BindControl(mWizard.Agent, nameof(Agent.DriverType));
                //xDriverTypeComboBox.SelectionChanged += xDriverTypeComboBox_SelectionChanged;
                //xDriverTypeComboBox.AddValidationRule(eValidationRule.CannotBeEmpty);
                //xDriverTypeStackPanel.Visibility = Visibility.Collapsed;
                break;
            }
        }
Пример #2
0
        WizardPOM ShowMyWizard(string folder, double width = 0)
        {
            Task.Factory.StartNew(() => {
                mGingerAutomator.MainWindowPOM.Execute(() => {
                    MyWizard wiz = new MyWizard(folder);
                    if (width == 0)
                    {
                        WizardWindow.ShowWizard(wiz);
                    }

                    else
                    {
                        WizardWindow.ShowWizard(wiz, width);
                    }
                });
            });

            WizardPOM wizardPOM = WizardPOM.CurrentWizard;

            return(wizardPOM);
        }