コード例 #1
0
ファイル: D5T4.cs プロジェクト: anttuov/OlioOhjelmointi
        static void Main(string[] args)
        {
            PC pc = new PC();
            GPU gpu = new GPU();
            gpu.Name = "Titan X";
            gpu.Memory = "12";
            List<GPU> gpus = new List<GPU>();
            gpus.Add(gpu);
            gpus.Add(gpu);
            RAM ram = new RAM();
            RAM ram2 = new RAM();
            List<RAM> rams = new List<RAM>();
            ram.Memory = 8;
            ram2.Memory = 4;
            rams.Add(ram);
            rams.Add(ram);
            rams.Add(ram2);
            rams.Add(ram2);
            CPU cpu = new CPU();
            cpu.Cores = 4;
            cpu.Speed = 3.5;
            pc.CPU = cpu;
            pc.GPU = gpus;
            pc.RAM = rams;
            pc.PrintData();

        }
コード例 #2
0
        public void Get_test()
        {
            // arrange
            var maker = "Intel";
            var processorSpeed = 500;
            var ramSize = 2000;
            processors[0] = new Dictionary<string, object>
            {
                { "Maker", maker},
                { "Speed", processorSpeed},
                { "RamId", 0 }
            };
            rams[0] = new Dictionary<string, object>
            {
                { "Size", ramSize }
            };
            var aggregatorProvider = aggregatorProviderMock.Object;
            var processorModel = new ProcessorModel(0, processorCollectionMock.Object);
            var ramModel = new RAMModel(0, ramCollectionMock.Object);
            var computer = new Computer(aggregatorProvider, processorModel);
            var ram = new RAM(aggregatorProvider, ramModel);
            aggregatorProvider.Save(computer, ram);

            // act and assert
            computer.RAM.Size.Should().Be(ramSize);
            computer.ProcessorSpeed.Should().Be(processorSpeed);
            computer.Maker.Should().Be(maker);
        }
コード例 #3
0
 public Computer(string hostName, string description, CPU cpu, RAM ram, HDD hdd)
 {
     HostName = hostName;
     Description = description;
     this.Cpu =cpu;
     this.Ram = ram;
     this.Hdd = hdd;
 }
コード例 #4
0
ファイル: Lenovo.cs プロジェクト: damy90/Telerik-all
 public override PC MakePC()
 {
     var cpu = new CPU(2, 64);
     var ram = new RAM(4);
     var hardDrives = new List<HardDrive>() { new HardDrive(2000, false, 0) };
     var videoCard = new VideoCard(true);
     var motherboard = new Motherboard();
     var pc = new PC(AbstractComputer.ComputerType.PC, cpu, ram, hardDrives, videoCard, null, motherboard);
     return pc;
 }
コード例 #5
0
ファイル: Lenovo.cs プロジェクト: damy90/Telerik-all
 public override Server MakeServer()
 {
     var cpu = new CPU(2, 128);
     var ram = new RAM(8);
     var hardDrives = new List<HardDrive>() { new HardDrive(500, true, 2), new HardDrive(500, true, 2) };
     var videoCard = new VideoCard(true);
     var motherboard = new Motherboard();
     var server = new Server(AbstractComputer.ComputerType.PC, cpu, ram, hardDrives, videoCard, null, motherboard);
     return server;
 }
コード例 #6
0
        public IPersonalComputer GetPersonalComputer()
        {
            var cpu = new CPU(PcCpuCores, LaptopCpuBits);
            var ram = new RAM(PcRam);
            var hardDrive = new HardDrive(PcHardDriveCapacity, false);
            var videoCard = new VideoCard(false);
            var hardDrives = new List<HardDrive>();
            hardDrives.Add(hardDrive);

            return new PersonalComputer(cpu, ram, hardDrives, videoCard);
        }
コード例 #7
0
ファイル: Lenovo.cs プロジェクト: damy90/Telerik-all
 public override Laptop MakeLaptop()
 {
     var cpu = new CPU(2, 64);
     var ram = new RAM(16);
     var hardDrives = new List<HardDrive>() { new HardDrive(1000, false, 0) };
     var videoCard = new VideoCard(false);
     var motherboard = new Motherboard();
     var battery = new Battery();
     var laptop = new Laptop(AbstractComputer.ComputerType.PC, cpu, ram, hardDrives, videoCard, battery, motherboard);
     return laptop;
 }
コード例 #8
0
 static bool EsRAMCompatible_Op1(this int nro)
 {
     try
     {
         RAM ram = (RAM)nro;
         return(true);
     }
     catch
     {
         return(false);
     }
 }
 public async Task <IEnumerable <RAM> > PutRAM(int id, [FromBody] RAM value)
 {
     if (User.Identity.IsAuthenticated)
     {
         value.ID = id;
         return(await _componentService.ReplaceRAM(new UpdateRAMRequest(value)));
     }
     else
     {
         throw new UnauthorizedAccessException("Only admin can make changes. Have a nice day and f**k off ;)");
     }
 }
コード例 #10
0
        public ILaptop GetLaptop()
        {
            var cpu = new CPU(LaptopCpuCores, LaptopCpuBits);
            var ram = new RAM(LaptopRam);
            var hardDrive = new HardDrive(LaptopHardDriveCapacity, false);
            var videoCard = new VideoCard(false);
            var battery = new LaptopBattery();
            var hardDrives = new List<HardDrive>();
            hardDrives.Add(hardDrive);

            return new Laptop(cpu, ram, hardDrives, videoCard, battery);
        }
コード例 #11
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            float cpu = CPU.NextValue();
            float ram = RAM.NextValue();

            metroProgressBar1.Value = (int)cpu;
            metroProgressBar2.Value = (int)ram;
            metroLabel3.Text        = string.Format("{0:0.00}%", cpu);
            metroLabel4.Text        = string.Format("{0:0.00}%", ram);
            chart1.Series["CPU"].Points.AddY(cpu);
            chart1.Series["RAM"].Points.AddY(ram);
        }
コード例 #12
0
        public Dictionary <string, string> Tabela()
        {
            Dictionary <string, string> tabela = new Dictionary <string, string>();

            tabela.Add("CPU", CPU);
            tabela.Add("RAM", RAM.ToString() + "GB");
            tabela.Add("GPU", GPU);
            tabela.Add("Memorija", Memorija.ToString() + "GB");
            tabela.Add("Velicina Ekrana", VelicinaEkrana.ToString() + "\"");
            tabela.Add("Boja", Boja.BojaTelefona);
            return(tabela);
        }
