コード例 #1
0
        public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.EventCalculationInfo serial_EventCalculationInfo = serial_Class as FpmlSerializedCSharp.EventCalculationInfo;

            FpmlSerializedCSharp.PreConditionEvent serial_preConditionEvent = serial_EventCalculationInfo.PreConditionEvent_;
            string preConditionEventtype = serial_preConditionEvent.Excel_type_.ValueStr;

            this.preConditionEventViewModel_ = PreConditionEventViewModel.CreatePreConditionEvent(preConditionEventtype);
            this.preConditionEventViewModel_.setFromSerial(serial_preConditionEvent);

            List <FpmlSerializedCSharp.EventCalculation> serial_eventCalculation = serial_EventCalculationInfo.EventCalculation_;

            this.eventCalculationViewModel_ = new ObservableCollection <EventCalculationViewModel>();
            foreach (var item in serial_eventCalculation)
            {
                string type = item.Excel_type_.ValueStr;
                EventCalculationViewModel viewModel = EventCalculationViewModel.CreateEventCalculation(type);
                viewModel.setFromSerial(item);
                this.eventCalculationViewModel_.Add(viewModel);
            }

            FpmlSerializedCSharp.JointSimpleCalculation serial_jointSimpleCalculation = serial_EventCalculationInfo.JointSimpleCalculation_;
            string jointSimpleCalculationtype = serial_jointSimpleCalculation.Excel_type_.ValueStr;

            this.jointSimpleCalculationViewModel_ = JointSimpleCalculationViewModel.CreateJointSimpleCalculation(jointSimpleCalculationtype);
            this.jointSimpleCalculationViewModel_.setFromSerial(serial_jointSimpleCalculation);

            this.pastEventOcc_ = serial_EventCalculationInfo.PastEventOcc_.ValueStr;

            FpmlSerializedCSharp.RefVariable_eventOcc serial_refVariable_eventOcc = serial_EventCalculationInfo.RefVariable_eventOcc_;
            string refVariable_eventOcctype = serial_refVariable_eventOcc.Excel_type_.ValueStr;

            this.refVariable_eventOccViewModel_ = RefVariable_eventOccViewModel.CreateRefVariable_eventOcc(refVariable_eventOcctype);
            this.refVariable_eventOccViewModel_.setFromSerial(serial_refVariable_eventOcc);
        }
        public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.EventCalculationList serial_EventCalculationList = serial_Class as FpmlSerializedCSharp.EventCalculationList;

            List <FpmlSerializedCSharp.EventCalculation> serial_eventCalculation = serial_EventCalculationList.EventCalculation_;

            this.eventCalculationViewModel_ = new ObservableCollection <EventCalculationViewModel>();
            foreach (var item in serial_eventCalculation)
            {
                string type = item.Excel_type_.ValueStr;
                EventCalculationViewModel viewModel = EventCalculationViewModel.CreateEventCalculation(type);
                viewModel.setFromSerial(item);
                this.eventCalculationViewModel_.Add(viewModel);
            }
        }