public bool AddCameraListByVideoSupplier(uint VideoSupplierId)
        {
            var row = Framework.Container.Instance.CommService.GET_NET_STORE_LIST().Find(it => it.Id == VideoSupplierId);

            if (row != null)
            {
                float  x = 121.48f;
                float  y = 31.23f;
                Random r = new Random();
                ConfigServices.DIOService server = new ConfigServices.DIOService(Framework.Container.Instance.IVXProtocol);
                server.Login(row.ProtocolType, row.IP, (ushort)row.Port, row.UserName, row.Password);
                List <CameraInfoV3_1> list = new List <CameraInfoV3_1>();
                foreach (ConfigServices.Interop.TDIO_ChannelInfo item in server.GetChannelList())
                {
                    list.Add(new CameraInfoV3_1()
                    {
                        CameraID               = item.szChannelId,
                        CameraName             = item.szChannelName,
                        PosCoordX              = x,
                        PosCoordY              = y,
                        VideoSupplierChannelID = item.szChannelId,
                        VideoSupplierDeviceID  = VideoSupplierId,
                    });

                    x += ((float)r.NextDouble() - 0.5f) / 5f;
                    y += ((float)r.NextDouble() - 0.5f) / 5f;
                }
                Framework.Container.Instance.CommService.ADD_CAMERA_LIST(list);
            }
            return(true);
        }
        private void InitCameraList(DevComponents.AdvTree.Node pNode)
        {
            if (pNode.Cells[3].Text != "Plat")
            {
                return;
            }

            if (pNode.Tag is ConfigServices.DIOService)
            {
                return;
            }

            DataModel.VideoSupplierDeviceInfo info = pNode.Tag as DataModel.VideoSupplierDeviceInfo;
            if (info == null)
            {
                return;
            }

            ConfigServices.DIOService server = new ConfigServices.DIOService(Framework.Container.Instance.IVXProtocol);
            server.Login(info.ProtocolType, info.IP, (ushort)info.Port, info.UserName, info.Password);

            //ConfigServices.DIOService server = pNode.Tag as ConfigServices.DIOService;
            pNode.Tag = server;
            treeListFtpFile.SuspendLayout();

            try
            {
                var list = server.GetChannelList();
                pNode.Nodes.Clear();

                foreach (IVX.Live.ConfigServices.Interop.TDIO_ChannelInfo item in list)
                {
                    DevComponents.AdvTree.Node snode = new DevComponents.AdvTree.Node();
                    snode.Expanded   = false;
                    snode.Name       = "Camera";
                    snode.ImageIndex = 1;
                    snode.Text       = item.szChannelName;
                    snode.Cells.Add(new DevComponents.AdvTree.Cell(item.szChannelId));
                    snode.Cells.Add(new DevComponents.AdvTree.Cell("0"));
                    snode.Cells.Add(new DevComponents.AdvTree.Cell("Camera"));
                    snode.Nodes.Add(new DevComponents.AdvTree.Node(NullValue));
                    snode.NodeDoubleClick += new EventHandler(snode_NodeDoubleClick);

                    snode.Tag = item;
                    pNode.Nodes.Add(snode);
                }
            }
            catch (Exception)
            {
                //Framework.Container.Instance.InteractionService.ShowMessageBox("无法连接FTP服务器,或获取HTTP文件列表失败。", Framework.Environment.PROGRAM_NAME);
                return;
            }
            treeListFtpFile.ResumeLayout();
        }
        public List <object[]> InitFileList(string channel, DateTime st, DateTime et)
        {
            List <object[]> list = new List <object[]>();

            ConfigServices.DIOService server = new ConfigServices.DIOService(Framework.Container.Instance.IVXProtocol);
            server.Login(Protocol, IP, (ushort)Port, User, Pass);
            IVX.Live.ConfigServices.Interop.TDIO_ChannelInfo chinfo = new ConfigServices.Interop.TDIO_ChannelInfo();
            chinfo.szChannelId   = channel;
            chinfo.szChannelName = channel;
            chinfo.szRest        = "0";
            foreach (ConfigServices.Interop.TDIO_StrmFileInfo item in server.GetFileListByTime(chinfo, st, et))
            {
                string filefullname = string.Format("{0}`{1}`{2}`{3}`{4}`{5}", server.m_currIP, server.m_currPort, (int)server.m_connType, server.m_currUser, server.m_currPass, chinfo.szChannelId);
                string filename     = string.Format("{0}-{1}", DataModel.Common.ConvertLinuxTime(item.tStart).ToString("yyyyMMddHHmmss"), DataModel.Common.ConvertLinuxTime(item.tStop).ToString("yyyyMMddHHmmss"));
                string filesize     = item.qwFileSize.ToString();
                string fst          = item.tStart.ToString();
                string fet          = item.tStop.ToString();

                list.Add(new object[] { filefullname, filename, filesize, fst, fet });
            }

            return(list);
        }