C# Class ZeroInstall.Commands.WinForms.ProgressForm

Displays the progress of a CliCommand and ITasks.
Inheritance: System.Windows.Forms.Form
Datei anzeigen Open project: 0install/0install-win

Public Methods

Method Description
Ask ( string question, MsgSeverity severity ) : Future
CustomizeSelections ( Func solveCallback, EventWaitHandle waitHandle ) : void

Allows the user to modify the InterfacePreferences and rerun the ISolver if desired. Returns immediatley.

This method must not be called from a background thread.

GetProgressControl ( [ taskName ) : IProgress

Gets a GUI element for reporting progress of a generic ITask. Should only be one running at a time.

This method must not be called from a background thread.

GetProgressControl ( [ taskName, ManifestDigest tag ) : IProgress

Gets a GUI element for reporting progress of a ITask for a specific implementation. May run multiple in parallel.

This method must not be called from a background thread.

Hide ( ) : void

Hides the form and the tray icon.

This method must not be called from a background thread.

ProgressForm ( [ cancellationTokenSource ) : System

Creates a new progress tracking form.

RestoreSelections ( ) : void

Restores the UI activated by ShowSelections and hidden by GetProgressControl(string) after an ITask.Run completes.

ShowSelections ( Selections selections, IFeedManager feedManager ) : void

Shows the user the Selections made by the ISolver. Returns immediately.

This method must not be called from a background thread.

ShowTrayIcon ( string information = null, ToolTipIcon messageType = ToolTipIcon.None ) : void

Shows the tray icon with an associated balloon message.

This method must not be called from a background thread.

Private Methods

Method Description
Cancel ( ) : void

Hides the window and then starts canceling the current process asynchronously.

Dispose ( bool disposing ) : void
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

ProgressForm_FormClosing ( object sender, CancelEventArgs e ) : void
ProgressForm_Shown ( object sender, EventArgs e ) : void
buttonCancel_Click ( object sender, EventArgs e ) : void
buttonCustomizeSelectionsDone_Click ( object sender, EventArgs e ) : void
buttonHide_Click ( object sender, EventArgs e ) : void
notifyIcon_BalloonTipClicked ( object sender, EventArgs e ) : void
notifyIcon_MouseClick ( object sender, MouseEventArgs e ) : void

Method Details

Ask() public method

public Ask ( string question, MsgSeverity severity ) : Future
question string
severity MsgSeverity
return Future

CustomizeSelections() public method

Allows the user to modify the InterfacePreferences and rerun the ISolver if desired. Returns immediatley.
This method must not be called from a background thread.
The value is set from a thread other than the UI thread.
public CustomizeSelections ( Func solveCallback, EventWaitHandle waitHandle ) : void
solveCallback Func Called after have been changed and the needs to be rerun.
waitHandle System.Threading.EventWaitHandle A wait handle to be signaled once the user is satisfied with the .
return void

GetProgressControl() public method

Gets a GUI element for reporting progress of a generic ITask. Should only be one running at a time.
This method must not be called from a background thread.
public GetProgressControl ( [ taskName ) : IProgress
taskName [ The name of the task to be tracked.
return IProgress

GetProgressControl() public method

Gets a GUI element for reporting progress of a ITask for a specific implementation. May run multiple in parallel.
This method must not be called from a background thread.
public GetProgressControl ( [ taskName, ManifestDigest tag ) : IProgress
taskName [ The name of the task to be tracked.
tag ManifestDigest A digest used to associate the task with a specific implementation.
return IProgress

Hide() public method

Hides the form and the tray icon.
This method must not be called from a background thread.
The value is set from a thread other than the UI thread.
public Hide ( ) : void
return void

ProgressForm() public method

Creates a new progress tracking form.
public ProgressForm ( [ cancellationTokenSource ) : System
cancellationTokenSource [ Used to signal when the user wishes to cancel the current process.
return System

RestoreSelections() public method

Restores the UI activated by ShowSelections and hidden by GetProgressControl(string) after an ITask.Run completes.
public RestoreSelections ( ) : void
return void

ShowSelections() public method

Shows the user the Selections made by the ISolver. Returns immediately.
This method must not be called from a background thread.
The value is set from a thread other than the UI thread.
public ShowSelections ( Selections selections, IFeedManager feedManager ) : void
selections Selections The as provided by the .
feedManager IFeedManager The feed manager used to retrieve feeds for additional information about implementations.
return void

ShowTrayIcon() public method

Shows the tray icon with an associated balloon message.
This method must not be called from a background thread.
The value is set from a thread other than the UI thread.
public ShowTrayIcon ( string information = null, ToolTipIcon messageType = ToolTipIcon.None ) : void
information string The balloon message text.
messageType ToolTipIcon The type icon to display next to the balloon message.
return void