Beispiel #1
0
 public void DeviceRemoved(string sUdn)
 {
     Logger.Info("Device with UUID :{0} restarts,and will removed from the Devices Tree", sUdn);
     if (_rtspDevice.UniqueDeviceName.Equals(sUdn))
     {
         _keepaLiveTimer.Stop();
         axWindowsMediaPlayer1.URL = "";
         _rtspDevice.Dispose();
     }
     treeView1.Nodes["Node0"].Nodes[sUdn].Remove();
 }
Beispiel #2
0
 private void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     try
     {
         _rtspDevice.Dispose();
         _client.DeviceFound -= DeviceFound;
         _client.DeviceLost  -= DeviceLost;
         _client.Dispose();
     }
     catch (Exception exception)
     {
         Logger.Error(string.Format("{0}-{1}:{2}", "Form1", "Form1_FormClosed", exception));
     }
 }