Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContextController"/> class.
 /// </summary>
 /// <param name="userService">User service.</param>
 /// <param name="buyOfferService">Buy offer service.</param>
 /// <param name="sellOfferService">Sell offer service.</param>
 public ContextController(IUserService userService, IBuyOfferService buyOfferService, ISellOfferService sellOfferService, IShareService shareService)
 {
     _userService      = userService;
     _buyOfferService  = buyOfferService;
     _sellOfferService = sellOfferService;
     _shareService     = shareService;
 }
Ejemplo n.º 2
0
 public ShareController(IFsoService fsoService, IUserService userService, IShareService shareService, IMailService mailService)
 {
     _fsoService   = fsoService ?? throw new ArgumentNullException(nameof(fsoService));
     _userService  = userService ?? throw new ArgumentNullException(nameof(userService));
     _shareService = shareService ?? throw new ArgumentNullException(nameof(shareService));
     _mailService  = mailService ?? throw new ArgumentNullException(nameof(mailService));
 }
Ejemplo n.º 3
0
        public HomeViewModel(IDeviceService deviceService, IShareService shareService, ISettings settings,
                             ILocationService locationService, IMvxMessenger messenger, ISendPositionService sendPositionService, IPopupService popupService, ITimerService timer)
        {
            _deviceService       = deviceService;
            _shareService        = shareService;
            _settings            = settings;
            _locationService     = locationService;
            _messenger           = messenger;
            _sendPositionService = sendPositionService;
            _popupService        = popupService;
            _timer = timer;

            Title         = "TrackMe";
            PossibleTimes = new PossibleTimeProvider().GetPossibleTimes().ToObservable();
            SelectedTime  = new PossibleTime(240);

            _deviceService.LocationStatusChanged += (sender, args) =>
            {
                GpsStatus = args.Status;

                if (!_locationService.IsWatching && args.Status == LocationStatus.Started)
                {
                    _locationService.StartWatching();
                }
            };
            GpsStatus                  = _deviceService.LocationStatus;
            _locationMessageToken      = _messenger.Subscribe <LocationMessage>(GotLocation);
            _requestStartTrackingToken = _messenger.Subscribe <RequestStartTrackingMessage>(OnRequestStartTracking);
            _messenger.Subscribe <CloseAppMessage>(message =>
            {
                _messenger.Publish(new StopTrackingMessage(this, true, Token, PrivateToken, _timeEnd));
            });

            TrackConnectionStatus();
        }
Ejemplo n.º 4
0
        public ReadmeViewModel(IApplicationService applicationService, IShareService shareService, IActionMenuService actionMenuService)
        {
            Title = "Readme";

            var nonNullContentModel = this.WhenAnyValue(x => x.ContentModel).Select(x => x != null);

            ShareCommand = ReactiveCommand.Create(nonNullContentModel);
            ShareCommand.Subscribe(_ => shareService.ShareUrl(ContentModel.HtmlUrl));

            GoToGitHubCommand = ReactiveCommand.Create(nonNullContentModel);
            GoToGitHubCommand.Select(_ => ContentModel.HtmlUrl).Subscribe(this.ShowWebBrowser);

            GoToLinkCommand = ReactiveCommand.Create();
            GoToLinkCommand.OfType <string>().Subscribe(this.ShowWebBrowser);

            ShowMenuCommand = ReactiveCommand.CreateAsyncTask(nonNullContentModel, _ =>
            {
                var menu = actionMenuService.Create(Title);
                menu.AddButton("Share", ShareCommand);
                menu.AddButton("Show in GitHub", GoToGitHubCommand);
                return(menu.Show());
            });

            LoadCommand = ReactiveCommand.CreateAsyncTask(async x =>
            {
                var repository = applicationService.Client.Users[RepositoryOwner].Repositories[RepositoryName];
                ContentText    = await repository.GetReadmeRendered();
                ContentModel   = (await applicationService.Client.ExecuteAsync(repository.GetReadme())).Data;
            });
        }
Ejemplo n.º 5
0
 public MainViewModel(IScheduledNotificationService scheduledNotificationService,
                      IShareService shareService, IModalScreenService popupService)
 {
     _scheduledNotificationService = scheduledNotificationService;
     _shareService = shareService;
     _popupService = popupService;
 }
Ejemplo n.º 6
0
 public FsoController(IConfiguration configuration, IFsoService fsoService, IUserService userService, IShareService shareService)
 {
     this._storageSize = configuration.GetValue <string>("Storage:size");
     _fsoService       = fsoService ?? throw new ArgumentNullException(nameof(fsoService));
     _userService      = userService ?? throw new ArgumentNullException(nameof(userService));
     _shareService     = shareService ?? throw new ArgumentNullException(nameof(shareService));
 }
Ejemplo n.º 7
0
 public ApiV11Controller(IApiService auth, ITasksRepository repository, IDateTimeProviderService date, IShareService shareService)
 {
     _apiService      = auth;
     _tasksRepository = repository;
     _dateTimeService = date;
     _shareService    = shareService;
 }
