Esempio n. 1
0
        public ResultViewModel(IDataService dataService)
        {
            _dataService = dataService;
            _dataService.GetData(
                (item, error) =>
            {
                if (error != null)
                {
                    // Report error here
                    return;
                }

                T             = new RealParamViewBase("Outlet Temperature:", item.UnitOp.Results["TOut"] as CapeRealParameter);
                P             = new RealParamViewBase("Outlet Pressure:", item.UnitOp.Results["POut"] as CapeRealParameter);
                Duty          = new RealParamViewBase("Duty:", item.UnitOp.Results["HeatdutyOut"] as CapeRealParameter);
                VaporFraction = new RealParamViewBase("VaporFraction:", item.UnitOp.Results["VaporFractionOut"] as CapeRealParameter);
            });
        }
Esempio n. 2
0
        public SpecificationViewModel(IDataService dataService)
        {
            _dataService = dataService;
            _dataService.GetData(
                (item, error) =>
            {
                if (error != null)
                {
                    // Report error here
                    return;
                }

                SpecOption    = new OptionParamViewModel("Flash Type:", item.UnitOp.Parameters["FlashOption"] as CapeOptionParameter);
                T             = new RealParamViewBase("Temperature:", item.UnitOp.Parameters["T"] as CapeRealParameter);
                P             = new RealParamViewBase("Pressure:", item.UnitOp.Parameters["P"] as CapeRealParameter);
                Duty          = new RealParamViewBase("Duty:", item.UnitOp.Parameters["Heatduty"] as CapeRealParameter);
                VaporFraction = new RealParamViewBase("VaporFraction:", item.UnitOp.Parameters["VaporFraction"] as CapeRealParameter);
            });
        }