Esempio n. 1
0
 /// <summary>
 /// Reports a single file sync operation via console output.
 /// </summary>
 /// <param name="op">The sync operation to report.</param>
 void Report(SyncOperation op)
 {
     switch (op.Action)
     {
         case SyncOperation.SyncAction.Copy:
             System.Console.WriteLine("Copying:{2}\t{0}{2}\t->{2}\t{1}", op.SourceFile, op.TargetFile, Environment.NewLine);
             break;
         case SyncOperation.SyncAction.Delete:
             System.Console.WriteLine("Deleting {0}", op.TargetFile);
             break;
         default:
             System.Console.WriteLine("Unknown sync action: {0}", op.Action);
             break;
     }
 }
Esempio n. 2
0
 void IOutputView.Report(SyncOperation op)
 {
     switch (op.Action)
     {
         case SyncOperation.SyncAction.Copy:
             OutputBox.AppendText(string.Format("Copying:{2}\t{0}{2}\t->{2}\t{1}", op.SourceFile, op.TargetFile, Environment.NewLine));
             break;
         case SyncOperation.SyncAction.Delete:
             OutputBox.AppendText(string.Format("Deleting {0}", op.TargetFile));
             break;
         default:
             OutputBox.AppendText(string.Format("Unknown sync action: {0}", op.Action));
             break;
     }
     OutputBox.AppendText(Environment.NewLine);
 }
Esempio n. 3
0
 private void Report(SyncOperation op)
 {
     switch (op.Action)
     {
         case SyncOperation.SyncAction.Copy:
             _log.Add(string.Format("Copying:{2}\t{0}{2}\t->{2}\t{1}", op.SourceFile, op.TargetFile, Environment.NewLine));
             break;
         case SyncOperation.SyncAction.Delete:
             _log.Add(string.Format("Deleting {0}", op.TargetFile));
             break;
         default:
             _log.Add(string.Format("Unknown sync action: {0}", op.Action));
             break;
     }
     RaisePropertyChanged("Log");
 }