예제 #1
0
 private void Decrypt_Three_Click(object sender, RoutedEventArgs e)
 {
     foreach (Window window in Application.Current.Windows)
     {
         if (window.GetType() == typeof(MainWindow))
         {
             text      = (window as MainWindow).TextBoxOriginal.Text;
             tritemius = new Tritemius(text, KeyWord.Text);
             (window as MainWindow).TextBoxOriginal.Text = tritemius.GausaDecrypt();
         }
     }
 }
예제 #2
0
 private void Decrypt_Two_Click(object sender, RoutedEventArgs e)
 {
     foreach (Window window in Application.Current.Windows)
     {
         if (window.GetType() == typeof(MainWindow))
         {
             text      = (window as MainWindow).TextBoxOriginal.Text;
             tritemius = new Tritemius(text, Convert.ToInt32(FirstNumberBox_Two.Text), Convert.ToInt32(SecondNumberBox_Two.Text), Convert.ToInt32(ThirdNumberBox_Two.Text));
             (window as MainWindow).TextBoxOriginal.Text = tritemius.TritemiusTwoDectrypt();
         }
     }
 }
예제 #3
0
 private void Hack_Click(object sender, RoutedEventArgs e)
 {
     foreach (Window window in Application.Current.Windows)
     {
         if (window.GetType() == typeof(MainWindow))
         {
             text      = (window as MainWindow).TextBoxOriginal.Text;
             tritemius = new Tritemius(text, KeyWord.Text);
             int first  = 0;
             int second = 0;
             tritemius.TritemiusHackTwo(Encrypted.Text, out first, out second);
             FirstNumberBox_One.Text  = first.ToString();
             SecondNumberBox_One.Text = second.ToString();
         }
     }
 }