Пример #1
0
        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);
                }
            }
        }
Пример #2
0
        public override object Clone()
        {
            MoodleTestTimer stop = new MoodleTestTimer()
            {
                MP     = this.MP,
                Név    = this.Név,
                Player = this.Player
            };

            stop.init();
            return(stop);
        }