Пример #1
0
 /// <summary>
 /// @author : KhoaHT
 /// @CreateDate:04/07/2008
 /// @Description: constructor
 /// </summary>
 public FrmDeleteCache(FileInfo[] pAllFilesInfo, WorkstationClipStatus pWorkstationStatus, string pstrFilter)
     : base()
 {
     mAllFilesInfo = pAllFilesInfo;
     mWorkstationStatus = pWorkstationStatus;
     mstrFilter = pstrFilter;
     SetProcessingStyle(ProgressBarStyle.Marquee);
 }
Пример #2
0
        private bool BindingGridOffline(DataView dv)
        {
            try
            {
                //DataView dv = mbScheduleDetail.RetrievesAll(scheduleDetail).Tables[0].DefaultView;
                mdgrSchedule.AutoGenerateColumns = false;

                mdgrSchedule.DataSource = dv;
                SetButtonStatus();
                if (this.mdgrSchedule.RowCount <= 0)
                    return false;
                GenSTT();
                // Read workstation clip status
                mclipStatus = new WorkstationClipStatus(dv.Table.Rows,
                                                        "FILE_NAME",
                                                        "UPLOAD_DATE",
                                                        STR_COL_DOWNLOADED,
                                                        Properties.Settings.Default.ClipPath,
                                                        STR_COL_EXCEPTION_DOWNLOAD);
                mclipStatus.ReadWorkstationClipStatus(Properties.Settings.Default.ClipPath + "\\" + Properties.Settings.Default.CacheListName);
                if (mdteSearh.CompareTo(mdteNow) >= 0)
                    mbScheduleDetail.CheckDownloaded(dv.Table.Rows, Global.Workstation.WorkstationId, mdteSearh);
                return true;
            }
            catch (Exception)
            {
                // NOT NEED TODO
            }
            return false;
        }
Пример #3
0
 /// <summary>
 /// @author : KhoaHT
 /// @CreateDate:04/07/2008
 /// @Description: Binding grid with specific data view
 /// </summary>
 private bool BindingGrid(DataView dv)
 {
     try
     {
         //DataView dv = mbScheduleDetail.RetrievesAll(scheduleDetail).Tables[0].DefaultView;
         mdgrSchedule.AutoGenerateColumns = false;
         // Marked column used for random generating playlist
         dv.Table.Columns.Add(STR_COL_MARKED_USING, System.Type.GetType("System.Int32"));
         // download exception used for exception message when downloading
         dv.Table.Columns.Add(STR_COL_EXCEPTION_DOWNLOAD, System.Type.GetType("System.String"));
        // dv.Table.Columns.Add("##STT##", System.Type.GetType("System.Int32"));
         mdgrSchedule.DataSource = dv;
         SetButtonStatus();
         if (this.mdgrSchedule.RowCount <= 0)
             return false;
         GenSTT();
         // Read workstation clip status
         mclipStatus = new WorkstationClipStatus(dv.Table.Rows,
                                                 "FILE_NAME",
                                                 "UPLOAD_DATE",
                                                 STR_COL_DOWNLOADED,
                                                 Properties.Settings.Default.ClipPath,
                                                 STR_COL_EXCEPTION_DOWNLOAD);
         mclipStatus.ReadWorkstationClipStatus(Properties.Settings.Default.ClipPath + "\\" + Properties.Settings.Default.CacheListName);
         if (mdteSearh.CompareTo(mdteNow) >= 0)
             mbScheduleDetail.CheckDownloaded(dv.Table.Rows, Global.Workstation.WorkstationId, mdteSearh);
         return true;
     }
     catch (Exception)
     {
         //NOT NEED TODO
     }
     return false;
 }
Пример #4
0
 /// <summary>
 /// @author: khoaht
 /// @createdate:6/16/2009
 /// </summary>
 private void WriteClipStatus()
 {
     // Write download status into file status
     WorkstationClipStatus clipStatus = new WorkstationClipStatus(((DataView)mdgrSchedule.DataSource).Table.Rows,
                                                                     "FILE_NAME",
                                                                     "UPLOAD_DATE",
                                                                     "DOWNLOADED",
                                                                     "LOCAL_PATH",
                                                                     STR_COL_EXCEPTION_DOWNLOAD);
     mclipStatus.WriteWorkstationClipStatus(Properties.Settings.Default.ClipPath + "\\" + Properties.Settings.Default.CacheListName);
     BindingGrid();
 }