コード例 #13
0
        public override Dictionary <string, string> GetAdditionalProperties()
        {
            Dictionary <string, string> additionalProperties = new Dictionary <string, string>();

            additionalProperties.Add("Screen size", ScreenSize.ToString());
            additionalProperties.Add("Processor", Processor);
            additionalProperties.Add("RAM", RAM.ToString());
            additionalProperties.Add("Videocard", Videocard);
            additionalProperties.Add("Drive volume", DriveVolume.ToString());

            return(additionalProperties);
        }
コード例 #14
0
ファイル: PartsService.cs プロジェクト: IT-Careers/pc-craft
        public async Task <bool> CreateRAMPart(RAMServiceModel rAMServiceModel)
        {
            RAM rAMEntity = rAMServiceModel.To <RAM>();

            rAMEntity.Id = Guid.NewGuid().ToString();

            bool result = await this.pCCDbContext.AddAsync(rAMEntity) != null;

            await this.pCCDbContext.SaveChangesAsync();

            return(result);
        }
コード例 #15
0
        /// <summary>
        /// Execute a Script.
        /// </summary>
        /// <param name="r">The RAM used for this execution.</param>
        /// <param name="scriptName">The Script name.</param>
        /// <param name="args">The arguments.</param>
        /// <returns>The resulting return.</returns>
        public object ExecuteScript(RAM r, string scriptName, object[] args)
        {
            try
            {
                return(_Scripts[scriptName].Execute(r, args));
            }
#pragma warning disable CS0168 // Variable is declared but never used
            catch (KeyNotFoundException e)
#pragma warning restore CS0168 // Variable is declared but never used
            {
                throw new ScriptUndeclaredException(scriptName);
            }
        }
コード例 #16
0
        public override LaptopComputer MakeLaptop()
        {
            var videoCard         = new ColorfulVideoCard();
            var ram               = new RAM(4);
            var motherboard       = new Motherboard(ram, videoCard);
            var cpu               = new Cpu64Bit(2, motherboard, StandardRandomNumbersProvider.Instance);
            var laptopHardDrivers = new[]
            {
                new HardDriver(500, false, 0)
            };

            return(new LaptopComputer(cpu, laptopHardDrivers, motherboard, new LaptopBattery()));
        }
コード例 #17
0
ファイル: Script.cs プロジェクト: PlatformerKing/Brack-CS
        /// <summary>
        /// Get the argument name of the given index.
        /// </summary>
        /// <param name="r">The current memory.</param>
        /// <param name="index">The index of the argument to get (nested Brack statements execute).</param>
        /// <returns>The name of the argument.</returns>
        public string GetArgName(RAM r, object index)
        {
            try
            {
                return(GetArgName(Convert.ToInt32(r.GetValue(index))));
            }
#pragma warning disable CS0168 // Variable is declared but never used
            catch (Exception e)
#pragma warning restore CS0168 // Variable is declared but never used
            {
                throw new ArgumentException();
            }
        }
コード例 #18
0
 /// <summary>商品分类树选择事件
 /// </summary>
 protected void TvGoodsClass_NodeClick(object sender, RadTreeNodeEventArgs e)
 {
     if (!string.IsNullOrEmpty(e.Node.Value))
     {
         GoodsClassId = new Guid(e.Node.Value);
         if (new Guid(RCB_Warehouse.SelectedValue).Equals(Guid.Empty))
         {
             RAM.Alert("请选择仓库!");
             return;
         }
         GridGoodsStock.Rebind();
     }
 }
コード例 #19
0
        /// <summary>单个保存
        /// </summary>
        protected void SaveClick(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(ConfirmGoodsList.SelectedValue))
            {
                RAM.Alert("温馨提示:请选择需要绑定的商品!");
                return;
            }
            IList <Guid> goodsId = new List <Guid> {
                new Guid(ConfirmGoodsList.SelectedValue)
            };

            SetGoodsGfit(goodsId);
        }
コード例 #20
0
        private void btnChrome_Click(object sender, EventArgs e)
        {
            var app = new Aplicação();

            app.Nome    = "Google Chrome";
            app.Tamanho = 128;
            RAM.AdicionarProcesso(app);

            ListViewItem item = new ListViewItem(app.Nome);

            item.SubItems.Add(app.Tamanho.ToString());
            memoriaListView.Items.Add(item);
        }
コード例 #21
0
        public RAM GetRamFromModel(string ramModel)
        {
            RAM resultRam = new RAM();

            foreach (var ram in context.rams)
            {
                if (ramModel == ram.model)
                {
                    resultRam = ram;
                }
            }
            return(resultRam);
        }
コード例 #22
0
 /// <summary>
 /// Constructor, initialize all attributes except id, state and date
 /// </summary>
 /// <param name="clientName">ClientName to initialize</param>
 /// <param name="os">Operative system to initialize</param>
 /// <param name="type">Computer type to initialize</param>
 /// <param name="processor">Processor to initialize</param>
 /// <param name="hardDisk">Hard disk to initialize</param>
 /// <param name="ram">RAM to initialize</param>
 /// <param name="desc">Description to initialize</param>
 /// <param name="graphicCard">Graphic card to initialize</param>
 public Computer(string clientName, OS os, ComType type, Processor processor, HardDisk hardDisk, RAM ram, string desc, GraphicCard graphicCard)
 {
     this.clientName      = clientName;
     this.operativeSystem = os;
     this.type            = type;
     this.processor       = processor;
     this.hardDisk        = hardDisk;
     this.ram             = ram;
     this.desc            = desc;
     this.date            = DateTime.Now;
     this.state           = State.Recibida;
     this.graphicCard     = graphicCard;
 }
コード例 #23
0
        public RamDto GetRamById(string id)
        {
            RamDto ramDto = new RamDto();
            RAM    ram    = this.context.rams.FirstOrDefault(x => x.model == id);


            ramDto.model      = ram.model;
            ramDto.frequency  = ram.frequency;
            ramDto.memorysize = ram.memorysize;
            ramDto.price      = ram.price;

            return(ramDto);
        }
