예제 #1
0
        protected List <DriveBay> GetBayStatuses()
        {
            List <DriveBay> list     = new List <DriveBay>();
            DriveBayHW      instance = DriveBayHW.GetInstance();

            if (instance != null)
            {
                foreach (DriveBay driveBay in this.bays)
                {
                    DriveBay driveBay2 = new DriveBay();
                    driveBay2.Number      = driveBay.Number;
                    driveBay2.ControlPort = driveBay.ControlPort;
                    driveBay2.Power       = true;
                    driveBay2.Present     = true;
                    driveBay2.DrivePort   = (DrivePort)driveBay.DrivePort.Clone();
                    driveBay2.Status      = DriveBayStatusEnum.DRIVE_BAY_NONE;
                    driveBay2.OldDrive    = null;
                    driveBay2.IsBoot      = driveBay.IsBoot;
                    driveBay2.BootIndex   = driveBay.BootIndex;
                    driveBay2.RaidVolume  = driveBay.RaidVolume;
                    driveBay2.SpacesPool  = driveBay2.SpacesPool;
                    instance.GetBayStatus(ref driveBay2);
                    list.Add(driveBay2);
                }
            }
            return(list);
        }
예제 #2
0
        public void SetPower(bool on)
        {
            DriveBayHW instance = DriveBayHW.GetInstance();

            if (instance != null && instance.SetBayPower(this, on))
            {
                this.power = on;
            }
        }