Esempio n. 1
0
 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;
      *  }
      * }*/
 }
Esempio n. 2
0
        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;
                }
            }*/
        }
Esempio n. 3
0
 /// <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);
     }
 }
Esempio n. 4
0
        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;
                }
            }
        }
Esempio n. 5
0
        /// <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;
            }
        }
Esempio n. 6
0
        /// <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;
            }
        }
Esempio n. 7
0
 /// <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);
     }
 }
Esempio n. 8
0
 /// <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;
     }
 }
Esempio n. 9
0
        /// <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);
        }
Esempio n. 10
0
        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;
        }
Esempio n. 11
0
        /// <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;
            }
        }
Esempio n. 12
0
        /// <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;
            }
        }
Esempio n. 13
0
 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;
         }
     }
 }
Esempio n. 14
0
 /// <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);
     }
 }
Esempio n. 15
0
 /// <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);
     }
 }
Esempio n. 16
0
        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;
        }
Esempio n. 17
0
 private void Page_Transition(object sender, PageTransitionEventArgs e)
 {
     PageViewModel = e.Page;
 }
Esempio n. 18
0
        /// <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;
            }
        }
Esempio n. 19
0
 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;
         }
     }
 }
Esempio n. 20
0
        /// <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;
            }
        }
Esempio n. 21
0
 private void TrueCryptPage_PageNext(object sender, PageTransitionEventArgs e)
 {
 }
Esempio n. 22
0
 private void TrueCryptPage_PageNext(object sender, PageTransitionEventArgs e)
 {
 }
Esempio n. 23
0
 /// <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;
     }
 }
Esempio n. 24
0
 /// <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;
 }
Esempio n. 25
0
 /// <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;
 }
Esempio n. 26
0
        /// <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);
        }