Esempio n. 1
0
        public CommentViewModel(Comment comment, VideoItemViewModel videoItemViewModel)
        {
            _videoItemViewModel = videoItemViewModel;
            Comment             = comment;
            _vidMeClient        = SimpleIoc.Default.GetInstance <IVidMeClient>();
            _navigationService  = SimpleIoc.Default.GetInstance <INavigationService>();

            if (IsInDesignMode)
            {
                Comment = new Comment
                {
                    Body = "This is a comment",
                    User = new User
                    {
                        UserId        = "59739",
                        Username      = "******",
                        AvatarUrl     = "https://d1wst0behutosd.cloudfront.net/avatars/59739.gif?gv2r1420954820",
                        CoverUrl      = "https://d1wst0behutosd.cloudfront.net/channel_covers/59739.jpg?v1r1420500373",
                        FollowerCount = 1200,
                        LikesCount    = "92",
                        VideoCount    = 532,
                        VideoViews    = "71556",
                        VideosScores  = 220,
                        Bio           = "Some bio information"
                    }
                };
            }
        }
Esempio n. 2
0
 public AuthenticationService(IApplicationSettingsService settingsService, IVidMeClient vidMeClient)
 {
     _settingsService = settingsService;
     _vidMeClient     = vidMeClient;
     _vidMeClient.AuthDetailsUpdated += VidMeClientOnAuthDetailsUpdated;
     Current = this;
 }
Esempio n. 3
0
 public UserViewModel(User user)
 {
     User               = user;
     _vidMeClient       = SimpleIoc.Default.GetInstance <IVidMeClient>();
     _tileService       = SimpleIoc.Default.GetInstance <ITileService>();
     _navigationService = SimpleIoc.Default.GetInstance <INavigationService>();
 }
Esempio n. 4
0
 public RevokeAppViewModel(Application application, IVidMeClient vidMeClient, ManageAppsAccessViewModel manageAppsAccessViewModel, IMessageBoxService messageBoxService)
 {
     _vidMeClient = vidMeClient;
     _manageAppsAccessViewModel = manageAppsAccessViewModel;
     _messageBoxService         = messageBoxService;
     Application = application;
 }
Esempio n. 5
0
 public ChannelItemViewModel(Channel channel)
 {
     Channel            = channel;
     _vidMeClient       = SimpleIoc.Default.GetInstance <IVidMeClient>();
     _navigationService = SimpleIoc.Default.GetInstance <INavigationService>();
     _tileService       = SimpleIoc.Default.GetInstance <ITileService>();
 }
Esempio n. 6
0
        public MainViewModel(INavigationService navigationService, IVidMeClient vidMeClient)
        {
            _navigationService = navigationService;
            _vidMeClient       = vidMeClient;

            if (!IsInDesignMode)
            {
                AuthenticationService.Current.UserSignedOut += UserStateChanged;
                AuthenticationService.Current.UserSignedIn  += UserStateChanged;
            }
        }
Esempio n. 7
0
        public EditVideoViewModel(INavigationService navigationService, IVidMeClient vidMeClient, IMessageBoxService messageBoxService)
        {
            _navigationService = navigationService;
            _vidMeClient       = vidMeClient;
            _messageBoxService = messageBoxService;

            if (IsInDesignMode)
            {
                CanEdit = true;
            }
        }
Esempio n. 8
0
        public NotificationService(INavigationService navigationService, IVidMeClient vidMeClient, ITileService tileService)
        {
            _vidMeClient       = vidMeClient;
            _tileService       = tileService;
            _navigationService = navigationService;
            _notificationTask  = new NotificationTask();

            _timer = new DispatcherTimer {
                Interval = TimeSpan.FromMinutes(Interval)
            };
            _timer.Tick += TimerOnTick;
        }
