コード例 #1
0
        public CustomRules(WizardData wizardData)
        {
            //2. Turn the blank instance of AdminSettingsWizardData into the one being used when the form was loaded
            settings = wizardData as AdminSettingWizardData;

            InitializeComponent();
            this.DataContext            = wizardData;
            this.adminSettingWizardData = this.DataContext as CustomRules;

            //load any custom rules
            try
            {
                foreach (var rule in settings.CustomRules)
                {
                    CustomRulesListViewControl.Items.Add(new AdditionalCustomRule()
                    {
                        CustomRuleID                 = rule.Id,
                        CustomRuleDisplayName        = (String)rule.Values[1].ToString(),
                        CustomRuleMessageClassEnum   = (ManagementPackEnumeration)rule.Values[2].Value,
                        CustomRuleMessageClasses     = settings.MessageClassEnums,
                        CustomRuleMessagePart        = (String)rule.Values[3].ToString(),
                        CustomRuleRegex              = (String)rule.Values[4].ToString(),
                        CustomRuleItemType           = (String)rule.Values[5].ToString(),
                        CustomRuleRegexMatchProperty = (String)rule.Values[6].ToString()
                    });
                }
            }
            catch { }
        }
コード例 #2
0
        public bool RunWizard()
        {
            this.runCallCount++;
            Assert.AreEqual <int>(1, this.runCallCount, "Run form must only ever be called once");
            Assert.IsNotNull(this.WizardCompleting);
            if (this.runWizardThrowsException)
            {
                throw new UserException("RunWizard exception");
            }

            if (Executable != null)
            {
                dataToReturn = new WizardData();
                dataToReturn.Configuration = new WcfUnitConfiguration();
                UILogic uiLogic = new UILogic();
                using (ScenarioRunManager srm = new ScenarioRunManager())
                {
                    uiLogic.RunProgramAndGetWizardData(Executable, srm, dataToReturn);
                }
            }

            if (resultToReturn)
            {
                CancellableWizardEventArgs cancel = new CancellableWizardEventArgs(dataToReturn, false);
                this.WizardCompleting(this, cancel);
                if (cancel.Cancel)
                {
                    resultToReturn = false;
                }
            }

            return(resultToReturn);
        }
コード例 #3
0
        public PWAWizardPage(WizardData wizdata)
        {
            base.Title       = ServiceManagerLocalization.GetStringFromManagementPack("strPWAConnectionPage");
            this.data        = wizdata as ProjectConnectorData;
            this.DataContext = data;

            if (credsControl == null)
            {
                credsControl = new CredentialsControl(data.RunAsAccount, data.Id.ToString(), ConsoleContext.GetConsoleEMG().Name);
            }

            if (!data.IsEditMode)
            {
                if (data.PwaUrl == null)
                {
                    data.PwaUrl = "http://yourprojectserver/pwa";
                }
                this.FinishButtonText = ServiceManagerLocalization.GetStringFromManagementPack("strCreateBtn");
            }


            InitializeComponent();

            credentialsPanel.Children.Add(credsControl);
            credsControl.CredentialsChanged += credsControl_CredentailsChanged;

            this.IsFinishButtonEnabled       = false;
            this.IsNextButtonEnabled         = false;
            this.btnTestConnection.IsEnabled = false;
        }
コード例 #4
0
        public IActionResult SaveWizard([FromBody] WizardData data)
        {
            if (data != null)
            {
                try
                {
                    /*string[] months = new string[12] {
                     *  "Jan", "Feb", "Mar", "Apr", "May", "Jun",
                     *  "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
                     * };*/

                    foreach (Service s in data.Services)
                    {
                        if (s.Id == 0)
                        {
                            //s.Month = months[DateTime.Now.Month - 1];
                            _Context.Service.Add(s);
                        }
                        else
                        {
                            _Context.Service.Update(s);
                        }
                    }

                    foreach (Task t in data.Tasks)
                    {
                        if (t.Id == 0)
                        {
                            _Context.Task.Add(t);
                        }
                        else
                        {
                            _Context.Task.Update(t);
                        }
                    }

                    foreach (KeyValuePair <int, string> kvp in data.Removed)
                    {
                        if (kvp.Value == "service")
                        {
                            Service s = _Context.Service.Find(kvp.Key);
                            _Context.Service.Remove(s);
                        }
                        else
                        {
                            Task t = _Context.Task.Find(kvp.Key);
                            _Context.Task.Remove(t);
                        }
                    }

                    _Context.SaveChanges();
                }
                catch (Exception e)
                {
                    return(StatusCode(500, e.Message));
                }
            }

            return(Ok());
        }
