Example #1
0
 public CipherTest(Action progress, Action<string> afterFinish, Texts texts)
 {
     this.progress = progress;
     this.afterFinish = afterFinish;
     this.texts = texts;
     lockObject = new object();
 }
Example #2
0
        public Form1()
        {
            InitializeComponent();
            languageSelect.SelectedIndex = 0;
            Storage.LoadFiles();

            InBackground(() =>
                {
                    currentLanguage = Storage.Languages.czech;
                    string lang = currentLanguage.ToString();
                    texts = new Texts(lang);
                    //textsNotStat = new Texts(lang, "texts_not.txt");
                    mono = new MonoTest(UpdateProgressBar, AfterDone, texts);
                    caesar = new CaesarTest(UpdateProgressBar, AfterDone, texts);
                    vigenere = new VigenereTest(UpdateProgressBar, AfterDone, texts);
                    trans = new TransTest(UpdateProgressBar, AfterDone, texts);
                    SetTitle(Text + ": Soubory načteny");
                });
        }
Example #3
0
 public CaesarTest(Action progress, Action<string> afterFinish, Texts texts)
     : base(progress, afterFinish, texts)
 {
     cipher = new Caesar();
 }
Example #4
0
 public VigenereTest(Action progress, Action<string> afterFinish, Texts texts)
     : base(progress, afterFinish, texts)
 {
     cipher = new Vigenere();
 }
Example #5
0
 public MonoTest(Action progress, Action<string> afterFinish, Texts texts)
     : base(progress, afterFinish, texts)
 {
     uniqueWords = File.ReadAllText(Storage.StatsFolderPath + "czech/" + "unique.txt").Split(' ');
     cipher = new Monoalphabetic();
 }
Example #6
0
 public TransTest(Action progress, Action<string> afterFinish, Texts texts)
     : base(progress, afterFinish, texts)
 {
     cipher = new CryptanalysisCore.Transposition();
 }