protected void Page_Load(object sender, EventArgs e) { try { iBattery = (IBattery)ServiceAgent.getInstance().GetMaintainObjectByName<IBattery>(WebConstant.MaintainBatteryObject); if (!this.IsPostBack) { pmtMessage1 = this.GetLocalResourceObject(Pre + "_pmtMessage1").ToString(); pmtMessage2 = this.GetLocalResourceObject(Pre + "_pmtMessage2").ToString(); pmtMessage3 = this.GetLocalResourceObject(Pre + "_pmtMessage3").ToString(); pmtMessage4 = this.GetLocalResourceObject(Pre + "_pmtMessage4").ToString(); pmtMessage5 = this.GetLocalResourceObject(Pre + "_pmtMessage5").ToString(); pmtMessage6 = this.GetLocalResourceObject(Pre + "_pmtMessage6").ToString(); userName = Master.userInfo.UserId; //UserInfo.UserName; initLabel(); IList<BatteryDef> dataList; dataList = iBattery.GetAllBatteryInfoList(); bindTable(dataList, DEFAULT_ROWS); } } catch (FisException ex) { showErrorMessage(ex.mErrmsg); } catch (Exception ex) { showErrorMessage(ex.Message); } }
public AbstractComputer(ComputerType type, CPU cpu, RAM ram, IEnumerable<HardDrive> hardDrives, VideoCard videoCard, IBattery battery, IMotherboard motherBoard) { this.MachineType = type; this.Cpu = cpu; this.Ram = ram; this.HardDrives = hardDrives; //// TODO: BUG was here ////if (type != ComputerType.LAPTOP && type != ComputerType.PC) ////{ //// VideoCard.IsMonochrome = true; ////} this.VideoCard = videoCard; this.Battery = battery; this.Motherboard = motherBoard; }
public MobilePhone(IBattery battery, MobilePhoneManufacture manufacture) { Battery = battery; Manufacture = manufacture; }
public override void gm_remove(IBattery b) { elems.Remove(b); }
public StoreBatteryData(IBattery battery, ICrudProvider db) { this.battery = battery; this.db = db; }
public Laptop(ICPU cpu, IRAM ram, IVideoCard videoCard, RAID hardDriveRaid, IMotherboard motherBoard, IBattery battery) : base(cpu, ram, videoCard, hardDriveRaid, motherBoard) { this.battery = battery; }
//[1] 생성자의 매개 변수로 인터페이스 형식 지정 public Car(IBattery battery) { _battery = battery; // 넘어온 개체가 _battery 필드에 저장 }
public TrafficThreeLight(IBattery battery) { _battery = battery; _status = _battery.GetPowerState() == Power.On ? true : false; }
public static float CurrentBatteryUnits(this IBattery b) { return(b.EnergyContainer.CurrentAmount / ElectricityConstants.WattHoursPerBatteryBlock); }
public static int BatteryUnitCapacity(this IBattery b) { return(Math.Max(1, Mathf.RoundToInt(b.EnergyContainer.AvailableCapacity / ElectricityConstants.WattHoursPerBatteryBlock))); }
public Laptop(IRam ram, ICpu cpu, IEnumerable <IHardDrive> drives, IVideoCard videoCard, IBattery battery) : base(ram, cpu, drives, videoCard) { this.Battery = battery; }
public MobilePhone(string model, string manufacturer, decimal price, string owner, IBattery battery, IDisplay display) : this(model, manufacturer) { this.price = price; this.owner = owner; this.battery = battery; this.display = display; }
public OptionLaunchRockets(IBattery battery, ISystem consoleSystem) { _battery = battery; _consoleSystem = consoleSystem; }
public IComputer CreateComputer(ICPU cpu, IRam ram, IHardDrive hardDrives, IVideoCard videoCard, IBattery battery) { IComputer laptop = new Laptop(cpu, ram, hardDrives, videoCard, battery); return(laptop); }
public IPhone(IColor color, IBattery battery, IQuickCharge quickcharge) { _color = color; _battery = battery; _quickcharge = quickcharge; }
public BatteryProxy(IBattery master) { this.master = master; }
public Laptop(ICpu cpu, IRam ram, IEnumerable <IHardDrive> hardDrives, IVideoCard videoCard, IBattery battery) : base(cpu, ram, hardDrives, videoCard) { this.battery = battery; }
public abstract PortableDeviceBuilder Battery(IBattery battery);
public void SetBattery(IBattery battery) { string batteryName = battery.GetName(); Console.WriteLine(batteryName + "安装到BenChi车架"); }
public Radio(IBattery radioBattery, ITuner radioTuner, string radioName) { Battery = radioBattery; Tuner = radioTuner; Name = radioName; }
public Laptop(ICpu cpu, IRamMemory ram, IVideoCard videoCard, IEnumerable<IHardDrive> hardDrives, IBattery battery) : base(cpu, ram, videoCard, hardDrives) { this.Battery = battery; }
public LaptopMotherBoard(IRamMemory ram, ICpu cpu, IHardDrive hardDrive, IVideoCard videoCard, IBattery battery) : base(ram, cpu, hardDrive, videoCard) { this.Battery = battery; }
public void UseBattery(IBattery battery) { battery.Discharge(); }
public Laptop(AbstractComputer.ComputerType type, CPU cpu, RAM ram, IEnumerable<HardDrive> hardDrives, VideoCard videoCard, IBattery battery, IMotherboard motherBoard) : base(type, cpu, ram, hardDrives, videoCard, battery, motherBoard) { }
public static bool BatteryCheck(Pickupable pickupable) { EnergyMixin energyMixin = pickupable.gameObject.GetComponentInChildren <EnergyMixin>(); if (energyMixin != null) { GameObject gameObject = energyMixin.GetBattery(); bool defaultCheck = false; if (gameObject != null) { defaultCheck = energyMixin.defaultBattery == CraftData.GetTechType(gameObject); } if (gameObject == null && QModServices.Main.ModPresent("NoBattery")) { return(true); } if (gameObject != null && (defaultCheck || QModServices.Main.ModPresent("NoBattery"))) { IBattery battery = gameObject.GetComponent <IBattery>(); #if SUBNAUTICA TechData techData = CraftDataHandler.GetTechData(pickupable.GetTechType()); #elif BELOWZERO RecipeData techData = CraftDataHandler.GetRecipeData(pickupable.GetTechType()); #endif bool recipeCheck = techData.Ingredients.FindAll((ingredient) => ingredient.techType == TechType.Battery || ingredient.techType == TechType.PrecursorIonBattery || ingredient.techType == TechType.LithiumIonBattery || ingredient.techType == TechType.PowerCell || ingredient.techType == TechType.PrecursorIonPowerCell).Count == 0; if (battery != null && QModServices.Main.ModPresent("NoBattery") && recipeCheck) { ErrorMessage.AddMessage($"{pickupable.GetTechType().ToString()} has a battery in it. Cannot Recycle."); return(false); } else if (battery != null && defaultCheck && battery.charge > (battery.capacity * 0.99)) { return(true); } else { if (gameObject != null && !defaultCheck) { ErrorMessage.AddMessage($"{CraftData.GetTechType(gameObject).ToString()} is not the default battery for {pickupable.GetTechType().ToString()}."); } else { ErrorMessage.AddMessage($"{pickupable.GetTechType().ToString()} is not fully charged and cannot be recycled."); } return(false); } } else { if (gameObject != null) { ErrorMessage.AddMessage($"{CraftData.GetTechType(gameObject).ToString()} is not the default battery for {pickupable.GetTechType().ToString()}."); } else { ErrorMessage.AddMessage($"{pickupable.GetTechType().ToString()} has no battery."); } return(false); } } IBattery b2 = pickupable.GetComponent <IBattery>(); if (b2 != null) { if (b2.charge > (b2.capacity * 0.99)) { return(true); } else { ErrorMessage.AddMessage($"{pickupable.GetTechType().ToString()} is not fully charged and cannot be recycled."); return(false); } } return(true); }
public Laptop(IRam ram, ICpu cpu, IEnumerable<IHardDrive> drives, IVideoCard videoCard, IBattery battery) : base(ram, cpu, drives, videoCard) { this.Battery = battery; }
public override void gm_add(IBattery b) { elems.Add(b); }