private void PageEncryption_PageNext(object sender, PageTransitionEventArgs e) { /*Nullable<TrueCrypt.Password> password = Password; * if (password.HasValue) * { * // select the default keyboard layout * InputLanguage.CurrentInputLanguage = InputLanguage.DefaultInputLanguage; * * // store the TrueCrypt password * PageContext.GetInstance().Password = password.Value; * * // select the next page of the TestCrypt wizard * switch (PageContext.GetInstance().Mode) * { * case Mode.SearchQuick: * case Mode.SearchDeep: * e.Page = new PageAnalyze(this); * break; * case Mode.SearchAdvanced: * e.Page = pageSearch; * break; * default: * System.Diagnostics.Debug.Fail("Not Implemented"); * break; * } * }*/ }
private void PageEncryption_PageNext(object sender, PageTransitionEventArgs e) { /*Nullable<TrueCrypt.Password> password = Password; if (password.HasValue) { // select the default keyboard layout InputLanguage.CurrentInputLanguage = InputLanguage.DefaultInputLanguage; // store the TrueCrypt password PageContext.GetInstance().Password = password.Value; // select the next page of the TestCrypt wizard switch (PageContext.GetInstance().Mode) { case Mode.SearchQuick: case Mode.SearchDeep: e.Page = new PageAnalyze(this); break; case Mode.SearchAdvanced: e.Page = pageSearch; break; default: System.Diagnostics.Debug.Fail("Not Implemented"); break; } }*/ }
/// <summary> /// The event-invoking method that derived classes can override and use to fire the event PageBack. /// </summary> /// <param name="e">The event arguments.</param> public virtual void OnPageBack(PageTransitionEventArgs e) { if (this.PageBack != null) { this.PageBack(this, e); } }
private void PageTrueCrypt_PageNext(object sender, PageTransitionEventArgs e) { Nullable <TrueCrypt.Password> password = Password; if (password.HasValue) { // select the default keyboard layout InputLanguage.CurrentInputLanguage = InputLanguage.DefaultInputLanguage; // store the TrueCrypt password PageContext.GetInstance().Password = password.Value; // select the next page of the TestCrypt wizard switch (PageContext.GetInstance().Mode) { case Mode.SearchQuick: case Mode.SearchDeep: case Mode.SearchAdvanced: e.Page = pageEncryption; break; default: System.Diagnostics.Debug.Fail("Not Implemented"); break; } } }
/// <summary> /// "PageNext" event handler of the wizard page. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="T:TestCrypt.PageTransitionEventArgs" /> instance containing the event data.</param> private void PageMain_PageNext(object sender, PageTransitionEventArgs e) { // get the mode selected by the user foreach (Control control in this.Controls) { if (control is RadioButton) { RadioButton opt = (RadioButton)control; if (opt.Checked) { PageContext.GetInstance().Mode = (Mode)Enum.Parse(typeof(Mode), (string)opt.Tag); break; } } } // select the next page of the TestCrypt wizard switch (PageContext.GetInstance().Mode) { case Mode.MountInPlace: case Mode.MountRescueDisk: // start with the device selection wizard page e.Page = new PageDevice(this); break; default: // start with the disk selection wizard page e.Page = new PageDisk(this); break; } }
/// <summary> /// The event-invoking method that derived classes can override and use to fire the event PageNext. /// </summary> /// <param name="e">The event arguments.</param> public virtual void OnPageNext(PageTransitionEventArgs e) { if (this.PageNext != null) { this.PageNext(this, e); } }
/// <summary> /// "PageBack" event handler of the wizard page. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="T:TestCrypt.PageTransitionEventArgs" /> instance containing the event data.</param> private void PageFragment_PageBack(object sender, PageTransitionEventArgs e) { if (MessageBox.Show(this, PageContext.GetInstance().GetResourceString("PageBackWarning"), Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { // return to the previous wizard page e.Page = previousPage; } }
/// <summary> /// "PageNext" event handler of the wizard page. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="T:TestCrypt.PageTransitionEventArgs" /> instance containing the event data.</param> private void PageDevice_PageNext(object sender, PageTransitionEventArgs e) { // store the selected device inside the page context PageContext.GetInstance().Device = SelectedDevice; // continue with the TrueCrypt settings wizard page e.Page = new PageTrueCrypt(this); }
private void ResultPage_PageBack(object sender, PageTransitionEventArgs e) { if (MessageBox.Show(this, "If you continue the analyzer results will be cleared. Are you sure to continue?", Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { //e.Cancel = true; } // skip the analyzer page when going back //e.PageCount = 2; }
/// <summary> /// "PageBack" event handler of the wizard page. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="T:TestCrypt.PageTransitionEventArgs" /> instance containing the event data.</param> private void PageTrueCrypt_PageBack(object sender, PageTransitionEventArgs e) { if (MessageBox.Show(this, PageContext.GetInstance().GetResourceString("PageBackWarning"), Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { // select the default keyboard layout InputLanguage.CurrentInputLanguage = InputLanguage.DefaultInputLanguage; // return to the previous wizard page e.Page = previousPage; } }
/// <summary> /// "PageNext" event handler of the wizard page. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="T:TestCrypt.PageTransitionEventArgs" /> instance containing the event data.</param> private void PageDisk_PageNext(object sender, PageTransitionEventArgs e) { // store the selected physical drive inside the page context PageContext.GetInstance().Device = SelectedDisk; // select the next page of the TestCrypt wizard switch (PageContext.GetInstance().Mode) { case Mode.SearchFragment: e.Page = new PageFragment(this); break; default: e.Page = new PageTrueCrypt(this); break; } }
private void AnalyzePage_PageBack(object sender, PageTransitionEventArgs e) { if (backgroundWorker.IsBusy) { const string message = "The analyzer is still in progress. If you go back the analyzer will be canceled. Do you really want to continue?"; if (MessageBox.Show(this, message, Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { // cancel the background worker and wait for cancellation canceled = true; backgroundWorker.CancelAsync(); resetEvent.WaitOne(); } else { //e.Cancel = true; } } }
private void Page_Transition(object sender, PageTransitionEventArgs e) { PageViewModel = e.Page; }
private void TrueCryptPage_PageNext(object sender, PageTransitionEventArgs e) { }
/// <summary> /// "PageBack" event handler of the wizard page. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="T:TestCrypt.PageTransitionEventArgs" /> instance containing the event data.</param> private void PageDevice_PageBack(object sender, PageTransitionEventArgs e) { // return to the previous wizard page e.Page = previousPage; }