Example #1
0
        public void InsertRecord(string vid, string titleImgUrl, string title, string fileUrl, string localPathName, long progress, long fileLen, int status, int rate)
        {
            DBMyDownloadInfo dbMyDownInfo = new DBMyDownloadInfo(vid, titleImgUrl, title, fileUrl, localPathName, progress, fileLen, status, rate);

            lock (DBMyDownloadFactory.syncObj)
            {
                _dataContext.Table_DBMyDownloadInfo.InsertOnSubmit(dbMyDownInfo);
                _dataContext.SubmitChanges();
                InsertIntoCollection(vid, titleImgUrl, title, fileUrl, localPathName, progress, fileLen, status, rate);
            }
        }
Example #2
0
        public void InsertRecord(string vid, string titleImgUrl, string title, string fileUrl, string localPathName, long progress, long fileLen, int status, int rate)
        {
            DBMyDownloadInfo dbMyDownInfo = new DBMyDownloadInfo(vid, titleImgUrl, title, fileUrl, localPathName, progress, fileLen, status, rate);

            lock (DBMyDownloadFactory.syncObj)
            {
                _dataContext.Table_DBMyDownloadInfo.InsertOnSubmit(dbMyDownInfo);
                _dataContext.SubmitChanges();
                InsertIntoCollection(vid, titleImgUrl, title, fileUrl, localPathName, progress, fileLen, status, rate);
            }
        }
Example #3
0
        private void DeleteFromCollection(string vid)
        {
            DBMyDownloadInfo downInfo = null;

            foreach (DBMyDownloadInfo info in MyDownInfos)
            {
                if (info.VID == vid)
                {
                    downInfo = info;
                    break;
                }
            }
            if (downInfo != null)
            {
                MyDownInfos.Remove(downInfo);
            }
        }
Example #4
0
 private void InsertIntoCollection(string vid, string titleImgUrl, string title, string fileUrl, string localPathName, long progress, long fileLen, int status, int rate)
 {
     DBMyDownloadInfo dbMyDownInfo = new DBMyDownloadInfo(vid, titleImgUrl, title, fileUrl, localPathName, progress, fileLen, status, rate);
     MyDownInfos.Add(dbMyDownInfo);
 }
Example #5
0
        private void InsertIntoCollection(string vid, string titleImgUrl, string title, string fileUrl, string localPathName, long progress, long fileLen, int status, int rate)
        {
            DBMyDownloadInfo dbMyDownInfo = new DBMyDownloadInfo(vid, titleImgUrl, title, fileUrl, localPathName, progress, fileLen, status, rate);

            MyDownInfos.Add(dbMyDownInfo);
        }