コード例 #24
0
        /// <summary>
        /// Возвращает реальный физический адрес начала таблицы
        /// </summary>
        /// <param name="ram">ссылка на физический блок памяти</param>
        /// <param name="isCorrect">флажок - если false, то результат не верен</param>
        /// <returns></returns>
        public uint GetRealPhysicalAdress(ref RAM ram, out bool isCorrect)
        {
            isCorrect = false;
            uint realPhysicalAdress = 0;

            if (this.bitArray.Equals(ram.ByteCells))
            {
                isCorrect = true;
                uint offset = this.StartIndex * 4;
                realPhysicalAdress = ram.PhysicalAdress + offset;
            }
            return(realPhysicalAdress);
        }
コード例 #25
0
    // Use this for initialization
    void Start()
    {
        SysSoftware = GameObject.Find("System");
        Hardware    = GameObject.Find("Hardware");


        Crash = GameObject.Find("Crash");
        SCM   = Crash.GetComponent <SysCrashMan>();

        cpu = Hardware.GetComponent <CPU>();
        ram = Hardware.GetComponent <RAM>();
        tv  = SysSoftware.GetComponent <TaskViewer>();
    }
コード例 #26
0
        public void initialize()
        {
            //constract system componants
            RAM          ram         = new RAM();
            IORegisters  ioRegisters = new IORegisters();
            ExpansionROM eROM        = new ExpansionROM();
            SaveRAM      sRAM        = new SaveRAM();
            ROM          rom         = new ROM();

            MemoryAccessController memoryAccessControler = new MemoryAccessController(ram, ioRegisters, eROM, sRAM, rom);

            CPU cpu = new CPU(memoryAccessControler);
        }
コード例 #27
0
        /// <summary>
        /// Execute an Operator with the given name and arguments.
        /// </summary>
        /// <param name="r">The RAM used for this execution.</param>
        /// <param name="opName">The name of the Operator to execute.</param>
        /// <param name="args">The arguments to pass into the Operator.</param>
        /// <returns>The resulting return of the Operator execution.</returns>
        public object ExecuteOperator(RAM r, string opName, object[] args)
        {
            try
            {
                return(_Operators[opName.ToLower()].Execute(r, args));
            }
#pragma warning disable CS0168 // Variable is declared but never used
            catch (KeyNotFoundException e)
#pragma warning restore CS0168 // Variable is declared but never used
            {
                throw new OperatorException(opName.ToLower());
            }
        }
コード例 #28
0
        public ActionResult RAM(RAM ram)
        {
            newItem.RAM = ram;

            // save to database
            DatabaseController db = new DatabaseController();

            db.AddItem(newItem.Item, newItem.RAM);


            newItem = null;
            return(RedirectToAction("Index", "Inventory"));
        }
コード例 #29
0
        /// <summary>新建
        /// </summary>
        protected void RadGrid_InvoiceRollList_InsertCommand(object sender, GridCommandEventArgs e)
        {
            if (!SubmitController.Enabled)
            {
                return;
            }
            var editedItem = e.Item as GridEditableItem;
            var newId      = Guid.NewGuid();

            if (editedItem != null)
            {
                var textBoxReceiptor        = editedItem.FindControl("TextBox_Receiptor") as TextBox;
                var textBoxInvoiceCode      = editedItem.FindControl("TextBox_InvoiceCode") as TextBox;
                var textBoxInvoiceStartNo   = editedItem.FindControl("TextBox_InvoiceStartNo") as TextBox;
                var textBoxInvoiceEndNo     = editedItem.FindControl("TextBox_InvoiceEndNo") as TextBox;
                var textBoxInvoiceRollCount = editedItem.FindControl("TextBox_InvoiceRollCount") as TextBox;
                var radDatePickerTime       = editedItem.FindControl("RadDatePicker_Time") as RadDatePicker;
                var radComboBoxFiliale      = editedItem.FindControl("RCB_Filiale") as RadComboBox;
                var invoiceRollInfo         = new Keede.Ecsoft.Model.InvoiceRoll
                {
                    Id               = newId,
                    Receiptor        = textBoxReceiptor != null?textBoxReceiptor.Text:string.Empty,
                    InvoiceCode      = textBoxInvoiceCode != null?textBoxInvoiceCode.Text:string.Empty,
                    InvoiceStartNo   = textBoxInvoiceStartNo == null?0:int.Parse(string.IsNullOrEmpty(textBoxInvoiceStartNo.Text.Trim()) ? "0" : textBoxInvoiceStartNo.Text.Trim()),
                    InvoiceEndNo     = textBoxInvoiceEndNo == null?0:int.Parse(string.IsNullOrEmpty(textBoxInvoiceEndNo.Text.Trim()) ? "0" : textBoxInvoiceEndNo.Text.Trim()),
                    InvoiceRollCount = textBoxInvoiceRollCount == null?0:int.Parse(string.IsNullOrEmpty(textBoxInvoiceRollCount.Text.Trim()) ? "0" : textBoxInvoiceRollCount.Text.Trim()),
                    CreateTime       = radDatePickerTime != null?radDatePickerTime.SelectedDate ?? DateTime.Now:DateTime.Now,
                    FilialeId        = radComboBoxFiliale != null?new Guid(radComboBoxFiliale.SelectedValue):Guid.Empty
                };
                invoiceRollInfo.InvoiceCount = invoiceRollInfo.InvoiceEndNo - invoiceRollInfo.InvoiceStartNo + 1;
                if (invoiceRollInfo.InvoiceCount < 1)
                {
                    RAM.Alert("发票份数是:" + invoiceRollInfo.InvoiceCount + "份,填写发票号码错误");
                    return;
                }
                var success = Invoice.WriteInstance.AddInvoiceRoll(invoiceRollInfo);
                if (success)
                {
                    var personnelInfo = CurrentSession.Personnel.Get();
                    //发票库管理发票入库操作记录添加
                    WebControl.AddOperationLog(personnelInfo.PersonnelId, personnelInfo.RealName, invoiceRollInfo.Id, invoiceRollInfo.InvoiceCode,
                                               OperationPoint.InvoiceStorageManage.InvoiceIntoLibrary.GetBusinessInfo(), string.Empty);
                    SubmitController.Submit();
                    RAM.ResponseScripts.Add("location.href=location.href;");
                }
                else
                {
                    RAM.Alert("购买发票添加失败");
                }
            }
        }
