public Model.WordState State(CryptoRandom rand) { CryptoRandom r = rand; int val; WordState w = new WordState(); Word word = _automat.word; int max = AppSettings.GetSound() ? 3 : 2; val = r.Next(0, max); switch(val) { case 0: w.Rus(); break; case 1: w.Eng(); break; case 2: w.Sound(); break; } w.Text(word.EWord, word.Transcription, word.EPhrase, word.RWord, word.RPhrase); if (_automat.word.WordId != -1) w.ButtonState(); else w.WithoutButtonState(); return w; }
public Model.WordState State() { WordState w = new WordState(); Word word = _automat.word; w.Text(word.EWord, word.Transcription, word.EPhrase, word.RWord, word.RPhrase); w.All(); w.ButtonStateN(); return w; }
public void TextTest() { WordState w = new WordState(); w.Text("london","[lo:ndon]", "londosn is the capital", "Лондон", "Лондон - столица"); Assert.AreEqual(w.Eng, "london [lo:ndon]"); Assert.AreEqual(w.Rus, "Лондон"); Assert.AreEqual(w.EngPhrase, "londosn is the capital"); Assert.AreEqual(w.RusPhrase, "Лондон - столица"); }