Example #1
0
        public frmPlayerOptions()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();
            string FakeUDN = "DBF54A20-3C3F-477c-A15D-84673C1DDF3B";
            NoDevice = Intel.UPNP.UPnPDevice.CreateEmbeddedDevice((double)1,FakeUDN);
            NoDevice.FriendlyName = "No Device Selected";
            NoDevice.SerialNumber = "N/A";
            cboOysterDevice.DisplayMember = "FriendlyName";
            cboOysterDevice.ValueMember = "SerialNumber";

            cboOysterDevice.Items.Add(NoDevice);
            cboOysterDevice.SelectedItem = NoDevice;
            disco = new OysterDeviceDiscovery();
            disco.OnAddedDevice += new OysterDeviceDiscovery.DiscoveryHandler(AddSink);
            disco.OnRemovedDevice += new OysterDeviceDiscovery.DiscoveryHandler(RemoveSink);

            m_PlayerOptions = new PlayerOptions(PlayerOptions.SaveType.ToRegistry);

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
Example #2
0
 private void RemoveSink(OysterDeviceDiscovery sender, UPnPDevice d)
 {
     Intel.UPNP.UPnPDevice DD = d;
     try
     {
         string sText = cboOysterDevice.Text;
         string sItem = (string)cboOysterDevice.SelectedValue;
         if(cboOysterDevice.SelectedItem == DD)
         {
             cboOysterDevice.SelectedItem = NoDevice;
         }
         cboOysterDevice.Items.Remove(DD);
     }
     catch(Exception Err)
     {
         MessageBox.Show(Err.Message,"Error during Remove device");
     }
 }
Example #3
0
 private void AddSink(OysterDeviceDiscovery sender, UPnPDevice d)
 {
     Intel.UPNP.UPnPService S = d.GetService("ConnectionService");
     string sFriendlyName = cboOysterDevice.Text;
     string sSerialNumber = (string)cboOysterDevice.SelectedValue;
     int BCount = cboOysterDevice.Items.Count;
     cboOysterDevice.Items.Add(d);
     int ACount = cboOysterDevice.Items.Count;
 }
Example #4
0
 private void AddSink(OysterDeviceDiscovery sender, UPnPDevice d)
 {
     Intel.UPNP.UPnPDevice DD = d;
     Intel.UPNP.UPnPService S = d.GetService("ConnectionService");
     string sFriendlyName = cboOysterDevice.Text;
     string sSerialNumber = (string)cboOysterDevice.SelectedValue;
     int BCount = cboOysterDevice.Items.Count;
     cboOysterDevice.Items.Add(DD);
     int ACount = cboOysterDevice.Items.Count;
     if(cboOysterDevice.SelectedItem == null)
     {
         if(DD.SerialNumber == m_HardCopyOptions.DefaultOysterDeviceID)
         {
             cboOysterDevice.SelectedItem = DD;
             cboOysterDevice.Text = DD.FriendlyName;
         }
     }
 }