Ejemplo n.º 1
0
        public MainViewModel()
        {
            AggregateFormationConfig = new AggregateFormationConfig();
            FilmFormationConfig      = new FilmFormationConfig();
            SimulationProperties     = new SimulationProperties();

            LoggingViewModel = new LoggingViewModel();
            StatusViewModel  = new StatusViewModel(LoggingViewModel);

            AggFormationControlViewModel = new AggFormationControlViewModel(
                AggregateFormationConfig,
                SimulationProperties,
                StatusViewModel,
                LoggingViewModel);

            FilmFormationControlViewModel = new FilmFormationControlViewModel(
                FilmFormationConfig,
                SimulationProperties,
                AggFormationControlViewModel,
                StatusViewModel,
                LoggingViewModel);

            FilmAnalysisControlViewModel = new FilmAnalysisControlViewModel();

            ActivateItem(AggFormationControlViewModel);
        }
        public static IAggregateFormationConfig MapDTOtoAggregateFormationConfiguration(AggregateConfigurationDTO dto)
        {
            var config = new AggregateFormationConfig
            {
                TotalPrimaryParticles = dto.TotalPrimaryParticles,
                ClusterSize           = dto.ClusterSize,
                Df      = dto.Df,
                Kf      = dto.Kf,
                Epsilon = dto.Epsilon,
                Delta   = dto.Delta,
                MaxAttemptsPerCluster               = dto.MaxAttemptsPerCluster,
                MaxAttemptsPerAggregate             = dto.MaxAttemptsPerAggregate,
                LargeNumber                         = dto.LargeNumber,
                RandomGeneratorSeed                 = Convert.ToInt32(dto.RandomGeneratorSeed),
                RadiusMeanCalculationMethod         = GetRadiusMeanCalculationMethod(dto.RadiusMeanCalculationMethod),
                AggregateSizeMeanCalculationMethod  = GetAggregateSizeMeanCalculationMethod(dto.AggregateSizeMeanCalculationMethod),
                AggregateFormationType              = GetAggregateFormationType(dto.AggregateFormationType),
                AggregateSizeDistributionType       = GetSizeDistributionType(dto.AggregateSizeDistributionType),
                PrimaryParticleSizeDistributionType = GetSizeDistributionType(dto.PrimaryParticleSizeDistributionType)
            };

            return(config);
        }
 public AdvancedConfigViewModel(AggregateFormationConfig config)
 {
     Config = config;
 }