public Model.PhraseState State(CryptoRandom rand) { CryptoRandom r = rand; int val; PhraseState w = new PhraseState(); Phrase phrase = _automat.phrase; int max = AppSettings.GetSound() ? 3 : 2; val = r.Next(1, max); switch(val) { case 0: w.Rus(); break; case 1: w.Eng(); break; case 2: w.Sound(); break; } w.Text(phrase.EPhrase, phrase.RPhrase); if (_automat.phrase.PhraseId != -1) w.ButtonState(); else w.WithoutButtonState(); return w; }
public Model.PhraseState State() { PhraseState w = new PhraseState(); Phrase phrase = _automat.phrase; w.Text(phrase.EPhrase, phrase.RPhrase); w.All(); w.ButtonStateP(); return w; }