/// <summary> /// Constructor for the class accepting a single argument. /// </summary> /// <param name="info">SyncInfo object containing information about the requested sync operation.</param> public SyncDialog(SyncInfo info) { InitializeComponent(); // Init a presenter. _presenter = new SyncPresenter(this, info); }
/// <summary> /// Constructor for this presenter accepting two arguments. /// </summary> /// <param name="view">Form that this controls presentation for.</param> /// <param name="info">Information about the requested sync operation.</param> public SyncPresenter(ISyncDialog view, SyncInfo info) { // Hand args to private members. _view = view; _info = info; // Introduce worker to all possible jobs. _ftpJobs = new SyncJobs(_view.Worker); // Give the worker its job. SetWorkerJob(); // Bind a progress changed event. _view.Worker.ProgressChanged += ProgressChanged; }