private void FormControl_Load(object sender, EventArgs e) { zonvif_ptz.PTZBinding ptz = new zonvif_ptz.PTZBinding(); ptz.Url = url_; // GetNodes zonvif_ptz.PTZNode[] nodes = ptz.GetNodes(); Console.WriteLine(string.Format("There are {0} ptzs", nodes.Length)); if (nodes.Length == 0) { MessageBox.Show("没有找到需要测试的云台服务 ...."); } else { foreach (zonvif_ptz.PTZNode node in nodes) { TabPage tc = new TabPage(node.token); tc.Tag = node; ucPtzControl pc = new ucPtzControl(ptz, node.token); tc.Controls.Add(pc); pc.Dock = DockStyle.Fill; tabCont.TabPages.Add(tc); } } }
private void FormControl_Load(object sender, EventArgs e) { zonvif_ptz.PTZBinding ptz = new zonvif_ptz.PTZBinding(); ptz.Url = url_; // GetNodes zonvif_ptz.PTZNode[] nodes = ptz.GetNodes(); Console.WriteLine(string.Format("There are {0} ptzs", nodes.Length)); if (nodes.Length == 0) { MessageBox.Show("没有找到需要测试的云台服务 ...."); } else { foreach (zonvif_ptz.PTZNode node in nodes) { TabPage tc = new TabPage(node.token); tc.Tag = node; ucPtzControl pc = new ucPtzControl(ptz, node.token); tc.Controls.Add(pc); pc.Dock = DockStyle.Fill; tabCont.TabPages.Add(tc); } } }