private void getTimers() { nonActiveTimers.Clear(); var linq = (from x in context.Timers where x.Name_Id.Contains(tb_keres.Text) select x).ToList(); foreach (var item in linq) { if (item.Theme == 1) { MoodleTestTimer temp = new MoodleTestTimer { MP = item.SEC, Név = item.Name_Id }; temp.init(); nonActiveTimers.Add(temp); } else if (item.Theme == 2) { MoodleTaskTimer temp = new MoodleTaskTimer { MP = item.SEC, Név = item.Name_Id }; temp.init(); nonActiveTimers.Add(temp); } } }
public override object Clone() { MoodleTaskTimer stop = new MoodleTaskTimer() { MP = this.MP, Név = this.Név, Player = this.Player }; stop.init(); return(stop); }