Example #1
0
        ////////////////////
        // PRIVATE METHODS
        ////////////////////

        /// <summary>
        /// Gets the background worker to start working and start backing up of folders
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void backgroundWorkerForTrackBackBackup_DoWork(object sender, DoWorkEventArgs e)
        {
            timeStamp = DateTime.Now.ToString(DATE_FORMAT) + " " + DateTime.Now.ToString(TIME_FORMAT);

            try
            {
                leftFolder  = new TrackBackFolder(leftFolderPath, rightFolderPath, timeStamp);
                rightFolder = new TrackBackFolder(rightFolderPath, leftFolderPath, timeStamp);
            }
            catch
            {
                // Do nothing as the exception caught here is captured in e.results
            }

            e.Result = BackupFolders();
        }
        ////////////////////
        // PRIVATE METHODS
        ////////////////////
        /// <summary>
        /// Gets the background worker to start working and start backing up of folders
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void backgroundWorkerForTrackBackBackup_DoWork(object sender, DoWorkEventArgs e)
        {
            timeStamp = DateTime.Now.ToString(DATE_FORMAT) + " " + DateTime.Now.ToString(TIME_FORMAT);

            try
            {
                leftFolder = new TrackBackFolder(leftFolderPath, rightFolderPath, timeStamp);
                rightFolder = new TrackBackFolder(rightFolderPath, leftFolderPath, timeStamp);
            }
            catch
            {
                // Do nothing as the exception caught here is captured in e.results
            }

            e.Result = BackupFolders();
        }