Ejemplo n.º 1
0
        public void ChooseSpecs()
        {
            displayBox.Items.Clear();

            int processorChoice    = rGen.Next(Constants.PROCESSOR_COUNT);
            int graphicsCardChoice = rGen.Next(Constants.GRAPHICSCARD_COUNT);
            int ramChoice          = rGen.Next(Constants.RAM_COUNT);
            int monitorChoice      = rGen.Next(Constants.MONITOR_COUNT);
            int totalPrice         = 0;

            Processor    currentProcessor    = computerFactory.createProcessor(processorChoice);
            GraphicsCard currentGraphicsCard = computerFactory.createGraphicsCard(graphicsCardChoice);
            Ram          currentRam          = computerFactory.createRam(ramChoice);
            Monitor      currentMonitor      = computerFactory.createMonitor(monitorChoice);

            totalPrice += currentProcessor.Price;
            totalPrice += currentGraphicsCard.Price;
            totalPrice += currentRam.Price;
            totalPrice += currentMonitor.Price;

            displayBox.Items.Add("Price    Component");
            displayBox.Items.Add("- - - - - - - - - - - - - - - - - -");
            displayBox.Items.Add(currentProcessor.ToString());
            displayBox.Items.Add(currentGraphicsCard.ToString());
            displayBox.Items.Add(currentRam.ToString());
            displayBox.Items.Add(currentMonitor.ToString());
            displayBox.Items.Add("- - - - - - - - - - - - - - - - - -");
            displayBox.Items.Add("Total Price: " + totalPrice);
        }
        public void printSpec()
        {
            Processor    currCPU         = machineMaker.makeCPU();
            Memory       currMemory      = machineMaker.makeMemory();
            GraphicsCard currGraphics    = machineMaker.makeGraphicsCard();
            MotherBoard  currMotherBoard = machineMaker.makeMotherBoard();

            double totalPrice = currCPU.Price + currMemory.Price + currGraphics.Price + currMotherBoard.Price;

            displayBox.Items.Clear();
            displayBox.Items.Add("Price\tComponent");
            displayBox.Items.Add("-----------------------------------------------------");
            displayBox.Items.Add(currCPU.ToString());
            displayBox.Items.Add(currMemory.ToString());
            displayBox.Items.Add(currGraphics.ToString());
            displayBox.Items.Add(currMotherBoard.ToString());
            displayBox.Items.Add("-----------------------------------------------------");
            displayBox.Items.Add("Total Price " + totalPrice.ToString());
        }
Ejemplo n.º 3
0
        public GraphicsCard createGraphicsCard(int graphicCode)
        {
            GraphicsCard newGraphics = null;

            switch (graphicCode)
            {
            case 0:
                newGraphics = new GTX1080Ti();
                break;

            case 1:
                newGraphics = new GTX980();
                break;

            case 2:
                newGraphics = new Radeon_R9_Fury_X();
                break;
            }
            return(newGraphics);
        }
Ejemplo n.º 4
0
        public GraphicsCard createGraphicsCard(int graphicCode)
        {
            GraphicsCard newGraphics = null;

            switch (graphicCode)
            {
            case 0:
                newGraphics = new GTX970();
                break;

            case 1:
                newGraphics = new GTX660();
                break;

            case 2:
                newGraphics = new Radeon_R7();
                break;
            }
            return(newGraphics);
        }
Ejemplo n.º 5
0
        public GraphicsCard createGraphicsCard(int graphicCode)
        {
            GraphicsCard newGraphics = null;

            switch (graphicCode)
            {
            case 0:
                newGraphics = new HD_Graphics__4000();
                break;

            case 1:
                newGraphics = new HD_Graphics_6000();
                break;

            case 2:
                newGraphics = new Quadro_K2000();
                break;
            }
            return(newGraphics);
        }
Ejemplo n.º 6
0
 public GraphicsCard makeGraphicsCard()
 {
     GraphicsCard gc = new GraphicsCard("Nvidia GTX 970 ", 1100);
     return gc;
 }
Ejemplo n.º 7
0
 public GraphicsCard makeGraphicsCard()
 {
     GraphicsCard gc = new GraphicsCard("GeForce 285", 711);
     return gc;
 }
Ejemplo n.º 8
0
 public GraphicsCard makeGraphicsCard()
 {
     GraphicsCard gc = new GraphicsCard("Intel HD Graphics", 390);
     return gc;
 }