C# Класс Catel.Services.PleaseWaitService

Показать файл Открыть проект

Открытые методы

Метод Описание
Hide ( ) : void

Hides this please wait window.

PleaseWaitService ( ILanguageService languageService ) : System

Initializes a new instance of the PleaseWaitService class.

Pop ( ) : void

Decreases the number of clients that show the please wait window. The implementing class is responsible for holding a counter internally which a call to this method will decrease. As long as the internal counter is not zero (0), the please wait window will stay visible. To increase the counter, make a call to Pop. A call to Show(string) or one of its overloads will not increase the internal counter. A call to Hide will reset the internal counter to zero (0) and thus hide the window.

Push ( string status = "" ) : void

Increases the number of clients that show the please wait window. The implementing class is responsible for holding a counter internally which a call to this method will increase. As long as the internal counter is not zero (0), the please wait window will stay visible. To decrease the counter, make a call to Pop. A call to Show(string) or one of its overloads will not increase the internal counter. A call to Hide will reset the internal counter to zero (0) and thus hide the window.

Show ( PleaseWaitWorkDelegate workDelegate, string status = "" ) : void

Shows the please wait window with the specified status text and executes the work delegate (in a background thread). When the work is finished, the please wait window will be automatically closed.

Show ( string status = "" ) : void

Shows the please wait window with the specified status text.

When this method is used, the M:Catel.Services.IPleaseWaitService.Hide method must be called to hide the window again.

UpdateStatus ( int currentItem, int totalItems, string statusFormat = "" ) : void

Updates the status and shows a progress bar with the specified status text. The percentage will be automatically calculated. The busy indicator will automatically hide when the totalItems is larger than currentItem. When providing the statusFormat, it is possible to use {0} (represents current item) and {1} (represents total items).

UpdateStatus ( string status ) : void

Updates the status text.

Приватные методы

Метод Описание
HideBusyIndicator ( ) : void
InitializeBusyIndicator ( ) : void
SetStatus ( string status ) : void
ShowBusyIndicator ( bool indeterminate ) : void

Описание методов

Hide() публичный Метод

Hides this please wait window.
public Hide ( ) : void
Результат void

PleaseWaitService() публичный Метод

Initializes a new instance of the PleaseWaitService class.
public PleaseWaitService ( ILanguageService languageService ) : System
languageService ILanguageService The language service.
Результат System

Pop() публичный Метод

Decreases the number of clients that show the please wait window. The implementing class is responsible for holding a counter internally which a call to this method will decrease. As long as the internal counter is not zero (0), the please wait window will stay visible. To increase the counter, make a call to Pop. A call to Show(string) or one of its overloads will not increase the internal counter. A call to Hide will reset the internal counter to zero (0) and thus hide the window.
public Pop ( ) : void
Результат void

Push() публичный Метод

Increases the number of clients that show the please wait window. The implementing class is responsible for holding a counter internally which a call to this method will increase. As long as the internal counter is not zero (0), the please wait window will stay visible. To decrease the counter, make a call to Pop. A call to Show(string) or one of its overloads will not increase the internal counter. A call to Hide will reset the internal counter to zero (0) and thus hide the window.
public Push ( string status = "" ) : void
status string The status to change the text to.
Результат void

Show() публичный Метод

Shows the please wait window with the specified status text and executes the work delegate (in a background thread). When the work is finished, the please wait window will be automatically closed.
public Show ( PleaseWaitWorkDelegate workDelegate, string status = "" ) : void
workDelegate PleaseWaitWorkDelegate The work delegate.
status string The status. When the string is null or empty, the default please wait text will be used.
Результат void

Show() публичный Метод

Shows the please wait window with the specified status text.
When this method is used, the M:Catel.Services.IPleaseWaitService.Hide method must be called to hide the window again.
public Show ( string status = "" ) : void
status string The status. When the string is null or empty, the default please wait text will be used.
Результат void

UpdateStatus() публичный Метод

Updates the status and shows a progress bar with the specified status text. The percentage will be automatically calculated. The busy indicator will automatically hide when the totalItems is larger than currentItem. When providing the statusFormat, it is possible to use {0} (represents current item) and {1} (represents total items).
The is smaller than zero. The is null.
public UpdateStatus ( int currentItem, int totalItems, string statusFormat = "" ) : void
currentItem int The current item.
totalItems int The total items.
statusFormat string The status format. Can be empty, but not null.
Результат void

UpdateStatus() публичный Метод

Updates the status text.
public UpdateStatus ( string status ) : void
status string The status. When the string is null or empty, the default please wait text will be used.
Результат void