public UnreadItemsNotificationsBackgroundTask()
 {
     _localNotificationService = new WindowsNotificationService();
     _gitterApiService = new GitterApiService();
     _passwordStorageService = new PasswordStorageService();
     _applicationStorageService = new ApplicationStorageService();
 }
        //IMvxMessenger messenger)
        public CoreClient(
            IApplicationSettingServiceSingleton applicationSettingService,
            IApplicationStorageService applicationStorageService)
        {
            if (applicationSettingService == null)
            {
                throw new ArgumentNullException("applicationSettingService");
            }

            if (applicationStorageService == null)
            {
                throw new ArgumentNullException("applicationStorageService");
            }

            //if (messenger == null)
            //{
            //    throw new ArgumentNullException("messenger");
            //}

            _applicationSettingService = applicationSettingService;
            _applicationStorageService = applicationStorageService;
            //_messenger = messenger;

            //_token = _messenger.Subscribe<ReloadDataMessage>(_ => Refresh());
        }
Esempio n. 3
0
        public MyShuttleClient(
            IApplicationSettingServiceSingleton applicationSettingService,
            IApplicationStorageService applicationStorageService,
            IMvxMessenger messenger)
        {
            if (applicationSettingService == null)
            {
                throw new ArgumentNullException("applicationSettingService");
            }

            if (applicationStorageService == null)
            {
                throw new ArgumentNullException("applicationStorageService");
            }

            if (messenger == null)
            {
                throw new ArgumentNullException("messenger");
            }

            _applicationSettingService = applicationSettingService;
            _applicationStorageService = applicationStorageService;
            _messenger = messenger;

            _token = _messenger.Subscribe <ReloadDataMessage>(_ => Refresh());
        }
 public SolutionListTreeViewService(IApplicationConfiguration applicationConfiguration, IApplicationStorageService applicationStorageService, IAreaTagCheckedListBoxService areaTagCheckedListBoxService, IActionService actionService)
 {
     _applicationStorageService    = applicationStorageService;
     _areaTagCheckedListBoxService = areaTagCheckedListBoxService;
     _actionService = actionService;
     _areaTagCheckedListBoxService.AreaTagCheckedListBoxCheckChanged += AreaTagCheckedListBoxService_AreaTagCheckedListBoxCheckChanged;
     _actionService.ActionRun     += ActionService_ActionRun;
     _actionService.ActionRefresh += ActionService_ActionRefresh;
 }
Esempio n. 5
0
        public ViewerService(IApplicationStorageService applicationStorageService, ISolutionListTreeViewService solutionListTreeViewService, IHtmlRenderer htmlRenderer, IActionService actionService, IFileUtilities fileUtilities, IRenderingOptionsTreeViewService renderingOptionsTreeViewService)
        {
            _applicationStorageService   = applicationStorageService;
            _solutionListTreeViewService = solutionListTreeViewService;
            _htmlRenderer  = htmlRenderer;
            _fileUtilities = fileUtilities;
            _renderingOptionsTreeViewService = renderingOptionsTreeViewService;

            _solutionListTreeViewService.ActionPresentBlobs += SolutionListTreeViewService_ActionPresentBlobs;
            actionService.ActionSave += ActionService_ActionSave;
        }
Esempio n. 6
0
        public MyShuttleClient(
            IApplicationSettingServiceSingleton applicationSettingService,
            IApplicationStorageService applicationStorageService)
        {
            if (applicationSettingService == null)
            {
                throw new ArgumentNullException("applicationSettingService");
            }

            if (applicationStorageService == null)
            {
                throw new ArgumentNullException("applicationStorageService");
            }



            _applicationSettingService = applicationSettingService;
            _applicationStorageService = applicationStorageService;
        }
Esempio n. 7
0
        public MyShuttleClient(
            IApplicationSettingServiceSingleton applicationSettingService, 
            IApplicationStorageService applicationStorageService,
            IMvxMessenger messenger)
        {
            if (applicationSettingService == null)
            {
                throw new ArgumentNullException("applicationSettingService");
            }

            if (applicationStorageService == null)
            {
                throw new ArgumentNullException("applicationStorageService");
            }

            if (messenger == null)
            {
                throw new ArgumentNullException("messenger");
            }

            _applicationSettingService = applicationSettingService;
            _applicationStorageService = applicationStorageService;
            _messenger = messenger;

            _token = _messenger.Subscribe<ReloadDataMessage>(_ => Refresh());
        }
Esempio n. 8
0
 public CleanerEngine(IApplicationStorageService storageService, IApplicationLogger logger)
 {
     _storageService = storageService;
     _logger         = logger;
 }