コード例 #30
0
        public void TestUnsubscribe()
        {
            Clock  clock  = new Clock();
            TicTok tictok = new TicTok();

            tictok.Init();;

            AReg areg = new AReg();
            BReg breg = new BReg();
            IReg ireg = new IReg();
            OReg oreg = new OReg();
            RAM  ram  = new RAM();

            PC   pc   = new PC(ref areg);
            ALU  alu  = new ALU(ref areg, ref breg);
            MReg mreg = new MReg(ref ram);
            SEQ  seq  = SEQ.Instance();

            seq.Load(GetInstructionSet());

            Wbus.Instance().Value = "00000000";
            Flags.Instance().Clear();

            areg.Subscribe(clock);
            breg.Subscribe(clock);
            ireg.Subscribe(clock);
            mreg.Subscribe(clock);
            oreg.Subscribe(clock);
            pc.Subscribe(clock);
            alu.Subscribe(clock); // ALU must come after A and B
            ram.Subscribe(clock);

            for (int i = 0; i < 500; i++)
            {
                clock.SendTicTok(tictok);
                tictok.ToggleClockState();
                clock.SendTicTok(tictok);
                tictok.ToggleClockState();
            }

            // UnSub all
            clock.EndTransmission();

            for (int i = 0; i < 500; i++)
            {
                clock.SendTicTok(tictok);
                tictok.ToggleClockState();
                clock.SendTicTok(tictok);
                tictok.ToggleClockState();
            }
        }
コード例 #31
0
ファイル: RAMController.cs プロジェクト: funny622/BuildPC
        public void Post(RAM ram)
        {
            string ID      = "RA";
            RAM    RamLast = new RAM();

            RamLast = context.RAMs.OrderByDescending(r => r.MaRam).FirstOrDefault();
            string temp = RamLast.MaRam.ToString().Substring(2);

            temp = (Int32.Parse(temp) + 1).ToString();
            if (temp.Count() == 4)
            {
                ID = ID + int.Parse(temp);
            }
            else
            if (temp.Count() == 3)
            {
                ID = ID + "0" + int.Parse(temp);
            }
            else
            if (temp.Count() == 2)
            {
                ID = ID + "00" + int.Parse(temp);
            }
            else
            {
                ID = ID + "000" + int.Parse(temp);
            }

            ram.MaRam = ID;

            RAM RamNeedAdd = new RAM
            {
                MaRam     = ram.MaRam,
                Model     = ram.Model,
                LoaiRam   = ram.LoaiRam,
                TocDoBus  = Convert.ToInt32(ram.TocDoBus),
                DungLuong = Convert.ToInt32(ram.DungLuong),
                HangSX    = ram.HangSX,
                Giaban    = Convert.ToInt32(ram.Giaban),
                Diem      = Convert.ToInt32(ram.Diem),
                DanhGia   = Convert.ToInt32(ram.DanhGia),
                URL       = ram.URL
            };

            if (ram == null)
            {
                throw new ArgumentNullException();
            }
            context.RAMs.Add(RamNeedAdd);
            context.SaveChanges();
        }
コード例 #32
0
ファイル: Machine.cs プロジェクト: jmcd/8080-invaders
        public Machine(byte[] buffer, Action <int, bool, bool> playSound)
        {
            var mem = new RAM(buffer);

            var ports = Enumerable.Range(0, 8).Select(_ => new Port()).ToList();

            Cpu = new CPU(mem, ports);

            var shiftRegister = new ShiftRegister();

            Inputs = new Inputs();

            var soundStatus = new bool[9];

            ports[0].OnIn = () => Inputs[0];
            ports[1].OnIn = () => Inputs[1];
            ports[2].OnIn = () => Inputs[2];
            ports[3].OnIn = () => shiftRegister.Result();

            ports[2].OnOut = b => shiftRegister.SetOffset(b);
            ports[3].OnOut = b =>
            {
                for (var i = 0; i < 4; i++)
                {
                    var play = ((b >> i) & 1) == 1;

                    if (play != soundStatus[i])
                    {
                        playSound(i, play, i == 0);
                        soundStatus[i] = play;
                    }
                }
            };
            ports[4].OnOut = b => shiftRegister.Write(b);
            ports[5].OnOut = b =>
            {
                for (var i = 0; i < 5; i++)
                {
                    var play = ((b >> i) & 1) == 1;

                    if (play != soundStatus[i])
                    {
                        var soundIndex = i + 4;
                        playSound(soundIndex, play, false);
                        soundStatus[soundIndex] = play;
                    }
                }
            };
            ports[6].OnOut = b => { };
        }
コード例 #33
0
 public DesktopPC(Case pcCase, Cooler cooler, CPU cpu, GPU gpu, HDD hdd, Keyboard keyboard, Monitor monitor, MotherBoard motherBoard, Mouse mouse, PSU psu, RAM ram)
 {
     Case        = pcCase;
     Cooler      = cooler;
     CPU         = cpu;
     GPU         = gpu;
     HDD         = hdd;
     Keyboard    = keyboard;
     Monitor     = monitor;
     MotherBoard = motherBoard;
     Mouse       = mouse;
     PSU         = psu;
     RAM         = ram;
 }
コード例 #34
0
        private bool IsEnteringRangeFrequency(RAM ram, Motherboard motherboard, string problem_report)
        {
            bool isValid = false;

            if (motherboard.Properties.MinFrequency <= ram.Properties.ClockFrequency & ram.Properties.ClockFrequency <= motherboard.Properties.MaxFrequency)
            {
                isValid = true;
            }
            else
            {
                ProblemReport(problem_report);
            }
            return(isValid);
        }
コード例 #35
0
        private bool IsСompatibleRAMType(Collection <ListBoxObject> collection, RAM ram, string problem_report)
        {
            bool isValid = false;

            if (ram.Properties.RAMType == (GetSingleItem(collection, "motherboard") as Motherboard).Properties.RamType)
            {
                isValid = true;
            }
            else
            {
                ProblemReport(problem_report);
            }
            return(isValid);
        }
