public UsageEntryViewModel(IMessageBroker messageBroker, IConsumableUsageService usageService,
            IHenHouseService houseService, IConsumableService consumableService,
            SaveUsageCommand saveUsageCommand, CancelCommand cancelCommand, ShowUsageCommand showListCommand
            )
        {
            this.messageBroker = messageBroker;
            this.usageService = usageService;
            this.houseService = houseService;
            this.consumableService = consumableService;

            this.saveUsageCommand = saveUsageCommand;
            this.showListCommand = showListCommand;

            CancelCommand = cancelCommand;

            PropertiesToValidate = new List<string>()
            {
                "Date",
                "Total",
                "Details"
            };

            InitializeCommands();

            HouseList = new ObservableCollection<HenHouse>(houseService.GetAll());
            ConsumableList = new ObservableCollection<Consumable>(consumableService.GetAll());

            SubscribeMessages();
        }
Example #2
0
 public ManageRunController(IRunService runService, IUserService userService, IPlayerService playerService, IConsumableService consumableService)
 {
     this.runService        = runService;
     this.userService       = userService;
     this.playerService     = playerService;
     this.consumableService = consumableService;
 }
        public UsageEntryViewModel(IMessageBroker messageBroker, IConsumableUsageService usageService,
                                   IHenHouseService houseService, IConsumableService consumableService,
                                   SaveUsageCommand saveUsageCommand, CancelCommand cancelCommand, ShowUsageCommand showListCommand
                                   )
        {
            this.messageBroker     = messageBroker;
            this.usageService      = usageService;
            this.houseService      = houseService;
            this.consumableService = consumableService;

            this.saveUsageCommand = saveUsageCommand;
            this.showListCommand  = showListCommand;

            CancelCommand = cancelCommand;

            PropertiesToValidate = new List <string>()
            {
                "Date",
                "Total",
                "Details"
            };

            InitializeCommands();

            HouseList      = new ObservableCollection <HenHouse>(houseService.GetAll());
            ConsumableList = new ObservableCollection <Consumable>(consumableService.GetAll());

            SubscribeMessages();
        }
Example #4
0
 public void Configure(NetworkServicesConfig config)
 {
     if (clubPenguinClient != null)
     {
         clubPenguinClient.Destroy();
     }
     clubPenguinClient = new ClubPenguinClient(monoBehaviour, config.CPAPIServicehost, config.CPAPIClientToken, config.ClientApiVersion, config.CPGameServerZone, !offlineMode && config.CPGameServerEncrypted, config.CPGameServerDebug, config.CPLagMonitoring, config.CPGameServerLatencyWindowSize, config.CPWebServiceLatencyWindowSize, config.CPMonitoringServicehost, config.CPWebsiteAPIServicehost, offlineMode);
     currentConfig     = config;
     worldService      = new WorldService();
     worldService.Initialize(clubPenguinClient);
     playerStateService = new PlayerStateService();
     playerStateService.Initialize(clubPenguinClient);
     chatService = new ChatService();
     chatService.Initialize(clubPenguinClient);
     playerActionService = new PlayerActionService();
     playerActionService.Initialize(clubPenguinClient);
     iglooService = new IglooService();
     iglooService.Initialize(clubPenguinClient);
     inventoryService = new InventoryService();
     inventoryService.Initialize(clubPenguinClient);
     breadcrumbService = new BreadcrumbService();
     breadcrumbService.Initialize(clubPenguinClient);
     savedOutfitService = new SavedOutfitService();
     savedOutfitService.Initialize(clubPenguinClient);
     prototypeService = new PrototypeService();
     prototypeService.Initialize(clubPenguinClient);
     questService = new QuestService();
     questService.Initialize(clubPenguinClient);
     consumableService = new ConsumableService();
     consumableService.Initialize(clubPenguinClient);
     friendsService = new FriendsService();
     friendsService.Initialize(clubPenguinClient);
     rewardService = new RewardService();
     rewardService.Initialize(clubPenguinClient);
     taskService = new TaskNetworkService();
     taskService.Initialize(clubPenguinClient);
     minigameService = new MinigameService();
     minigameService.Initialize(clubPenguinClient);
     iapService = new IAPService();
     iapService.Initialize(clubPenguinClient);
     tutorialService = new TutorialService();
     tutorialService.Initialize(clubPenguinClient);
     moderationService = new ModerationService();
     moderationService.Initialize(clubPenguinClient);
     disneyStoreService = new DisneyStoreService();
     disneyStoreService.Initialize(clubPenguinClient);
     newsfeedService = new NewsfeedService();
     newsfeedService.Initialize(clubPenguinClient);
     catalogService = new CatalogService();
     catalogService.Initialize(clubPenguinClient);
     partyGameService = new PartyGameService();
     partyGameService.Initialize(clubPenguinClient);
     scheduledEventService = new ScheduledEventService();
     scheduledEventService.Initialize(clubPenguinClient);
     diagnosticsService = new DiagnosticsService();
     diagnosticsService.Initialize(clubPenguinClient);
     captchaService = new CaptchaService();
     captchaService.Initialize(clubPenguinClient);
 }
        public ConsumableListViewModel(IMessageBroker messageBroker, IConsumableService consumableService,
            NewConsumableCommand newCommand, EditConsumableCommand editCommand, DeleteConsumableCommand deleteCommand)
        {
            this.messageBroker = messageBroker;
            this.consumableService = consumableService;

            NewCommand = newCommand;
            EditCommand = editCommand;
            DeleteCommand = deleteCommand;

            NavigationCommands = new List<CommandBase>(){ NewCommand, DeleteCommand };
            SubscribeMessages();
        }
