Exemple #1
0
        public EditVideoForm(IYoutubeVideo video, INotificationSettings notificationSettings, bool hasMailPrivilegue, IYoutubeCategoryContainer catContainer, IYoutubeLanguageContainer langContainer, IYoutubePlaylistContainer plContainer, IPlaylistServiceConnectionContainer pscContainer)
            : this()
        {
            Video = video;
            NotificationSettings = notificationSettings;

            uploadGrid.IsNewUpload = false;
            uploadGrid.Fill(video, notificationSettings, hasMailPrivilegue, catContainer, langContainer, plContainer, pscContainer);
        }
Exemple #2
0
        public SettingsDialogViewModel(IConfig config, IVisualSettings visual, IGeneralSettings general,
                                       IMuteSettings mute, INotificationSettings notifications)
        {
            Config        = config;
            Visual        = visual;
            General       = general;
            Mute          = mute;
            Notifications = notifications;

            Title = Strings.Settings;
        }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SendMailTask"/> class.
 /// </summary>
 /// <param name="notificationRepository">The notification repository.</param>
 /// <param name="taskSettings">The task settings.</param>
 /// <param name="logService">The log service.</param>
 /// <param name="notificationSettings">The notification settings.</param>
 public SendMailTask(
     IRepository <EmailNotification> notificationRepository,
     ITaskSettings taskSettings,
     ILoggerService logService,
     INotificationSettings notificationSettings)
 {
     this.notificationRepository = notificationRepository;
     this.taskSettings           = taskSettings;
     this.logService             = logService;
     this.notificationSettings   = notificationSettings;
 }
        public bool TryGetNotificationSettings(ISymbol symbol, out INotificationSettings settings)
        {
            IValueSymbol symbol2 = (IValueSymbol)symbol;

            if (symbol2 != null)
            {
                settings = symbol2.NotificationSettings;
                return(true);
            }
            settings = null;
            return(false);
        }
Exemple #5
0
        public UserConfigurationWindowViewModel(
            IMonitors monitors,
            INotificationSettings notificationSettings,
            IEventAggregator eventAggregator,
            INotificationFactory notificationFactory)
        {
            this.monitors             = monitors;
            this.notificationSettings = notificationSettings;
            this.eventAggregator      = eventAggregator;
            this.notificationFactory  = notificationFactory;

            CancelCommand = new DelegateCommand(OnCancel);
            SaveCommand   = new DelegateCommand(OnSave);
        }
        public NotificationWindowViewModel(
            IMonitors monitors,
            INotificationSettings notificationSettings,
            IEventAggregator eventAggregator)
        {
            this.notificationSettings = notificationSettings;
            this.eventAggregator      = eventAggregator;
            this.monitors             = monitors;

            topLeftNotifications          = new NotificationCollection();
            topLeftNotifications.Removed += OnRemoved;

            topRightNotifications          = new NotificationCollection();
            topRightNotifications.Removed += OnRemoved;

            bottomLeftNotifications          = new NotificationCollection();
            bottomLeftNotifications.Removed += OnRemoved;

            bottomRightNotifications          = new NotificationCollection();
            bottomRightNotifications.Removed += OnRemoved;

            eventAggregator
            .GetEvent <NotificationEvents.AddNotification>()
            .Subscribe(OnAdd);

            eventAggregator
            .GetEvent <NotificationEvents.AddNotificationWithPosition>()
            .Subscribe(OnAdd);

            eventAggregator
            .GetEvent <NotificationEvents.ClearAll>()
            .Subscribe(OnClearAll);

            eventAggregator
            .GetEvent <NotificationEvents.ClearGroup>()
            .Subscribe(OnClearGroup);

            eventAggregator
            .GetEvent <NotificationEvents.ClickNotification>()
            .Subscribe(OnClick);

            eventAggregator
            .GetEvent <NotificationEvents.RefreshNotificationCentre>()
            .Subscribe(OnRefresh);
        }
Exemple #7
0
        public void Fill(IYoutubeVideo video, INotificationSettings notificationSettings, bool hasMailPrivilegue, IYoutubeCategoryContainer catContainer,
                         IYoutubeLanguageContainer langContainer, IYoutubePlaylistContainer plContainer, IPlaylistServiceConnectionContainer pscContainer)
        {
            categoryContainer = catContainer;
            RefreshCategories();

            languageContainer = langContainer;
            RefreshLanguages();

            playlistContainer = plContainer;
            RefreshPlaylists();

            HasMailPrivilegue    = hasMailPrivilegue;
            Video                = video;
            NotificationSettings = notificationSettings;

            PscContainer = pscContainer;
        }
Exemple #8
0
        public LocalServiceFactory(INotificationSettings notificationSettings)
        {
            var monitors = new Monitors();

            EventAggregator     = new EventAggregator();
            NotificationFactory = new NotificationFactory(() => new Notification(EventAggregator));

            var viewModelFactory = new ViewModelFactory(
                EventAggregator,
                () => new UserConfigurationWindowViewModel(
                    monitors,
                    notificationSettings,
                    EventAggregator,
                    NotificationFactory),
                () => new NotificationWindowViewModel(
                    monitors,
                    notificationSettings,
                    EventAggregator));

            NotificationWindowManager = new NotificationWindowManager(viewModelFactory);
            NotificationService       = new NotificationService(() => NotificationWindowManager);
        }
 public abstract void OnRegisterNotification(ISymbol symbol, SymbolNotificationType type, INotificationSettings settings);
 protected RpcNotificationAccessorBase(IAccessorValueFactory valueFactory, ISession session, INotificationSettings defaultSettings) : base(valueFactory, session)
 {
     this._notificationSettings = defaultSettings;
 }
 public VideoInformation(IYoutubeVideo video, ExpressionEvaluator evaluator, INotificationSettings notificationSettings)
 {
     Video                = video;
     Evaluator            = evaluator;
     NotificationSettings = notificationSettings;
 }
Exemple #12
0
        public override void OnRegisterNotification(ISymbol symbol, SymbolNotificationType type, INotificationSettings settings)
        {
            if (symbol == null)
            {
                throw new ArgumentNullException("symbol");
            }
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }
            NotificationSettings settings2 = null;

            if (!this._notificationTable.TryGetRegisteredNotificationSettings(symbol, out settings2))
            {
                this.RegisterNotification(symbol, type, (NotificationSettings)settings);
            }
            else if (settings2.CompareTo(settings) >= 0)
            {
                this.RegisterNotification(symbol, type, settings2);
            }
            else
            {
                this.UnregisterNotification(symbol, type);
                this.RegisterNotification(symbol, type, (NotificationSettings)settings);
            }
        }
        public override void OnRegisterNotification(ISymbol symbol, SymbolNotificationType type, INotificationSettings settings)
        {
            IAccessorNotification notification = this._inner as IAccessorNotification;

            if (this._inner == null)
            {
                throw new ValueAccessorException($"Accessor '{this._inner}' doesn't support INotificationAccessor", this._inner);
            }
            notification.OnRegisterNotification(symbol, type, settings);
        }