Esempio n. 1
0
        private static void Main()
        {
            var st = new StorageDepartment(CreateRobotMachine(), "Заготовительный цех№1", CreatePipleListForStorageDepartment(), new List <Production>(CreatePrimaryProduction()));
            var pd = new ProcessingDepartment("Обрабатывающий цех№1", CreatePipleListForProcessingDepartment(), new List <Production>(CreateSecondaryProduction()));
            var ad = new AssemblyDepartment("Сборочно-монтажный цех№1", CreatePipleListForAssembluDepartment(), new List <Production>(CreateFinalProduction()));

            var department = new List <Department> {
                st, pd, ad
            };

            var industry = new Industry("Инастриз", department);

            ShowClassWork(industry);
        }
 public Department CreateDepartment()
 {
     if (TypeDepartament == TypeDepartment.StorageDepartment)
     {
         Departament = new StorageDepartment(Robot, NameDepartment, PipleList, ProductionList);
     }
     if (TypeDepartament == TypeDepartment.ProcessingDepartment)
     {
         Departament = new ProcessingDepartment(NameDepartment, PipleList, ProductionList);
     }
     if (TypeDepartament == TypeDepartment.AssemblyDepartment)
     {
         Departament = new AssemblyDepartment(NameDepartment, PipleList, ProductionList);
     }
     return(Departament);
 }
Esempio n. 3
0
        public static Industry InitializeOrganization(Industry industry)
        {
            var st = new StorageDepartment(CreateRobotMachine(), "Заготовительный цех№1",
                                           CreatePipleListForStorageDepartment(), new List <Production>(CreateProduction()));

            var pd = new ProcessingDepartment("Обрабатывающий цех№1", CreatePipleListForProcessingDepartment(),
                                              new List <Production>(CreateProduction()));

            var ad = new AssemblyDepartment("Сборочно-монтажный цех№1", CreatePipleListForAssembluDepartment(),
                                            new List <Production>(CreateProduction()));

            var department = new List <Department> {
                st, pd, ad
            };

            return(industry = new Industry("Инастриз", department));
        }
Esempio n. 4
0
        public static void AddDepartmentFromIndusty(Industry industry)
        {
            Console.WriteLine("Выбор типа цеха:");
            Console.WriteLine("1.Заготавливающий цех");
            Console.WriteLine("2.Обрабатывающий цех");
            Console.WriteLine("3.Сборочно-монтажный цех");
            int itemDep = Convert.ToInt32(Console.ReadLine());

            var pipleList = new List <string> {
                "Зощенко Е.Ф.", "Клубина П.Я.", "Носов Н.П."
            };

            switch (itemDep)
            {
            case 1:
            {
                var machineList = new List <RobotMachine>
                {
                    new RobotMachine("Станочный резчик по дереву", 15),
                    new RobotMachine("Автоматизированный станок резьбы по дереву", 10)
                };

                var productionList = new List <PrimaryProduction>
                {
                    new PrimaryProduction(TypeMaterial.Wood, TypeProduction.Plate, "Лист W-4", new Size(50, 70, 5, 3), 10000, 250m),
                    new PrimaryProduction(TypeMaterial.Wood, TypeProduction.Rod, "Прут W-5", new Size(0.5, 0.5, 5, 7), 5000, 150m)
                };

                var newSt = new StorageDepartment(machineList, "Заготовительный цех№2", pipleList, new List <Production>(productionList));
                industry.AddDepartment(newSt);
            }
            break;

            case 2:
            {
                var productionList = new List <SecondaryProduction>
                {
                    new SecondaryProduction("Заготовка-I5", new Size(50, 50, 12, 5),
                                            new PrimaryProduction(TypeMaterial.Iron, TypeProduction.Rod, "Прут IR-5", new Size(0.5, 0.5, 5, 7), 200, 1000m)),
                    new SecondaryProduction("Заготовка-P3", new Size(150, 50, 7, 40),
                                            new PrimaryProduction(TypeMaterial.Iron, TypeProduction.Plate, "Лист IR-3", new Size(5, 5, 1, 9), 250, 1500m))
                };

                var newPd = new ProcessingDepartment("Обрабатывающий цех№2", pipleList, new List <Production>(productionList));
                industry.AddDepartment(newPd);
            }
            break;

            case 3:
            {
                var productionList = new List <FinalProduction>
                {
                    new FinalProduction("Станок A09", new Size(100, 200, 160, 15), 100,
                                        new List <SecondaryProduction>
                        {
                            new SecondaryProduction("Заготовка-AL5", new Size(50, 50, 12, 5),
                                                    new PrimaryProduction(TypeMaterial.Aluminum, TypeProduction.Plate, "Лист AL-4", new Size(50, 70, 5, 3), 1000,
                                                                          250m)),
                            new SecondaryProduction("Заготовка-ТТ3", new Size(150, 7, 7, 40),
                                                    new PrimaryProduction(TypeMaterial.Steel, TypeProduction.Rod, "Прут ST-5", new Size(0.5, 0.5, 5, 7), 500,
                                                                          1500m))
                        }),
                    new FinalProduction("Станок автоматизированный B-8", new Size(200, 50, 50, 17), 100,
                                        new List <SecondaryProduction>
                        {
                            new SecondaryProduction("Заготовка-AL5", new Size(50, 50, 12, 5),
                                                    new PrimaryProduction(TypeMaterial.Aluminum, TypeProduction.Plate, "Лист AL-4", new Size(50, 70, 5, 3), 1000,
                                                                          250m)),
                            new SecondaryProduction("Заготовка-ТТ3", new Size(150, 7, 7, 40),
                                                    new PrimaryProduction(TypeMaterial.Steel, TypeProduction.Rod, "Прут ST-5", new Size(0.5, 0.5, 5, 7), 500,
                                                                          1500m))
                        }),
                    new FinalProduction("Измеритель ЭТМ", new Size(50, 50, 30, 1.2), 100,
                                        new List <SecondaryProduction>
                        {
                            new SecondaryProduction("Заготовка-AL5", new Size(50, 50, 12, 5),
                                                    new PrimaryProduction(TypeMaterial.Aluminum, TypeProduction.Plate, "Лист AL-4", new Size(50, 70, 5, 3), 1000,
                                                                          250m))
                        }),
                };

                var newAd = new AssemblyDepartment("Сборочно-монтажный цех№2", pipleList, new List <Production>(productionList));
                industry.AddDepartment(newAd);
            }
            break;

            default:
                Console.WriteLine("Введено неверное значение");
                break;
            }
        }