Ejemplo n.º 1
0
 private void V_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrWhiteSpace(OG.Text))
     {
         if (Base64C.IsBase64String(OG.Text))
         {
             NEW.Text = Base64C.Decode(OG.Text);
             AddToHistory(NEW.Text);
         }
         else
         {
             MessageBox.Show("That is not a base64 string!");
         }
     }
 }
Ejemplo n.º 2
0
 private void PDC_Click(object sender, EventArgs e)
 {
     //Paste, Decode, Copy
     if (!String.IsNullOrWhiteSpace(Clipboard.GetText()))
     {
         if (Base64C.IsBase64String(Clipboard.GetText()))
         {
             OG.Text  = Clipboard.GetText();
             NEW.Text = Base64C.Decode(Clipboard.GetText());
             Clipboard.SetText(NEW.Text);
             AddToHistory(NEW.Text);
         }
         else
         {
             SystemSounds.Hand.Play();
             MessageBox.Show("That is not a base64 string!");
         }
     }
     else
     {
         SystemSounds.Hand.Play();
         MessageBox.Show("That is not some text!");
     }
 }