コード例 #5
0
        public Settings(WizardData wizardData)
        {
            InitializeComponent();

            this.DataContext = wizardData;
            this.incidentSLASettingsWizardData = this.DataContext as IncidentSLASettingsWizardData;
        }
コード例 #6
0
        public void InitializeTest()
        {
            this.wizard   = new ItemWizardImplementation(new FormFactory(this.MockFactory), new ErrorDisplay(this.DisplayError));
            this.mockForm = null;

            this.wizardData                 = new WizardData();
            this.wizardData.TraceFile       = Path.GetTempFileName();
            this.wizardData.TraceFileSource = TraceFileSource.Dynamic;
            this.wizardData.Configuration   = new WcfUnitConfiguration();
            this.wizardData.Configuration.testMethodMode     = TestMethodMode.ScenarioMethodOnly;
            this.wizardData.Configuration.operationTimerMode = OperationTimerMode.IncludeOperationTimers;
            AssemblyType a = new AssemblyType();

            a.fileName = "ClientProxies.dll";
            this.wizardData.Configuration.assembly    = new AssemblyType[] { a };
            this.wizardData.Configuration.soapActions = new WcfUnitConfigurationSoapActions();
            this.wizardData.Configuration.soapActions.soapActionMode = SoapActionMode.Include;

            this.errorDisplayCalled = false;

            File.Copy(@"..\..\..\Library.Test\TestData\SampleWithNamespaces.svclog", this.wizardData.TraceFile, true);
            File.SetAttributes(this.wizardData.TraceFile, FileAttributes.Normal); // make sure not read only
            File.Delete("ignore.cs");
            File.Delete("test.cs");
            File.Delete("ignorestub.cs");
            File.Delete("teststub.cs");
        }
コード例 #7
0
        public ProcessingLogicForm(WizardData wizardData)
        {
            //2. Turn the blank instance of AdminSettingsWizardData into the one being used when the form was loaded
            settings = wizardData as AdminSettingWizardData;

            InitializeComponent();
            this.DataContext            = wizardData;
            this.adminSettingWizardData = this.DataContext as ProcessingLogicForm;

            //enable Cireson specific controls if the MP is imported per the AdminSettingsWizardData
            if (settings.IsCiresonPortalMPImported == false)
            {
                chkTakeRequiresCiresonGroupMembership.IsEnabled = false;
            }

            //set default values within the statically defined drop downs within the WPF form
            if (settings.ExternalIRCommentType == "(null)")
            {
                CBExternalIRCommentType.SelectedIndex = 1;
            }
            if (settings.ExternalSRCommentType == "(null)")
            {
                CBExternalSRCommentType.SelectedIndex = 1;
            }
            if (settings.ExternalIRCommentPrivate == "(null)")
            {
                CBExternalIRCommentTypePrivate.SelectedIndex = 0;
            }
            if (settings.ExternalSRCommentPrivate == "(null)")
            {
                CBExternalSRCommentTypePrivate.SelectedIndex = 0;
            }
        }