コード例 #36
0
        public IServer GetServer()
        {
            var cpu = new CPU(ServerCpuCores, ServerCpuBits);
            var ram = new RAM(ServerRam);
            var hardDrive = new HardDrive(ServerHardDriveCapacity, true);
            var videoCard = new VideoCard(true);
            var hardDrives = new List<HardDrive>();
            for (int i = 0; i < ServerNumberOfHardDrives; i++)
            {
                hardDrives.Add(hardDrive);
            }

            return new Server(cpu, ram, hardDrives, videoCard);
        }
コード例 #37
0
        // GET: RAMs/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RAM rAM = db.RAMs.Find(id);

            if (rAM == null)
            {
                return(HttpNotFound());
            }
            return(View(rAM));
        }
コード例 #38
0
        public override bool SetupFromSetupData(ExecuteSetupData setupData)
        {
            this.SetupData = setupData;
            MessageManager.ShowLine($"Constructing memory of slot0...", enumMessageLevel.DetailProgressLog);
            this.Memory = new CommonModule.RAM();
            this.Memory.Initialize(setupData.MemoryContents[0]); //Slot.0
            InitializeExecutionTraceData(setupData, 0);

            MessageManager.ShowLine($"Setting ProgramCounter...", enumMessageLevel.DetailProgressLog);
            this.ProgramCounter = setupData.StartupAddress;

            base.IsHalted = false;
            return(true);
        }
コード例 #39
0
 /// <summary>添加到商品确定框
 /// </summary>
 protected void AddToRight(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(FiltrateGoodsList.SelectedValue))
     {
         ConfirmGoodsList.Items.Add(new RadListBoxItem(FiltrateGoodsList.SelectedItem.Text,
                                                       FiltrateGoodsList.SelectedItem.Value));
         ShowGoodsGiftList(new Guid(FiltrateGoodsList.SelectedValue));
         FiltrateGoodsList.Items.Remove(FiltrateGoodsList.SelectedItem);
     }
     else
     {
         RAM.Alert("温馨提示:请先选择数据!");
     }
 }
コード例 #40
0
 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;
 }
コード例 #41
0
        public void Preload_test()
        {
            // arrange
            var maker = "Intel";
            var processorSpeed = 500;
            var ramSize = 2000;
            processors[0] = new Dictionary<string, object>
            {
                { "Maker", maker},
                { "Speed", processorSpeed},
                { "RamId", 0 }
            };
            rams[0] = new Dictionary<string, object>
            {
                { "Size", ramSize }
            };
            var aggregatorProvider = aggregatorProviderMock.Object;
            var processorModel = new ProcessorModel(0, processorCollectionMock.Object);
            var ramModel = new RAMModel(0, ramCollectionMock.Object);
            var computer = new Computer(aggregatorProvider, processorModel);
            var ram = new RAM(aggregatorProvider, ramModel);
            aggregatorProvider.Save(computer, ram);

            // act
            computer.PreloadAgg(x => x.Maker,
                                x => x.ProcessorSpeed,
                                x => x.RAM);

            // assert
            computer.RAM.Size.Should().Be(ramSize);
            computer.ProcessorSpeed.Should().Be(processorSpeed);
            computer.Maker.Should().Be(maker);
            processorCollectionMock.Verify(x =>
                x.GetFields(It.IsAny<Id>(), It.IsAny<string[]>()),
                Times.Once);
            processorCollectionMock.Verify(x =>
                x.GetModelField(It.IsAny<Id>(), It.IsAny<string>()),
                Times.Never);
            ramCollectionMock.Verify(x =>
                x.GetFields(It.IsAny<Id>(), It.IsAny<string[]>()),
                Times.Once);
            ramCollectionMock.Verify(x =>
                x.GetModelField(It.IsAny<Id>(), It.IsAny<string>()),
                Times.Never);
        }
コード例 #42
0
ファイル: Player.cs プロジェクト: rhyok/hue-r
    //void renderInfoPane(float left, float top, float width, float height
    Motherboard fabricateDebugRig()
    {
        Motherboard returnMobo = new Motherboard();

        returnMobo.name = "Mother of All Boards";

        CPU         debugCPU        = new CPU           ("Hammond DebugHammer 750XL",           Company.COMPUTECH, 125.0f, DEBUG_INTERFACE, 30, 0, 1, 6, 32);
        GPU         debugGPU        = new GPU           ("Zhu Industries Mothra 8800",          Company.COMPUTECH, 125.0f, DEBUG_INTERFACE, 20, 0, 3, 1);
        HDD         debugHDD        = new HDD           ("DataPlatter Stack 5",                 Company.COMPUTECH, 125.0f, DEBUG_INTERFACE, 2, 0, 10, 8);
        RAM         debugRAM        = new RAM           ("RYAM Interceptor 1 MB",               Company.COMPUTECH, 125.0f, DEBUG_INTERFACE, 1, 0, 1, 10, 1);
        PowerSupply debugPower      = new PowerSupply   ("ArEmEs 200W Power Supply",            Company.COMPUTECH, 125.0f, DEBUG_INTERFACE, 0, 0, 200);
        CompInput   debugInput      = new CompInput     ("Cobra Katana",                        Company.COMPUTECH, 125.0f, DEBUG_INTERFACE, 0, 0, 50, 60, false);
        CompOutput  debugOutput     = new CompOutput    ("AudiVisual AV2350",                   Company.COMPUTECH, 125.0f, DEBUG_INTERFACE, 0, 0, 320, 30, 5);
        CompNetwork debugNet        = new CompNetwork   ("Digiline Dial-up Package",            Company.COMPUTECH, 125.0f, DEBUG_INTERFACE, 0, 0, NetworkType.DIALUP, 40, 4);
        Chassis     debugChassis    = new Chassis       ("CompuTech Tower of Power",            Company.COMPUTECH, 125.0f, DEBUG_INTERFACE, 0, 0, 10);

        GPU         badGPU          = new GPU           ("Bad GPU",                             Company.COMPUTECH, 125.0f, "Pudding Cup Interface", 20, 0, 3, 1);

        returnMobo.CPUInterface         = DEBUG_INTERFACE;
        returnMobo.GPUInterface         = DEBUG_INTERFACE;
        returnMobo.HDDInterface         = DEBUG_INTERFACE;
        returnMobo.RAMInterface         = DEBUG_INTERFACE;
        returnMobo.powerInterface       = DEBUG_INTERFACE;
        returnMobo.compInputInterface   = DEBUG_INTERFACE;
        returnMobo.compOutputInterface  = DEBUG_INTERFACE;
        returnMobo.networkInterface     = DEBUG_INTERFACE;
        returnMobo.formFactor           = DEBUG_INTERFACE;

        returnMobo.plugIn(debugCPU);
        returnMobo.plugIn(debugGPU);
        returnMobo.plugIn(debugHDD);
        returnMobo.plugIn(debugRAM);
        returnMobo.plugIn(debugInput);
        returnMobo.plugIn(debugOutput);
        returnMobo.plugIn(debugNet);
        returnMobo.plugIn(debugPower);
        returnMobo.plugIn(debugChassis);

        return returnMobo;
    }