Ejemplo n.º 8
0
 public UserService(IUserRepository userRepository, IMapper mapper, IShareService shareService,
                    IAccountService accountService)
 {
     _userRepository = userRepository;
     _mapper         = mapper;
     _shareService   = shareService;
     _accountService = accountService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="photos_DetailViewModel" /> class.
 /// </summary>
 /// <param name="dialogService">The Dialog Service.</param>
 /// <param name="navigationService">The Navigation Service.</param>
 /// <param name="speechService">The Speech Service.</param>
 /// <param name="shareService">The Share Service.</param>
 /// <param name="liveTileService">The Live Tile Service.</param>
 public photos_DetailViewModel(IDialogService dialogService, INavigationService navigationService, ISpeechService speechService, IShareService shareService, ILiveTileService liveTileService)
 {
     _dialogService     = dialogService;
     _navigationService = navigationService;
     _speechService     = speechService;
     _shareService      = shareService;
     _liveTileService   = liveTileService;
 }
        public RecipesRecipeDetail1ViewModel(INavigationService _NavigationService, ILiveTileService _LiveTileService, IDialogService _DialogService, IShareService _ShareService, ISpeechService _SpeechService)
        {
            this._NavigationService = _NavigationService;
			this._LiveTileService = _LiveTileService;
			this._DialogService = _DialogService;
			this._ShareService = _ShareService;
			this._SpeechService = _SpeechService;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="VideoAlbum_DetailVideosViewModel" /> class.
 /// </summary>
 /// <param name="dialogService">The Dialog Service.</param>
 /// <param name="navigationService">The Navigation Service.</param>
 /// <param name="speechService">The Speech Service.</param>
 /// <param name="shareService">The Share Service.</param>
 /// <param name="liveTileService">The Live Tile Service.</param>
 public VideoAlbum_DetailVideosViewModel(IDialogService dialogService, INavigationService navigationService, ISpeechService speechService, IShareService shareService, ILiveTileService liveTileService)
 {
     _dialogService = dialogService;
     _navigationService = navigationService;
     _speechService = speechService;
     _shareService = shareService;
     _liveTileService = liveTileService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AboutUsViewModel" /> class.
 /// </summary>
 /// <param name="dialogService">The Dialog Service.</param>
 /// <param name="navigationService">The Navigation Service.</param>
 /// <param name="speechService">The Speech Service.</param>
 /// <param name="shareService">The Share Service.</param>
 /// <param name="liveTileService">The Live Tile Service.</param>
 public AboutUsViewModel(IDialogService dialogService, INavigationService navigationService, ISpeechService speechService, IShareService shareService, ILiveTileService liveTileService)
 {
     _dialogService = dialogService;
     _navigationService = navigationService;
     _speechService = speechService;
     _shareService = shareService;
     _liveTileService = liveTileService;
 }
Ejemplo n.º 13
0
 public ShareController(IHostingEnvironment environment, IShareService shareService,
                        IShareTransactionService shareTransactionService, IMemberService memberService)
 {
     _hostingEnvironment      = environment;
     _shareService            = shareService;
     _shareTransactionService = shareTransactionService;
     _memberService           = memberService;
 }
Ejemplo n.º 14
0
 public AccountService(IShareService shareService, IAccountRepository accountRepository, IMapper mapper,
                       IRecordTypeService recordTypeService)
 {
     _accountRepository = accountRepository;
     _mapper            = mapper;
     _shareService      = shareService;
     _recordTypeService = recordTypeService;
 }
Ejemplo n.º 15
0
        public ShareController()
        {
            feedService   = new FeedService();
            friendService = new FriendService();
            followService = new FollowerService();

            shareService = new ShareService();
        }
Ejemplo n.º 16
0
 public ExpenseDetailViewModel(IDatabaseService databaseService, IDesktopBridgeService desktopBridgeService, IFilePickerService filePickerService, IDialogService dialogService, IShareService shareService)
 {
     this.databaseService      = databaseService;
     this.desktopBridgeService = desktopBridgeService;
     this.filePickerService    = filePickerService;
     this.dialogService        = dialogService;
     this.shareService         = shareService;
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
 /// </summary>
 public AboutViewModel(INavigationService navigationService, IShareService shareService)
 {
     _title = @"MovieStore";
     _description = @"Welcome To MovieStore NaJaaa!!!";
     _version = "v1";
     _appLink = "https://apps.windowsstore.com/DashBoard/DownloadAppXap?appId=c49215cb-c512-470c-a464-cf00d3404337";
     _navigationService = navigationService;
     _shareService = shareService;
 }
Ejemplo n.º 18
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
        /// </summary>
        public AboutViewModel(INavigationService navigationService, IShareService shareService)
        {
			_title = @"Mr. Bean";
			_description = @"Mr. Bean is a British situation comedy television programme series of fourteen 25-minute episodes written by and starring Rowan Atkinson as the title character."; 
			_version = "v1";
			_appLink = "https://apps.windowsstore.com/DashBoard/DownloadAppXap?appId=428fe504-6076-4ecd-b246-104dd094b491";
			_navigationService = navigationService;
			_shareService = shareService;
        }
Ejemplo n.º 19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
 /// </summary>
 public AboutViewModel(INavigationService navigationService, IShareService shareService)
 {
     _title = @"Onepiece";
     _description = @"The series begins with the execution of Gol D. Roger, a man known as the King of the Pirates.Just before his death, Roger announces that his treasure, the One Piece, will be available to anyone who finds it, causing the Great Pirate Era. to begin. As a re";
     _version = "v1";
     _appLink = "https://apps.windowsstore.com/DashBoard/DownloadAppXap?appId=871ad7c1-842d-4483-a1b0-20ce8cb2dd6b";
     _navigationService = navigationService;
     _shareService = shareService;
 }
Ejemplo n.º 20
0
 public RecipeDetailViewModel(ITileService tileService, IDialogService dialogService,
     IShareService shareService, ISpeechService speechService, INavigationService navigationService)
 {
     _liveTileService = tileService;
     _dialogService = dialogService;
     _shareService = shareService;
     _speechService = speechService;
     _navigationService = navigationService;
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
 /// </summary>
 public AboutViewModel(INavigationService navigationService, IShareService shareService)
 {
     _title = @"Our Wedding";
     _description = @"Pictures and video capturing our wedding";
     _version = "v1";
     _appLink = "https://apps.windowsstore.com/DashBoard/DownloadAppXap?appId=5805c149-42db-4899-8bc3-cc98e9edba78";
     _navigationService = navigationService;
     _shareService = shareService;
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
 /// </summary>
 public AboutViewModel(INavigationService navigationService, IShareService shareService)
 {
     _title             = @"Dandandin.it";
     _description       = @"Tutto Dandandin.it sul tuo Windows Phone!";
     _version           = "v1";
     _appLink           = "https://apps.windowsstore.com/DashBoard/DownloadAppXap?appId=a39b6036-74f2-448a-87c3-9a0df799de14";
     _navigationService = navigationService;
     _shareService      = shareService;
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
 /// </summary>
 public AboutViewModel(INavigationService navigationService, IShareService shareService)
 {
     _title = @"อาหารประจําชาติอาเซียน ";
     _description = @"ยินดีตอนรับ";
     _version = "v1";
     _appLink = "https://apps.windowsstore.com/DashBoard/DownloadAppXap?appId=1dbe211e-0fe9-40ff-ad9e-0841d3f5f839";
     _navigationService = navigationService;
     _shareService = shareService;
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
 /// </summary>
 public AboutViewModel(INavigationService navigationService, IShareService shareService)
 {
     _title = @"Eminem";
     _description = @"Marshall Bruce Mathers III  better known by his stage name Eminem and by his alter ego Slim Shady, is an American rapper, record producer, songwriter, and actor.Eminem is one of the world's best-selling music artists and ranked as one of the greatest arti";
     _version = "v1";
     _appLink = "https://apps.windowsstore.com/DashBoard/DownloadAppXap?appId=e01aea01-23b8-4df3-ac4f-8ef18e4410f2";
     _navigationService = navigationService;
     _shareService = shareService;
 }
        public RecipesRecipesListViewModel(INavigationService _NavigationService, IRecipeDataSource _RecipeDataSource, ILiveTileService _LiveTileService, IDialogService _DialogService, IShareService _ShareService, ISpeechService _SpeechService)
        {
            this._NavigationService = _NavigationService;
			this._RecipeDataSource = _RecipeDataSource;
			this._LiveTileService = _LiveTileService;
			this._DialogService = _DialogService;
			this._ShareService = _ShareService;
			this._SpeechService = _SpeechService;
        }
Ejemplo n.º 26
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
        /// </summary>
        public AboutViewModel(INavigationService navigationService, IShareService shareService)
        {
			_title = @"CinemaTalk";
			_description = @"Don't know which movies you should or shouldn't be watching? Find out what's showing in theaters now, the movie of the week, what critics are saying about your favorite movie and new movies out on DVD, all on CinemaTalk, just for all you movie die-hards."; 
			_version = "v1";
			_appLink = "https://apps.windowsstore.com/DashBoard/DownloadAppXap?appId=1c2bd035-3850-42c9-9851-a9985399909e";
			_navigationService = navigationService;
			_shareService = shareService;
        }
Ejemplo n.º 27
0
 public RecipeDetailViewModel(ILiveTileService tileService, IDialogService dialogService, INavigationService navigationService,
                              IReminderService reminderService, IShareService shareService)
 {
     this.LiveTileService   = tileService;
     this.DialogService     = dialogService;
     this.NavigationService = navigationService;
     this.ReminderService   = reminderService;
     this.ShareService      = shareService;
 }
Ejemplo n.º 28
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
 /// </summary>
 public AboutViewModel(INavigationService navigationService, IShareService shareService)
 {
     _title             = @"Puri";
     _description       = @"This app shows the virtues of holy city ""Puri"" which is situated in Odisha, India. It features in trying to show/depict the culture, monuments, people of this small but popular city well known for the Car-Festival (Rath-Yatra).";
     _version           = "v1";
     _appLink           = "https://apps.windowsstore.com/DashBoard/DownloadAppXap?appId=6db54d9f-884f-4583-b7d7-c78d46374d22";
     _navigationService = navigationService;
     _shareService      = shareService;
 }
Ejemplo n.º 29
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
        /// </summary>
        public AboutViewModel(INavigationService navigationService, IShareService shareService)
        {
			_title = @"Flappy Bird";
			_description = @"Flappy Bird is a 2013 mobile game developed in Hanoi by Vietnam-based developer Nguyễn Hà Đông (Dong Nguyen) and published by .GEARS Studios, a small, independent game developer also based in Vietnam."; 
			_version = "v1";
			_appLink = "https://apps.windowsstore.com/DashBoard/DownloadAppXap?appId=6acf5c79-78f4-4278-a26f-c8678bca1be9";
			_navigationService = navigationService;
			_shareService = shareService;
        }
Ejemplo n.º 30
0
 public OffersController(ISellOfferService sellOfferService, IBuyOfferService buyOfferService, IUserService userService, IShareService shareService, IStockService stockService, IStockExchangeLogic stockExchangeLogic)
 {
     _sellOfferService   = sellOfferService;
     _buyOfferService    = buyOfferService;
     _userService        = userService;
     _shareService       = shareService;
     _stockService       = stockService;
     _stockExchangeLogic = stockExchangeLogic;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
        /// </summary>
        public AboutViewModel(INavigationService navigationService, IShareService shareService)
        {
			_title = @"GadgtSpot";
			_description = @"This is the official app for the new tech blog GadgtSpot! Here at GadgtSpot, we specialize in reviews and interviews, and occasionally wander into the land of no-return; giveaways. We love to do editorials, and feature developers.
We are a growing bunch,"; 
			_version = "v1";
			_appLink = "https://apps.windowsstore.com/DashBoard/DownloadAppXap?appId=35074d41-6405-4a5c-8708-f50fdd290999";
			_navigationService = navigationService;
			_shareService = shareService;
        }
Ejemplo n.º 32
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
 /// </summary>
 public AboutViewModel(INavigationService navigationService, IShareService shareService)
 {
     _title = @"21สิ่งมหัศจรรย์ของโลกทั้ง";
     _description = @"การแบ่งประเภทของสิ่งมหัศจรรย์ในโลกอันกว้างนั้นสามารถจำแนกออกเป็นหลายสาขาด้วยกัน อาทิเช่น สิ่งมหัศจรรย์สาขาภูมิศาสตร์ , สาขาประวัติศาสตร์ , สาขาจิตร
     กรรม และสถาปัตยกรรม , สาขาชีววิทยา และก็ สาขาวิทยาศาสตร์";
     _version = "v1";
     _appLink = "https://apps.windowsstore.com/DashBoard/DownloadAppXap?appId=5630b103-1175-4f1a-8e0e-eba74a0f6216";
     _navigationService = navigationService;
     _shareService = shareService;
 }
Ejemplo n.º 33
0
 public ServicesController()
 {
     AuthorizationService = new AuthorizationService();
     DatabaseService      = new DatabaseService();
     UserService          = new UserService();
     ScenesService        = new ScenesService();
     ContentService       = new ContentService();
     TimeService          = new TimeService();
     ShareService         = new ShareService();
 }
Ejemplo n.º 34
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
        /// </summary>
        public AboutViewModel(INavigationService navigationService, IShareService shareService)
        {
            _title             = @"GadgetsGeek";
            _description       = @"Latest Gadget news from different sources on daily basis.
A great app to keep you on update.";
            _version           = "v1";
            _appLink           = "https://apps.windowsstore.com/DashBoard/DownloadAppXap?appId=f218511d-d065-4b60-8278-a0cfc28c95b5";
            _navigationService = navigationService;
            _shareService      = shareService;
        }
 public TradingInteractiveService(IPhraseProvider phraseProvider, IIOProvider ioProvider, ILogger logger, IValidator validator,
                                  IClientService clientService, IShareService shareService, IClientsSharesService clientsSharesService)
 {
     this.phraseProvider       = phraseProvider;
     this.ioProvider           = ioProvider;
     this.logger               = logger;
     this.validator            = validator;
     this.clientService        = clientService;
     this.shareService         = shareService;
     this.clientsSharesService = clientsSharesService;
 }
Ejemplo n.º 36
0
 public PromotionDataService(IPromotionService promotionService, ICouponService couponService, IPromotionBrandRelationRepository promotionBrandRelationRepository, IPromotionRepository promotionRepository, IFavoriteService favoriteService, IShareService shareService, ICouponDataService couponDataService, IResourceService resourceService)
 {
     _promotionRepository = promotionRepository;
     _favoriteService = favoriteService;
     _shareService = shareService;
     _couponDataService = couponDataService;
     _resourceService = resourceService;
     _promotionBrandRelationRepository = promotionBrandRelationRepository;
     _couponService = couponService;
     _promotionService = promotionService;
 }
Ejemplo n.º 37
0
 public LoanController(IHostingEnvironment environment,
                       IShareTransactionService transactionService, IShareService shareService,
                       IMemberService memberService, ILoanTransactionService loanService, ILoanRepaymentTransactionService loanRepaymentService)
 {
     _hostingEnvironment      = environment;
     _shareTransactionService = transactionService;
     _shareService            = shareService;
     _memberService           = memberService;
     _loanService             = loanService;
     _loanRepaymentService    = loanRepaymentService;
 }
Ejemplo n.º 38
0
 public RecipeDetailViewModel(ILiveTileServiceWP8 tileService, IDialogService dialogService,
     INavigationService navigationService,
     IReminderService reminderService, IShareService shareService, ISpeechService speechService)
 {
     _liveTileService = tileService;
     _dialogService = dialogService;
     _navigationService = navigationService;
     _reminderService = reminderService;
     _shareService = shareService;
     _speechService = speechService;
 }
Ejemplo n.º 39
0
 public PromotionDataService(IPromotionService promotionService, ICouponService couponService, IPromotionBrandRelationRepository promotionBrandRelationRepository, IPromotionRepository promotionRepository, IFavoriteService favoriteService, IShareService shareService, ICouponDataService couponDataService, IResourceService resourceService)
 {
     _promotionRepository = promotionRepository;
     _favoriteService     = favoriteService;
     _shareService        = shareService;
     _couponDataService   = couponDataService;
     _resourceService     = resourceService;
     _promotionBrandRelationRepository = promotionBrandRelationRepository;
     _couponService    = couponService;
     _promotionService = promotionService;
 }
Ejemplo n.º 40
0
        public DetailViewModel(
            ISniptRepository sniptRepository,
            IShareService shareService,
            IDialogService dialogService)
        {
            this.LocalSniptRepository = sniptRepository;
            this.ShareService         = shareService;
            this.DialogService        = dialogService;

            this.ShareCommand            = new RelayCommand(this.ShareItem);
            this.ChangeActiveItemCommand = new RelayCommand <Snipt>(this.ChangeActiveItem);
        }
Ejemplo n.º 41
0
        public Controller(
            IInputOutput io,
            IPhraseProvider phraseProvider,
            GameSettings gs,
            ITraderService traderService,
            IShareService shareService,
            ITransactionService transactionService,
            ITraderRepository traderRep,
            IShareRepository shareRep,
            ITransactionRepository transactionRep)
        {
            this.io             = io;
            this.phraseProvider = phraseProvider;

            this.traderService      = traderService;
            this.shareService       = shareService;
            this.transactionService = transactionService;

            this.traderRep      = traderRep;
            this.shareRep       = shareRep;
            this.transactionRep = transactionRep;

            Point start  = (0, 0);
            int   whidth = gs.whidthWindow;
            int   height = gs.heightWindow;

            if (whidth < 160)
            {
                io.Print("Window whidth is low" + Environment.NewLine);
                throw new Exception();
            }
            if (height < 30)
            {
                io.Print("Window height is low" + Environment.NewLine);
                throw new Exception();
            }

            this.io.SetWindowSize(whidth + 4, height);
            terminal = new Terminal(
                (whidth / 2 + 1, start.y),
                whidth / 2,
                5,
                io,
                phraseProvider);

            menu = new Menu(
                start,
                whidth / 2,
                height,
                io,
                phraseProvider);
        }
Ejemplo n.º 42
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AboutViewModel" /> class.
        /// </summary>
        public AboutViewModel(INavigationService navigationService, IShareService shareService)
        {
			_title = @"Fashionista";
			_description = @"This is an app all about fashion for example clothes, shoes, hairstyles and make-up tutorials.

Enjoy!!

Developed by Viola Bazanye"; 
			_version = "v1";
			_appLink = "https://apps.windowsstore.com/DashBoard/DownloadAppXap?appId=4a1fe87d-e15b-4934-8687-8574b4362d98";
			_navigationService = navigationService;
			_shareService = shareService;
        }
Ejemplo n.º 43
0
        public StoryViewModel(IShareService share, IBrowserService browser, IDialogService dialog)
        {
            _share   = share;
            _browser = browser;
            _dialog  = dialog;

            ShareStoryCommand = new MvxAsyncCommand <object>(
                s => _share.ShareLinkAsync(Title, StoryUrl, s));
            ShareCommentsCommand = new MvxAsyncCommand <object>(
                s => _share.ShareLinkAsync(Title, $"https://news.ycombinator.com/item?id={_story.Id}", s));
            OpenInExternalBrowserCommand = new MvxAsyncCommand(
                () => _browser.ShowInBrowserAsync(new Uri(StoryUrl), false));
        }
Ejemplo n.º 44
0
 public void Initialize()
 {
     clientService        = Substitute.For <IClientService>();
     shareService         = Substitute.For <IShareService>();
     clientsSharesService = Substitute.For <IClientsSharesService>();
     shareService.GetAllShares().Returns(new List <ShareEntity>()
     {
         new ShareEntity()
         {
             ShareID   = 1,
             ShareCost = 10
         }
     });
 }
        public LoanDetailsViewModel(IEMIService emiService, IShareService shareService)
        {
            this.emiService   = emiService;
            this.shareService = shareService;

            //Command intialization
            CalculatePaymentCommand = new Command(Calculate);
            ResetValuesCommand      = new Command(ResetFields);
            PaymentStartMonth       = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);

            //Collection intialization
            TotalPaymentCollection = new ObservableCollection <ChartDataPoint>()
            {
                new ChartDataPoint("Principal", 1)
            };
        }
Ejemplo n.º 46
0
 public StockExchangeLogic(
     ISellOfferService sellOfferService,
     IBuyOfferService buyOfferService,
     IUserService userService,
     IShareService shareService,
     IStockService stockService,
     ITransactionService transactionService
     )
 {
     _sellOfferService   = sellOfferService;
     _buyOfferService    = buyOfferService;
     _userService        = userService;
     _shareService       = shareService;
     _stockService       = stockService;
     _transactionService = transactionService;
 }
Ejemplo n.º 47
0
        public UploadService(
            IUserService userService,
            ISoulseekClient soulseekClient,
            IOptionsMonitor <Options> optionsMonitor,
            IShareService shareService,
            IDbContextFactory <TransfersDbContext> contextFactory)
        {
            Users          = userService;
            Client         = soulseekClient;
            Shares         = shareService;
            ContextFactory = contextFactory;
            OptionsMonitor = optionsMonitor;

            Governor = new UploadGovernor(userService, optionsMonitor);
            Queue    = new UploadQueue(userService, optionsMonitor);
        }
        public ResizePageViewModel(IDragDropService dragDrop, IShareService shareService,
                                   IResizeService resizeService, IPageDialogService pageDialogService, IProgressBarDialogService progressBar,
                                   IFileSystemPermissionDialogService fileSystemPermissionDialogService, IApplicationService applicationService, IImageFileService imageFileService, ILocalSettings <ResizeSettings> localSettings,
                                   ILoggerService loggerService, ObservableCollection <ImageFile> selectedFiles,
                                   INavigationService navigationService, IResourceService resourceLoader, AppStartType appStartType) : base(loggerService)
        {
            try
            {
                _appStartType = appStartType;
                _fileSystemPermissionDialogService = fileSystemPermissionDialogService;
                _dragDropService = dragDrop;
                _shareService    = shareService;
                _resizeService   = resizeService;
                _localSettings   = localSettings;
                _localSettings.Settings.PropertyChanged += Settings_PropertyChanged;
                _pageDialogService        = pageDialogService;
                _progressBarDialogService = progressBar;
                _applicationService       = applicationService;
                _selectedFiles            = selectedFiles;
                _resourceLoader           = resourceLoader;
                _navigationService        = navigationService;
                _loggerService            = loggerService;
                _imageFileService         = imageFileService;
                ImageFiles = new ObservableCollection <ImageFile>();

                if (_selectedFiles != null)
                {
                    ImageFiles = _selectedFiles;
                }
                //get settings
                LoadSettings();

                if (IsShareTarget)
                {
                    OverwriteFiles = false;
                }

                //update preview
                ApplyPreviewDimensions();
                PropertyChanged += ResizePageViewModel_PropertyChanged;
                _loggerService?.LogEvent(nameof(ResizePageViewModel));
            }
            catch (Exception e)
            {
                _loggerService?.LogException(nameof(ResizePageViewModel), e);
            }
        }
Ejemplo n.º 49
0
        public ReadmeViewModel(IApplicationService applicationService, IMarkdownService markdownService, IShareService shareService)
        {
            ShareCommand = new ReactiveCommand(this.WhenAnyValue(x => x.ContentModel, x => x != null));
            ShareCommand.Subscribe(_ => shareService.ShareUrl(ContentModel.HtmlUrl));

            GoToGitHubCommand = new ReactiveCommand(this.WhenAnyValue(x => x.ContentModel, x => x != null));
            GoToGitHubCommand.Subscribe(_ => GoToUrlCommand.ExecuteIfCan(ContentModel.HtmlUrl));

            GoToLinkCommand = new ReactiveCommand();
            GoToLinkCommand.OfType<string>().Subscribe(x => GoToUrlCommand.ExecuteIfCan(x));

            LoadCommand.RegisterAsyncTask(x => 
                this.RequestModel(applicationService.Client.Users[RepositoryOwner].Repositories[RepositoryName].GetReadme(), x as bool?, r =>
                {
                    ContentModel = r.Data;
                    ContentText = markdownService.Convert(Encoding.UTF8.GetString(Convert.FromBase64String(ContentModel.Content)));
                }));
        }
Ejemplo n.º 50
0
 public ProductDataService(IPromotionDataService promotionDataService, IPromotionService promotionService,
     ICouponService couponService, IResourceService resourceService, IProductRepository productRepository,
     IShareService shareService, IFavoriteService favoriteService, ICouponDataService couponDataService,
     IPromotionRepository promotionRepo,
     IProductPropertyRepository productpropertyRepo,
     IProductPropertyValueRepository productpropertyvalueRepo,
     IProductCode2StoreCodeRepository productcodemapRepo)
 {
     _promotionDataService = promotionDataService;
     _productRepository = productRepository;
     _shareService = shareService;
     _favoriteService = favoriteService;
     _couponDataService = couponDataService;
     _resourceService = resourceService;
     _couponService = couponService;
     _promotionService = promotionService;
     _promotionRepo = promotionRepo;
     _productpropertyRepo = productpropertyRepo;
     _productpropertyvalueRepo = productpropertyvalueRepo;
     _productcodemapRepo = productcodemapRepo;
 }
Ejemplo n.º 51
0
 public ShareController(IShareService shareService, ITasksRepository tasks, IUsersRepository users)
 {
     _shareService = shareService;
     _tasksRepository = tasks;
     _usersRepository = users;
 }
Ejemplo n.º 52
0
        public GistViewModel(IApplicationService applicationService, IShareService shareService)
        {
            _applicationService = applicationService;
            Comments = new ReactiveCollection<GistCommentModel>();

            ShareCommand = new ReactiveCommand(this.WhenAnyValue(x => x.Gist, x => x != null));
            ShareCommand.Subscribe(_ => shareService.ShareUrl(Gist.HtmlUrl));

            ToggleStarCommand = new ReactiveCommand(this.WhenAnyValue(x => x.IsStarred, x => x.HasValue));
            ToggleStarCommand.RegisterAsyncTask(async t =>
            {
                try
                {
                    if (!IsStarred.HasValue) return;
                    var request = IsStarred.Value ? _applicationService.Client.Gists[Id].Unstar() : _applicationService.Client.Gists[Id].Star();
                    await _applicationService.Client.ExecuteAsync(request);
                    IsStarred = !IsStarred.Value;
                }
                catch (Exception e)
                {
                    throw new Exception("Unable to start gist. Please try again.", e);
                }
            });

            ForkCommand = new ReactiveCommand();
            ForkCommand.RegisterAsyncTask(async t =>
            {
                var data =
                    await _applicationService.Client.ExecuteAsync(_applicationService.Client.Gists[Id].ForkGist());
                var forkedGist = data.Data;
                var vm = CreateViewModel<GistViewModel>();
                vm.Id = forkedGist.Id;
                vm.Gist = forkedGist;
                ShowViewModel(vm);
            });

            GoToViewableFileCommand = new ReactiveCommand();
            GoToViewableFileCommand.OfType<GistFileModel>().Subscribe(x =>
            {
                var vm = CreateViewModel<GistViewableFileViewModel>();
                vm.GistFile = x;
                ShowViewModel(vm);
            });

            GoToHtmlUrlCommand = new ReactiveCommand(this.WhenAnyValue(x => x.Gist, x => x != null && !string.IsNullOrEmpty(x.HtmlUrl)));
            GoToHtmlUrlCommand.Subscribe(_ => GoToUrlCommand.ExecuteIfCan(Gist.HtmlUrl));

            GoToFileSourceCommand = new ReactiveCommand();
            GoToFileSourceCommand.OfType<GistFileModel>().Subscribe(x =>
            {
                var vm = CreateViewModel<GistFileViewModel>();
                vm.Id = Id;
                vm.GistFile = x;
                vm.Filename = x.Filename;
                ShowViewModel(vm);
            });

            GoToUserCommand = new ReactiveCommand(this.WhenAnyValue(x => x.Gist, x => x != null));
            GoToUserCommand.Subscribe(x =>
            {
                var vm = CreateViewModel<ProfileViewModel>();
                vm.Username = Gist.Owner.Login;
                ShowViewModel(vm);
            });

            GoToForksCommand = new ReactiveCommand();

            LoadCommand.RegisterAsyncTask(t =>
            {
                var forceCacheInvalidation = t as bool?;
                var t1 = this.RequestModel(_applicationService.Client.Gists[Id].Get(), forceCacheInvalidation, response => Gist = response.Data);
			    this.RequestModel(_applicationService.Client.Gists[Id].IsGistStarred(), forceCacheInvalidation, response => IsStarred = response.Data).FireAndForget();
			    Comments.SimpleCollectionLoad(_applicationService.Client.Gists[Id].GetComments(), forceCacheInvalidation).FireAndForget();
                return t1;
            });
        }
Ejemplo n.º 53
0
 public SharingHub(IShareService service)
 {
     this.service = service;
 }
 public SharesController(IShareService service)
 {
     this.service = service;
 }
Ejemplo n.º 55
0
        public IssueViewModel(IApplicationService applicationService, IShareService shareService)
        {
            _applicationService = applicationService;
            Comments = new ReactiveCollection<IssueCommentModel>();
            Events = new ReactiveCollection<IssueEventModel>();
            var issuePresenceObservable = this.WhenAnyValue(x => x.Issue, x => x != null);

            ShareCommand = new ReactiveCommand(this.WhenAnyValue(x => x.Issue, x => x != null && !string.IsNullOrEmpty(x.HtmlUrl)));
            ShareCommand.Subscribe(_ => shareService.ShareUrl(Issue.HtmlUrl));

            AddCommentCommand = new ReactiveCommand();
            AddCommentCommand.Subscribe(_ =>
            {
                var vm = CreateViewModel<CommentViewModel>();
                vm.SaveCommand.RegisterAsyncTask(async t =>
                {
                    var issue = _applicationService.Client.Users[RepositoryOwner].Repositories[RepositoryName].Issues[IssueId];
                    var comment = await _applicationService.Client.ExecuteAsync(issue.CreateComment(vm.Comment));
                    Comments.Add(comment.Data);
                    vm.DismissCommand.ExecuteIfCan();
                });
                ShowViewModel(vm);
            });

            ToggleStateCommand = new ReactiveCommand(issuePresenceObservable);
            ToggleStateCommand.RegisterAsyncTask(async t =>
            {
                var close = string.Equals(Issue.State, "open", StringComparison.OrdinalIgnoreCase);
                try
                {
                    var issue = _applicationService.Client.Users[RepositoryOwner].Repositories[RepositoryName].Issues[Issue.Number];
                    var data = await _applicationService.Client.ExecuteAsync(issue.UpdateState(close ? "closed" : "open"));
                    Issue = data.Data;
                }
                catch (Exception e)
                {
                    throw new Exception("Unable to " + (close ? "close" : "open") + " the item. " + e.Message, e);
                }
            });

            GoToEditCommand = new ReactiveCommand(issuePresenceObservable);
            GoToEditCommand.Subscribe(_ =>
            {
                var vm = CreateViewModel<IssueEditViewModel>();
                vm.RepositoryOwner = RepositoryOwner;
                vm.RepositoryName = RepositoryName;
                vm.Id = IssueId;
                vm.Issue = Issue;
                vm.WhenAnyValue(x => x.Issue).Skip(1).Subscribe(x => Issue = x);
                ShowViewModel(vm);
            });

            GoToAssigneeCommand = new ReactiveCommand(issuePresenceObservable);
            GoToAssigneeCommand.Subscribe(_ =>
            {
                var vm = CreateViewModel<IssueAssignedToViewModel>();
                vm.SaveOnSelect = true;
                vm.RepositoryOwner = RepositoryOwner;
                vm.RepositoryName = RepositoryName;
                vm.IssueId = IssueId;
                vm.SelectedUser = Issue.Assignee;
                vm.WhenAnyValue(x => x.SelectedUser).Subscribe(x =>
                {
                    Issue.Assignee = x;
                    this.RaisePropertyChanged("Issue");
                });
                ShowViewModel(vm);
            });

            GoToLabelsCommand = new ReactiveCommand(issuePresenceObservable);
            GoToLabelsCommand.Subscribe(_ =>
            {
                var vm = CreateViewModel<IssueLabelsViewModel>();
                vm.SaveOnSelect = true;
                vm.RepositoryOwner = RepositoryOwner;
                vm.RepositoryName = RepositoryName;
                vm.IssueId = IssueId;
                vm.SelectedLabels.Reset(Issue.Labels);
                vm.WhenAnyValue(x => x.SelectedLabels).Subscribe(x =>
                {
                    Issue.Labels = x.ToList();
                    this.RaisePropertyChanged("Issue");
                });
                ShowViewModel(vm);
            });

            GoToMilestoneCommand = new ReactiveCommand(issuePresenceObservable);
            GoToMilestoneCommand.Subscribe(_ =>
            {
                var vm = CreateViewModel<IssueMilestonesViewModel>();
                vm.SaveOnSelect = true;
                vm.RepositoryOwner = RepositoryOwner;
                vm.RepositoryName = RepositoryName;
                vm.IssueId = IssueId;
                vm.SelectedMilestone = Issue.Milestone;
                vm.WhenAnyValue(x => x.SelectedMilestone).Subscribe(x =>
                {
                    Issue.Milestone = x;
                    this.RaisePropertyChanged("Issue");
                });
                ShowViewModel(vm);
            });

            LoadCommand.RegisterAsyncTask(t =>
            {
                var forceCacheInvalidation = t as bool?;
                var issue = _applicationService.Client.Users[RepositoryOwner].Repositories[RepositoryName].Issues[IssueId];
                var t1 = this.RequestModel(issue.Get(), forceCacheInvalidation, response => Issue = response.Data);
                Comments.SimpleCollectionLoad(issue.GetComments(), forceCacheInvalidation).FireAndForget();
                Events.SimpleCollectionLoad(issue.GetEvents(), forceCacheInvalidation).FireAndForget();
                return t1;
            });
        }
Ejemplo n.º 56
0
        public PullRequestViewModel(IApplicationService applicationService, IMarkdownService markdownService, IShareService shareService)
        {
            _applicationService = applicationService;
            _markdownService = markdownService;

            Comments = new ReactiveList<IssueCommentModel>();
            Events = new ReactiveList<IssueEventModel>();

            MergeCommand = ReactiveCommand.CreateAsyncTask(
                this.WhenAnyValue(x => x.PullRequest).Select(x =>
                x != null && x.Merged.HasValue && !x.Merged.Value && x.Mergable.HasValue && x.Mergable.Value),
                async t =>
            {
                try
                {
                    var response = await _applicationService.Client.ExecuteAsync(_applicationService.Client.Users[RepositoryOwner].Repositories[RepositoryName].PullRequests[PullRequestId].Merge());
                    if (!response.Data.Merged)
                        throw new Exception(response.Data.Message);
                    var pullRequest = _applicationService.Client.Users[RepositoryOwner].Repositories[RepositoryName].PullRequests[PullRequestId].Get();
                    await this.RequestModel(pullRequest, true, r => PullRequest = r.Data);
                }
                catch (Exception e)
                {
                    throw new Exception("Unable to Merge: " + e.Message, e);
                }
            });

            ToggleStateCommand = ReactiveCommand.CreateAsyncTask(
                this.WhenAnyValue(x => x.PullRequest).Select(x => x != null), async t =>
            {
                var close = string.Equals(PullRequest.State, "open", StringComparison.OrdinalIgnoreCase);

                try
                {
                    var data = await _applicationService.Client.ExecuteAsync(
                        _applicationService.Client.Users[RepositoryOwner].Repositories[RepositoryName].PullRequests[PullRequestId].UpdateState(close ? "closed" : "open"));
                    PullRequest = data.Data;
                }
                catch (Exception e)
                {
                    throw new Exception("Unable to " + (close ? "close" : "open") + " the item. " + e.Message, e);
                }
            });

            GoToCommitsCommand = ReactiveCommand.Create();
            GoToCommitsCommand.Subscribe(_ =>
            {
                var vm = CreateViewModel<PullRequestCommitsViewModel>();
                vm.RepositoryOwner = RepositoryOwner;
                vm.RepositoryName = RepositoryName;
                vm.PullRequestId = PullRequestId;
                ShowViewModel(vm);
            });

            GoToFilesCommand = ReactiveCommand.Create();
            GoToFilesCommand.Subscribe(_ =>
            {
                var vm = CreateViewModel<PullRequestFilesViewModel>();
                vm.Username = RepositoryOwner;
                vm.Repository = RepositoryName;
                vm.PullRequestId = PullRequestId;
                ShowViewModel(vm);
            });

            ShareCommand = ReactiveCommand.Create(this.WhenAnyValue(x => x.PullRequest).Select(x => x != null && !string.IsNullOrEmpty(x.HtmlUrl)));
            ShareCommand.Subscribe(_ => shareService.ShareUrl(PullRequest.HtmlUrl));

            GoToEditCommand = ReactiveCommand.Create();
            GoToEditCommand.Subscribe(_ =>
            {
                var vm = CreateViewModel<IssueEditViewModel>();
                vm.RepositoryOwner = RepositoryOwner;
                vm.RepositoryName = RepositoryName;
                vm.Id = PullRequestId;
                vm.Issue = Issue;
                vm.WhenAnyValue(x => x.Issue).Skip(1).Subscribe(x => Issue = x);
                ShowViewModel(vm);
            });

            GoToLabelsCommand = ReactiveCommand.Create(this.WhenAnyValue(x => x.Issue).Select(x => x != null));
            GoToLabelsCommand.Subscribe(_ =>
            {
                var vm = CreateViewModel<IssueLabelsViewModel>();
                vm.RepositoryOwner = RepositoryOwner;
                vm.RepositoryName = RepositoryName;
                vm.IssueId = PullRequestId;
                vm.SaveOnSelect = true;
                vm.SelectedLabels.Reset(Issue.Labels);
                vm.WhenAnyValue(x => x.Labels).Skip(1).Subscribe(x =>
                {
                    Issue.Labels = x.ToList();
                    this.RaisePropertyChanged("Issue");
                });
                ShowViewModel(vm);
            });

            GoToMilestoneCommand = ReactiveCommand.Create(this.WhenAnyValue(x => x.Issue).Select(x => x != null));
            GoToMilestoneCommand.Subscribe(_ =>
            {
                var vm = CreateViewModel<IssueMilestonesViewModel>();
                vm.RepositoryOwner = RepositoryOwner;
                vm.RepositoryName = RepositoryName;
                vm.IssueId = PullRequestId;
                vm.SaveOnSelect = true;
                vm.SelectedMilestone = Issue.Milestone;
                vm.WhenAnyValue(x => x.SelectedMilestone).Skip(1).Subscribe(x =>
                {
                    Issue.Milestone = x;
                    this.RaisePropertyChanged("Issue");
                });
                ShowViewModel(vm);
            });

            GoToAssigneeCommand = ReactiveCommand.Create(this.WhenAnyValue(x => x.Issue).Select(x => x != null));
            GoToAssigneeCommand.Subscribe(_ =>
            {
                var vm = CreateViewModel<IssueAssignedToViewModel>();
                vm.RepositoryOwner = RepositoryOwner;
                vm.RepositoryName = RepositoryName;
                vm.IssueId = PullRequestId;
                vm.SaveOnSelect = true;
                vm.SelectedUser = Issue.Assignee;
                vm.WhenAnyValue(x => x.SelectedUser).Skip(1).Subscribe(x =>
                {
                    Issue.Assignee = x;
                    this.RaisePropertyChanged("Issue");
                });
                ShowViewModel(vm);
            });

            GoToAddCommentCommand = ReactiveCommand.Create();
            GoToAddCommentCommand.Subscribe(_ =>
            {
                var vm = CreateViewModel<CommentViewModel>();
                ReactiveUI.Legacy.ReactiveCommandMixins.RegisterAsyncTask(vm.SaveCommand, async t =>
                {
                    var req =
                        _applicationService.Client.Users[RepositoryOwner]
                        .Repositories[RepositoryName].Issues[PullRequestId].CreateComment(vm.Comment);
                    var comment = await _applicationService.Client.ExecuteAsync(req);
                    Comments.Add(comment.Data);
                    vm.DismissCommand.ExecuteIfCan();
                });
            });

            LoadCommand = ReactiveCommand.CreateAsyncTask(t =>
            {
                var forceCacheInvalidation = t as bool?;
                var pullRequest = _applicationService.Client.Users[RepositoryOwner].Repositories[RepositoryName].PullRequests[PullRequestId].Get();
                var t1 = this.RequestModel(pullRequest, forceCacheInvalidation, response => PullRequest = response.Data);
                Events.SimpleCollectionLoad(_applicationService.Client.Users[RepositoryOwner].Repositories[RepositoryName].Issues[PullRequestId].GetEvents(), forceCacheInvalidation).FireAndForget();
                Comments.SimpleCollectionLoad(_applicationService.Client.Users[RepositoryOwner].Repositories[RepositoryName].Issues[PullRequestId].GetComments(), forceCacheInvalidation).FireAndForget();
                this.RequestModel(_applicationService.Client.Users[RepositoryOwner].Repositories[RepositoryName].Issues[PullRequestId].Get(), forceCacheInvalidation, response => Issue = response.Data).FireAndForget();
                return t1;
            });
        }