Esempio n. 9
0
        public AccountViewModel(INavigationService navigationService, IVidMeClient vidMeClient, AvatarViewModel avatar)
        {
            Avatar             = avatar;
            _navigationService = navigationService;
            _vidMeClient       = vidMeClient;

            if (!IsInDesignMode)
            {
                AuthenticationService.Current.UserSignedIn  += UserStateChanged;
                AuthenticationService.Current.UserSignedOut += UserStateChanged;
                Reset();
            }
        }
Esempio n. 10
0
        public ManageMyAppsViewModel(INavigationService navigationService, IVidMeClient vidMeClient)
        {
            _navigationService = navigationService;
            _vidMeClient       = vidMeClient;

            if (IsInDesignMode)
            {
                Items = new ObservableCollection <OwnedAppViewModel>
                {
                    new OwnedAppViewModel(new Application
                    {
                        ClientId = "kjsdlfkjlsdkfjlskdjf09wefj0w9e",
                        Name     = "Viddi for Windows Phone"
                    })
                };
            }
        }
Esempio n. 11
0
        public VideoItemViewModel(Video video, VideoLoadingViewModel videoLoadingViewModel)
        {
            _vidMeClient           = SimpleIoc.Default.GetInstance <IVidMeClient>();
            _settingsService       = SimpleIoc.Default.GetInstance <IApplicationSettingsService>();
            _navigationService     = SimpleIoc.Default.GetInstance <INavigationService>();
            _tileService           = SimpleIoc.Default.GetInstance <ITileService>();
            _toastService          = SimpleIoc.Default.GetInstance <IToastService>();
            _videoLoadingViewModel = videoLoadingViewModel;
            Video = video;

            if (Video != null && Video.Channel != null)
            {
                Channel = new ChannelItemViewModel(Video.Channel);
            }

            if (IsInDesignMode)
            {
                var user = new User
                {
                    UserId        = "59739",
                    Username      = "******",
                    AvatarUrl     = "https://d1wst0behutosd.cloudfront.net/avatars/59739.gif?gv2r1420954820",
                    CoverUrl      = "https://d1wst0behutosd.cloudfront.net/channel_covers/59739.jpg?v1r1420500373",
                    FollowerCount = 1200,
                    LikesCount    = "92",
                    VideoCount    = 532,
                    VideoViews    = "71556",
                    VideosScores  = 220,
                    Bio           = "Some bio information"
                };
                Items = new ObservableCollection <CommentViewModel>
                {
                    new CommentViewModel(new Comment
                    {
                        Body = "This is a comment",
                        User = user
                    }, this)
                };

                Video = new Video
                {
                    User = user
                };
            }
        }
Esempio n. 12
0
        public UploadVideoViewModel(
            INavigationService navigationService,
            IVidMeClient vidMeClient,
            IApplicationSettingsService applicationSettings,
            FoursqureViewModel foursqureViewModel,
            EditVideoViewModel editVideoViewModel)
        {
            EditVideo            = editVideoViewModel;
            _navigationService   = navigationService;
            _vidMeClient         = vidMeClient;
            _applicationSettings = applicationSettings;
            _foursqureViewModel  = foursqureViewModel;

            if (IsInDesignMode)
            {
                IsUploading = true;
            }
        }
Esempio n. 13
0
        public ManageAppsAccessViewModel(INavigationService navigationService, IVidMeClient vidMeClient, IMessageBoxService messageBoxService)
        {
            _navigationService = navigationService;
            _vidMeClient       = vidMeClient;
            _messageBoxService = messageBoxService;

            if (IsInDesignMode)
            {
                Items = new ObservableCollection <RevokeAppViewModel>
                {
                    new RevokeAppViewModel(new Application
                    {
                        Name         = "Viddi for Windows Phone",
                        Organization = "Ferret Labs",
                        Website      = "http://ferretlabs.com",
                        Description  = "VidMe app for Windows Phone 8.1"
                    }, _vidMeClient, this, _messageBoxService)
                };
            }
        }
