예제 #1
0
 private void lockbut_Click_1(object sender, EventArgs e)
 {
     if (foldnam == "")
     {
         FolderBrowserDialog a = new FolderBrowserDialog();
         a.ShowDialog();
         foldnam = a.SelectedPath;
     }
     removebut.Enabled = false;
     unlockbut.Enabled = false;
     if (foldnam != "")
     {
         pwdbx sd = new pwdbx();
         sd.ShowDialog();
         if (folderlocker.Properties.Settings.Default.passcheck)
         {
             locking();
         }
         else
         {
             MessageBox.Show("Wrong Password.", "Folder Locker");
         }
         lvfolders.SelectedIndices.Clear();
         lockToolStripMenuItem.Visible = false;
         foldnam = "";
         removeToolStripMenuItem.Visible = false;
         unlockToolStripMenuItem.Visible = false;
     }
 }
예제 #2
0
 private void unlockToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (foldnam != "")
     {
         pwdbx sd = new pwdbx();
         sd.ShowDialog();
         if (folderlocker.Properties.Settings.Default.passcheck)
         {
             unlocking();
         }
         else
         {
             MessageBox.Show("Wrong Password.", "Folder Locker");
         }
         foldnam = "";
         lvfolders.SelectedIndices.Clear();
         lockToolStripMenuItem.Visible   = false;
         removeToolStripMenuItem.Visible = false;
         unlockToolStripMenuItem.Visible = false;
     }
 }