コード例 #43
0
ファイル: LazyAggregatorTests.cs プロジェクト: iroq/trellis
        public void Preload_test()
        {
            // arrange
            var maker = "Intel";
            var processorSpeed = 500;
            var ramSize = 2000;
            processors[0] = new Dictionary<string, object>
            {
                { "Maker", maker},
                { "Speed", processorSpeed}
            };
            rams[0] = new Dictionary<string, object>
            {
                { "Size", ramSize }
            };
            var processor = new Processor(0, processorCollectionMock.Object);
            var ram = new RAM(0, ramCollectionMock.Object);
            var computer = new Computer(aggregatorProviderMock.Object, processor, ram);

            // act
            computer.PreloadAgg(x => x.Maker,
                                x => x.ProcessorSpeed,
                                x => x.RAMSize);

            // assert
            var sth = computer.Maker;
            var sth2 = computer.Maker;
            var sth3 = computer.Maker;
            computer.Maker.Should().Be(maker);
            computer.ProcessorSpeed.Should().Be(processorSpeed);
            computer.RAMSize.Should().Be(ramSize);

            processorCollectionMock.Verify(x =>
                x.GetFields(It.IsAny<Id>(), It.IsAny<string[]>()),
                Times.Once());
            ramCollectionMock.Verify(x =>
                x.GetFields(It.IsAny<Id>(), It.IsAny<string[]>()),
                Times.Once());
        }
コード例 #44
0
ファイル: LazyAggregatorTests.cs プロジェクト: iroq/trellis
        public void Set_test()
        {
            // arrange
            var maker = "Intel";
            var processorSpeed = 500;
            var ramSize = 2000;
            processors[0] = new Dictionary<string, object>
            {
                { "Maker", maker},
                { "Speed", processorSpeed}
            };
            rams[0] = new Dictionary<string, object>
            {
                { "Size", ramSize }
            };
            var processor = new Processor(0, processorCollectionMock.Object);
            var ram = new RAM(0, ramCollectionMock.Object);
            var computer = new Computer(aggregatorProviderMock.Object, processor, ram);

            // act
            var newRamSize = 1;
            computer.RAMSize = newRamSize;
            computer.Commit();

            // assert
            rams[0]["Size"].Should().Be(newRamSize);
        }
コード例 #45
0
ファイル: LazyAggregatorTests.cs プロジェクト: iroq/trellis
 public Computer(IAggregatorProvider aggProvider, Processor processor, RAM ram)
     : base(aggProvider, processor, ram)
 {
 }
コード例 #46
0
ファイル: Server.cs プロジェクト: viktorD1m1trov/T-Academy
 public Server(Cpu cpu, BaseHardDrive drives, RAM ram, IDrawable videoCard)
     : base(cpu, drives, ram, videoCard)
 {
 }
コード例 #47
0
ファイル: Parts.cs プロジェクト: rhyok/hue-r
    public bool plugIn(Part part)
    {
        bool returnValue = false;

        if (part.GetType() == typeof(CPU))
        {
            if (part.partInterface == CPUInterface)
            {
                this.cpu = (CPU) part;
                returnValue = true;
            }
        }
        if (part.GetType() == typeof(GPU))
        {
            if (part.partInterface == GPUInterface)
            {
                this.gpu = (GPU)part;
                returnValue = true;
            }
        }
        if (part.GetType() == typeof(HDD))
        {
            if (part.partInterface == HDDInterface)
            {
                this.hdd = (HDD)part;
                returnValue = true;
            }
        }
        if (part.GetType() == typeof(RAM))
        {
            if (part.partInterface == RAMInterface)
            {
                this.ram = (RAM)part;
                returnValue = true;
            }
        }
        if (part.GetType() == typeof(CompInput))
        {
            if (part.partInterface == compInputInterface)
            {
                this.input = (CompInput)part;
                returnValue = true;
            }
        }
        if (part.GetType() == typeof(CompOutput))
        {
            if (part.partInterface == compOutputInterface)
            {
                this.output = (CompOutput)part;
                returnValue = true;
            }
        }
        if (part.GetType() == typeof(CompNetwork))
        {
            if (part.partInterface == networkInterface)
            {
                this.network = (CompNetwork) part;
                returnValue = true;
            }
        }
        if (part.GetType() == typeof(PowerSupply))
        {
            if (part.partInterface == powerInterface)
            {
                this.pSupply = (PowerSupply)part;
                returnValue = true;
            }
        }
        if (part.GetType() == typeof(Chassis))
        {
            if (part.partInterface == formFactor)
            {
                this.chassis = (Chassis)part;
                returnValue = true;
            }
        }

        return returnValue;
    }
コード例 #48
0
ファイル: Server.cs プロジェクト: damy90/Telerik-all
 public Server(CPU cpu, RAM ram,  HardDriver hardDriver, IDrawable videoCard)
     : base(cpu, ram, hardDriver, videoCard)
 {
 }
コード例 #49
0
ファイル: Motherboard.cs プロジェクト: damy90/Telerik-all
 public Motherboard(RAM ram, IDrawable videoCard)
 {
     this.ram = ram;
     this.videoCard = videoCard;
 }
コード例 #50
0
ファイル: Laptop.cs プロジェクト: damy90/Telerik-all
 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)
 {
 }
コード例 #51
0
 public PersonalComputer(Cpu cpu, BaseHardDrive hdd, RAM ram, IDrawable videoCard)
     : base(cpu, hdd, ram, videoCard)
 {
 }
コード例 #52
0
ファイル: Laptop.cs プロジェクト: damy90/Telerik-all
 public Laptop(CPU cpu, RAM ram, IEnumerable<HardDrive> hardDrives, VideoCard videoCard, LaptopBattery battery)
     : base(cpu, ram, hardDrives, videoCard)
 {
     this.Battery = battery;
 }
