public PkgTransfer(QueueItem queueItem, System.ComponentModel.BackgroundWorker bgWorker, FileRenameService fileRenameService, Server server) { this.bgWorker = bgWorker; this.queueItem = queueItem; this.fileRenameService = fileRenameService; this.server = server; stopwatch = new Stopwatch(); stopwatch.Start(); }
public MainForm() { InitializeComponent(); listViewColumnSorter = new ListViewColumnSorter(); listViewItemsQueue.ListViewItemSorter = listViewColumnSorter; queueBackgroundWorker = new BackgroundWorker(); queueBackgroundWorker.WorkerReportsProgress = true; queueBackgroundWorker.WorkerSupportsCancellation = true; queueBackgroundWorker.DoWork += queueWorker_DoWork; queueBackgroundWorker.ProgressChanged += queueWorker_ProgressChanged; fileRenameService = new FileRenameService(); fileRenameService.StartService(); }