private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { dvc_MAIN = e.Result as DVCore; EnableButtons(); SortItems(); OutputToExcel(); UpdateSummary(); StringBuilder strbd_TimeSequence = new StringBuilder(); ts_DiffTime = dt_EndTime.Subtract(dt_StartTime); if (ts_DiffTime.TotalDays >= 1.0) { strbd_TimeSequence.Append(ts_DiffTime.TotalDays); strbd_TimeSequence.Append(" days."); } else if (ts_DiffTime.TotalHours >= 1.0) { strbd_TimeSequence.Append(ts_DiffTime.TotalHours); strbd_TimeSequence.Append(" hours."); } else if (ts_DiffTime.TotalMinutes >= 1.0) { strbd_TimeSequence.Append(ts_DiffTime.TotalMinutes); strbd_TimeSequence.Append(" minutes."); } else if (ts_DiffTime.TotalSeconds >= 1.0) { strbd_TimeSequence.Append(ts_DiffTime.TotalSeconds); strbd_TimeSequence.Append(" seconds."); } else { strbd_TimeSequence.Append(ts_DiffTime.TotalMilliseconds); strbd_TimeSequence.Append(" milliseconds."); } MessageBox.Show("Scanning Completed in " + strbd_TimeSequence.ToString(), "SCANNING COMPLETE", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public DVDiff(int iMaxCount, DVCore owner) { int_MaxCount = iMaxCount; dvc_owner = owner; }
private void btn_Work_Click(object sender, EventArgs e) { DisableButtons(); ResetSummary(); tabControl1.SelectedIndex = 1; dvc_MAIN = new DVCore(this); foreach (ListViewItem temp in lvw_Folders.Items) { dvc_MAIN.addFolderLocation(temp.SubItems[0].Text); } if (cmb_FileType.SelectedItem.ToString().CompareTo("Video") == 0) dvt_FileType = DVType.FileType.Video; else if (cmb_FileType.SelectedItem.ToString().CompareTo("Audio") == 0) dvt_FileType = DVType.FileType.Audio; else if (cmb_FileType.SelectedItem.ToString().CompareTo("Image") == 0) dvt_FileType = DVType.FileType.Image; else dvt_FileType = DVType.FileType.All; backgroundWorker1.RunWorkerAsync(); }