Example #1
0
        /// <summary>
        /// RoboSharp OnCommandCompleted callback handler.
        /// </summary>
        private void RsCommandCompleted(object sender, RoboCommandCompletedEventArgs e)
        {
            Log.Trace("RsCommandCompleted()");
            if (_transferState == TxState.DoNothing)
            {
                return;
            }


            // Calling _roboCommand.Stop() is not required (any more, maybe it never was), since
            // all of this is already taken care of by the RoboCommand class internally, hence we
            // can safely disable the call here:
            // _roboCommand.Stop();

            Log.Debug("Transfer stopped");
            _transferState = TxState.Stopped;
            _status.TransferredBytesCompleted   = 0;
            _status.TransferredBytesCurrentFile = 0;
            _status.CurrentTransferPercent      = 0;
            _txCurFileSize     = 0;
            _txCurFileProgress = 0;
            _roboCommand.Dispose();
            _status.TransferInProgress = false;
            _waitCyclesBeforeNextTx    = 2;
        }
Example #2
0
 void copy_OnCommandCompleted(object sender, RoboCommandCompletedEventArgs e)
 {
     Dispatcher.BeginInvoke((Action)(() =>
     {
         OptionsGrid.IsEnabled = true;
         ProgressGrid.IsEnabled = false;
     }));
 }
Example #3
0
        void copy_OnCommandCompleted(object sender, RoboCommandCompletedEventArgs e)
        {
            Dispatcher.BeginInvoke((Action)(() =>
            {
                OptionsGrid.IsEnabled = true;
                ProgressGrid.IsEnabled = false;

                var results = e.Results;
                Console.WriteLine("Files copied: " + results.FilesStatistic.Copied);
                Console.WriteLine("Directories copied: " + results.DirectoriesStatistic.Copied);
            }));
        }
        private void Robo_OnCopyCompleted(object sender, RoboCommandCompletedEventArgs e)
        {
            RunningCopyOperations--;
            if (RunningCopyOperations > 0)
            {
                return;
            }

            taskbarIcon.ShowBalloonTip("Backup abgeschlossen", "Die Erstellung des Backups wurde erfolgreich abgeschlossen.", BalloonIcon.Info);
            taskbarIcon.Dispatcher.BeginInvoke(new Action(() => { taskbarIcon.ToolTipText = "USB-Backup"; }), System.Windows.Threading.DispatcherPriority.Send);
            System.Media.SystemSounds.Asterisk.Play();

            CopyExecuting      = false;
            BaloonTipDisplayed = false;
        }
Example #5
0
        private void _RoboCommand_OnCommandCompleted(object sender, RoboCommandCompletedEventArgs e)
        {
            BeginInvoke((Action)(() =>
            {
                _Stopwatch.Stop();

                CurrentFileProgress.Value = 100;

                TaskbarProgress.SetValue(Handle, 100, 100);

                PauseResumeButton.Enabled = false;

                Text = "Finished";

                JobLogger.Log(new Job
                {
                    TotalMillseconds = _Stopwatch.ElapsedMilliseconds,
                    TotalBytes = TotalFileSize,
                    TotalFiles = FileCount
                });

                Activate();
            }));
        }
Example #6
0
 /// <summary>
 /// Event that is called when copy has completed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void rbc_OnCommandCompleted(object sender, RoboCommandCompletedEventArgs e)
 {
     TaskCompleteCallBack("Complete"); // A callback using a delegate that calls a method when the copy completes
 }
Example #7
0
 private void OnCommandCompleted(object sender, RoboCommandCompletedEventArgs e)
 {
     _logger.InfoFormat("[{0}] - Copy ApplicationSite Complete!", MethodInfo.GetCurrentMethod().Name);
 }
Example #8
0
 void backup_OnCommandCompleted(object sender, RoboCommandCompletedEventArgs e)
 {
     Logger.Info(e.ToString() + "Complete");
 }
Example #9
0
 void backup_OnCommandCompleted(object sender, RoboCommandCompletedEventArgs e)
 {
     Console.WriteLine("Копирование окончено");
 }
Example #10
0
 void copy_OnCommandCompleted(object sender, RoboCommandCompletedEventArgs e)
 {
     Dispatcher.BeginInvoke((Action)(() =>
     {
         OptionsGrid.IsEnabled = true;
         ProgressGrid.IsEnabled = false;
     }));
 }