public void Execute() { //Finished = false; Bigrams.InitLanguage(settings.Language); if (this.input == null) { GuiLogMessage("No input!", NotificationLevel.Error); return; } //if (this.costMaster == null) //{ // GuiLogMessage("You have to connect the Cost Function component to the Transpostion Analyzer control!", NotificationLevel.Error); // return; //} //comparer = new ValueKeyComparer(costMaster.GetRelationOperator() != RelationOperator.LargerThen); comparer = new ValueKeyComparer(false); TOPLIST = new HighscoreList(comparer, 10); myPresentation.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (SendOrPostCallback) delegate { myPresentation.entries.Clear(); }, null); switch (this.settings.Analysis_method) { case 0: GuiLogMessage("Starting Dictionary Attack", NotificationLevel.Info); DictionaryAttack(); break; case 1: GuiLogMessage("Starting Hill Climbing Analysis", NotificationLevel.Info); HillClimbingAnalysis(); break; } //Finished = true; Output = TOPLIST[0].plaintext; //OnPropertyChanged("Output"); ProgressChanged(1, 1); }
public HighscoreList(ValueKeyComparer comparer, int Capacity) { this.comparer = comparer; this.Capacity = Capacity; }