コード例 #1
0
ファイル: BaseViewModel.cs プロジェクト: Osceus/Countdown
 public BaseViewModel(INavigationService navService, IEventAggregator eventAggregator, IPurchaseManager purchaseMgr, IMessageSettingsRepository repository)
 {
     this._purchaseManager = purchaseMgr;
     this._eventAggregator = eventAggregator;
     this._navService = navService;
     this._messageRepository = repository;
     this.GoBackCommand = new DelegateCommand(OnGoBack, () => _navService.CanGoBack());
 }
コード例 #2
0
 public ProductsController(IAppUserManager user, IProductManager product, IPurchaseManager purchase, IPrintManager print, ICartManager cart)
 {
     _user     = user;
     _product  = product;
     _purchase = purchase;
     _print    = print;
     _cart     = cart;
 }
コード例 #3
0
 public ValuesController(ILogger <ValuesController> logger, IApplicationManager applicationManager, IPurchaseManager purchaseManager)
 {
     _logger             = logger ?? throw new ArgumentNullException(nameof(logger));
     _applicationManager = applicationManager ?? throw new ArgumentNullException(nameof(applicationManager));
     _purchaseManager    = purchaseManager ?? throw new ArgumentNullException(nameof(purchaseManager));
 }
コード例 #4
0
 public MessageSettingsHubPageViewModel(INavigationService navService, IEventAggregator eventAggregator, IPurchaseManager purchaseMgr, IMessageSettingsRepository repository)
     : base(navService, eventAggregator, purchaseMgr, repository)
 {
     this.AddToFavorites = new DelegateCommand(async () =>
     {
         var settingsID = this.Settings.ID;
         await this.MessageRepository.AddMessageSettingsToFavorites(FavoriteMessageSettings.CreateFavoriteMessageSettings(this.Settings));
         var fav = this.MessageRepository.GetFavoriteMessageSettingsFromID(settingsID);
         this.Settings = fav;
         this.FavoriteSettings = fav;
     });
     this.RemoveFromFavorites = new DelegateCommand(async () =>
     {
         var tmpSettings = MessageSettings.Clone(this.Settings);
         await this.MessageRepository.RemoveMessageSettingsFromFavorites(FavoriteMessageSettings.CreateFavoriteMessageSettings(this.Settings));
         this.Settings = tmpSettings;
         SetProperty(ref this._favoriteSettings, null);
     });
     this.ClearAllFavoriteMessages = new DelegateCommand(async () =>
     {
         var tmpSettings = MessageSettings.Clone(this.Settings);
         await this.MessageRepository.ClearFavoriteMessages();
         this.Settings = tmpSettings;
     });
     this.ClearAllOldMessages = new DelegateCommand(async () =>
     {
         var tmpSettings = MessageSettings.Clone(this.Settings);
         await this.MessageRepository.ClearOldMessages();
         this.Settings = tmpSettings;
     });
     this.NewMessage = new DelegateCommand(() => 
         {
             this.Settings = new MessageSettings();
             this.FavoriteSettings = null;
             this.OldSettings = null;
         });
 }
コード例 #5
0
 public MessageConfigurationPageViewModel(INavigationService navService, MessageSettings settings, IEventAggregator eventAggregator, IPurchaseManager purchaseMgr)
     : base(navService, eventAggregator, purchaseMgr)
 {
     this._settings = settings;
 }
コード例 #6
0
 public ClickManager(NanrDbContext context, IPurchaseManager purchaseManager)
 {
     this.context         = context;
     this.purchaseManager = purchaseManager;
 }
コード例 #7
0
 public PurchaseController(IMapper mapper, IPurchaseManager manager)
 {
     _mapper  = mapper;
     _manager = manager;
 }
コード例 #8
0
 public PurchaseController(IPurchaseManager purchaseManager)
 {
     this.purchaseManager = purchaseManager;
 }