Exemple #1
0
        public static ReferenceCalculationViewModel CreateReferenceCalculation(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.ReferenceCalculation serial_ReferenceCalculation = serial_Class as FpmlSerializedCSharp.ReferenceCalculation;
            string typeStr = serial_ReferenceCalculation.Type_.ValueStr;

            return(ReferenceCalculationViewModel.CreateReferenceCalculation(typeStr));
        }
Exemple #2
0
        public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.ReferenceCalculationInfo serial_ReferenceCalculationInfo = serial_Class as FpmlSerializedCSharp.ReferenceCalculationInfo;

            FpmlSerializedCSharp.FixingInformation serial_fixingInformation = serial_ReferenceCalculationInfo.FixingInformation_;
            this.fixingInformationViewModel_.setFromSerial(serial_fixingInformation);

            List <FpmlSerializedCSharp.ReferenceCalculation> serial_referenceCalculation = serial_ReferenceCalculationInfo.ReferenceCalculation_;

            this.referenceCalculationViewModel_ = new ObservableCollection <ReferenceCalculationViewModel>();
            foreach (var item in serial_referenceCalculation)
            {
                string type = item.Type_.ValueStr;
                ReferenceCalculationViewModel viewModel = ReferenceCalculationViewModel.CreateReferenceCalculation(type);
                viewModel.setFromSerial(item);
                this.referenceCalculationViewModel_.Add(viewModel);
            }

            FpmlSerializedCSharp.OperatorND serial_operatorND = serial_ReferenceCalculationInfo.OperatorND_;
            string operatorNDtype = serial_operatorND.Type_.ValueStr;

            this.operatorNDViewModel_ = OperatorNDViewModel.CreateOperatorND(operatorNDtype);
            this.operatorNDViewModel_.setFromSerial(serial_operatorND);

            FpmlSerializedCSharp.PostCalculation serial_postCalculation = serial_ReferenceCalculationInfo.PostCalculation_;
            this.postCalculationViewModel_.setFromSerial(serial_postCalculation);

            FpmlSerializedCSharp.RefVariable_referenceValue serial_refVariable_referenceValue = serial_ReferenceCalculationInfo.RefVariable_referenceValue_;
            this.refVariable_referenceValueViewModel_.setFromSerial(serial_refVariable_referenceValue);

            //this.view_ = new ReferenceCalculationInfoView();
            //this.view_.DataContext = this;
        }