Пример #1
0
        public Enigma()
        {
            this.settings = new EnigmaSettings();
            this.core     = new EnigmaCore(this);
            this.analyzer = new EnigmaAnalyzer(this);
            this.analyzer.OnIntermediateResult += new EventHandler <IntermediateResultEventArgs>(analyzer_OnIntermediateResult);
            this.statistics = new Dictionary <int, IDictionary <string, double[]> >();



            enigmaPresentationFrame = new EnigmaPresentationFrame(this);
            EnigmaPresentation myPresentation = enigmaPresentationFrame.EnigmaPresentation;

            this.Presentation = enigmaPresentationFrame;
            //this.Presentation.IsVisibleChanged += presentation_isvisibleChanged;
            this.settings.PropertyChanged += enigmaPresentationFrame.EnigmaPresentation.settings_OnPropertyChange;
            this.settings.PropertyChanged += settings_OnPropertyChange;
            this.enigmaPresentationFrame.EnigmaPresentation.fireLetters += fireLetters;
            this.enigmaPresentationFrame.EnigmaPresentation.newInput    += newInput;
        }
Пример #2
0
 /// <summary>
 /// Creates a new Enigma nalyzer class
 /// This analyzer performs an cipher-text-only analysis of a given enigma text.
 /// It uses the method as described by James Gillogly in Cryptologia 1995
 /// </summary>
 /// <param name="facade">The enimga plugin which controls this analyzer</param>
 public EnigmaAnalyzer(Enigma facade)
 {
     pluginFacade = facade;
     settings     = (EnigmaSettings)pluginFacade.Settings;
     core         = new EnigmaCore(facade);
 }