Пример #1
0
 private void buttonApply_Click(object sender, EventArgs e)
 {
     buttonApply.Enabled   = false;
     buttonPreview.Enabled = false;
     OutlookHelperTool.setMailText(mailitem, tempMessage);
     OutlookHelperTool.cutCryptedSubject(mailitem);
     mailitem.Save();
     this.Close();
 }
Пример #2
0
 private void button1_Click_1(object sender, EventArgs e)
 {
     buttonApply.Enabled   = false;
     buttonPreview.Enabled = false;
     OutlookHelperTool.setMailText(tempMessage);
     if (cryption)
     {
         OutlookHelperTool.setCryptedSubject();
     }
     else
     {
         OutlookHelperTool.cutCryptedSubject();
     }
     this.Close();
 }
Пример #3
0
        private void buttonDecrypt_Click(object sender, EventArgs e)
        {
            String pass = textBox1.Text;

            if (pass != ThisAddIn.getPassword())
            {
                ThisAddIn.setPassword(pass);
            }
            String text = OutlookHelperTool.getMailText(mailitem, true);

            tempMessage = Encrypt.DecryptString(text, pass, OutlookHelperTool.getinitVector(OutlookHelperTool.getMailText(mailitem, false)));

            //OutlookHelperTool.setMailText(Encrypt.DecryptString(text, textBox1.Text,OutlookHelperTool.getinitVector(text)));
            buttonApply.Enabled   = true;
            buttonPreview.Enabled = true;
        }
Пример #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            String pass = textBox1.Text;

            if (pass != ThisAddIn.getPassword())
            {
                ThisAddIn.setPassword(pass);
            }

            Tuple <String, String> cryptedtuple = Encrypt.EncryptString(OutlookHelperTool.getMailText(false), pass);
            String crypted = cryptedtuple.Item1;
            String vector  = cryptedtuple.Item2;


            tempMessage = OutlookHelperTool.getPreparedMessage(crypted, vector);

            cryption = true;
            //OutlookHelperTool.setMailText(exportString);
            buttonApply.Enabled   = true;
            buttonPreview.Enabled = true;
        }