コード例 #8
0
    public void CreateLessonPlanner(WizardData wizardData)
    {
        using (var con = _provider.GetConnection())
            using (var trans = new TransactionScope())
            {
                con.Open();

                var weekListA = new List <Week>();
                var weekListB = new List <Week>();

                LessonPlannerCreator.CreateLessonPlanner(weekListA, weekListB, wizardData);

                _provider.DeleteLessonPlanner(wizardData.StartDate, con);

                _provider.CreateLessonPlanner(weekListA, con);
                _provider.CreateLessonPlanner(weekListB, con);

                _provider.DeleteTimeTable(TimeTable.WeekType.A, con);
                _provider.StoreTimeTable(wizardData.LessonsWeekA.ToList <TimeTable>(), TimeTable.WeekType.A, con);

                _provider.DeleteTimeTable(TimeTable.WeekType.B, con);
                _provider.StoreTimeTable(wizardData.LessonsWeekB.ToList <TimeTable>(), TimeTable.WeekType.B, con);

                trans.Complete();
            }
    }
コード例 #9
0
        public ActionResult SaveWizard(WizardData data)
        {
            var o      = new ShortApplicationDataModel();
            var result = o.SaveWizardData(data);

            return(Json(result.IsSuccessful));
        }
コード例 #10
0
 public AdminSettingsGroomingForm(WizardData data)
 {
     settings         = data as AdminSettingsData;
     this.DataContext = settings;
     InitializeComponent();
     numericDays.Value             = Convert.ToDecimal(settings.RetentionDays);
     spDataRetentionTime.IsEnabled = settings.IsRetentionEnabled;
 }
コード例 #11
0
 /// <summary>
 /// Initializes the configuration data.
 /// </summary>
 private void InitializeConfigurationData()
 {
     this.wizardData = new WizardData();
     this.wizardData.TraceFileSource = TraceFileSource.Dynamic;
     this.wizardData.Configuration   = new WcfUnitConfiguration();
     this.SetOperationTimerMode(OperationTimerMode.IncludeOperationTimers, ActionDirection.FromController);
     this.SetTestMethodMode(TestMethodMode.ScenarioMethodOnly, ActionDirection.FromController);
 }
コード例 #12
0
        ExecutionResult IValueGatheringService.Execute(XmlElement data, bool allowSuspend)
        {
            WizardData wizardData = GetWizardConfiguration(data);

            if (wizardData == null)
            {
                throw new System.Configuration.ConfigurationException(
                          Properties.Resources.WizardGatheringService_CannotLoadConfig);
            }
            WizardForm             form    = null;
            AliasResolutionService aliases = null;

            try
            {
                // Setup alias resolution for the current wizard
                aliases = new AliasResolutionService(wizardData.TypeAliases,
                                                     GetService <ITypeResolutionService>(true));
                AddService(typeof(ITypeResolutionService), aliases);

                form = new WizardForm(this, wizardData.WizardConfig);
                // Site the form in our own container.
                Add(form);

                IUIService   uiService = GetService <IUIService>();
                IWin32Window parentWnd = null;
                if (uiService != null)
                {
                    parentWnd = uiService.GetDialogOwnerWindow();
                }
                form.Start(parentWnd);
                return(form.ExecutionResult);
            }
            catch (Exception e)
            {
                string wizardName = "";
                if (wizardData != null && wizardData.WizardConfig != null)
                {
                    wizardName = wizardData.WizardConfig.Name;
                }
                throw new WizardExecutionException(wizardName, e);
            }
            finally
            {
                // Cleanup the service we added temporarily.
                if (aliases != null && aliases == GetService(typeof(ITypeResolutionService)))
                {
                    RemoveService(typeof(ITypeResolutionService));
                }

                // Remove from parent container always.
                if (form != null)
                {
                    Remove(form);
                    form.Dispose();
                    form = null;
                }
            }
        }
コード例 #13
0
 private void wizardLauncher_WizardReturn(object sender, WizardReturnEventArgs e)
 {
     // Handle wizard return
     WizardData = e.Data as WizardData;
     if (DialogResult == null)
     {
         DialogResult = (e.Result == WizardResult.Finished);
     }
 }
コード例 #14
0
 private void wizardLauncher_WizardReturn(object sender, WizardReturnEventArgs e)
 {
     // Handle wizard return
     WizardData = e.Data as WizardData;
     if (DialogResult == null)
     {
         DialogResult = (e.Result == WizardResult.Finished);
     }
 }
