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

            ServiceStorage.addFlash(f1);
            ServiceStorage.addFlash(new Flash("Sumsung", "hags7364", 4000, typeUSB.USB2));
            ServiceStorage.addFlash(new Flash("Sumsung", "gh464", 8000, typeUSB.USB3));

            Console.WriteLine("Enter V Information: ");
            double t = double.Parse(Console.ReadLine());

            ServiceStorage.getCountDevice(TypeDevice.Flash, t);
        }
예제 #2
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);
        }
예제 #3
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);
        }
예제 #4
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;
                }
            }
        }
예제 #6
0
 static void Main(string[] args)
 {
     ServiceStorage ss = new ServiceStorage();
 }
예제 #7
0
 public JobList <MatchingJobDto> GetMatchingJobs(string[] tags, int from, int count, string stateName = null)
 {
     return(ServiceStorage?.GetMatchingJobs(_jobStorage, tags.Select(t => t.GetSetKey()).ToArray(), from, count, stateName) ??
            new JobList <MatchingJobDto>(Enumerable.Empty <KeyValuePair <string, MatchingJobDto> >()));
 }
예제 #8
0
 public IEnumerable <string> SearchRelatedTags(string tag)
 {
     return(ServiceStorage?.SearchRelatedTags(_jobStorage, tag));
 }
예제 #9
0
 public IEnumerable <TagDto> SearchWeightedTags(string tag = null)
 {
     return(ServiceStorage?.SearchWeightedTags(_jobStorage, tag) ?? Enumerable.Empty <TagDto>());
 }
예제 #10
0
 public IDictionary <string, int> GetJobStateCount(string[] tags, int maxTags = 50)
 {
     return(ServiceStorage?.GetJobStateCount(_jobStorage, tags.Select(t => t.GetSetKey()).ToArray(), maxTags) ?? new Dictionary <string, int>());
 }
예제 #11
0
 public long GetJobCount(string[] tags, string stateName = null)
 {
     return(ServiceStorage?.GetJobCount(_jobStorage, tags.Select(t => t.GetSetKey()).ToArray(), stateName) ?? 0);
 }