Example #1
0
        private void buttonDecrypt_Click(object sender, EventArgs e)
        {
            this.Enabled = false;
            decryptForm dlg = new decryptForm();

            dlg.ShowDialog();
            this.Enabled = true;
        }
Example #2
0
        public static void DecryptCallback(object data, int iPct, string sStatus, bool bThreadRun)
        {
            decryptForm form = (decryptForm)data;

            if (invkclosure == true)
            {
                return;
            }

            if (form.InvokeRequired)
            {
                DecryptCallback callback = new Crypt.DecryptCallback(DecryptCallback);
                form.Invoke(callback, data, iPct, sStatus, bThreadRun);
            }
            else
            {
                if (sStatus == "Decryption Failure")
                {
                    form.UpdForm(100, sStatus, 2);
                    form.NotifIcnShow("Failed to decrypt " + form.textBoxFile.Text, "Decryption Failure", "error");
                }
                else
                {
                    form.UpdForm(iPct, sStatus, 1);
                    if (iPct == 100 && sStatus == "File Successfully Decrypted")
                    {
                        form.NotifIcnShow("File Directory : " + form.textBoxDirDest.Text, "File Successfully Decrypted", "info");
                    }
                }
                form.m_bThreadRun = bThreadRun;
                if (bThreadRun == false)
                {
                    form.UpdUI(true);
                }
            }
        }