Esempio n. 14
0
        private void SetAuthentication()
        {
            if (AuthenticationService.Current == null)
            {
                _vidMeClient = new VidMeClient(Utils.UniqueDeviceIdentifier, "WindowsPhone");
                new AuthenticationService(_settingsService, _vidMeClient);
            }

            if (AuthenticationService.Current != null)
            {
                if (!AuthenticationService.Current.ServiceStarted)
                {
                    AuthenticationService.Current.StartService();
                }

                if (_vidMeClient == null || _vidMeClient.AuthenticationInfo == null)
                {
                    _vidMeClient = AuthenticationService.Current.GetAuthenticatedVidMeClient();
                }
            }
        }
Esempio n. 15
0
        public ProfileViewModel(INavigationService navigationService, IVidMeClient vidMeClient, ITileService tileService)
        {
            _navigationService = navigationService;
            _vidMeClient       = vidMeClient;
            _tileService       = tileService;

            if (IsInDesignMode)
            {
                User = new UserViewModel(new User
                {
                    UserId        = "59739",
                    Username      = "******",
                    AvatarUrl     = "https://d1wst0behutosd.cloudfront.net/avatars/59739.gif?gv2r1420954820",
                    CoverUrl      = "https://d1wst0behutosd.cloudfront.net/channel_covers/59739.jpg?v1r1420500373",
                    FollowerCount = 1200,
                    LikesCount    = "92",
                    VideoCount    = 532,
                    VideoViews    = "71556",
                    VideosScores  = 220,
                    Bio           = "Some bio information"
                });
            }
        }
Esempio n. 16
0
 public CreateAccountViewModel(INavigationService navigationService, IVidMeClient vidMeClient)
 {
     _navigationService = navigationService;
     _vidMeClient       = vidMeClient;
 }
Esempio n. 17
0
 public EditProfileViewModel(IVidMeClient vidMeClient, AvatarViewModel avatarViewModel, IToastService toastService)
 {
     Avatar        = avatarViewModel;
     _vidMeClient  = vidMeClient;
     _toastService = toastService;
 }
Esempio n. 18
0
 public BrowseChannelsViewModel(IVidMeClient vidMeClient)
 {
     _vidMeClient = vidMeClient;
 }
Esempio n. 19
0
 public AddAppViewModel(INavigationService navigationService, IVidMeClient vidMeClient)
 {
     _navigationService = navigationService;
     _vidMeClient       = vidMeClient;
 }
Esempio n. 20
0
 public NotificationsViewModel(IVidMeClient vidMeClient, INotificationService notificationService)
 {
     _vidMeClient         = vidMeClient;
     _notificationService = notificationService;
 }
Esempio n. 21
0
 public FollowersViewModel(IVidMeClient vidMeClient, bool isUser)
 {
     _vidMeClient = vidMeClient;
     _isUser      = isUser;
 }
Esempio n. 22
0
 public VideoPlayerViewModel(INavigationService navigationService, IVidMeClient vidMeClient, ITileService tileService)
 {
     _navigationService = navigationService;
     _vidMeClient       = vidMeClient;
     _tileService       = tileService;
 }
Esempio n. 23
0
 public AvatarViewModel(IVidMeClient vidMeClient, IToastService toastService)
 {
     _vidMeClient  = vidMeClient;
     _toastService = toastService;
 }
Esempio n. 24
0
 public ManualLoginViewModel(INavigationService navigationService, IVidMeClient vidMeClient)
 {
     _navigationService = navigationService;
     _vidMeClient       = vidMeClient;
 }
Esempio n. 25
0
 public ManageAccountViewModel(INavigationService navigationService, IVidMeClient vidMeClient, AvatarViewModel avatar)
 {
     Avatar             = avatar;
     _navigationService = navigationService;
     _vidMeClient       = vidMeClient;
 }
Esempio n. 26
0
 public ChannelViewModel(INavigationService navigationService, IVidMeClient vidMeClient, ITileService tileService)
 {
     _navigationService = navigationService;
     _vidMeClient       = vidMeClient;
     _tileService       = tileService;
 }