コード例 #53
0
ファイル: Server.cs プロジェクト: damy90/Telerik-all
 public Server(CPU cpu, RAM ram, IEnumerable<HardDrive> hardDrives, VideoCard videoCard)
     : base(cpu, ram, hardDrives, videoCard)
 {
     this.VideoCard.IsMonochrome = true;
     this.Mediator = new ServerComponentsMediator(this.Ram, this.Cpu, this.VideoCard);
 }
コード例 #54
0
ファイル: PartGenerator.cs プロジェクト: rhyok/hue-r
    public object generatePart(Type partType, Company company)
    {
        object returnPart = null;
        if (partType == typeof(CPU))
        {
            /*
            CPU = new CPU(
                generatePartName(partType, company),
                companyToString(company),
                499.0f,
                "Generic Interface",
                100,
                1
                )
             * */

            returnPart = new CPU(generatePartName(partType, company),
                company,
                500.0f * (float)CPU[company] * (float)CPU[company],
                "Debug",
                100 * (int)((float)CPU[company] * 100.0f) / 100,
                1.0f,
                rand.Next(ranges.PE1980.cpu_CoresRange.getLeft(), ranges.PE1980.cpu_CoresRange.getRight() + 1),
                rand.Next(ranges.PE1980.cpu_ClockRange.getLeft(), ranges.PE1980.cpu_ClockRange.getRight() + 1),
                rand.Next(ranges.PE1980.cpu_BitsRange.getLeft(), ranges.PE1980.cpu_BitsRange.getRight() + 1)
                );

            //returnPart = new CPU(generatePartName(partType, company),
            //    company,
            //    500.0f * (float)CPU[company] * (float)CPU[company],
            //    "Debug",
            //    100 * (int)((float)CPU[company] * 100.0f) / 100,
            //    1.0f,
            //    rand.Next(ranges.PE1980.cpu_CoresRange.getLeft(), ranges.PE1980.cpu_CoresRange.getRight() + 1), 1, 1);

        }
        else if (partType == typeof(GPU))
        {
            returnPart = new GPU(generatePartName(partType, company),
                company,
                 500.0f * (float)GPU[company] * (float)GPU[company],
                "Debug",
                200 * (int)((float)GPU[company] * 100.0f) / 100,
                1.0f,
                rand.Next(ranges.PE1980.gpu_MegaflopsRange.getLeft(), ranges.PE1980.gpu_MegaflopsRange.getRight() + 1),
                rand.Next(ranges.PE1980.gpu_MemoryRange.getLeft(), ranges.PE1980.gpu_MemoryRange.getRight() + 1)
                );
        }
        else if (partType == typeof(HDD))
        {
            returnPart = new HDD(generatePartName(partType, company),
                company,
                 500.0f * (float)HDD[company] * (float)HDD[company],
                "Debug",
                5 * (int)((float)HDD[company] * 100.0f) / 100,
                1.0f,
                rand.Next(ranges.PE1980.hdd_SizeRange.getLeft(), ranges.PE1980.hdd_SizeRange.getRight() + 1),
                rand.Next(ranges.PE1980.hdd_SpeedRange.getLeft(), ranges.PE1980.hdd_SpeedRange.getRight() + 1)
                );
        }
        else if (partType == typeof(RAM))
        {
            returnPart = new RAM(generatePartName(partType, company),
                company,
                 500.0f * (float)RAM[company] * (float)RAM[company],
                "Debug",
                5 * (int)((float)RAM[company] * 100.0f) / 100,
                1.0f,
                rand.Next(ranges.PE1980.ram_SizeRange.getLeft(), ranges.PE1980.ram_SizeRange.getRight() + 1),
                rand.Next(ranges.PE1980.ram_SpeedRange.getLeft(), ranges.PE1980.ram_SpeedRange.getRight() + 1),
                rand.Next(ranges.PE1980.ram_ChannelsRange.getLeft(), ranges.PE1980.ram_ChannelsRange.getRight() + 1)
                );
        }
        else if (partType == typeof(CompInput))
        {
            returnPart = new CompInput(generatePartName(partType, company),
                company,
                 500.0f * (float)INPUT[company] * (float)INPUT[company],
                "Debug",
                5 * (int)((float)INPUT[company] * 100.0f) / 100,
                1.0f,
                rand.Next(ranges.PE1980.input_DPIRange.getLeft(), ranges.PE1980.input_DPIRange.getRight() + 1),
                rand.Next(ranges.PE1980.input_PollingRange.getLeft(), ranges.PE1980.input_PollingRange.getRight() + 1),
                rand.Next(10) <= 7 ? false : true
                );
        }
        else if (partType == typeof(CompOutput))
        {
            returnPart = new CompOutput(generatePartName(partType, company),
                company,
                 500.0f * (float)OUTPUT[company] * (float)OUTPUT[company],
                "Debug",
                50 * (int)((float)OUTPUT[company] * 100.0f) / 100,
                1.0f,
                rand.Next(ranges.PE1980.output_ResolutionRange.getLeft(), ranges.PE1980.output_ResolutionRange.getRight() + 1),
                rand.Next(ranges.PE1980.output_RefreshRange.getLeft(), ranges.PE1980.output_RefreshRange.getRight() + 1),
                rand.Next(ranges.PE1980.output_SQRange.getLeft(), ranges.PE1980.output_SQRange.getRight() + 1)
                );
        }
        else if (partType == typeof(CompNetwork))
        {
            returnPart = new CompNetwork(generatePartName(partType, company),
                company,
                 500.0f * (float)NETWORK[company] * (float)NETWORK[company],
                "Debug",
                0,
                1.0f,
                rand.Next(2) == 0 ? ranges.PE1980.network_TypeRange.getLeft() : ranges.PE1980.network_TypeRange.getRight(),
                rand.Next(ranges.PE1980.network_PingRange.getLeft(), ranges.PE1980.network_PingRange.getRight() + 1),
                rand.Next(ranges.PE1980.network_BandwidthRange.getLeft(), ranges.PE1980.network_BandwidthRange.getRight() + 1)
                );
        }
        else if (partType == typeof(PowerSupply))
        {
            returnPart = new PowerSupply(generatePartName(partType, company),
                company,
                 500.0f * (float)PSU[company] * (float)PSU[company],
                "Debug",
                0,
                1.0f,
                rand.Next(ranges.PE1980.pSupply_WattageRange.getLeft(), ranges.PE1980.pSupply_WattageRange.getRight() + 1)
                );
        }
        else if (partType == typeof(Chassis))
        {
            returnPart = new Chassis(generatePartName(partType, company),
                company,
                 500.0f * (float)CHASSIS[company] * (float)CHASSIS[company],
                "Debug",
                0,
                1.0f,
                rand.Next(ranges.PE1980.chassis_CoolRange.getLeft(), ranges.PE1980.chassis_CoolRange.getRight() + 1)
                );
        }
        else if (partType == typeof(Motherboard))
        {
            returnPart = new Motherboard(generatePartName(partType, company),
                500.0f * (float)MOBO[company] * (float)MOBO[company],
                1.0f,
                "Debug",
                "Debug",
                "Debug",
                "Debug",
                "Debug",
                "Debug",
                "Debug",
                "Debug",
                "Debug",
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null
                );
        }
        return returnPart;
    }