コード例 #15
0
        public DatabaseOperationResult SaveWizardData(WizardData wizardData)
        {
            var o = new ShortApplication()
            {
                additional_cash      = wizardData.additional_cash,
                household_income     = wizardData.household_income,
                bankruptcy           = wizardData.bankruptcy,
                contact_time         = wizardData.contact_time,
                credit_history       = wizardData.credit_history,
                email_address        = wizardData.email_address,
                employment_status    = wizardData.employment_status,
                fha_loan             = wizardData.fha_loan,
                first_name           = wizardData.first_name,
                foreclosure          = wizardData.foreclosure,
                phone                = wizardData.phone,
                last_name            = wizardData.last_name,
                late_payments        = wizardData.late_payments,
                lead_date            = wizardData.lead_date,
                lead_type            = wizardData.lead_type,
                loan_purpose         = wizardData.loan_purpose,
                loan_type            = wizardData.loan_type,
                military_service     = wizardData.military_service,
                monthly_payments     = wizardData.monthly_payments,
                mortgage_balance_one = wizardData.mortgage_balance_one,
                mortgage_balance_two = wizardData.mortgage_balance_two,
                mortgage_rate_one    = wizardData.mortgage_rate_one,
                mortgage_rate_two    = wizardData.mortgage_rate_two,
                property_address     = wizardData.property_address,
                property_city        = wizardData.property_city,
                property_state       = wizardData.property_state,
                property_type        = wizardData.property_type,
                property_use         = wizardData.property_use,
                property_value       = wizardData.property_value,
                property_zip         = wizardData.property_zip,
                alt_phone            = wizardData.alt_phone,
                purchase_year        = wizardData.purchase_year,
            };

            _db.ShortApplications.Add(o);
            var result = _db.SaveChanges();

            if (result == 1)
            {
                return(new DatabaseOperationResult()
                {
                    IsSuccessful = true,
                    ResultId = o.id,
                });
            }

            return(new DatabaseOperationResult()
            {
                IsSuccessful = false
            });
        }
コード例 #16
0
        public HistoryForm(WizardData wizardData)
        {
            InitializeComponent();
            this.DataContext            = wizardData;
            this.adminSettingWizardData = this.DataContext as HistoryForm;

            //retrieve smlets exchange connector settings
            settings = wizardData as AdminSettingWizardData;

            //build a custom list based on SMexco configuration history
            //Based on SMlets Get-SCSMObjectHistory - https://github.com/SMLets/SMLets/blob/795242d4a44cf8857957a7628cca67655e2e4252/SMLets.Shared/Code/EntityObjects.cs#L1181-L1216
            List <CustomHistoryObject> smexcoConfigHistory = new List <CustomHistoryObject>();

            foreach (EnterpriseManagementObjectHistoryTransaction historyItem in settings.SMExcoSettingsHistory)
            {
                string propertyName = null;
                string oldVal       = null;
                string newVal       = null;

                foreach (KeyValuePair <Guid, EnterpriseManagementObjectHistory> h in historyItem.ObjectHistory)
                {
                    foreach (EnterpriseManagementObjectClassHistory ch in h.Value.ClassHistory)
                    {
                        foreach (KeyValuePair <ManagementPackProperty, Microsoft.EnterpriseManagement.Common.Pair <EnterpriseManagementSimpleObject, EnterpriseManagementSimpleObject> > hpc in ch.PropertyChanges)
                        {
                            //Simplify properties to variables
                            propertyName = hpc.Key.Name;
                            // propertyName = hpc.Key.DisplayName;
                            try { oldVal = hpc.Value.First.Value.ToString(); } catch { oldVal = ""; }
                            try { newVal = hpc.Value.Second.Value.ToString(); } catch { newVal = ""; }

                            //Create a new custom history object
                            smexcoConfigHistory.Add(new CustomHistoryObject()
                            {
                                UserName    = historyItem.UserName,
                                Property    = propertyName,
                                OldValue    = oldVal,
                                NewValue    = newVal,
                                DateOccured = historyItem.DateOccurred.ToLocalTime(),
                                DateAndUser = historyItem.DateOccurred.ToLocalTime().ToString() + "   " + historyItem.UserName
                            });
                        }
                    }
                }
            }

            //With the Custom History Objects created, update the list to all of them. Then define a grouping property for the XAML
            dgHistory.ItemsSource = smexcoConfigHistory;
            CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(dgHistory.ItemsSource);

            view.SortDescriptions.Add(new System.ComponentModel.SortDescription("DateOccured", System.ComponentModel.ListSortDirection.Descending));
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("DateAndUser");

            view.GroupDescriptions.Add(groupDescription);
        }
