public bool InstallMB(MotherBoard mb) { bool result = false; if (mboard.name != string.Empty) { int sale = (int)((int)mboard.Cost / (int)PRICE_COST); OnSale(sale); mboard = mb; result = true; } else { mboard = mb; result = true; } return(result); }
public Comp() { cpu.Clear(); for (int i = 0; i < MAX_nSOCKET; i++) { cpu.Add(new CPU()); } ram.Clear(); for (int i = 0; i < MAX_nRAM; i++) { ram.Add(new RAM()); } hdd.Clear(); for (int i = 0; i < MAX_nSATA; i++) { hdd.Add(new Hard()); } mboard = new MotherBoard(); lan = new Ethernet(); }
void InitializeMB() { MBoarList.Clear(); MotherBoard mb = new MotherBoard(); mb.name = "e-Dox M-32R-D11"; mb.nRAM = 1; mb.nSATA = 1; mb.nSokets = 1; mb.isProtectedHard = false; mb.Cost = Constance.MIN_COST * 100; MBoarList.Add(mb); ///////// mb = new MotherBoard(); mb.name = "Iptel AA43-DX"; mb.nRAM = 1; mb.nSATA = 2; mb.nSokets = 1; mb.isProtectedHard = false; mb.Cost = Constance.MIN_COST * 150; MBoarList.Add(mb); ///////// mb = new MotherBoard(); mb.name = "e-Dox M-35F-D10"; mb.nRAM = 2; mb.nSATA = 2; mb.nSokets = 1; mb.isProtectedHard = false; mb.Cost = Constance.MIN_COST * 250; MBoarList.Add(mb); ///////// mb = new MotherBoard(); mb.name = "APUS R765D85F"; mb.nRAM = 3; mb.nSATA = 2; mb.nSokets = 1; mb.isProtectedHard = false; mb.Cost = Constance.MIN_COST * 300; MBoarList.Add(mb); ///////// mb = new MotherBoard(); mb.name = "APUS D457H72SS"; mb.nRAM = 4; mb.nSATA = 3; mb.nSokets = 1; mb.isProtectedHard = false; mb.Cost = Constance.MIN_COST * 400; MBoarList.Add(mb); ///////// mb = new MotherBoard(); mb.name = "DidoByte RKE-1000"; mb.nRAM = 4; mb.nSATA = 3; mb.nSokets = 2; mb.isProtectedHard = false; mb.Cost = Constance.MIN_COST * 600; MBoarList.Add(mb); ///////// mb = new MotherBoard(); mb.name = "APD 43-D11F2 ProtectedHDD"; mb.nRAM = 4; mb.nSATA = 4; mb.nSokets = 2; mb.isProtectedHard = true; mb.Cost = Constance.MIN_COST * 1000; MBoarList.Add(mb); }