Ejemplo n.º 1
0
 private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
 {
     panel1.Controls.Clear();
     if (e.Node.Tag != null && e.Node.Tag is "Root")
     {
         var projectinfo = new ProjectInformation();
         panel1.Controls.Add(projectinfo);
         label1.Text = "Sat>Ip Project";
     }
     else if (e.Node.Tag != null && e.Node.Tag is SatIpDevice)
     {
         var device = ssdp.FindByUDN(e.Node.Name);
         if (device != null)
         {
             var deviceinfo = new DeviceInformation(device);
             label1.Text = e.Node.Text;
             panel1.Controls.Add(deviceinfo);
             //TransponderScan frm = new TransponderScan(device);
             //frm.ShowDialog();
         }
     }
     else if (e.Node.Tag != null && e.Node.Tag is "Cable")
     {
         var device  = ssdp.FindByUDN(e.Node.Parent.Name);
         var cabinfo = new CableInformation(device);
         panel1.Controls.Add(cabinfo);
         label1.Text = string.Format("{0} - {1}", device.FriendlyName, e.Node.Text);
     }
     else if (e.Node.Tag != null && e.Node.Tag is "Satellite")
     {
         var device  = ssdp.FindByUDN(e.Node.Parent.Name);
         var satinfo = new SatelliteInformation(device);
         panel1.Controls.Add(satinfo);
         label1.Text = string.Format("{0} - {1}", device.FriendlyName, e.Node.Text);
     }
     else if (e.Node.Tag != null && e.Node.Tag is "Terrestrial")
     {
         var device  = ssdp.FindByUDN(e.Node.Parent.Name);
         var terinfo = new TerrestrialInformation(device);
         panel1.Controls.Add(terinfo);
         label1.Text = string.Format("{0} - {1}", device.FriendlyName, e.Node.Text);
     }
 }
Ejemplo n.º 2
0
        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            var device = (SatIpDevice)ssdp.FindByUDN(e.Node.Name);

            if (device != null)
            {
                Form2 frm = new Form2(device);
                frm.ShowDialog();
            }
        }
 private void TreeView1_AfterSelect(object sender, TreeViewEventArgs e)
 {
     panel1.Controls.Clear();
     if (e.Node.Tag != null && e.Node.Tag is SatIpDevice)
     {
         var device = ssdp.FindByUDN(e.Node.Name);
         if (device != null)
         {
             var deviceinfo = new SatIpDeviceInformation(device);
             gradientLabel221.Caption = e.Node.Text;
             panel1.Controls.Add(deviceinfo);
             //TransponderScan frm = new TransponderScan(device);
             //frm.ShowDialog();
         }
     }
     else if (e.Node.Tag != null && e.Node.Tag is CableTuner)
     {
         var device  = ssdp.FindByUDN(e.Node.Parent.Name);
         var satinfo = new CableInformtion(device);
         panel1.Controls.Add(satinfo);
         gradientLabel221.Caption = string.Format("{0} - {1}", device.FriendlyName, e.Node.Text);
     }
     else if (e.Node.Tag != null && e.Node.Tag is SatelliteTuner)
     {
         var device  = ssdp.FindByUDN(e.Node.Parent.Name);
         var satinfo = new SatelliteInformation(device);
         panel1.Controls.Add(satinfo);
         gradientLabel221.Caption = string.Format("{0} - {1}", device.FriendlyName, e.Node.Text);
     }
     else if (e.Node.Tag != null && e.Node.Tag is TerrestrialTuner)
     {
         var device  = ssdp.FindByUDN(e.Node.Parent.Name);
         var satinfo = new TerrestrialInformation(device);
         panel1.Controls.Add(satinfo);
         gradientLabel221.Caption = string.Format("{0} - {1}", device.FriendlyName, e.Node.Text);
     }
 }