static bool reg(ref int id, out string sid) { sid = null; zonvif_dm.DeviceBinding db = new zonvif_dm.DeviceBinding(); db.Url = endp(); zonvif_dm.ZonekeyDMServRegisterType req = new zonvif_dm.ZonekeyDMServRegisterType(); req.ns = ns_; req.desc = desc_; req.url = url_; req.addr = service_name_; //try { //zonvif_dm.ZonekeyDMServRegisterResponseType res = db.Reg //} return false; }
static bool reg(ref int id, out string sid) { sid = null; zonvif_dm.DeviceBinding db = new zonvif_dm.DeviceBinding(); db.Url = endp(); zonvif_dm.ZonekeyDMServRegisterType req = new zonvif_dm.ZonekeyDMServRegisterType(); req.ns = ns_; req.desc = desc_; req.url = url_; req.addr = service_name_; //try { //zonvif_dm.ZonekeyDMServRegisterResponseType res = db.Reg //} return(false); }
static void Main(string[] args) { if (args.Length == 0) { MessageBox.Show("必须在命令行启动,并且设置参数为 http://.... 格式,指向dm"); return; } /// TODO: 这里输入多个参数更合理,用于指定测试的对象 ... Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); string dm_url = "http://172.16.1.111:10000"; if (args.Length > 0) { dm_url = args[0]; } zonvif_dm.DeviceBinding dm = new zonvif_dm.DeviceBinding(); dm.Url = dm_url; string url0 = null; zonvif_dm.ZonekeyDMServiceType[] services = dm.GetServices(false); foreach (zonvif_dm.ZonekeyDMServiceType s in services) { string url = s.url; string ns = s.ns; if (url != null && ns != null) { Console.WriteLine("INFO: Service '" + s.ns + "', url='" + url + "'"); if (ns == "ptz") { // FIXME: 仅仅测试云台模块 ... url0 = url; break; } } } /// TODO: 根据测试对象,决定启动的窗体 ... Application.Run(new FormControl(url0)); }
static void Main(string[] args) { if (args.Length == 0) { MessageBox.Show("必须在命令行启动,并且设置参数为 http://.... 格式,指向dm"); return; } /// TODO: 这里输入多个参数更合理,用于指定测试的对象 ... Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); string dm_url = "http://172.16.1.111:10000"; if (args.Length > 0) dm_url = args[0]; zonvif_dm.DeviceBinding dm = new zonvif_dm.DeviceBinding(); dm.Url = dm_url; string url0 = null; zonvif_dm.ZonekeyDMServiceType[] services = dm.GetServices(false); foreach (zonvif_dm.ZonekeyDMServiceType s in services) { string url = s.url; string ns = s.ns; if (url != null && ns != null) { Console.WriteLine("INFO: Service '" + s.ns + "', url='" + url + "'"); if (ns == "ptz") { // FIXME: 仅仅测试云台模块 ... url0 = url; break; } } } /// TODO: 根据测试对象,决定启动的窗体 ... Application.Run(new FormControl(url0)); }