コード例 #1
0
        public void AddComponentToConfiguration(IPCComponent pCComponent)
        {
            if (pCComponent == null)
            {
                return;
            }

            ChosenPCComponents.Add(pCComponent);
        }
コード例 #2
0
        public bool ApplyChanges()
        {
            PCConfigurationBaseViewModel pCConfigurationViewModel = new PCConfigurationViewModel();

            pCConfigurationViewModel.PCComponents = ChosenPCComponents.ToList();

            if ((ConfigurationType & ConfigurationType.ExtraOrdinary) == ConfigurationType.ExtraOrdinary)
            {
                pCConfigurationViewModel = new ExtraordinaryPCConfiguration(pCConfigurationViewModel, Coefficient ?? 0);
            }

            TotalPrice = pCConfigurationViewModel.CalculateTotalConfigurationPrice();

            return(true);
        }