Esempio n. 1
0
        private static void CreateInstances()
        {
            gsmInstances = new List <GSM>();

            GSM gsm = new GSM("Sony Experia", "Sony");

            gsmInstances.Add(gsm);

            gsm = new GSM("Lumnia", "Nokia", 50M, null, new Battery(null, 26, 15));
            gsmInstances.Add(gsm);

            gsm = new GSM("Galaxy 6", "Samsung", 1000M, "Gerasimo", null, new Display(7, 200000000));
            gsmInstances.Add(gsm);
        }
Esempio n. 2
0
        public static void AddCalls()
        {
            gsm = new GSM("Lumnia", "Nokia");

            var call = new Call(new DateTime(2015, 05, 14, 13, 20, 15), "+359889966543", 260);

            gsm.AddCall(call);

            call = new Call(new DateTime(2014, 06, 20, 05, 13, 16), "+359889966654", 15);
            gsm.AddCall(call);

            call = new Call(new DateTime(2013, 07, 16, 15, 13, 12), "+359889966654", 220);
            gsm.AddCall(call);

            gsm.CallHistory = gsm.CallHistory.OrderBy(o => o.Date).ToList();
        }