示例#1
0
        public MenuBarViewModel(IUntappdService untappdService, IInteractionRequestService interactionRequestService,
                                ISettingService settingService,
                                IModuleManager moduleManager,
                                IRegionManager regionManager,
                                IEventAggregator eventAggregator,
                                IWebDownloader webDownloader,
                                IReportingService reportingService) : base(regionManager)
        {
            this.interactionRequestService = interactionRequestService;
            this.settingService            = settingService;
            this.untappdService            = untappdService;
            this.moduleManager             = moduleManager;
            this.eventAggregator           = eventAggregator;
            this.webDownloader             = webDownloader;
            this.reportingService          = reportingService;

            GoToWelcomeCommand           = new DelegateCommand(GoToWelcome);
            RenameProjectCommand         = new DelegateCommand(RenameProject);
            SaveProjectCommand           = new DelegateCommand(SaveProject);
            SaveAsProjectCommand         = new DelegateCommand(SaveAsProject);
            DownloadProjectMediaCommand  = new DelegateCommand(DownloadProjectMedia);
            UploadProjectPhotoCommand    = new DelegateCommand(UploadProjectPhotos);
            WebDownloadProjectCommand    = new DelegateCommand(WebDownloadProject);
            CheckinsProjectReportCommand = new DelegateCommand(CheckinsProjectReport);
            HelpCommand = new DelegateCommand(Help);
        }
示例#2
0
 public AboutViewModel(IUntappdService untappdService)
 {
     this.untappdService = untappdService;
     Version             = CommunicationHelper.GetTitle();
     if (untappdService.IsUNTPProject())
     {
         ImagePaths = GetImagePaths();
     }
 }
示例#3
0
        public BeerSearchViewModel()
        {
            Title = "Search";
            Beers = new ObservableCollection <Beer>();

            _untappdService = new UntappdService();

            SearchCommand     = new Command <string>(async(query) => await SearchBeer(query));
            SelectBeerCommand = new Command(async() => await NewMethod());
        }
示例#4
0
 public UntappdViewModel(IUntappdService untappdService, IModuleManager moduleManager,
                         IRegionManager regionManager,
                         IInteractionRequestService interactionRequestService,
                         ISettingService settingService) : base(regionManager)
 {
     this.untappdService            = untappdService;
     this.moduleManager             = moduleManager;
     this.interactionRequestService = interactionRequestService;
     this.settingService            = settingService;
 }
示例#5
0
        public TreeViewModel(IUntappdService untappdService, IModuleManager moduleManager,
                             IRegionManager regionManager,
                             IEventAggregator eventAggregator,
                             ISettingService settingService) : base(moduleManager, regionManager)
        {
            this.untappdService  = untappdService;
            this.eventAggregator = eventAggregator;
            this.settingService  = settingService;

            UniqueCheckedCommand = new DelegateCommand <bool?>(UniqueChecked);
            TreeItems            = new ObservableCollection <TreeItemViewModel>();
        }
示例#6
0
        public ShellViewModel(IUntappdService untappdService, IInteractionRequestService interactionRequestService,
                              IRegionManager regionManager,
                              ISettingService settingService,
                              IModuleManager moduleManager,
                              IArgumentsProvider argumentsProvider)
        {
            this.untappdService            = untappdService;
            this.interactionRequestService = interactionRequestService;
            this.regionManager             = regionManager;
            this.settingService            = settingService;
            this.moduleManager             = moduleManager;
            this.argumentsProvider         = argumentsProvider;

            ClosingCommand = new DelegateCommand <CancelEventArgs>(Closing);
            untappdService.UpdateUntappdUserNameEvent += UpdateTitle;
            untappdService.CleanUntappdEvent          += UpdateTitle;
        }
示例#7
0
        public WelcomeViewModel(IUntappdService untappdService, IInteractionRequestService interactionRequestService,
                                ISettingService settingService,
                                IModuleManager moduleManager,
                                IRegionManager regionManager,
                                IEventAggregator eventAggregator) : base(regionManager)
        {
            this.untappdService            = untappdService;
            this.interactionRequestService = interactionRequestService;
            this.settingService            = settingService;
            this.moduleManager             = moduleManager;
            this.settingService            = settingService;
            this.eventAggregator           = eventAggregator;

            OpenFileCommand      = new DelegateCommand(OpenFile);
            DropFileCommand      = new DelegateCommand <DragEventArgs>(DropFile);
            CreateProjectCommand = new DelegateCommand(CreateProject);
        }
示例#8
0
        public WebDownloadProjectViewModel(IRegionManager regionManager, IUntappdService untappdService,
                                           IWebApiClient webApiClient,
                                           IModuleManager moduleManager,
                                           IInteractionRequestService interactionRequestService) : base(moduleManager, regionManager)
        {
            this.untappdService            = untappdService;
            this.webApiClient              = webApiClient;
            this.moduleManager             = moduleManager;
            this.interactionRequestService = interactionRequestService;

            CheckAccessTokenCommand    = new DelegateCommand <string>(CheckAccessToken);
            FulllDownloadButtonCommand = new DelegateCommand(FulllDownloadCheckins);
            FirstDownloadButtonCommand = new DelegateCommand(FirstDownloadCheckins);
            ToEndDownloadButtonCommand = new DelegateCommand(ToEndDownloadCheckins);
            BeerUpdateButtonCommand    = new DelegateCommand(UpdateBeers);
            OkButtonCommand            = new DelegateCommand(Exit);
        }
示例#9
0
        public CheckinViewModel(IUntappdService untappdService, IInteractionRequestService interactionRequestService,
                                IWebDownloader webDownloader,
                                IEventAggregator eventAggregator,
                                IModuleManager moduleManager,
                                IRegionManager regionManager) : base(moduleManager, regionManager)
        {
            this.interactionRequestService = interactionRequestService;
            this.untappdService            = untappdService;
            this.eventAggregator           = eventAggregator;
            this.webDownloader             = webDownloader;

            loadingModuleName = typeof(PhotoLoadingModule).Name;
            loadingRegionName = RegionNames.PhotoLoadingRegion;

            CheckinUrl = DefautlValues.DefaultUrl;
            BeerUrl    = DefautlValues.DefaultUrl;
            BreweryUrl = DefautlValues.DefaultUrl;
            Badges     = new List <ImageItemViewModel>();

            CheckinVenueLocationCommand = new DelegateCommand(CheckinVenueLocation);
        }