public CipherTest(Action progress, Action<string> afterFinish, Texts texts) { this.progress = progress; this.afterFinish = afterFinish; this.texts = texts; lockObject = new object(); }
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"); }); }
public CaesarTest(Action progress, Action<string> afterFinish, Texts texts) : base(progress, afterFinish, texts) { cipher = new Caesar(); }
public VigenereTest(Action progress, Action<string> afterFinish, Texts texts) : base(progress, afterFinish, texts) { cipher = new Vigenere(); }
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(); }
public TransTest(Action progress, Action<string> afterFinish, Texts texts) : base(progress, afterFinish, texts) { cipher = new CryptanalysisCore.Transposition(); }