Esempio n. 9
0
        public MainViewModel(IGitterApiService gitterApiService,
            ILocalNotificationService localNotificationService,
            IApplicationStorageService applicationStorageService,
            IProgressIndicatorService progressIndicatorService,
            IPasswordStorageService passwordStorageService,
            IEventService eventService,
            ITelemetryService telemetryService,
            INavigationService navigationService)
        {
            // Services
            _gitterApiService = gitterApiService;
            _localNotificationService = localNotificationService;
            _applicationStorageService = applicationStorageService;
            _progressIndicatorService = progressIndicatorService;
            _passwordStorageService = passwordStorageService;
            _eventService = eventService;
            _navigationService = navigationService;
            _telemetryService = telemetryService;

            // Commands
            SelectRoomCommand = new RelayCommand<IRoomViewModel>(SelectRoom);
            ChatWithUsCommand = new RelayCommand(ChatWithUs, CanChatWithUs);
            GoToAboutPageCommand = new RelayCommand(GoToAboutPage);
            RefreshCommand = new RelayCommand(Refresh, () => !IsRefreshing);
            ToggleSearchCommand = new RelayCommand<bool>(ToggleSearch);

            // Properties
            CurrentDateTime = DateTime.Now;

            if (IsInDesignMode)
            {
                // Code runs in Blend --> create design time data.

                CurrentUser = new User
                {
                    Id = "53307734c3599d1de448e192",
                    Username = "******",
                    DisplayName = "Mauro Pompilio",
                    Url = "/malditogeek",
                    SmallAvatarUrl = "https://avatars.githubusercontent.com/u/14751?",
                    MediumAvatarUrl = "https://avatars.githubusercontent.com/u/14751?"
                };

                var suprememoocow = new User
                {
                    Id = "53307831c3599d1de448e19a",
                    Username = "******",
                    DisplayName = "Andrew Newdigate",
                    Url = "/suprememoocow,",
                    SmallAvatarUrl = "https://avatars.githubusercontent.com/u/594566?",
                    MediumAvatarUrl = "https://avatars.githubusercontent.com/u/594566?"
                };

                Rooms.Add(new RoomViewModel(new Room
                {
                    Id = "53307860c3599d1de448e19d",
                    Name = "Andrew Newdigate",
                    Topic = string.Empty,
                    OneToOne = true,
                    Users = new[] { suprememoocow },
                    UnreadItems = 52,
                    UnreadMentions = 0,
                    DisabledNotifications = false,
                    Type = "ONETOONE"
                }, gitterApiService, localNotificationService, progressIndicatorService, eventService, telemetryService, this));

                Rooms.Add(new RoomViewModel(new Room
                {
                    Id = "5330777dc3599d1de448e194",
                    Name = "gitterHQ",
                    Topic = "Gitter",
                    Url = "gitterHQ",
                    OneToOne = false,
                    UserCount = 2,
                    UnreadItems = 0,
                    UnreadMentions = 0,
                    LastAccessTime = new DateTime(2014, 3, 24, 18, 22, 28),
                    DisabledNotifications = false,
                    Type = "ORG",
                    Version = 1
                }, gitterApiService, localNotificationService, progressIndicatorService, eventService, telemetryService, this));

                Rooms.Add(new RoomViewModel(new Room
                {
                    Id = "5330780dc3599d1de448e198",
                    Name = "gitterHQ/devops",
                    Topic = string.Empty,
                    Url = "gitterHQ/devops",
                    OneToOne = false,
                    UserCount = 2,
                    UnreadItems = 3,
                    UnreadMentions = 0,
                    LastAccessTime = new DateTime(2014, 3, 24, 18, 23, 10),
                    DisabledNotifications = false,
                    Type = "ORG_CHANNEL",
                    Version = 1
                }, gitterApiService, localNotificationService, progressIndicatorService, eventService, telemetryService, this));

                Rooms.Add(new RoomViewModel(new Room
                {
                    Id = "53307793c3599d1de448e196",
                    Name = "malditogeek/vmux",
                    Topic = "VMUX - Plugin-free video calls in your browser using WebRTC",
                    Url = "gitterHQ/devops",
                    OneToOne = false,
                    UserCount = 2,
                    UnreadItems = 42,
                    UnreadMentions = 0,
                    LastAccessTime = new DateTime(2014, 3, 24, 18, 21, 08),
                    DisabledNotifications = false,
                    Type = "REPO",
                    Version = 1
                }, gitterApiService, localNotificationService, progressIndicatorService, eventService, telemetryService, this));

                SelectedRoom = Rooms.FirstOrDefault();

                foreach (var room in Rooms)
                    SearchedRooms.Add(room);
            }
            else
            {
                // Code runs "for real"

                // Events
                _eventService.ReadRoom
                    .Subscribe(room =>
                    {
                        HtmlToXaml.HtmlToXaml.RoomName = room.Room.Name;
                    });

                HtmlToXaml.HtmlToXaml.ImageTapped += (sender, args) =>
                {
                    var image = sender as Image;
                    var bitmapImage = image.Source as BitmapImage;

                    ViewModelLocator.FullImage.Source = bitmapImage.UriSource.OriginalString;
                    _navigationService.NavigateTo("FullImage");
                };

                // Retrieve access token to use in the app
                string token = _passwordStorageService.Retrieve("token");
                _gitterApiService.SetToken(token);

                // Add event that will update READ new messages
                _currentSelectedRoomUnreadMessages = _eventService.NotifyUnreadMessages
                    .Subscribe(async unreadMessages => await NotifyReadMessages(unreadMessages));
            }
        }
 public NotificationsBackgroundTask()
 {
     _gitterApiService = new GitterApiService();
     _passwordStorageService = new PasswordStorageService();
     _applicationStorageService = new ApplicationStorageService();
 }