Esempio n. 1
0
 private void button1_Click(object sender, System.EventArgs e)
 {
     if (device!=null)
     {
         // Starting UPnP Device
         Log("Stopping UPNP Device");
         device.Stop();
         device=null;  // Indicate we're done with this device...
         GC.Collect(); // and garbage collect to clean up the PPT controller
     }
     else
     {
         Log("Device is not running.");
     }
 }
Esempio n. 2
0
 // Start Device
 private void button2_Click(object sender, System.EventArgs e)
 {
     if (device==null)
     {
         // Starting UPnP Device
         Log("Intel's UPnP .NET Framework Stack");
         Log("Intel Device Builder Build#1.0.1725.27554");
         device = new SampleDevice();
         device.OnLogEvent += new Wnms04.UpnpStack.SampleDevice.OnLog(this.Log);
         device.Start();
     }
     else
     {
         Log("Device Already Running.");
     }
 }