コード例 #1
0
ファイル: Battery.cs プロジェクト: plwh/TelerikHomework
 public Battery(string model, int hoursIdle, int hoursTalk,BatteryTypes batteryType)
 {
     this.Model = model;
     this.IdleHours = hoursIdle;
     this.TalkHours = hoursTalk;
     this.BatteryType = batteryType;
 }
コード例 #2
0
 public Battery(string model, BatteryTypes batteryType)
 {
     this.model       = model;
     this.batteryType = batteryType;
     this.idleTime    = 0;
     this.hoursTalk   = 0;
 }
コード例 #3
0
ファイル: Battery.cs プロジェクト: ithhlvn/C-Sharp-OOP
 //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
ファイル: Battery.cs プロジェクト: RossyB/RossyTelerikAcademy
 public Battery(string model, BatteryTypes batteryType, float?hoursIdle, float?hoursTalk)
 {
     this.Model       = model;
     this.BatteryType = batteryType;
     this.HoursIdle   = hoursIdle;
     this.HoursTalk   = hoursTalk;
 }
コード例 #5
0
ファイル: Battery.cs プロジェクト: niki-funky/Telerik_Academy
 //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
ファイル: Battery.cs プロジェクト: NikolaPineda/Telerik
 public Battery(string model, uint idle, uint talk, BatteryTypes batteryType)
 {
     Model = model;
     howersIdle = idle;
     howersTalk = talk;
     BatteryTipe = batteryType;
 }
コード例 #8
0
ファイル: Battery.cs プロジェクト: nexusstar/Telerik
 //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
ファイル: Battery.cs プロジェクト: damy90/Telerik-all
 public Battery(string model, double hoursIdle, double hoursTalk, BatteryTypes type)
 {
     this.Model = model;
     this.HoursIdle = hoursIdle;
     this.HoursTalk = hoursTalk;
     this.BatteryType = batteryType;
 }
コード例 #13
0
ファイル: Battery.cs プロジェクト: enchev-93/Telerik-Academy
 public Battery(string model, double idle, double talk, BatteryTypes type)
 {
     this.Model = model;
     this.HoursIdle = idle;
     this.hoursTalk = talk;
     this.Type = type;
 }
コード例 #14
0
ファイル: GSM.cs プロジェクト: Ico0/TelerikAcademy
 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
ファイル: Battery.cs プロジェクト: velev1/Telerik-Academy
 public Battery(string setModel, Manufacturers setManifacturer, BatteryTypes setBatteryType, int setHoursIdle, int setHoursTalk)
     : this(setModel, setManifacturer, setBatteryType)
 {
     this.HoursIdle = setHoursIdle;
     this.HoursTalk = setHoursTalk;
 }
コード例 #19
0
ファイル: Battery.cs プロジェクト: velev1/Telerik-Academy
 public Battery(string setModel, Manufacturers setManifacturer, BatteryTypes setBatteryType)
     : this(setModel, setManifacturer)
 {
     this.batteryType = setBatteryType;
 }
コード例 #20
0
ファイル: Battery.cs プロジェクト: kikooo52/C-Programs
 public Battery(string BatteryModel, int HoursIdle, BatteryTypes BateryTypes)
 {
     this._batteryType = BatteryType;
     this.batteryModel = BatteryModel;
     this.hoursIdle = HoursIdle;
 }
コード例 #21
0
ファイル: GSM.cs プロジェクト: IvanGrigorov/OOP
 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
ファイル: Battery.cs プロジェクト: Ico0/TelerikAcademy
 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
ファイル: Battery.cs プロジェクト: IvanGrigorov/OOP
 public Battery(BatteryTypes model)
 {
     this.model     = model;
     this.hourIdle  = null;
     this.hoursTalk = null;
 }
コード例 #27
0
ファイル: Battery.cs プロジェクト: Ico0/TelerikAcademy
 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
ファイル: Battery.cs プロジェクト: IvanGrigorov/OOP
 public Battery(BatteryTypes model, int hourIdle, int hoursTalk)
 {
     this.model     = model;
     this.hourIdle  = hourIdle;
     this.hoursTalk = hoursTalk;
 }
コード例 #30
0
ファイル: Battery.cs プロジェクト: rilrai/VRSN.Labs
 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
ファイル: Battery.cs プロジェクト: niki-funky/Telerik_Academy
        //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
ファイル: Battery.cs プロジェクト: RossyB/RossyTelerikAcademy
 //constructors
 public Battery(string model, BatteryTypes batteryType)
     : this(model, batteryType, null, null)
 {
 }
コード例 #35
0
 public Battery(BatteryTypes batteryType, double? hoursIdle, double? hoursTalk)
     : this(batteryType)
 {
     this.HoursIdle = hoursIdle;
     this.HoursTalk = hoursTalk;
 }
コード例 #36
0
 public Battery(string model, BatteryTypes batteryType, double? hoursIdle, double? hoursTalk)
     : this(batteryType, hoursIdle, hoursTalk)
 {
     this.Model = model;
 }
コード例 #37
0
ファイル: Battery.cs プロジェクト: aPisC/JxBP_2019
 // Update is called once per frame
 void Update()
 {
     BatteryType = (BatteryTypes)lazer.GetComponent <LaserHeadMovement>().IntensityId;
 }
コード例 #38
0
 public Battery(BatteryTypes batteryType)
 {
     this.BatteryType = batteryType;
 }