예제 #1
0
        public static void Main()
        {
            var tests = new GsmTests();
            tests.DisplayGsmInformation();

            var call = new Call(new DateTime(2015, 09, 15, 12, 54, 6), "0456-345-33", 390);
            Console.WriteLine(call.ToString());

            var callTest = new GsmCallHistoryTest();
            callTest.Functionality();
        }
예제 #2
0
        static void Main(string[] args)
        {
            List<MobilePhone> mobilePhones = new List<MobilePhone>();
            mobilePhones.Add(new MobilePhone("1020C", "Nokia", 1299.99m, "Jhon Dow", new Battery("2307", 15, 5, BatteryType.LiIon), new Display(new DisplaySize(1980, 1024), 65000000)));
            mobilePhones.Add(new MobilePhone("Galaxy NOTE", "Samsung"));
            mobilePhones.Add(new MobilePhone("AishE", "Nokia", 299.90m, battery: new Battery()));
            mobilePhones.Add(new MobilePhone("1020C", "Nokia", 1299.99m, display: new Display(new DisplaySize(1980, 1024), 65000000)));

            foreach (var phone in mobilePhones)
            {
                Console.WriteLine(phone);
            }

            Console.WriteLine(mobilePhones[0].IPhone4SInfo);
            Console.WriteLine(mobilePhones[1].IPhone4SInfo);

            Call call = new Call(DateTime.Now, DateTime.Now.AddSeconds(177), "Pesho");

            CallHistoryTest.Test();
        }
예제 #3
0
 public void DeleteCalls(Call call)
 {
     this.callHistory.Remove(call);
 }
예제 #4
0
 public void AddCalls(Call call)
 {
     this.callHistory.Add(call);
 }
예제 #5
0
 //task10
 public void Adding(Call calling)
 {
     CallHistory.Add(calling);
 }
예제 #6
0
 public void DeleteCall(Call currentCall)
 {
     this.callHistory.Remove(currentCall);
 }
예제 #7
0
 public void AddCall(Call currentCall)
 {
     this.callHistory.Add(currentCall);
 }
예제 #8
0
 public bool DelCall(Call call)
 {
     return CallHistory.Remove(call);
 }
예제 #9
0
 // 10. Add methods in the GSM class for adding and deleting calls
 //     from the calls history. Add a method to clear the call history.
 public void AddCall(Call call)
 {
     CallHistory.Add(call);
 }
예제 #10
0
 // Methods that handle calls in the call history - Add/Remove(via duration ^ number), Clear
 public void AddCallToHistory(string number, int duration)
 {
     Call newCall = new Call(DateTime.Now,number,duration);
      callHistory.Add(newCall);
 }
예제 #11
0
파일: GSM.cs 프로젝트: KirilToshev/Projects
 public void AddCall(DateTime date, TimeSpan time, int number, int duration)
 {
     Call call = new Call(date, time, number, duration);
     this.callHistory.Add(call);
 }
 public void AddCall(string number, int duration)
 {
     Call newCall = new Call(number, duration);
     this.callHistory.Add(newCall);
 }