/// <summary> /// 添加USB设备 /// </summary> /// <param name="usb">USB设备</param> public void AddUSBDevice(USB usb) { if (this.MainBoardUSBList.Count < this.MainBoardUSBList.Capacity) { this.MainBoardUSBList.Add(usb); } }
/// <summary> /// 主板供电,CPU、内存、硬盘、USB设备、显卡初始化 /// </summary> public void MainBoardPowerOn() { Memory mainBoardMemory1 = new Memory("Memory1", "Memory"); Memory mainBoardMemory2 = new Memory("Memory2", "Memory"); HardDisk hardDisk1 = new HardDisk("HardDisk1", "HardDisk"); HardDisk hardDisk2 = new HardDisk("HardDisk2", "HardDisk"); HardDisk hardDisk3 = new HardDisk("HardDisk3", "HardDisk"); USB mainBoardMouse = new USB("Mouse1", "USB"); USB mainBoardKeyBoard = new USB("KeyBoard1", "USB"); GraphicsCard mainBoardGraphicsCard1 = new GraphicsCard("GraphicsCard1", "GraphicsCard"); GraphicsCard mainBoardGraphicsCard2 = new GraphicsCard("GraphicsCard2", "GraphicsCard"); //CPU、内存、硬盘、USB设备、显卡初始化 this.mainBoardCPU = new CPU("CPU1", "CPU"); this.mainBoardMemoryList.Add(mainBoardMemory1); this.mainBoardMemoryList.Add(mainBoardMemory2); this.mainBoardHardDiskList.Add(hardDisk1); this.mainBoardHardDiskList.Add(hardDisk2); this.mainBoardHardDiskList.Add(hardDisk3); this.mainBoardUSBList.Add(mainBoardMouse); this.mainBoardUSBList.Add(mainBoardKeyBoard); this.mainBoardGraphicsCardList.Add(mainBoardGraphicsCard1); this.mainBoardGraphicsCardList.Add(mainBoardGraphicsCard2); }
/// <summary> /// 移除USB设备 /// </summary> /// <param name="usb">USB设备</param> public void RemoveUSBDevice(USB usb) { this.MainBoardUSBList.Remove(usb); }