コード例 #17
0
        /// <summary>
        /// Registers the wizard data.
        /// </summary>
        public void RegisterWizardData()
        {
            WizardData wizardData = new WizardData
            {
                WindowTitle  = "Add Nuget Packages",
                WindowHeight = 600,
                WindowWidth  = 680,
                WizardSteps  = this.GetWizardsSteps()
            };

            this.registerService.Register <IWizardData>(wizardData);
        }
コード例 #18
0
        /// <summary>
        /// Registers the wizard data.
        /// </summary>
        public void RegisterWizardData()
        {
            WizardData wizardData = new WizardData
            {
                WindowTitle  = "Add Xamarin Forms Custom Renderer",
                WindowHeight = 600,
                WindowWidth  = 600,
                WizardSteps  = this.GetWizardsSteps()
            };

            this.registerService.Register <IWizardData>(wizardData);
        }
コード例 #19
0
 public GeneralWizardPage(WizardData wizardData)
 {
     base.Title       = ServiceManagerLocalization.GetStringFromManagementPack("strGeneral");
     this.data        = wizardData as ProjectConnectorData;
     this.DataContext = data;
     if (!data.IsEditMode)
     {
         this.FinishButtonText = ServiceManagerLocalization.GetStringFromManagementPack("strCreateBtn");
     }
     this.IsNextButtonEnabled = false;
     InitializeComponent();
 }
        public AdminSettingsProjectTasksForm(WizardData _data)
        {
            InitializeComponent();
            this.data        = _data as AdminSettingsData;
            this.DataContext = this.data;

            //add interval units
            cbFrequencyUnit.Items.Add(ServiceManagerLocalization.GetStringFromManagementPack("strHours"));
            cbFrequencyUnit.Items.Add(ServiceManagerLocalization.GetStringFromManagementPack("strMinutes"));
            //set interval unit if the data has it.
            cbFrequencyUnit.Text = data.TaskEvalFrequencyUnit;
        }
コード例 #21
0
 public ResultsWizardPage(WizardData wizardData)
 {
     base.Title = ServiceManagerLocalization.GetStringFromManagementPack("strResults");
     if (wizardData is ProjectConnectorData)
     {
         this.DataContext = wizardData as ProjectConnectorData;
     }
     //else if (wizardData is ProjectConfigurationWizardData)
     //    this.DataContext = wizardData as ProjectConfigurationWizardData;
     this.FinishButtonText      = ServiceManagerLocalization.GetStringFromManagementPack("strClose");
     this.IsFinishButtonEnabled = true;
     InitializeComponent();
 }
コード例 #22
0
        /// <summary>
        /// Registers the wizard data.
        /// </summary>
        public void RegisterWizardData()
        {
            TraceService.WriteLine("ProjectFactory::RegisterWizardData");

            WizardData wizardData = new WizardData
            {
                WindowTitle  = "Add Projects",
                WindowHeight = 600,
                WindowWidth  = 680,
                WizardSteps  = this.GetWizardsSteps()
            };

            this.registerService.Register <IWizardData>(wizardData);
        }
        public AzureAutomationConfigurationPage(WizardData wizardData)
        {
            if (wizardData == null)
            {
                throw new ArgumentNullException("wizardData");
            }

            InitializeComponent();

            this.DataContext = wizardData;
            this.azureautomationWizardData = this.DataContext as AzureAutomationWizardData;

            this.Title = "Configure the Azure Automation Connector";
            this.FinishButtonText = "Create";
        }
