Пример #1
0
        private void ShowResults()
        {
            SimpleModel save = simpleModel;

            Results.ResultValuesPackCC rvp = new Results.ResultValuesPackCC();

            var res = simpleModel.AnalyzeIntensities(SimpleModel.AnalyzeType.RAPID);

            rvp.RapidCost = (decimal)res.Item1 * 100; rvp.RapidCapex = (decimal)res.Item2 * 100;

            res        = simpleModel.AnalyzeIntensities(SimpleModel.AnalyzeType.ENTERPRISE);
            rvp.EFCost = (decimal)res.Item1 * 100; rvp.EFCapex = (decimal)res.Item2 * 100;

            res        = simpleModel.AnalyzeIntensities(SimpleModel.AnalyzeType.CAPACITY);
            rvp.COCost = (decimal)res.Item1 * 100; rvp.COCapex = (decimal)res.Item2 * 100;

            Results.ResultValuePackCB rvpCB = new Results.ResultValuePackCB();

            res = simpleModel.AnalyzeInvestments(SimpleModel.AnalyzeType.RAPID);
            rvpCB.RapidCapex = (decimal)res.Item1 * 100; rvpCB.RapidBR = (decimal)res.Item2 * 100;

            res           = simpleModel.AnalyzeInvestments(SimpleModel.AnalyzeType.ENTERPRISE);
            rvpCB.EFCapex = (decimal)res.Item1 * 100; rvpCB.EFBR = (decimal)res.Item2 * 100;

            res           = simpleModel.AnalyzeInvestments(SimpleModel.AnalyzeType.CAPACITY);
            rvpCB.COCapex = (decimal)res.Item1 * 100; rvpCB.COBR = (decimal)res.Item2 * 100;

            Results.ResultValuePackC rvpCI = new Results.ResultValuePackC();

            var resCI = simpleModel.CostIntensity(SimpleModel.AnalyzeType.RAPID);

            rvpCI.RapidBase = 100; rvpCI.Rapid5 = (decimal)(resCI * ((100.0 / simpleModel.BaseCostIntensity()) / 100.0) * 100);

            resCI        = simpleModel.CostIntensity(SimpleModel.AnalyzeType.ENTERPRISE);
            rvpCI.EFBase = 100; rvpCI.EF5 = (decimal)(resCI * ((100.0 / simpleModel.BaseCostIntensity()) / 100.0) * 100);

            resCI        = simpleModel.CostIntensity(SimpleModel.AnalyzeType.CAPACITY);
            rvpCI.COBase = 100; rvpCI.CO5 = (decimal)(resCI * ((100.0 / simpleModel.BaseCostIntensity()) / 100.0) * 100);

            Results.ResultValuePackC rvpTC = new Results.ResultValuePackC();

            var resTC = simpleModel.TotalCost(SimpleModel.AnalyzeType.RAPID);

            rvpTC.RapidBase = 100; rvpTC.Rapid5 = (decimal)resTC * 100;

            resTC        = simpleModel.TotalCost(SimpleModel.AnalyzeType.ENTERPRISE);
            rvpTC.EFBase = 100; rvpTC.EF5 = (decimal)resTC * 100;

            resTC        = simpleModel.TotalCost(SimpleModel.AnalyzeType.CAPACITY);
            rvpTC.COBase = 100; rvpTC.CO5 = (decimal)resTC * 100;

            Results.ResultValuePackC rvpR = new Results.ResultValuePackC();

            var resR = simpleModel.TotalRevenue(SimpleModel.AnalyzeType.RAPID) / simpleModel.AR * 100;

            rvpR.RapidBase = 100; rvpR.Rapid5 = (decimal)resR;

            resR        = simpleModel.TotalRevenue(SimpleModel.AnalyzeType.ENTERPRISE) / simpleModel.AR * 100;
            rvpR.EFBase = 100; rvpR.EF5 = (decimal)resR;

            resR        = simpleModel.TotalRevenue(SimpleModel.AnalyzeType.CAPACITY) / simpleModel.AR * 100;
            rvpR.COBase = 100; rvpR.CO5 = (decimal)resR;

            Results.ResultValuePackERC rvpERC = new Results.ResultValuePackERC();

            var resERC = simpleModel.IndexedEnterpriseContribution(SimpleModel.AnalyzeType.BASE);

            rvpERC.ExTotal = 100; rvpERC.ExEnterprise = (decimal)resERC;

            resERC            = simpleModel.IndexedEnterpriseContribution(SimpleModel.AnalyzeType.RAPID);
            rvpERC.RapidTotal = (decimal)simpleModel.IndexedTotalRev(SimpleModel.AnalyzeType.RAPID); rvpERC.RapidEnterprise = (decimal)resERC;

            resERC         = simpleModel.IndexedEnterpriseContribution(SimpleModel.AnalyzeType.ENTERPRISE);
            rvpERC.EFTotal = (decimal)simpleModel.IndexedTotalRev(SimpleModel.AnalyzeType.ENTERPRISE); rvpERC.EFEnterprise = (decimal)resERC;

            resERC         = simpleModel.IndexedEnterpriseContribution(SimpleModel.AnalyzeType.CAPACITY);
            rvpERC.COTotal = (decimal)simpleModel.IndexedTotalRev(SimpleModel.AnalyzeType.CAPACITY); rvpERC.COEnterprise = (decimal)resERC;

            //Results resUICC = new Results(rvp), resUICI = new Results(rvpCI), resUITC = new Results(rvpTC, "Total Cost"), resUIR = new Results(rvpR, "Revenues"), resUIERC = new Results(rvpERC);
            Full_Results resUICB = new Full_Results(rvpCB, rvp, rvpCI, "Cost Intensities", rvpTC, "Total Cost", rvpR, "Revenues", rvpERC);

            resUICB.ShowDialog();
            simpleModel = save;
        }
Пример #2
0
        public Full_Results(Results.ResultValuePackCB rvpCB, Results.ResultValuesPackCC rvpCC, Results.ResultValuePackC rvpCI, string titleCI, Results.ResultValuePackC rvpTC, string titleTC, Results.ResultValuePackC rvpR, string titleR, Results.ResultValuePackERC rvpERC)
        {
            InitializeComponent();
            this.WindowStartupLocation = WindowStartupLocation.CenterScreen;

            Results res = new Results(rvpCB);

            ContentAreaCB.Content  = res;
            ContentAreaCC.Content  = new Results(rvpCC);
            ContentAreaCI.Content  = new Results(rvpCI, titleCI);
            ContentAreaTC.Content  = new Results(rvpTC, titleTC);
            ContentAreaR.Content   = new Results(rvpR, titleR);
            ContentAreaERC.Content = new Results(rvpERC);
        }