public UserPanel( IMotherboard motherboard, IWashProgramFactory programFactory) { _motherboard = motherboard; _programFactory = programFactory; }
public IPc GetPc( ICpu cpu, IEnumerable<IHardDrive> hardDrives, IMotherboard motherboard) { return new Pc(cpu, hardDrives, motherboard); }
public Server( ICpu cpu, IEnumerable<IHardDrive> hardDrives, IMotherboard motherboard) : base(cpu, hardDrives, motherboard) { }
public WashTunnel( IMotherboard motherboard, IWashStepNotifier notifier) { _motherboard = motherboard; _state = new FreeState(this, notifier); }
public IServer GetServer( ICpu cpu, IEnumerable<IHardDrive> hardDrives, IMotherboard motherboard) { return new Server(cpu, hardDrives, motherboard); }
public void LoadData([NotNull] IMotherboard motherboard, [NotNull] ITool tool, IBios selectedBios = null) { _motherboard = motherboard ?? throw new ArgumentNullException(nameof(motherboard));; _tool = tool ?? throw new ArgumentNullException(nameof(tool)); txtMotherboard.Text = motherboard.Name; txtMotherboardVersion.Text = motherboard.Version; txtMotherboardDescription.Text = motherboard.Description; txtTool.Text = tool.Name; txtToolVersion.Text = tool.Version; { BiosRowData[] bioses = _model .Bioses .Where(x => x.MotherboardIds.Contains(motherboard.Id)) .OrderBy(x => x.Name) .Select(x => new BiosRowData(x)) .ToArray(); ddlBioses.Items.Clear(); ddlBioses.Items.AddRange(bioses); if (selectedBios == null) { ddlBioses.SelectedItem = bioses.FirstOrDefault(); } else { ddlBioses.SelectedItem = bioses.First(x => x.Source.Equals(selectedBios)); } } }
public CentralProcessingUnit(byte numberOfCores, byte numberOfBits, IMotherboard motherboard) { this.numberOfBits = numberOfBits; this.NumberOfCores = numberOfCores; this.MotherBoard = motherboard; this.random = new Random(); }
public Laptop(IMotherboard motherboard, Cpu cpu, HardDriveComponent hardDrive, LaptopBattery laptopBattery) { this.Motherboard = motherboard; this.Cpu = cpu; this.HardDrive = hardDrive; this.LaptopBattery = laptopBattery; }
public void Dump([NotNull] IMotherboard motherboard, [NotNull] ITool tool, bool autoExecuteScript) { if (motherboard == null) { throw new ArgumentNullException(nameof(motherboard)); } if (tool == null) { throw new ArgumentNullException(nameof(tool)); } string path = GetTempFolderPath(); FileInfo toolFi = new FileInfo(tool.FileName); FileInfo tempBatFi = new FileInfo(Path.Combine(path, "dump.bat")); string dumpFileName = $"{motherboard.Id}-{DateTime.Now:yyyyMMdd-HHmmss}.rom"; ZipFile.ExtractToDirectory(toolFi.FullName, path); using TextWriter writer = new StreamWriter(tempBatFi.FullName); WriteScriptHeader(motherboard, tool, writer); writer.WriteLine(string.Format(tool.DumpCommand, dumpFileName)); WriteScriptFooter(writer); ProcessStart(path); if (autoExecuteScript) { ProcessStart(tempBatFi.FullName); } }
public void Flash([NotNull] IMotherboard motherboard, [NotNull] IBios bios, [NotNull] ITool tool, bool autoExecuteScript) { if (motherboard == null) { throw new ArgumentNullException(nameof(motherboard)); } if (bios == null) { throw new ArgumentNullException(nameof(bios)); } if (tool == null) { throw new ArgumentNullException(nameof(tool)); } string path = GetTempFolderPath(); FileInfo toolFi = new FileInfo(tool.FileName); FileInfo tempBatFi = new FileInfo(Path.Combine(path, "flash.bat")); string flashFileName = Path.GetFileNameWithoutExtension(bios.FileName); ZipFile.ExtractToDirectory(toolFi.FullName, path); ZipFile.ExtractToDirectory(bios.FileName, path); using TextWriter writer = new StreamWriter(tempBatFi.FullName); WriteScriptHeader(motherboard, bios, tool, writer); writer.WriteLine(string.Format(tool.FlashCommand, flashFileName)); WriteScriptFooter(writer); ProcessStart(path); if (autoExecuteScript) { ProcessStart(tempBatFi.FullName); } }
public void PowerOnAndInitBios(IMotherboard motherboard) { PowerSupply.Start(); ComputerBoxFan.Start(); motherboard.Start(); motherboard.Bios.Start(motherboard); Console.WriteLine("***** Turned on Computer ******"); }
protected Computer(ICPU cpu, IRAM ram, IVideoCard videoCard, RAID hardDriveRaid, IMotherboard motherBoard) { this.cpu = cpu; this.ram = ram; this.videoCard = videoCard; this.hardDriveRaid = hardDriveRaid; this.motherBoard = motherBoard; }
protected Computer(CentralProcessingUnit cpu, RandomAcessMemory ram, IEnumerable<HardDriver> hardDrives, IVideoCard videoCard, IMotherboard motherBoard) { this.CentralProcessingUnit = cpu; this.RandomAcessMemory = ram; this.HardDrives = hardDrives; this.VideoCard = videoCard; this.MotherBoard = motherBoard; }
public ILaptop GetLaptop( ICpu cpu, IEnumerable<IHardDrive> hardDrives, IMotherboard motherboard, ILaptopBattery battery) { return new Laptop(cpu, hardDrives, motherboard, battery); }
public Computer(ICPU cPU, IVGA vGA = null, IMotherboard motherboard = null, RAM rAM = null, PSU pSU = null) { CPU = cPU; VGA = vGA; Motherboard = motherboard; RAM = rAM; PSU = pSU; }
public Cpu(byte numberOfCores, byte numberOfBits, IMotherboard motherboard, Random random) { // TODO: validate. this.numberOfBits = numberOfBits; this.NumberOfCores = numberOfCores; this.motherboard = motherboard; this.Random = random; }
public SmartWashTunnel( IWashTunnel washTunnel, IMotherboard motherboard, IDirtinessSensor sensor) { _washTunnel = washTunnel; _motherboard = motherboard; _sensor = sensor; }
public Laptop( ICpu cpu, IEnumerable<IHardDrive> hardDrives, IMotherboard motherboard, ILaptopBattery battery) : base(cpu, hardDrives, motherboard) { this.Battery = battery; }
public Computer(ComputerType type, IMotherboard motherboard, Cpu cpu, Ram ram, IEnumerable<HardDrive> hardDrives, IVideoCard videoCard) { // TODO: validate this.Cpu = cpu; this.Ram = ram; this.HardDrives = hardDrives; this.VideoCard = videoCard; this.Motherboard = motherboard; }
public void LoadData(IMotherboard motherboard) { Motherboard = new MotherboardRowData(motherboard ?? throw new ArgumentNullException(nameof(motherboard))); picMotherboard.ImageLocation = Motherboard.Images.FirstOrDefault()?.Url; txtId.Text = Motherboard.Id; txtName.Text = Motherboard.Name; txtBrand.Text = Motherboard.Brand; txtModel.Text = Motherboard.Model; txtVersion.Text = Motherboard.Version; txtTags.Text = Motherboard.TagsString; txtDescription.Text = Motherboard.Description; { List <ITool> tools = _model.Tools.Where(x => motherboard.ToolIds.Contains(x.Id)).ToList(); flpTools.Controls.Clear(); foreach (ITool item in tools) { ITool tool = item; LinkLabel lbl = new LinkLabel() { Text = tool.Name, AutoSize = true, Anchor = AnchorStyles.Left | AnchorStyles.Right }; flpTools.Controls.Add(lbl); lbl.Click += (s, a) => { ToolSelected?.Invoke(this, tool); }; } } grdImages.DataSource = motherboard.Images.Select(x => new { x.Name, x.Url, Image = new Bitmap(x.Url) }).ToList(); grdImages.AutoResizeColumns(); grdBioses.DataSource = new GenericBindingList <BiosRowData> ( _model .Bioses .Where(x => x.MotherboardIds.Contains(motherboard.Id)) .Select(x => new BiosRowData(x)) ); grdBioses.AutoResizeColumns(); grdLinks.DataSource = motherboard.Links; grdLinks.AutoResizeColumns(); }
public Computer(Cpu cpu, Ram ram, IStorageDevice storage, VideoCard videoCard) { this.CPU = cpu; this.Ram = ram; this.StorageDevice = storage; this.VideoCard = videoCard; this.motherboard = new Motherboard(this.CPU, this.Ram, VideoCard); }
public Computer( ICpu cpu, IEnumerable<IHardDrive> hardDrives, IMotherboard motherboard) { this.Cpu = cpu; this.HardDrives = hardDrives; this.Motherboard = motherboard; }
internal Computer(IRam ram, ICpu cpu, IEnumerable <IHardDrive> drives, IVideoCard videoCard) { this.Ram = ram; this.Cpu = cpu; this.Drives = drives; this.VideoCard = videoCard; this.motherboard = new Motherboard(ram, cpu, videoCard); }
public void Start(IMotherboard element) { Console.WriteLine("***** Turned on BIOS ******"); PrintBiosVersion(); element.CpuFan.Start(); element.Cpu.Start(); element.Ram.Start(); element.SolidStateDrive.Start(); element.Gpu.Start(); element.Gpu.InitializeProcessingUnit(); }
public Computer( IProcessor <T> Cpu, IMotherboard <T> Board, IPrimaryMemory <T> Ram, ISecondaryMemory <T> Harddrive ) { _cpu = Cpu; _board = Board; _ram = Ram; _harddrive = Harddrive; }
private void WriteScriptHeader(IMotherboard motherboard, IBios bios, ITool tool, TextWriter writer) { writer.WriteLine("@echo off"); writer.WriteLine($":: {nameof(Mi899)} - {DateTime.Now:yyyy.MM.dd} {DateTime.Now:HH:mm:ss}"); writer.WriteLine($":: Motherboard: {motherboard.Name} {motherboard.Version}"); if (bios != null) { writer.WriteLine($":: BIOS: {bios.Name}"); } writer.WriteLine($":: Tool: {tool.Name} {tool.Version}"); writer.WriteLine(); writer.WriteLine("cd /d %~dp0"); }
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 Computer ( IMotherboard motherboard, IRam ram, IGraphicsCard graphicsCard, IHardDiskDrive hdd, ICPU cpu ) { this.motherboard = motherboard; this.ram = ram; this.graphicsCard = graphicsCard; this.hdd = hdd; this.cpu = cpu; }
public IBios AddBiosFromFile([NotNull] IMotherboard motherboard, [NotNull] string fileName) { if (motherboard == null) { throw new ArgumentNullException(nameof(motherboard)); } if (fileName == null) { throw new ArgumentNullException(nameof(fileName)); } FileInfo fi = new FileInfo(fileName); if (!fi.Exists) { throw new FileNotFoundException("File not found", fi.FullName); } Bios oldBios = _bioses.FirstOrDefault(x => fi.FullName.Equals(x.FileName, StringComparison.OrdinalIgnoreCase)); Bios newBios = new Bios() { Name = fi.Name, FileName = fi.FullName, IsZipped = false, Description = "User selected file", Properties = new Dictionary <string, string>() { { "Path", fi.FullName } }, MotherboardIds = new string[] { motherboard.Id }, Chipsets = new string[0] }; if (oldBios != null) { _bioses.Remove(oldBios); } _bioses.Add(newBios); return(newBios); }
public Laptop(CentralProcessingUnit cpu, RandomAcessMemory ram, IEnumerable<HardDriver> hardDrives, IVideoCard videoCard, IMotherboard motherBoard, LaptopBattery battery) : base(cpu, ram, hardDrives, videoCard, motherBoard) { this.LaptopBattery = battery; }
public void AttachTo(IMotherboard motherboard) { this.Motherboard = motherboard; }
public Laptop(Cpu cpu, StorageProvider storageProvider, IMotherboard motherboard, LaptopBattery battery) : base(cpu, storageProvider, motherboard) { this.Battery = battery; }
private void WriteScriptHeader(IMotherboard motherboard, ITool tool, TextWriter writer) { WriteScriptHeader(motherboard, null, tool, writer); }
public Laptop(IMotherboard motherboard, ILaptopBattery battery) { this.motherboard = motherboard; this.battery = battery; }
public Laptop(ICPU cpu, IRAM ram, IVideoCard videoCard, RAID hardDriveRaid, IMotherboard motherBoard, IBattery battery) : base(cpu, ram, videoCard, hardDriveRaid, motherBoard) { this.battery = battery; }
public LaptopComputer(IMotherboard motherboard, Cpu cpu, Ram ram, IEnumerable<HardDrive> hardDrives, IVideoCard videoCard, LaptopBattery battery) : base(ComputerType.LAPTOP, motherboard, cpu, ram, hardDrives, videoCard) { this.battery = battery; }
public Computer(ICpu cpu, IMotherboard motherboard) { this.Cpu = cpu; this.Motherboard = motherboard; }
public Cpu128(byte numOfCores, IMotherboard motherboard) : base(numOfCores, motherboard) { }
public Cpu(byte numberOfCores, CpuType numberOfBits, IMotherboard motherboard) { this.numberOfBits = (byte)numberOfBits; this.NumberOfCores = numberOfCores; this.motherboard = motherboard; }
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 Cpu(CpuStrategy cpuStrategy, byte numberOfCores, IMotherboard motherBoeard) { this.cpuStrategy = cpuStrategy; this.NumberOfCores = numberOfCores; this.motherBoeard = motherBoeard; }
public PersonalComputer(Cpu cpu, StorageProvider storageProvider, IMotherboard motherboard) : base(cpu, storageProvider, motherboard) { }
public ServerComputer(IMotherboard motherboard, Cpu cpu, Ram ram, IEnumerable<HardDrive> hardDrives, IVideoCard videoCard) : base(ComputerType.SERVER, motherboard, cpu, ram, hardDrives, videoCard) { }
public Laptop(ICpu cpu, IMotherboard motherboard, HardDriver hardDrive, ILaptopBattery battery) : base(cpu, motherboard) { this.Battery = battery; this.hardDrive = hardDrive; }
public MotherboardRepo(IMotherboard motherboardContext) { Context = motherboardContext; }
public Cpu128Bit(byte numberOfCores, IMotherboard motherboard, Random random) : base(numberOfCores, 128, motherboard, random) { }
public PC(ICPU cpu, IRAM ram, IVideoCard videoCard, RAID hardDriveRaid, IMotherboard motherBoard) : base(cpu, ram, videoCard, hardDriveRaid, motherBoard) { }
public Server(IMotherboard motherboard, Cpu cpu, HardDriveComponent hardDrive) { this.Motherboard = motherboard; this.Cpu = cpu; this.HardDrive = hardDrive; }
public CpuTests(IMotherboardMoq motherboardMock) { this.motherboard = motherboardMock.MotherboardData; }
internal Cpu(byte numberOfCores, byte numberOfBits, IMotherboard motherboard) { this.NumberOfCores = numberOfCores; this.numberOfBits = numberOfBits; this.motherboard = motherboard; }
protected Computer(CentralProcessingUnit cpu, RandomAcessMemory ram, IEnumerable <HardDriver> hardDrives, IVideoCard videoCard, IMotherboard motherBoard) { this.CentralProcessingUnit = cpu; this.RandomAcessMemory = ram; this.HardDrives = hardDrives; this.VideoCard = videoCard; this.MotherBoard = motherBoard; }
public Laptop(CentralProcessingUnit cpu, RandomAcessMemory ram, IEnumerable <HardDriver> hardDrives, IVideoCard videoCard, IMotherboard motherBoard, LaptopBattery battery) : base(cpu, ram, hardDrives, videoCard, motherBoard) { this.LaptopBattery = battery; }
public CPU(byte numberOfCores, byte numberOfBits, IMotherboard motherboard) { this.numberOfBits = numberOfBits; this.NumberOfCores = numberOfCores; this.motherboard = motherboard; }
public Cpu64Bit(byte numberOfCores, IMotherboard motherboard, Random random) : base(numberOfCores, 64, motherboard, random) { }