示例#1
0
 public GSM(string phoneModel, string phoneManufacturer, decimal phonePrice, string phoneOwner, Battery myBattery, Display myDisplay)
     : this(phoneModel, phoneManufacturer, phonePrice)
 {
     this.OwnerName = phoneOwner;
     this.Battery = myBattery;
     this.Display = myDisplay;
 }
示例#2
0
文件: GSM.cs 项目: GAlex7/TA
 public GSM(string modelGSM, string manifactGSM)
 {
     this.Model = modelGSM;
     this.Manufacturer = manifactGSM;
     this.batteryCharacteristics = new Battery();
     this.displayCharacteristics = new Display();
     this.callHistory = new List<Call>();
 }
示例#3
0
 public GSM(string manufacturer, string model, string owner = null, double price = 0, Battery battery = null, Display display = null)
 {
     this.manufacturer = manufacturer;
     this.model = model;
     this.owner = owner;
     this.price = price;
     this.battery = battery;
     this.display = display;
 }
示例#4
0
文件: GSM.cs 项目: GAlex7/TA
 public GSM(string modelGSM, string manifactGSM, decimal priceGSM, string ownerGSM, Battery batt, Display displ)
     : this(modelGSM, manifactGSM)
 {
     this.Price = priceGSM;
     this.Owner = ownerGSM;
     this.batteryCharacteristics = batt;
     this.displayCharacteristics = displ;
     this.callHistory = new List<Call>();
 }
示例#5
0
 public GSM(string model, string manufacturer, double? price, string owner, Battery bat, Display disp)
 {
     this.model = model;
     this.manufacturer = manufacturer;
     this.price = price;
     this.owner = owner;
     this.phoneBat = bat;
     this.phoneDisp = disp;
 }
        static void Main()
        {
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

            Battery myBattery = new Battery("Bateria");
            Display myDisplay = new Display();
            GSM myGSM = new GSM("Nokia","Nokia", 100.23M, "Pesho",myBattery,myDisplay);
            string myGSMinfo = myGSM.ToString();
            Console.WriteLine(myGSMinfo);

            GSM mySecondGSM = GSM.IPhone4S;

            Console.WriteLine(mySecondGSM);

            GSMTest test = new GSMTest();
            test.Create4GSMs();

            GSMCallHistoryTest secondTest = new GSMCallHistoryTest();
            secondTest.CallHistoryTest();
        }
示例#7
0
 public string PrintMobileInfo(Battery battery, Display display)
 {
     string manufacturer = this.Manufacturer;
     string model = this.Model;
     string price = this.Price.ToString();
     string owner = this.Owner;
     this.CallHistory = new List<Call>();
     string mobileInfo = string.Format("Mobile Info:\nManufacturer:{0}\nModel: {1}\nPrice: {2}\nOwner: {3}", manufacturer, model, price, owner);
     string result = string.Format("{0} \nBattery info: {1}\nDisplay info: {2}", mobileInfo, battery.PrintInfoForBattery(), display.PrintInfoForDisplay());
     return result;
 }
示例#8
0
文件: GSM.cs 项目: molivpopov/Telerik
 public GSM(string model, string manifacturer, string owner, double price, Battery battery, Display display)
     : this(model, manifacturer, owner, price)
 {
     this.Battery = battery;
     this.Display = display;
 }
示例#9
0
文件: GSM.cs 项目: molivpopov/Telerik
 public GSM(string model, string manifacturer, Battery battery, Display display)
     : this(model, manifacturer, battery)
 {
     this.Display = display;
 }
示例#10
0
文件: GSM.cs 项目: molivpopov/Telerik
 public GSM(string model, string manifacturer, Display display)
     : this(model, manifacturer)
 {
     this.Display = display;
 }
示例#11
0
 static void Main(string[] args)
 {
     Battery battery1 = new Battery("asdasasd", "asdasdasd", "asdasdas", BatteryType.LIon);
     Display display1 = new Display("10x10", "Niggerian");
     GSM     number1  = new GSM("samsung", "galaxy", 300, "Shefa", battery1, display1);
 }
示例#12
0
 public GSM(string model = null, string manufacturer = null, decimal price = 0, string owner = null, Battery battery = null, Display display = null)
 {
     this.Model        = model;
     this.Manufacturer = manufacturer;
     this.Price        = price;
     this.Owner        = owner;
     this.Battery      = battery;
     this.Display      = display;
 }