private void EncryptorForm_Load(object sender, EventArgs e) { if (ThisAddIn.usePassword) { textBox1.Text = ThisAddIn.getPassword(); } }
public DecryptForm(Outlook.MailItem mailitem) { this.mailitem = mailitem; InitializeComponent(); if (ThisAddIn.usePassword) { textBox1.Text = ThisAddIn.getPassword(); } this.ShowDialog(); }
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; }
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; }
private void checkBoxSavePassword_Click(object sender, RibbonControlEventArgs e) { ThisAddIn.setusepassword(checkBoxSavePassword.Checked); ThisAddIn.blankPassword(); }
private void button1_Click(object sender, RibbonControlEventArgs e) { ThisAddIn.showMainForm(); }