C# Class Nexus.Client.DownloadMonitoring.UI.DownloadMonitorVM

This class encapsulates the data and the operations presented by UI elements that display Download monitoring.
Inheritance: INotifyPropertyChanged
Show file Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Methods

Method Description
CanCancelTask ( IBackgroundTask p_tskTask ) : bool

Determines if the given IBackgroundTask can be cancelled.

CanPauseDownload ( IBackgroundTask p_tskTask ) : bool

Determines if the given IBackgroundTask can be paused.

CanQueueDownload ( IBackgroundTask p_tskTask ) : bool

Determines if the given IBackgroundTask can be paused.

CanRemoveDownload ( IBackgroundTask p_tskTask ) : bool

Determines if the given IBackgroundTask can be removed.

CanResumeDownload ( IBackgroundTask p_tskTask ) : bool

Determines if the given IBackgroundTask can be resumed.

CancelTask ( IBackgroundTask p_tskTask ) : void

Cancels the given task.

DownloadMonitorVM ( DownloadMonitor p_amnDownloadMonitor, ISettings p_setSettings, ModManager p_mmgModManager, IModRepository p_mrpModRepository ) : Nexus.Client.BackgroundTasks

A simple constructor that initializes the object with its dependencies.

PauseTask ( IBackgroundTask p_tskTask ) : void

Puases the given task.

QueueTask ( IBackgroundTask p_tskTask ) : void

Puases the given task.

RemoveAllTasks ( ) : void

Removes all the completed/failed tasks.

RemoveTask ( AddModTask p_tskTask ) : void

Removes the given task.

ResumeAllTasks ( ) : void

Resumes all paused tasks.

ResumeTask ( IBackgroundTask p_tskTask ) : void

Resumes the given task.

Protected Methods

Method Description
OnPropertyChanged ( string name ) : void

Raises the INotifyPropertyChanged.PropertyChanged event of the project.

Private Methods

Method Description
ActiveTasks_PropertyChanged ( object sender, System e ) : void
ModRepository_UserStatusUpdate ( object sender, System e ) : void

Handles the m_mrpModRepository.UserStatusUpdate event of the tasks list.

Updates the UI elements.

bgwWorker_DoWork ( object sender, DoWorkEventArgs e ) : void
bgwWorker_RunWorkerCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void

Method Details

CanCancelTask() public method

Determines if the given IBackgroundTask can be cancelled.
public CanCancelTask ( IBackgroundTask p_tskTask ) : bool
p_tskTask IBackgroundTask The task for which it is to be determined /// if it can be cancelled.
return bool

CanPauseDownload() public method

Determines if the given IBackgroundTask can be paused.
public CanPauseDownload ( IBackgroundTask p_tskTask ) : bool
p_tskTask IBackgroundTask The task for which it is to be determined /// if it can be paused.
return bool

CanQueueDownload() public method

Determines if the given IBackgroundTask can be paused.
public CanQueueDownload ( IBackgroundTask p_tskTask ) : bool
p_tskTask IBackgroundTask The task for which it is to be determined /// if it can be paused.
return bool

CanRemoveDownload() public method

Determines if the given IBackgroundTask can be removed.
public CanRemoveDownload ( IBackgroundTask p_tskTask ) : bool
p_tskTask IBackgroundTask The task for which it is to be determined /// if it can be removed.
return bool

CanResumeDownload() public method

Determines if the given IBackgroundTask can be resumed.
public CanResumeDownload ( IBackgroundTask p_tskTask ) : bool
p_tskTask IBackgroundTask The task for which it is to be determined /// if it can be resumed.
return bool

CancelTask() public method

Cancels the given task.
public CancelTask ( IBackgroundTask p_tskTask ) : void
p_tskTask IBackgroundTask The task to cancel.
return void

DownloadMonitorVM() public method

A simple constructor that initializes the object with its dependencies.
public DownloadMonitorVM ( DownloadMonitor p_amnDownloadMonitor, ISettings p_setSettings, ModManager p_mmgModManager, IModRepository p_mrpModRepository ) : Nexus.Client.BackgroundTasks
p_amnDownloadMonitor DownloadMonitor The Download manager to use to manage the monitored activities.
p_setSettings ISettings The application and user settings.
p_mmgModManager Nexus.Client.ModManagement.ModManager
p_mrpModRepository IModRepository
return Nexus.Client.BackgroundTasks

OnPropertyChanged() protected method

Raises the INotifyPropertyChanged.PropertyChanged event of the project.
protected OnPropertyChanged ( string name ) : void
name string The property name.
return void

PauseTask() public method

Puases the given task.
public PauseTask ( IBackgroundTask p_tskTask ) : void
p_tskTask IBackgroundTask The task to pause.
return void

QueueTask() public method

Puases the given task.
public QueueTask ( IBackgroundTask p_tskTask ) : void
p_tskTask IBackgroundTask The task to pause.
return void

RemoveAllTasks() public method

Removes all the completed/failed tasks.
public RemoveAllTasks ( ) : void
return void

RemoveTask() public method

Removes the given task.
public RemoveTask ( AddModTask p_tskTask ) : void
p_tskTask Nexus.Client.ModManagement.AddModTask IBackgroundTask task to remove.
return void

ResumeAllTasks() public method

Resumes all paused tasks.
public ResumeAllTasks ( ) : void
return void

ResumeTask() public method

Resumes the given task.
public ResumeTask ( IBackgroundTask p_tskTask ) : void
p_tskTask IBackgroundTask The task to resume.
return void