private void Main_NextMain(object sender, EventArgs e) { threount[2]++; foreach (var r in RadioButList()) { r.IsChecked = false; r.IsEnabled = true; r.Foreground = Brushes.Black; } Main.TruOrFals.Content = null; // int rNewR = new Random().Next(0, 5); // Engl.DataBase.Word w = new DataBase.Word(); //---------------------------------------------------------- w = Method.RandomQuesion(); quest = Method.MethorOtherFiveRandom(w); ModelMain mm = Method.GetStringObject(w, quest) as ModelMain; Main.l1.Content = mm.L1; Main.l2.Content = mm.L2; Main.word.Content = mm.GetWord; Main.synonym.Content = mm.GetSynonym; for (int i = 0; i < RadioButList().Count; i++) { RadioButList().ElementAt(i).Content = mm.GetWordsQuest.ElementAt(i); } Main.LvL.Content = ForSerial.Lvl + ForSerial.sravnenieOstatka; Main.Progres.Value = Engl.Kateroris.DependencyPropertySub.LvlProgres; #region stars methodSTARS(); #endregion }
public object GetStringObject(Word w, List <Word> quest) { ModelMain Main = new ModelMain(); Main.GetWordsQuest = new List <string>(); if (lang == 1) { Main.L1 = "En"; Main.L2 = "Ru"; if (w.NumberPart == 7) { Main.GetWord = "to " + w.EN; if (w.SynonymsEn == null) { Main.GetSynonym = null; } else { Main.GetSynonym = "Синоним ( " + w.SynonymsEn + " )"; } } else { Main.GetWord = w.EN; if (w.SynonymsEn == null) { Main.GetSynonym = null; } else { Main.GetSynonym = "Синоним ( " + w.SynonymsEn + " )"; } } for (int i = 0; i < quest.Count; i++) { Main.GetWordsQuest.Add(quest.ElementAt(i).Ru.ToString()); } } else { Main.L1 = "Ru"; Main.L2 = "En"; Main.GetWord = w.Ru; if (w.SynonymsRu == null) { Main.GetSynonym = ""; } else { Main.GetSynonym = "Синоним ( " + w.SynonymsRu + " )"; } if (w.NumberPart == 7) { for (int i = 0; i < quest.Count; i++) { Main.GetWordsQuest.Add("to " + quest.ElementAt(i).EN.ToString()); } } else { for (int i = 0; i < quest.Count; i++) { Main.GetWordsQuest.Add(quest.ElementAt(i).EN.ToString()); } } } return(Main); }