Example #6
0
        public BookingsController(IAuthenticationProvider authProvider,
                                  IPlaceService placeService, IBookingService bookingService,
                                  IViewModelFactory factory, IConsumableService consumableService,
                                  IBookedTablesService bookedTablesService, ITablesService tablesService)
        {
            if (authProvider == null)
            {
                throw new ArgumentNullException(nameof(authProvider));
            }

            if (placeService == null)
            {
                throw new ArgumentNullException(nameof(placeService));
            }

            if (bookingService == null)
            {
                throw new ArgumentNullException(nameof(bookingService));
            }

            if (factory == null)
            {
                throw new ArgumentNullException(nameof(factory));
            }

            if (consumableService == null)
            {
                throw new ArgumentNullException(nameof(consumableService));
            }

            if (bookedTablesService == null)
            {
                throw new ArgumentNullException(nameof(bookedTablesService));
            }

            if (tablesService == null)
            {
                throw new ArgumentNullException(nameof(tablesService));
            }

            this.authProvider        = authProvider;
            this.placeService        = placeService;
            this.bookingService      = bookingService;
            this.factory             = factory;
            this.consumableService   = consumableService;
            this.bookedTablesService = bookedTablesService;
            this.tablesService       = tablesService;
        }
        public ConsumableListViewModel(IMessageBroker messageBroker, IConsumableService consumableService,
                                       NewConsumableCommand newCommand, EditConsumableCommand editCommand, DeleteConsumableCommand deleteCommand)
        {
            this.messageBroker     = messageBroker;
            this.consumableService = consumableService;

            NewCommand    = newCommand;
            EditCommand   = editCommand;
            DeleteCommand = deleteCommand;

            NavigationCommands = new List <CommandBase>()
            {
                NewCommand, DeleteCommand
            };
            SubscribeMessages();
        }
        public ConsumableEntryViewModel(IMessageBroker messageBroker, IConsumableService consumableService, 
            SaveConsumableCommand saveCommand, CancelCommand cancelCommand)
        {
            this.consumableService = consumableService;
            this.messageBroker = messageBroker;

            ActualSaveCommand = saveCommand;
            CancelCommand = cancelCommand;

            ConsumableTypes = new List<Tuple<byte, string>>()
                {
                    Tuple.Create((byte)ConsumableType.Feed, LanguageData.ConsumableType_Feed),
                    Tuple.Create((byte)ConsumableType.Ovk, LanguageData.ConsumableType_Ovk)
                };

            PropertiesToValidate = new List<string>() { "Name", "UnitPrice" };

            InitializeCommands();
            SubscribeMessages();
        }
Example #9
0
        public ConsumablesController(IConsumableService consumableService,
                                     IPlaceService placeService, IViewModelFactory factory)
        {
            if (consumableService == null)
            {
                throw new ArgumentNullException(nameof(consumableService));
            }

            if (placeService == null)
            {
                throw new ArgumentNullException(nameof(placeService));
            }

            if (factory == null)
            {
                throw new ArgumentNullException(nameof(factory));
            }

            this.consumableService = consumableService;
            this.placeService      = placeService;
            this.factory           = factory;
        }
Example #10
0
        public ConsumableEntryViewModel(IMessageBroker messageBroker, IConsumableService consumableService,
                                        SaveConsumableCommand saveCommand, CancelCommand cancelCommand)
        {
            this.consumableService = consumableService;
            this.messageBroker     = messageBroker;

            ActualSaveCommand = saveCommand;
            CancelCommand     = cancelCommand;

            ConsumableTypes = new List <Tuple <byte, string> >()
            {
                Tuple.Create((byte)ConsumableType.Feed, LanguageData.ConsumableType_Feed),
                Tuple.Create((byte)ConsumableType.Ovk, LanguageData.ConsumableType_Ovk)
            };

            PropertiesToValidate = new List <string>()
            {
                "Name", "UnitPrice"
            };

            InitializeCommands();
            SubscribeMessages();
        }
 public ConsumableController(IConsumableService oserv)
 {
     consumableService = oserv;
 }
 public DeleteConsumableCommand(IMessageBroker messageBroker, IConsumableService consumableService)
 {
     this.consumableService = consumableService;
     this.messageBroker = messageBroker;
 }
Example #13
0
 public ConsumablesController(IConsumableService service) : base(service)
 {
 }
 public ConsumablesController(IConsumableService consumableService)
 {
     _consumableService = consumableService;
 }
Example #15
0
 public DeleteConsumableCommand(IMessageBroker messageBroker, IConsumableService consumableService)
 {
     this.consumableService = consumableService;
     this.messageBroker     = messageBroker;
 }
Example #16
0
 public SaveConsumableCommand(IMessageBroker messageBroker, IConsumableService consumableService)
     : base(messageBroker)
 {
     this.messageBroker     = messageBroker;
     this.consumableService = consumableService;
 }