Esempio n. 1
0
        internal static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Application.ThreadException += GlobalExceptionHandler;
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);

            AppDomain.CurrentDomain.UnhandledException += GlobalExceptionHandler;

            IXDocumentParser xDocParser = new XDocumentParser();

            IWordBank <Question> wordBank = new XmlWordBank(xDocParser);

            wordBank.InitialiseWordBank(Repository.Properties.Resources.wordsDefault);

            var speechSynthesizer = new SpeechSynthesizer
            {
                Volume = 100,
                Rate   = -3,
            };

            speechSynthesizer.SelectVoiceByHints(VoiceGender.Male);

            Application.Run(new Main(wordBank, speechSynthesizer));
        }
Esempio n. 2
0
        public void Init()
        {
            _xmlString       = Properties.Resources.words_testFile;
            _xDocumentParser = new XDocumentParser();

            _sut = new XmlWordBank(_xDocumentParser);
        }
 public void TearDown()
 {
     _fakeXDocParser = null;
     _sut            = null;
     _xDocument      = null;
 }
 public void Init()
 {
     _fakeXDocParser = new Mock <IXDocumentParser>();
     _sut            = new XmlWordBank(_fakeXDocParser.Object);
     _xDocument      = Mother.GetTestXDocument();
 }
Esempio n. 5
0
 public void TearDown()
 {
     _xmlString       = null;
     _xDocumentParser = null;
     _sut             = null;
 }