Пример #1
0
        private void init(string filePath)
        {
            LoadData     ld          = new LoadData();
            InitDataLoad initDataSet = ld.LoadInitData(filePath);

            CurrnetTime = initDataSet.InitParameters.startDate;

            dataManager = new DataManager(initDataSet.MetaData);
            dataManager.UpdateTime(CurrnetTime);

            clock       = new Clock(CurrnetTime);
            clock.Tick += ClockTick;

            WarehouseManager  = new WarehouseManager(initDataSet.InitParameters.InitWarehouseInventory, initDataSet.InitParameters.WarehouseMaxCapacity);
            financeManager    = new FinanceManager(initDataSet.InitParameters.InitBankStartBalance);
            DataSummary       = new DataSummaryClass(WarehouseManager, dataManager, financeManager, CurrnetTime, marketingManager, purchaseManager);
            productionManager = new ProductionManager(initDataSet.InitLists.InitToolsList, initDataSet.MetaData.ToolTypeMetaData);
            purchaseManager   = new PurchaseManager(initDataSet.InitLists.InitPurchaseOrders);
            marketingManager  = new MarketingManager(initDataSet.InitLists.InitCustomersOrderList, initDataSet.InitLists.InitFutureCustomersOrderList);


            foreach (ProductionOrder productionOrder in initDataSet.InitLists.InitProductionOrderList.GetProductionOrderList())
            {
                productionManager.AddProductionOrder(productionOrder);
            }

            productionManager.tempStartProduction();
        }