Exemplo n.º 1
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;
 }
Exemplo n.º 2
0
        public frmRecordOptions()
        {
            //
            // 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);
            disco = new OysterDeviceDiscovery();
            disco.OnAddedDevice += new OysterDeviceDiscovery.DiscoveryHandler(AddSink);
            disco.OnRemovedDevice += new OysterDeviceDiscovery.DiscoveryHandler(RemoveSink);

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            //			log = new CarverLab.Utility.Logger("DesktopRecorder");
            m_RecordOptions = new RecordOptions(RecordOptions.SaveType.ToRegistry);
            //tabControl1.SelectedIndex = 0;
            m_wrap = new CarverLab.Utility.Win32Wrapper();
            //disco.Start();
            cboCaptureQuality.DisplayMember = "Name";
            cboCaptureQuality.ValueMember = "Identifier";
            cboCaptureQuality.DataSource = m_PerformanceList;
        }
Exemplo n.º 3
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");
     }
 }
Exemplo n.º 4
0
        public frmOptions()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();
            #if USE_DEVICE_DISCOVERY
            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);
            #endif

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

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }