Example #1
0
 private void accept_Click(object sender, EventArgs e)
 {
     if (Password.Text == string.Empty)
     {
         Dialog.ErrorDialog error = new Dialog.ErrorDialog("Password empty!");
         error.ShowDialog();
     }
     Operations.Content.Message.CurrentPassword = Password.Text;
     Close();
 }
Example #2
0
        private void Decrypt_Click(object sender, EventArgs e)
        {
            WorkSpace.EnterKey KeyIn = new WorkSpace.EnterKey();
            KeyIn.ShowDialog();
            if (Operations.Content.Message.CurrentPassword == string.Empty)
            {
                MessageBox.Show("This content is WhiteSpace or Empty!",
                                "NO CONTENT", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            string Res = Operations.AES.Decrypt(ContentShow.DocumentText, Operations.Content.Message.CurrentPassword);

            if (Res == string.Empty)
            {
                Dialog.ErrorDialog error = new Dialog.ErrorDialog("Wrong password! Suspiciously -_-");
                error.ShowDialog();
                return;
            }
            ContentShow.DocumentText = Res;
            Decrypt.Enabled          = false;
        }