public override void Initialize() { // automatically update the DisplayName _displayNameUpdater = _wizardTranslations.CreateDisplayNameBinding(this, nameof(IWizardTranslations.TitleStep3)); IsVisible = false; ParentWizard.OnPropertyChanged(nameof(WizardExampleViewModel.IsStep3Visible)).Subscribe(s => IsVisible = ParentWizard.IsStep3Visible); }
/// <summary> /// Handles the DocumentCompleted event of the Browser control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Windows.Forms.WebBrowserDocumentCompletedEventArgs"/> instance containing the event data.</param> /// <remarks>Documented by Dev02, 2008-01-24</remarks> private void Browser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { if (statusDialog != null && statusDialog.Visible) { statusDialog.Close(); } //now the webpage has finished loading and can be printed [ML-63] if (sender is WebBrowser && ((WebBrowser)sender).Tag is Button) { Button button = ((Button)((WebBrowser)sender).Tag); if (button == buttonPreview) { //little hack to resize the PreviewDialog Window - without that, it would be shown in the size of this dialog //if there is any other way, let me know ;-) AWE ParentWizard.Hide(); Size size = ParentWizard.Size; ParentWizard.Size = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); Browser.ShowPrintPreviewDialog(); Application.DoEvents(); ParentWizard.Size = size; ParentWizard.Show(); } else if (button == buttonPrint) { Browser.ShowPrintDialog(); } } this.Enabled = true; if (this.ParentWizard is Wizard) { this.ParentWizard.Enabled = true; } }
/// <summary> /// Refreshes the pages. /// </summary> /// <remarks>Documented by Dev05, 2007-12-21</remarks> private void RefreshPages() { if (radioButtonBoxes.Checked && !ParentWizard.Pages.Contains(BoxPage)) { ParentWizard.Pages.Insert(1, BoxPage); } else if (!radioButtonBoxes.Checked && ParentWizard.Pages.Contains(BoxPage)) { ParentWizard.Pages.Remove(BoxPage); } if (radioButtonChapters.Checked && !ParentWizard.Pages.Contains(ChapterPage)) { ParentWizard.Pages.Insert(1, ChapterPage); } else if (!radioButtonChapters.Checked && ParentWizard.Pages.Contains(ChapterPage)) { ParentWizard.Pages.Remove(ChapterPage); } if (radioButtonIndividual.Checked && !ParentWizard.Pages.Contains(IndividualPage)) { ParentWizard.Pages.Insert(1, IndividualPage); } else if (!radioButtonIndividual.Checked && ParentWizard.Pages.Contains(IndividualPage)) { ParentWizard.Pages.Remove(IndividualPage); } ParentWizard.UpdateButtonStates(); }
public override void OnWizardNext(object sender, WizardPageEventArgs e) { if (!IsValid()) { e.Cancel = true; return; } else { ProgressDialog dlgProgresss = new ProgressDialog(); CustomBrokerClient client = GetWizard().Tag as CustomBrokerClient; // // See if the user wants to update are add. The user will only be asked if the originally did a search but // changed one of the patient ids. // if (_Update && (comboBoxPatientId.Text != _OriginalPatientId)) { DialogResult r = Messager.ShowQuestion(this, "You searched for a patient but have changed some of the identifying information. " + "Would you like to update this patient with the new information? \r\n\r\nClicking No will add a new patient.", MessageBoxButtons.YesNo); _Update = r == DialogResult.Yes; } UpdatePatient(); dlgProgresss.Title = _Update ? "Update patient" : "Add Patient"; dlgProgresss.Description = _Update ? "Updating..." : "Adding..."; dlgProgresss.Action = () => { if (_Update) { client.UpdatePatient(_OriginalPatientId, _OriginalIssuerOfPatientId, _Patient); } else { client.AddPatient(_Patient); } }; if (dlgProgresss.ShowDialog(this) == DialogResult.Cancel) { if (dlgProgresss.Exception != null) { e.Cancel = true; Messager.ShowError(this, dlgProgresss.Exception); } } else { if (_Update) { UpdatePatient(_OriginalPatientId, _OriginalIssuerOfPatientId, _Patient.PatientID, _Patient.IssuerOfPatientID); } else { comboBoxPatientId.Items.Add(new PatientKey() { PatientId = _Patient.PatientID, IssurerOfPatientId = _Patient.IssuerOfPatientID }); } comboBoxPatientId.Text = _Patient.PatientID; if (_Patient != null) { _OriginalPatientId = _Patient.PatientID; _OriginalIssuerOfPatientId = _Patient.IssuerOfPatientID; } else { e.Cancel = true; ParentWizard.Reset(); } } } base.OnWizardNext(sender, e); }
public virtual void MovePreviousPage() { ParentWizard?.MovePreviousPage(); }
public virtual void MoveNextPage() { ParentWizard?.MoveNextPage(); }
private void DispatcherTimer_Tick(object sender, EventArgs e) { dispatcherTimer?.Stop(); ParentWizard.MoveNextPage(); }
/// <summary> /// Handles the Click event of the buttonDontUseWizard control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// <remarks>Documented by Dev05, 2007-12-21</remarks> private void buttonDontUseWizard_Click(object sender, EventArgs e) { ParentWizard.DialogResult = DialogResult.Ignore; ParentWizard.Close(); }