public ToastHandler(IConfig config, IRpApiHandler apiHandler, ILog log)
 {
     _config     = config;
     _apiHandler = apiHandler;
     _log        = log;
     // Register AUMID and COM server (for Desktop Bridge apps, this no-ops)
     DesktopNotificationManagerCompat.RegisterAumidAndComServer <ToastActivator>(appId);
     // Register COM server and activator type
     DesktopNotificationManagerCompat.RegisterActivator <ToastActivator>();
     WriteIconToDisk();
 }
        public SongInfoListener(IRpApiHandler apiHandler, IConfig config, ILog log, IToastHandler toastHandler)
        {
            _apiHandler   = apiHandler;
            _config       = config;
            _log          = log;
            _toastHandler = toastHandler;

            NextSongWaiterCancellationTokenSource = new CancellationTokenSource();
            listenerCancellationTokenSource       = new CancellationTokenSource();

            Application.ApplicationExit += (sender, e) => listenerCancellationTokenSource.Cancel();
        }
示例#3
0
        public RpApplicationCore(IConfig config, IRpApiHandler apiHandler, IToastHandler toastHandler, Foobar2000Watcher foobar2000Watcher, MusicBeeWatcher musicBeeWatcher, ISongInfoListener songInfoListener, ILog log, RpTrayIcon rpTrayIcon, ShortcutHelper shortcutHelper)
        {
            _log               = log;
            _apihandler        = apiHandler;
            _config            = config;
            _toastHandler      = toastHandler;
            _songInfoListener  = songInfoListener;
            _foobar2000Watcher = foobar2000Watcher;
            _musicBeeWatcher   = musicBeeWatcher;
            _rpTrayIcon        = rpTrayIcon;
            _shortcutHelper    = shortcutHelper;

            EventCounter = 0;

            Init();
        }