コード例 #24
0
        public AzureAutomationWelcomePage(WizardData wizardData)
        {
            if (wizardData == null)
            {
                throw new ArgumentNullException("wizardData");
            }

            InitializeComponent();

            this.DataContext = wizardData;
            this.azureautomationWizardData = this.DataContext as AzureAutomationWizardData;

            this.Title            = "Before You Begin";
            this.FinishButtonText = "Create";
        }
コード例 #25
0
        public TemplateForm(WizardData wizardData)
        {
            //2. Turn the blank instance of AdminSettingsWizardData into the one being used when the form was loaded
            settings = wizardData as AdminSettingWizardData;

            InitializeComponent();
            this.DataContext            = wizardData;
            this.adminSettingWizardData = this.DataContext as TemplateForm;

            //set default values within the statically defined drop downs within the WPF form
            if (settings.DefaultWorkItem == "(null)")
            {
                cbDefaultWorkItemType.SelectedIndex = 3;
            }
        }
        public AzureAutomationWelcomePage(WizardData wizardData)
        {
            if (wizardData == null)
            {
                throw new ArgumentNullException("wizardData");
            }

            InitializeComponent();

            this.DataContext = wizardData;
            this.azureautomationWizardData = this.DataContext as AzureAutomationWizardData;

            this.Title = "Before You Begin";
            this.FinishButtonText = "Create";
        }
コード例 #27
0
        public AzureAutomationResultPage(WizardData wizardData)
        {
            if (wizardData == null)
            {
                throw new ArgumentNullException("wizardData");
            }

            InitializeComponent();

            this.DataContext = wizardData;
            this.azureautomationWizardData = this.DataContext as AzureAutomationWizardData;

            this.Title            = "Completed";
            this.FinishButtonText = "Close";
        }
コード例 #28
0
        public CSVConnectorConfigurationPage(WizardData wizardData)
        {
            if (wizardData == null)
            {
                throw new ArgumentNullException("wizardData");
            }

            InitializeComponent();

            this.DataContext            = wizardData;
            this.csvConnectorWizardData = this.DataContext as CSVConnectorWizardData;

            this.Title            = "Configure the CSV Connector";
            this.FinishButtonText = "Create";
        }
コード例 #29
0
        public CSVConnectorResultPage(WizardData wizardData)
        {
            if (wizardData == null)
            {
                throw new ArgumentNullException("wizardData");
            }

            InitializeComponent();

            this.DataContext            = wizardData;
            this.csvConnectorWizardData = this.DataContext as CSVConnectorWizardData;

            this.Title            = "Completed";
            this.FinishButtonText = "Close";
        }
コード例 #30
0
        public CSVConnectorWelcomePage(WizardData wizardData)
        {
            if (wizardData == null)
            {
                throw new ArgumentNullException("wizardData");
            }

            InitializeComponent();

            this.DataContext            = wizardData;
            this.csvConnectorWizardData = this.DataContext as CSVConnectorWizardData;

            this.Title            = "Before You Begin";
            this.FinishButtonText = "Create";
        }
コード例 #31
0
        public AnnouncementsForm(WizardData wizardData)
        {
            //2. Turn the blank instance of AdminSettingsWizardData into the one being used when the form was loaded
            settings = wizardData as AdminSettingWizardData;

            InitializeComponent();
            this.DataContext            = wizardData;
            this.adminSettingWizardData = this.DataContext as AnnouncementsForm;

            //enable Cireson specific controls if the MP is imported per the AdminSettingsWizardData
            if (settings.IsCiresonPortalMPImported == false)
            {
                chkPostAnnouncementToCiresonPortal.IsEnabled = false;
            }
        }
        public AzureAutomationResultPage(WizardData wizardData)
        {
            if (wizardData == null)
            {
                throw new ArgumentNullException("wizardData");
            }

            InitializeComponent();

            this.DataContext = wizardData;
            this.azureautomationWizardData = this.DataContext as AzureAutomationWizardData;

            this.Title = "Completed";
            this.FinishButtonText = "Close";
        }
