public EditCartridgeViewModel(ConfigurationModel configurationModel,
                               AmmoModel cartridgesModel,
                               Cartridge cartridgeToEdit = null)
 {
     Cartridge = cartridgeToEdit ?? new Cartridge();
     isNew     = cartridgeToEdit == null;
     configurationModel.Initialize();
     units                = configurationModel.Units;
     DisplayName          = "Cartridge Data";
     this.cartridgesModel = cartridgesModel;
 }
Exemplo n.º 2
0
        public AmmoViewModel(AmmoModel ammoModel,
                             RiflesModel riflesModel,
                             ConfigurationModel configurationModel,
                             IWindowManager windowManager,
                             IEventAggregator eventsAggregator)
            : base(eventsAggregator)
        {
#pragma warning disable CC0021 // Use nameof
            DisplayName = "Cartridges";
#pragma warning restore CC0021 // Use nameof
            this.ammoModel          = ammoModel;
            this.configurationModel = configurationModel;
            this.windowManager      = windowManager;

            configurationModel.Initialize();
            this.eventsAggregator = eventsAggregator;
            this.riflesModel      = riflesModel;
        }
        public ActionResult Configure()
        {
            ConfigurationModel model = ConfigurationModel.Initialize(Profile);

            return(View(model));
        }