//当用户创建成功后,触发此事件 protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e) { string ChineseName, Gender, Love, work; WizardStepBase step = null; //获取指定的向导页 for (int i = 0; i < CreateUserWizard1.WizardSteps.Count; i++) { if (CreateUserWizard1.WizardSteps[i].ID == "PersonalInfo") { step = CreateUserWizard1.WizardSteps[i]; break; } } if (step != null) { //获取向导页中的值。 ChineseName = ((TextBox)step.FindControl("TextBox1")).Text; Gender = ((DropDownList)step.FindControl("DropDownList1")).SelectedValue; work = ((TextBox)step.FindControl("TextBox2")).Text; Love = ((TextBox)step.FindControl("TextBox3")).Text; Label1.Text = "个人信息如下:<br/>"; Label1.Text += "中文名称:" + ChineseName + "<br/>"; Label1.Text += "婚否:" + Gender + "<br/>"; Label1.Text += "职业:" + work + "<br/>"; Label1.Text += "爱好:" + Love + "<br/>"; } }
private void CheckFirstUse() { var settingsService = _container.Resolve <ISettingsService>(); var profileSettingsService = _container.Resolve <IProfileSettingsService>(); if (profileSettingsService.SelectedProfile == null) { using (var container = _container.GetChildContainer()) { container.Register <WizardController>().AsSingleton(); var wizard = new Wizard(); var steps = new WizardStepBase[] { new FirstUseWelcomeStepViewModel(container), new InstallationsWizardStepViewModel(container), new CreateProfileWizardStepViewModel(container), }; var viewModel = new WizardViewModel(container, steps); Current.MainWindow = wizard; _splashScreen.Hide(); wizard.DataContext = viewModel; wizard.ShowDialog(); _splashScreen.Show(); } settingsService.SetValue(SettingsCategories.Launcher, SettingsKeys.IsFirstUseComplete, true); } }
private void OnAddProfile() { try { using (var container = SettingsController.GetChildContainer()) { container.Register <WizardController>().AsSingleton(); var wizard = new Wizard(); var steps = new WizardStepBase[] { new CreateProfileWizardStepViewModel(container), new InstallationsWizardStepViewModel(container), }; var viewModel = new WizardViewModel(container, steps); wizard.DataContext = viewModel; wizard.ShowDialog(); } UpdateProfiles(); } catch (Exception e) { GeneralExceptionHandler.Instance.OnError(e); } }
protected void CreateUserWizard1_PreviousButtonClick(object sender, WizardNavigationEventArgs e) { WizardStepBase a = CreateUserWizard1.ActiveStep; if (a.ID == "CreateUserWizardStep1") { ddlTotalLeagues.Items.Clear(); } }
protected void Step_DP_SelectedIndexChanged(object sender, EventArgs e) { DropDownList dp = (DropDownList)sender; string index = dp.SelectedValue; Step_DP.SelectedValue = index; Step2_DP.SelectedValue = index; Step3_DP.SelectedValue = index; Step4_DP.SelectedValue = index; WizardStepBase step = Wizard1.WizardSteps[DataConvert.CLng(index)]; Wizard1.MoveTo(step); DoByStepIndex(); }
public List <FieldInfo> WizardStepInfo(WizardStepBase wizardStep, List <FieldInfo> wizardInfo) { formInfo = wizardInfo; //Start by looping through each control in the Wizard Step foreach (Control control in wizardStep.Controls) { //If the control is a User Control then loop through each control inside the panel in the current user control if (control.GetType().ToString().EndsWith("ascx")) { foreach (Control currentControl in control.Controls) { if (currentControl is Panel) { CreateFormInfo((Panel)currentControl); } } } }//end foreach loop return(formInfo); }// end AddRecords Method
public ModuleViewportTemplate ShowTemplateSelection(ModuleViewportTemplate[] templates) { using (var container = _container.GetChildContainer()) { container.Register <SelectViewportWizardController>().AsSingleton(); var controller = container.Resolve <SelectViewportWizardController>(); var wizard = new Wizard(); var steps = new WizardStepBase <SelectViewportWizardController>[] { new SelectViewportsWizardStepViewModel(container, templates), }; var viewModel = new WizardViewModel(container, steps); wizard.DataContext = viewModel; wizard.ShowDialog(); return(controller.SelectedTemplate); } }
protected void RegisterUser_CreatedUser(object sender, EventArgs e) { // Find the correct wizard step WizardStepBase step = null; for (int i = 0; i < RegisterUser.WizardSteps.Count; i++) { if (RegisterUser.WizardSteps[i].ID == "NameStep") { step = RegisterUser.WizardSteps[i]; break; } } if (step != null) { _Firstname = ((TextBox)step.FindControl("FirstnameText")).Text; _Lastname = ((TextBox)step.FindControl("LastnameText")).Text; _Age = short.Parse(((TextBox)step.FindControl("AgeTExt")).Text); // Store the information Debug.WriteLine(string.Format("{0} {1} {2}", _Firstname, _Lastname, _Age)); } }
public int IndexOf(WizardStepBase wizardStep) { }
// Methods public void Add(WizardStepBase wizardStep) { }
public void MoveTo(WizardStepBase wizardStep) {}
public bool Contains(WizardStepBase wizardStep) { }
public void Insert(int index, WizardStepBase wizardStep) { }
public WizardStepType GetStepType(WizardStepBase wizardStep, int index) {}
public void AddAt(int index, WizardStepBase wizardStep) { }
public void AddAt(int index, WizardStepBase wizardStep) { }
public void CopyTo(WizardStepBase[] array, int index) { }
public WizardStepType GetStepType(WizardStepBase wizardStep, int index) { }
public int IndexOf(WizardStepBase wizardStep) { }
protected void CreateUserWizard1_NextButtonClick(object sender, WizardNavigationEventArgs e) { double orgFee = 34.99; double leagueFee = 24.99; double discontedLeagueFee = 19.99; WizardStepBase a = CreateUserWizard1.ActiveStep; if (a.ID == "CreateUserWizardStep0") { TextBox totalLeagues = (TextBox)CreateUserWizardStep0.FindControl("txt_league"); int totalLeaguesToFillInDropDown = Convert.ToInt32(totalLeagues.Text); DropDownList ddlTotalLeagues = (DropDownList)CreateUserWizardStep1.FindControl("ddlTotalLeagues"); for (int i = 1; i <= totalLeaguesToFillInDropDown; i++) { ddlTotalLeagues.Items.Add(i.ToString()); } // Button aa = (Button)CreateUserWizardStep0.FindControl("StepNavigationTemplate").FindControl("StepNextButton"); // Money Logic here double amount = 0; int noOfLeaguesForAmountCalculation = Convert.ToInt32(txt_league.Text); if (noOfLeaguesForAmountCalculation <= 5) { amount = orgFee + (noOfLeaguesForAmountCalculation * leagueFee); } else { amount = orgFee + (noOfLeaguesForAmountCalculation * discontedLeagueFee); } AmountTextBox.Text = amount.ToString(); } else if (a.ID == "CreateUserWizardStep1") { //if (Session["arr"]==null) if (ViewState["arr"] == null) { e.Cancel = true; } else { ArrayList arrCount = (ArrayList)ViewState["arr"]; if (arrCount.Count < (ddlTotalLeagues.Items.Count * 3)) { lblErrorMessage.Text = "Select Start and End Date for All Leagues"; lblErrorMessage.ForeColor = System.Drawing.Color.Red; lblErrorMessage.Visible = true; e.Cancel = true; } else { lblErrorMessage.Visible = false; } } } else if (a.ID == "CreateUserWizardStep2") { if (e.Cancel == true) { //string testingg = CustomValidator1.ErrorMessage; e.Cancel = false; CreateUserWizard1.ActiveStepIndex = 2; //CustomValidator1.Visible = true; //ServerValidateEventArgs srve = new ServerValidateEventArgs(testingg, true); //CustomValidator1_ServerValidate(null, srve); //CustomValidator1.ErrorMessage = testingg; //lblError.Text = testingg; } //string abc = (string)Session["creditCard"]; //if (Session["creditCard"] != "1") ////if (Session["creditCard"] ) //{ // lblError.Text = "Kindly, Submit the credit card information first."; // lblError.ForeColor = System.Drawing.Color.Red; // lblError.Visible = true; // e.Cancel = true; //} //else //{ // lblError.Visible = false; //} } else if (a.ID == "CreateUserWizardStep3") { } }
public WizardStepBaseTemplateDefinition(WizardDesigner designer, WizardStepBase step, string name, Style style) : base(designer, name, step, name, style) { this._step = step; }
public void Insert(int index, WizardStepBase wizardStep) { }
public WizardStepTemplatedEditableRegion(TemplateDefinition templateDefinition, WizardStepBase wizardStep) : base(templateDefinition) { this._wizardStep = wizardStep; base.EnsureSize = true; }
public void Remove(WizardStepBase wizardStep) { }
internal WizardSelectableRegion(WizardDesigner designer, string name, WizardStepBase wizardStep) : base(designer, name, true) { this._wizardStep = wizardStep; }
public bool Contains(WizardStepBase wizardStep) { }
public WizardStepEditableRegion(WizardDesigner designer, WizardStepBase wizardStep) : base(designer, designer.GetRegionName(wizardStep), false) { this._wizardStep = wizardStep; base.EnsureSize = true; }
/// <summary> /// /// </summary> /// <param name="_nrPergunta"></param> /// <param name="_qtdPerguntas"></param> /// <param name="_pergunta"></param> /// <param name="_step"></param> private void CriaWizardStep(Int16 _nrPergunta, int _qtdPerguntas, Pergunta _pergunta, out WizardStepBase _step) { WizardStep step = new WizardStep() { ID = "step" + _nrPergunta }; if (_nrPergunta == 1) { step.StepType = WizardStepType.Start; } //else if ((_nrPergunta == qtdPerguntas)) //{ // Label lblFinish = new Label(); // lblFinish.ID = "lblFinish"; // step.StepType = WizardStepType.Finish; // step.Controls.Add(lblFinish); //} else { step.StepType = WizardStepType.Step; } Label lblPergunta = new Label(); lblPergunta.ID = "lblPergunta" + _nrPergunta; lblPergunta.CssClass = "tituloPergunta"; if (!_pergunta.PathPicture.Equals(String.Empty)) { lblPergunta.Text = _nrPergunta + ". " + _pergunta.DsPergunta + "<br><img src=\"../../" + _pergunta.PathPicture + "\" border=\"0\" alt=\"" + _pergunta.PathPicture + "\" />"; } else { lblPergunta.Text = _nrPergunta + ". " + _pergunta.DsPergunta; } step.Controls.Add(lblPergunta); //RadioButtonList com as Respostas RadioButtonList rblRespostas = new RadioButtonList() { ID = "rblRespostas" + _nrPergunta }; foreach (ManipulaXMLCulturaInglesa.Resposta r in _pergunta.ListaResposta()) { rblRespostas.Items.Add(new ListItem(r.DsResposta)); } step.Controls.Add(rblRespostas); _step = step; }
public void Remove(WizardStepBase wizardStep) { }
public void MoveTo(WizardStepBase wizardStep) { }
// Methods public void Add(WizardStepBase wizardStep) { }