コード例 #33
0
        public AzureAutomationSummaryPage(WizardData wizardData)
        {
            if (wizardData == null)
            {
                throw new ArgumentNullException("wizardData");
            }

            InitializeComponent();

            this.DataContext = wizardData;
            this.azureautomationWizardData = this.DataContext as AzureAutomationWizardData;

            this.Title                 = "Confirmation";
            this.FinishButtonText      = "Create";
            this.IsNextButtonEnabled   = false;
            this.IsFinishButtonEnabled = true;
        }
        public AzureAutomationSummaryPage(WizardData wizardData)
        {
            if (wizardData == null)
            {
                throw new ArgumentNullException("wizardData");
            }

            InitializeComponent();

            this.DataContext = wizardData;
            this.azureautomationWizardData = this.DataContext as AzureAutomationWizardData;

            this.Title = "Confirmation";
            this.FinishButtonText = "Create";
            this.IsNextButtonEnabled = false;
            this.IsFinishButtonEnabled = true;
        }
コード例 #35
0
        private WizardData GetWizardConfiguration(XmlElement data)
        {
            if (wizardConfigs[data] != null)
            {
                return((WizardData)wizardConfigs[data]);
            }
            if (data == null || !(data is XmlNode))
            {
                return(null);
            }

            XmlReaderSettings settings = new XmlReaderSettings();

            settings.ValidationType   = ValidationType.Schema;
            settings.ConformanceLevel = ConformanceLevel.Auto;

            // Pull the XSD from the config assembly (it's an embedded resource).
            using (Stream xsdstream = typeof(Configuration.Wizard).Assembly.GetManifestResourceStream(
                       Configuration.Wizard.SchemaResourceName))
            {
                Debug.Assert(xsdstream != null, "XSD not embedded in config assembly");
                // If the schema is not valid (we must check that at design-time), this will throw.
                XmlSchema xsd = XmlSchema.Read(xsdstream, null);
                settings.Schemas.Add(xsd);
            }

            // XInclude at this point has already been resolved by the parent guidance package
            // configuration reading process.
            XmlReader reader = new XmlNodeReader(data);
            XmlReader xr     = XmlReader.Create(reader, settings);

            try
            {
                WizardData wizard = new WizardData(
                    (Configuration.Wizard) new Configuration.WizardSerializer().Deserialize(xr));
                wizardConfigs.Add(data, wizard);
                return(wizard);
            }
            catch (Exception e)
            {
                wizardConfigs.Remove(data);
                throw new WizardFrameworkException(Properties.Resources.WizardGatheringService_InvalidConfiguration, e);
            }
        }
コード例 #36
0
        /// <summary>
        /// Registers the wizard data.
        /// </summary>
        public void RegisterWizardData()
        {
            WizardData wizardData = new WizardData
            {
                WindowTitle = "Add Xamarin Forms Custom Renderer",
                WindowHeight = 600,
                WindowWidth = 600,
                WizardSteps = this.GetWizardsSteps()
            };

            this.registerService.Register<IWizardData>(wizardData);
        }
コード例 #37
0
        /// <summary>
        /// Registers the wizard data.
        /// </summary>
        public void RegisterWizardData()
        {
            WizardData wizardData = new WizardData
            {
                WindowTitle = "Add ViewModel and Views",
                WindowHeight = 600,
                WindowWidth = 680,
                WizardSteps = this.GetWizardsSteps()
            };

            this.registerService.Register<IWizardData>(wizardData);
        }
コード例 #38
0
        /// <summary>
        /// Registers the wizard data.
        /// </summary>
        public void RegisterWizardData()
        {
            TraceService.WriteLine("ProjectFactory::RegisterWizardData");

            WizardData wizardData = new WizardData
            {
                WindowTitle = "Add Projects",
                WindowHeight = 600,
                WindowWidth = 680,
                WizardSteps = this.GetWizardsSteps()
            };

            this.registerService.Register<IWizardData>(wizardData);
        }