コード例 #1
0
        public HenListViewModel(IMessageBroker messageBroker,IHenService henService, IHenHouseService houseService,
            NewHenCommand newHenCommand,EditHenCommand editHenCommand, DeleteHenCommand deleteCommand)
        {
            this.henService = henService;
            this.messageBroker = messageBroker;
            this.houseService = houseService;

            NewCommand = newHenCommand;
            EditCommand = editHenCommand;
            DeleteCommand = deleteCommand;

            hens = new ObservableCollection<HenListItem>();
            NavigationCommands = new List<CommandBase>() {NewCommand, DeleteCommand};
            SubscribeMessages();
        }
コード例 #2
0
        public HenListViewModel(IMessageBroker messageBroker, IHenService henService, IHenHouseService houseService,
                                NewHenCommand newHenCommand, EditHenCommand editHenCommand, DeleteHenCommand deleteCommand)
        {
            this.henService    = henService;
            this.messageBroker = messageBroker;
            this.houseService  = houseService;

            NewCommand    = newHenCommand;
            EditCommand   = editHenCommand;
            DeleteCommand = deleteCommand;


            hens = new ObservableCollection <HenListItem>();
            NavigationCommands = new List <CommandBase>()
            {
                NewCommand, DeleteCommand
            };
            SubscribeMessages();
        }
コード例 #3
0
        public HenEntryViewModel(IMessageBroker messageBroker, IHenService henService, IHenHouseService houseService,
            SaveHenCommand saveCommand, CancelCommand cancelCommand)
        {
            this.henService = henService;
            this.messageBroker = messageBroker;
            this.houseService = houseService;

            ActualSaveCommand = saveCommand;
            CancelCommand = cancelCommand;

            PropertiesToValidate = new List<string>
                {
                    "Name",
                    "Type",
                    "HouseId"
                };

            OnRefreshHouseList(null);

            InitializeCommands();
            SubscribeMessages();
        }
コード例 #4
0
        public HenEntryViewModel(IMessageBroker messageBroker, IHenService henService, IHenHouseService houseService,
                                 SaveHenCommand saveCommand, CancelCommand cancelCommand)
        {
            this.henService    = henService;
            this.messageBroker = messageBroker;
            this.houseService  = houseService;

            ActualSaveCommand = saveCommand;
            CancelCommand     = cancelCommand;

            PropertiesToValidate = new List <string>
            {
                "Name",
                "Type",
                "HouseId"
            };

            OnRefreshHouseList(null);

            InitializeCommands();
            SubscribeMessages();
        }
コード例 #5
0
 public HenController(IHenService henService)
 {
     this.henService = henService;
 }
コード例 #6
0
 public DeleteHenCommand(IMessageBroker messageBroker, IHenService henService)
 {
     this.henService    = henService;
     this.messageBroker = messageBroker;
 }
コード例 #7
0
 public HenController(IHenService henService)
 {
     this.henService = henService;
 }
コード例 #8
0
 public DeleteHenCommand(IMessageBroker messageBroker, IHenService henService)
 {
     this.henService = henService;
     this.messageBroker = messageBroker;
 }
コード例 #9
0
 public SaveHenCommand(IMessageBroker messageBroker, IHenService henService)
 {
     Text               = () => "Save";
     this.henService    = henService;
     this.messageBroker = messageBroker;
 }
コード例 #10
0
 public SaveHenCommand(IMessageBroker messageBroker, IHenService henService)
 {
     Text = () => "Save";
     this.henService = henService;
     this.messageBroker = messageBroker;
 }
コード例 #11
0
 public HensController(IHenService henService) : base(henService)
 {
 }