예제 #1
0
 private void queryDaemon_ServerNowUnavailable(object sender, QueryMediaServers.ServerEventArgs e)
 {
     if (_groups.ContainsKey(e.ServerAddress))
     {
         SourceDiscoveryGroup group = _groups[e.ServerAddress];
         FireGroupOffline(group);
         _groups.Remove(e.ServerAddress);
     }
 }
예제 #2
0
        private void queryDaemon_ServerNowAvailable(object sender, QueryMediaServers.ServerEventArgs e)
        {
            SourceDiscoveryGroup group      = new SourceDiscoveryGroup();
            ServerInfo           serverInfo = _queryMediaServers.MediaServers[e.ServerAddress];

            group.ServerInfo = serverInfo;
            group.Name       = serverInfo.ServerName;
            foreach (StreamSourceInfo streamSourceInfo in serverInfo.StreamSources.Items)
            {
                group.Sources.Add(streamSourceInfo);
            }
            _groups.Add(e.ServerAddress, group);
            FireGroupOnline(group);
        }
예제 #3
0
 /// <summary>
 /// Updates a server in the TreeView if its ServerInfo has changed
 /// </summary>
 void queryDaemon_ServerInfoChanged(object sender, QueryMediaServers.ServerEventArgs e)
 {
     if (_groups.ContainsKey(e.ServerAddress))
     {
         SourceDiscoveryGroup group      = _groups[e.ServerAddress];
         ServerInfo           serverInfo = _queryMediaServers.MediaServers[e.ServerAddress];
         group.Name = serverInfo.ServerName;
         group.Sources.Clear();
         foreach (StreamSourceInfo streamSourceInfo in serverInfo.StreamSources.Items)
         {
             group.Sources.Add(streamSourceInfo);
         }
         FireGroupChanged(group);
     }
 }