Пример #1
0
 public Battery(string model, int hoursIdle, int hoursTalk,BatteryTypes batteryType)
 {
     this.Model = model;
     this.IdleHours = hoursIdle;
     this.TalkHours = hoursTalk;
     this.BatteryType = batteryType;
 }
 public Battery(string model, BatteryTypes batteryType)
 {
     this.model       = model;
     this.batteryType = batteryType;
     this.idleTime    = 0;
     this.hoursTalk   = 0;
 }
Пример #3
0
 //Full constructor taking 3 parameters - model, hours idle and hours talk
 public Battery(string model, double idle, double talk, BatteryTypes type)
 {
     this.Model     = model;
     this.HoursIdle = idle;
     this.HoursTalk = talk;
     this.Type      = type;
 }
Пример #4
0
 public Battery(string model, BatteryTypes batteryType, float?hoursIdle, float?hoursTalk)
 {
     this.Model       = model;
     this.BatteryType = batteryType;
     this.HoursIdle   = hoursIdle;
     this.HoursTalk   = hoursTalk;
 }
Пример #5
0
 //defining constructors
 //constructor with all fields
 public Battery(string model, int? idleHours, int? talkHours, BatteryTypes type)
 {
     this.Model = model;
     this.hoursIdle = idleHours;
     this.hoursTalk = talkHours;
     this.batteryType = type;
 }
Пример #6
0
 public BatteryBasic(bool builtinb, int capacity, bool wirelesschargeb, BatteryTypes batterytype)
 {
     Builtinb      = builtinb;
     Capacity      = capacity;
     Wirelesschrgb = wirelesschargeb;
     BatteryType   = batterytype;
 }
Пример #7
0
 public Battery(string model, uint idle, uint talk, BatteryTypes batteryType)
 {
     Model = model;
     howersIdle = idle;
     howersTalk = talk;
     BatteryTipe = batteryType;
 }
Пример #8
0
 //define constructor with input
 public Battery(string model, uint? hoursIdle, uint? hoursTalk, BatteryTypes? batteryType)
 {
     this.Model = model;
     this.HoursIdle = hoursIdle;
     this.HoursTalk = hoursTalk;
     this.BatteryType = batteryType;
 }
Пример #9
0
 public Battery(string model, double idleTime, double talkHours, BatteryTypes battery)
 {
     this.model       = model;
     this.idleTime    = idleTime;
     this.talkHours   = talkHours;
     this.batteryType = battery;
 }
Пример #10
0
 public Battery(int capacity, string voltage, string maxAmpDraw, BatteryTypes batteryType)
 {
     Capacity    = capacity;
     Voltage     = voltage;
     MaxAmpDraw  = maxAmpDraw;
     BatteryType = batteryType;
 }
Пример #11
0
 public Battery()
 {
     this.model       = null;
     this.hourseIdle  = 0;
     this.hoursTalk   = 0;
     this.batteryType = 0;
 }
Пример #12
0
 public Battery(string model, double hoursIdle, double hoursTalk, BatteryTypes type)
 {
     this.Model = model;
     this.HoursIdle = hoursIdle;
     this.HoursTalk = hoursTalk;
     this.BatteryType = batteryType;
 }
Пример #13
0
 public Battery(string model, double idle, double talk, BatteryTypes type)
 {
     this.Model = model;
     this.HoursIdle = idle;
     this.hoursTalk = talk;
     this.Type = type;
 }
Пример #14
0
 public GSM(string model, string manifacturer, double price, string owner, BatteryTypes batteryType, decimal batteryHoursIdle, decimal batteryHoursTalk, double displaySize, long displayColors)
 {
     this.Model        = model;
     this.Manifacturer = manifacturer;
     this.Price        = price;
     this.Owner        = owner;
     this.myBattery    = new Battery(batteryType, batteryHoursIdle, batteryHoursTalk);
     this.myDisplay    = new Display(displaySize, displayColors);
 }
Пример #15
0
        public static BatteryTypes getNextConfigKey(BatteryTypes config)
        {
            int nextIdx = Configurations.IndexOfKey(config) + 1;

            if (nextIdx >= Configurations.Count)
            {
                nextIdx = 0;
            }

            return(Configurations.Keys[nextIdx]);
        }
Пример #16
0
        public static string getBatteryTypesFriendlyName(BatteryTypes theType)
        {
            switch (theType)
            {
            case BatteryTypes.CFG_lead_acid: return("Lead Acid");

            case BatteryTypes.CFG_lead_acid_singleUse: return("Single use Lead Acid");

            case BatteryTypes.CFG_li_ion: return("Li Ion");

            default: return("unknown");
            }
        }
Пример #17
0
        public static BatteryConfig GetConfig(BatteryTypes config)
        {
            PopulateConfig();

            BatteryConfig retCfg = new BatteryConfig();

            if (!Configurations.ContainsKey(config))
            {
                retCfg.isPopulated = false;
                Debug.Log("RealBattery: Warning, config is not populated!");
            }
            else
            {
                retCfg             = Configurations[config];
                retCfg.isPopulated = true;
            }

            return(retCfg);
        }
