예제 #1
0
        static void Main(string[] args)
        {
            Flash f1 = new Flash(2000, typeUSB.USB1);

            f1.Name = "kingston"; f1.Model = "FJH54";
            ServiceStorage.AddFlash(f1);

            ServiceStorage.AddFlash(new Flash("samsung", "KHF54", 4000, typeUSB.USB2));

            ServiceStorage.AddFlash(new Flash("hero", "FHG54", 8000, typeUSB.USB3));

            Console.WriteLine("введите объем информации: ");
            double t = double.Parse(Console.ReadLine());

            ServiceStorage.GetCountDevice(TypeDevice.flash, t);
        }
예제 #2
0
        static void Main(string[] args)
        {
            Flash f1 = new Flash(Modul.TypeUsb.Usb1, 2);

            f1.NameNositel = "Samsung";
            f1.Model       = "KC-15994";
            Flash f2 = new Flash(Modul.TypeUsb.Usb1, 4);
            Flash f3 = new Flash(Modul.TypeUsb.Usb1, 8);

            ServiceStorage.AddFlash(f1);
            ServiceStorage.AddFlash(f2);
            ServiceStorage.AddFlash(f3);
            ServiceStorage.AddFlash(new Flash(Modul.TypeUsb.Usb2, 16));
            ServiceStorage.AddFlash(new Flash(Modul.TypeUsb.Usb2, 32));

            Console.Write("Введите объем информации для BackUP: ");
            double t = double.Parse(Console.ReadLine());

            ServiceStorage.GetCountDevice(TypeDevice.Flash, t);
        }
예제 #3
0
        static void Main(string[] args)
        {
            Flash f1 = new Flash(2000, TypeUSB.USB1);

            f1.Name  = "Kingston";
            f1.Model = "KB12";
            ServiceStorage.AddFlash(f1);

            ServiceStorage.AddFlash(new Flash(4000, TypeUSB.USB2)
            {
                Name = "Transend", Model = "B12"
            });

            ServiceStorage.AddFlash(new Flash(8000, TypeUSB.USB2)
            {
                Name = "Sumsung", Model = "D125"
            });

            Console.Write("Введите объем информации: ");
            double t = double.Parse(Console.ReadLine());

            ServiceStorage.GetCountDevice(TypeDevice.Flash, t);
        }
        static void Main(string[] args)
        {
            Flash flash1 = new Flash(2000, TypeUSB.USB1);

            flash1.Name  = "Kingston";
            flash1.Model = "KB12";

            ServiceStorage.AddFlash(flash1);
            ServiceStorage.AddFlash(new Flash(4000, TypeUSB.USB2)
            {
                Name = "Transend", Model = "B125"
            });
            ServiceStorage.AddFlash(new Flash(8000, TypeUSB.USB3)
            {
                Name = "Samsung", Model = "S13G"
            });
            ServiceStorage.AddFlash(new Flash(16000, TypeUSB.USB3)
            {
                Name = "Samsung", Model = "S13G4"
            });


            HDD hdd1 = new HDD(TypeUSB.USB1, 2, 256000);

            hdd1.Model = "Barracuda";
            hdd1.Name  = "Seagate";

            HDD hdd2 = (new HDD(TypeUSB.USB2, 3, 84992)
            {
                Name = "Seagate", Model = "Iron Wolf"
            });
            HDD hdd3 = (new HDD(TypeUSB.USB1, 4, 256000)
            {
                Name = "Seagate", Model = "Sky Hawk"
            });

            ServiceStorage.AddHDD(hdd1);
            ServiceStorage.AddHDD(hdd2);
            ServiceStorage.AddHDD(hdd3);


            DVD dvd1 = new DVD(TypeDVD.SimpleSide)
            {
                Name = "Sony", Model = "DYK2"
            };
            DVD dvd2 = new DVD(TypeDVD.DoubleSide)
            {
                Name = "Panasonic", Model = "DG5S"
            };
            DVD dvd3 = new DVD(TypeDVD.DoubleSide)
            {
                Name = "Lightning", Model = "ESR9"
            };

            ServiceStorage.AddDVD(dvd1);
            ServiceStorage.AddDVD(dvd2);
            ServiceStorage.AddDVD(dvd3);

            while (true)
            {
                int x;
                Console.WriteLine("Выберите устройство, куда вы будете копировать.\n1: Флешка\n2: Жесткий диск\n3: DVD диск\n\n4: Выход");
                x = Int32.Parse(Console.ReadLine());
                if (x == 1)
                {
                    Console.Clear();
                    //ServiceStorage.printFlashes();
                    Console.WriteLine("Введите объем информации");
                    double t = double.Parse(Console.ReadLine());
                    ServiceStorage.GetCountDevice(TypeDevice.Flash, t);
                    Console.WriteLine("\nEnter any key");
                    Console.ReadKey();
                    Console.Clear();
                }
                if (x == 2)
                {
                    Console.Clear();
                    //ServiceStorage.printHDDs();
                    Console.WriteLine("Введите объем информации");
                    double s = double.Parse(Console.ReadLine());
                    ServiceStorage.GetCountDevice(TypeDevice.HDD, s);
                    Console.WriteLine("\nEnter any key");
                    Console.ReadKey();
                    Console.Clear();
                }
                if (x == 3)
                {
                    Console.Clear();
                    //ServiceStorage.printDVDs();
                    Console.WriteLine("Введите объем информации");
                    double s = double.Parse(Console.ReadLine());
                    ServiceStorage.GetCountDevice(TypeDevice.DVD, s);
                    Console.WriteLine("\nEnter any key");
                    Console.ReadKey();
                    Console.Clear();
                }
                if (x == 4)
                {
                    Console.Clear();
                    break;
                }
            }
        }