コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PRIM_Software"/> class.
 /// Sets all first-session-time use/one time settings.
 /// </summary>
 public PRIM_Software()
 {
     InitializeComponent();
     SetDefaultText();
     btnReset.BackColor            = Color.DimGray;
     btnReset.Enabled              = false;
     cbHidePasswordDisplay.Checked = true;
     cbHideNewPasswords.Checked    = true;
     PasswordManagement.DisableTab(InfoManagementTab);
     PasswordManagement.DisableTab(InfoAddTab);
     InitialDisplayModeSelected = false;
     cbRedirect.Checked         = true;
 }
コード例 #2
0
 /// <summary>
 /// Resets the application and data to first time use. All passwords and keys are deleted.
 /// Files are recreated on selection screen.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 private void btnReset_Click(object sender, EventArgs e)
 {
     File.Delete(AppDomain.CurrentDomain.BaseDirectory + Constants.FilePaths.WorkInformation);
     File.Delete(AppDomain.CurrentDomain.BaseDirectory + Constants.FilePaths.PersonalInformation);
     File.Delete(AppDomain.CurrentDomain.BaseDirectory + Constants.FilePaths.SharedInformation);
     File.Delete(AppDomain.CurrentDomain.BaseDirectory + Constants.FilePaths.SocialMediaInformation);
     File.Delete(AppDomain.CurrentDomain.BaseDirectory + Constants.FilePaths.OtherInformation);
     File.Delete(AppDomain.CurrentDomain.BaseDirectory + Constants.FilePaths.Key);
     File.Delete(AppDomain.CurrentDomain.BaseDirectory + Constants.FilePaths.InitializationVector);
     ClearApplicationData();
     InitialDisplayModeSelected = false;
     PasswordManagement.DisableTab(InfoManagementTab);
     PasswordManagement.DisableTab(InfoAddTab);
     PasswordManagement.SelectTab(InfoTypeSelectionTab);
     notification = new DialogBox("All data has been Reset! A new key has been generated. Please do not modify it.", MetroFramework.MetroColorStyle.Silver, this.DesktopLocation, "Reset");
     notification.Show();
 }