Пример #18
0
 public Battery(string setModel, Manufacturers setManifacturer, BatteryTypes setBatteryType, int setHoursIdle, int setHoursTalk)
     : this(setModel, setManifacturer, setBatteryType)
 {
     this.HoursIdle = setHoursIdle;
     this.HoursTalk = setHoursTalk;
 }
Пример #19
0
 public Battery(string setModel, Manufacturers setManifacturer, BatteryTypes setBatteryType)
     : this(setModel, setManifacturer)
 {
     this.batteryType = setBatteryType;
 }
Пример #20
0
 public Battery(string BatteryModel, int HoursIdle, BatteryTypes BateryTypes)
 {
     this._batteryType = BatteryType;
     this.batteryModel = BatteryModel;
     this.hoursIdle = HoursIdle;
 }
Пример #21
0
 public GSM(string model, string manifacturer, string owner, int price, int size, int colorNumber, BatteryTypes batteryModel, int hoursIdle, int hoursTalk)
 {
     this.Model        = model;
     this.Manifacturer = manifacturer;
     this.Owner        = owner;
     this.Price        = price;
     display           = new Display(size, colorNumber);
     battery           = new Battery(batteryModel, hoursIdle, hoursTalk);
 }
Пример #22
0
 public Battery(BatteryTypes batteryType, int batteryCapacity, string manufacturerName)
 {
     BatteryType      = batteryType;
     BatteryCapacity  = batteryCapacity;
     ManufacturerName = manufacturerName;
 }
Пример #23
0
 public Battery(BatteryTypes batteryType, decimal hoursIdle, decimal hoursTalk)
 {
     this.BatteryType = batteryType;
     this.HoursIdle   = hoursIdle;
     this.HoursTalk   = hoursTalk;
 }
Пример #24
0
 public Battery(BatteryModels _bateryModel, BatteryTypes _batteryTypes, int _idleTime, int _talkTime)
 {
     BatteryModel = _bateryModel;
     IdleTime     = _idleTime;
     TalkTime     = _talkTime;
 }
Пример #25
0
 public Battery(string BatteryModel, int HoursIdle, BatteryTypes BateryTypes)
 {
     this._batteryType = BatteryType;
     this.batteryModel = BatteryModel;
     this.hoursIdle    = HoursIdle;
 }
Пример #26
0
 public Battery(BatteryTypes model)
 {
     this.model     = model;
     this.hourIdle  = null;
     this.hoursTalk = null;
 }
Пример #27
0
 public Battery(BatteryTypes batteryType, decimal hoursIdle) : this(batteryType, hoursIdle, 0)
 {
 }
Пример #28
0
 public Battery(BatteryTypes model, int hoursIdle, int hoursTalk)
 {
     this.model = model;
     this.hoursIdle = hoursIdle;
     this.hoursTalk = hoursTalk;
 }
Пример #29
0
 public Battery(BatteryTypes model, int hourIdle, int hoursTalk)
 {
     this.model     = model;
     this.hourIdle  = hourIdle;
     this.hoursTalk = hoursTalk;
 }
Пример #30
0
 public Battery(BatteryTypes type, int capacity, bool isRemovable)
 {
     Type        = type;
     Capacity    = capacity;
     IsRemovable = isRemovable;
 }
Пример #31
0
 public BatteryBase(BatteryTypes batteryType, int batteryCapacityMAh)
 {
     vBatteryType        = batteryType;
     vBatteryCapacityMAh = batteryCapacityMAh;
 }
Пример #32
0
 public Battery(string model, int hourseIdle, int hoursTalk, BatteryTypes batteryType)
     : this(model, hourseIdle, hoursTalk)
 {
     this.batteryType = batteryType;
 }
Пример #33
0
        //constructor only with model and type fields
        //and setting hours to be null
        public Battery(string model, BatteryTypes type)
            : this(model, null, null, type)
        {

        }
Пример #34
0
 //constructors
 public Battery(string model, BatteryTypes batteryType)
     : this(model, batteryType, null, null)
 {
 }
 public Battery(BatteryTypes batteryType, double? hoursIdle, double? hoursTalk)
     : this(batteryType)
 {
     this.HoursIdle = hoursIdle;
     this.HoursTalk = hoursTalk;
 }
 public Battery(string model, BatteryTypes batteryType, double? hoursIdle, double? hoursTalk)
     : this(batteryType, hoursIdle, hoursTalk)
 {
     this.Model = model;
 }
Пример #37
0
 // Update is called once per frame
 void Update()
 {
     BatteryType = (BatteryTypes)lazer.GetComponent <LaserHeadMovement>().IntensityId;
 }
 public Battery(BatteryTypes batteryType)
 {
     this.BatteryType = batteryType;
 }