Esempio n. 1
0
        private void SetupServer()
        {
            Subscribe();
            _locationTimer          = new Timer(100);
            _locationTimer.Elapsed += _locationTimer_Elapsed;
            _clientManager          = new RemoteClients(this);
            var playlist = Extension.PlayerExtensions.FirstOrDefault(t => t.Descriptor.Guid == _playlistGuid);

            if (playlist != null)
            {
                _playlistInstance = playlist as Playlist.Playlist;
                if (_playlistInstance != null)
                {
                    _playlistInstance.GetPlaylistForm.VisibleChanged  += GetPlaylistFormVisibleChanged;
                    _playlistInstance.GetPlaylistForm.PlaylistChanged += GetPlaylistFormPlaylistChanged;
                }
            }
            Task.Factory.StartNew(Server);
        }
Esempio n. 2
0
        private void SetupServer()
        {
            if (m_LocationTimer != null)
            {
                ShutdownServer();
            }

            Subscribe();
            m_AreYouAliveTimer = new Timer {
                Interval = 1000
            };
            m_AreYouAliveTimer.Tick += (sender, args) => { PushToAllListeners("AreYouAlive|"); };
            m_AreYouAliveTimer.Start();
            m_LocationTimer = new Timer {
                Interval = 100
            };
            m_LocationTimer.Tick += _locationTimer_Elapsed;
            m_ClientManager       = new RemoteClients(this);
            Task.Factory.StartNew(Server);
        }