コード例 #55
0
ファイル: Parts.cs プロジェクト: rhyok/hue-r
 public Motherboard(string name, float price, float defectiveChance, string CPUI, string GPUI, string HDDI, string RAMI, 
     string powerI, string compInputI, string compOutputI, string networkI, string formFactor,
     CPU cpu, GPU gpu, HDD hdd, RAM ram, CompInput input, CompOutput output, CompNetwork network,
     PowerSupply pSupply, Chassis chassis)
 {
     this.name                   = name;
     this.price                  = price;
     this.defectiveChance        = defectiveChance;
     this.CPUInterface           = CPUI;
     this.GPUInterface           = GPUI;
     this.HDDInterface           = HDDI;
     this.RAMInterface           = RAMI;
     this.powerInterface         = powerI;
     this.compInputInterface     = compInputI;
     this.compOutputInterface    = compOutputI;
     this.networkInterface       = networkI;
     this.formFactor             = formFactor;
     this.cpu                    = cpu;
     this.gpu                    = gpu;
     this.hdd                    = hdd;
     this.ram                    = ram;
     this.input                  = input;
     this.output                 = output;
     this.network                = network;
     this.pSupply                = pSupply;
     this.chassis                = chassis;
 }
コード例 #56
0
ファイル: Laptop.cs プロジェクト: viktorD1m1trov/T-Academy
 public Laptop(Cpu cpu, BaseHardDrive hardDrives, RAM ram, IDrawable videoCard, LaptopBattery battery)
     : base(cpu, hardDrives, ram, videoCard)
 {
     this.battery = battery;
 }
コード例 #57
0
ファイル: Case.cs プロジェクト: GabrielWilds/JSLCode
        public void ReadXml(XmlReader reader)
        {
            Brand = reader["brand"];
            Size = reader["size"];
            Color = reader["color"];

            reader.ReadToFollowing("motherboard");
            Mobo = new Motherboard();
            Mobo.ReadXml(reader);

            reader.ReadToFollowing("processor");
            CPU = new Processor();
            CPU.ReadXml(reader);

            reader.ReadToFollowing("ram");
            Ram = new RAM();
            Ram.ReadXml(reader);

            reader.ReadToFollowing("videocard");
            Videocard = new VideoCard();
            Videocard.ReadXml(reader);

            reader.ReadToFollowing("diskdrive");
            Diskdrive = new DiskDrive();
            Diskdrive.ReadXml(reader);

            reader.ReadToFollowing("fans");
            while (true)
            {
                reader.Read();
                if (reader.Name == "fan")
                {
                    Fan fan = new Fan();
                    fan.ReadXml(reader);
                    AddFan(fan);
                }
                else if (reader.Name == "LED")
                {
                    Fans[Fans.Count - 1].HasLED = true;
                    LED led = new LED();
                    led.ReadXml(reader);
                    Fans[Fans.Count - 1].Led = led;
                    reader.Read();
                }

                if (reader.EOF)
                    break;
            }
        }
コード例 #58
0
        public void Set_test()
        {
            // arrange
            var maker = "Intel";
            var processorSpeed = 500;
            var ramSize = 2000;
            processors[0] = new Dictionary<string, object>
            {
                { "Maker", maker},
                { "Speed", processorSpeed},
                { "RamId", 0 }
            };
            rams[0] = new Dictionary<string, object>
            {
                { "Size", ramSize }
            };
            var aggregatorProvider = aggregatorProviderMock.Object;
            var processorModel = new ProcessorModel(0, processorCollectionMock.Object);
            var ramModel = new RAMModel(0, ramCollectionMock.Object);
            var computer = new Computer(aggregatorProvider, processorModel);
            var ram = new RAM(aggregatorProvider, ramModel);
            aggregatorProvider.Save(computer, ram);

            // act
            var newMaker = "AMD";
            var newProcessorSpeed = 1000;
            var newRamSize = 3000;
            computer.RAM.Size = newRamSize;
            computer.ProcessorSpeed = newProcessorSpeed;
            computer.Maker = newMaker;
            computer.Commit();

            // assert
            processors[0]["Maker"].Should().Be(newMaker);
            processors[0]["Speed"].Should().Be(newProcessorSpeed);
            rams[0]["Size"].Should().Be(newRamSize);
            processorCollectionMock.Verify(x =>
                x.UpdateFields(It.IsAny<Id>(), It.IsAny<IDictionary<string, object>>()),
                Times.Once);
            ramCollectionMock.Verify(x =>
                x.UpdateFields(It.IsAny<Id>(), It.IsAny<IDictionary<string, object>>()),
                Times.Once);
        }
コード例 #59
0
 public PersonalComputer(CPU cpu, RAM ram, IEnumerable<HardDrive> hardDrives, VideoCard videoCard)
     : base(cpu, ram, hardDrives, videoCard) 
 {
     this.VideoCard.IsMonochrome = false;
 }
コード例 #60
0
ファイル: Laptop.cs プロジェクト: damy90/Telerik-all
 public Laptop(LaptopBattery battery, CPU cpu, RAM ram, HardDriver hardDriver, IDrawable videoCard)
     : base(cpu, ram, hardDriver, videoCard)
 {
     this.Battery = battery;
 }