void ViewClearBuild(object sender, EventArgs e)
        {
            var boEntity = mBuildManager.CurrentBuildOrder.GenerateBuildOrderEntity();

            boEntity.BuildOrderItems = new List <string>();

            mBuildManager.LoadBuildOrder(boEntity);

            UpdateView();
        }
        public void LoadBuildOrder(BuildOrderEntity bo, BuildOrderProcessorConfiguration config)
        {
            mConfig = config;

            mBuildManager = new BuildOrderProcessor(mConfig);

            mBuildManager.LoadBuildOrder(bo);

            UpdateView();
        }
Beispiel #3
0
        public ServiceListResponse <BuildOrderItemInfo> GetProcessedBuildItems(BuildOrder build, string versionsFolder)
        {
            var config = GetConfig(build.SC2VersionID, build.Race, versionsFolder);

            var processor = new BuildOrderProcessor(config);

            var convertedBuild = ConvertModelToEntity(build);

            if (convertedBuild == null)
            {
                throw new ApplicationException("Cannot convert build order!");
            }

            processor.LoadBuildOrder(convertedBuild);

            var result = GenerateBuildItems(processor.CurrentBuildOrder, config);

            return(new ServiceListResponse <BuildOrderItemInfo>(result));
        }