Esempio n. 1
0
 public App()
 {
     ServiceConfigurator.RegisterService <ISpotifyWatcher, SpotifyWatcher>();
     ServiceConfigurator.RegisterService <IConnectionManager, ConnectionManager>();
     ServiceConfigurator.RegisterService <ISessionManager, SessionManager>();
     ServiceConfigurator.RegisterService <IOptions, Options>();
 }
        public MainWindow()
        {
            InitializeComponent();
            DataContext = this;

            spotify    = ServiceConfigurator.GetService <ISpotifyWatcher>();
            connection = ServiceConfigurator.GetService <IConnectionManager>();
            session    = ServiceConfigurator.GetService <ISessionManager>();

            spotify.OnTrackChanged    += PrintTrackName;
            connection.OnTrackChanged += ServerTrackChange;
        }