Пример #1
0
        void InitializeHDD()
        {
            HDDList.Clear();
            Hard hdd = new Hard();

            hdd.name     = "Balakuda DD0010";
            hdd.Capacity = 10000;
            hdd.Cost     = Constance.MIN_COST * 20;
            HDDList.Add(hdd);
            //////////
            hdd          = new Hard();
            hdd.name     = "Balakuda DF50";
            hdd.Capacity = 50000;
            hdd.Cost     = Constance.MIN_COST * 50;
            HDDList.Add(hdd);
            //////////
            hdd          = new Hard();
            hdd.name     = "WDD SL0100";
            hdd.Capacity = 100000;
            hdd.Cost     = Constance.MIN_COST * 110;
            HDDList.Add(hdd);
            //////////
            hdd          = new Hard();
            hdd.name     = "WDD FE120RR";
            hdd.Capacity = 120000;
            hdd.Cost     = Constance.MIN_COST * 180;
            HDDList.Add(hdd);
            //////////
        }
Пример #2
0
        public bool InstallHDD(Hard _hdd, byte nSock)
        {
            bool result = false;

            if (mboard.nSATA >= nSock)
            {
                if (hdd[nSock].name != string.Empty)
                {
                    int sale = (int)(hdd[nSock].Cost / PRICE_COST);
                    OnSale(sale);
                    hdd[nSock] = _hdd;
                    result     = true;
                }
                else
                {
                    hdd[nSock] = _hdd;
                    result     = true;
                }
            }
            return(result);
        }