-
-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix slow response to checkbox changes
- Loading branch information
Showing
8 changed files
with
292 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
|
||
namespace CKAN | ||
{ | ||
|
||
public class GUIUser : NullUser | ||
{ | ||
public delegate bool DisplayYesNo(string message); | ||
|
||
public Action<string, object[]> displayMessage; | ||
public Action<string, object[]> displayError; | ||
public DisplayYesNo displayYesNo; | ||
|
||
protected override bool DisplayYesNoDialog(string message) | ||
{ | ||
if (displayYesNo == null) | ||
return true; | ||
|
||
return displayYesNo(message); | ||
} | ||
|
||
protected override void DisplayMessage(string message, params object[] args) | ||
{ | ||
displayMessage(message, args); | ||
} | ||
|
||
protected override void DisplayError(string message, params object[] args) | ||
{ | ||
displayError(message, args); | ||
} | ||
|
||
protected override void ReportProgress(string format, int percent) | ||
{ | ||
Main.Instance.SetDescription($"{format} - {percent}%"); | ||
Main.Instance.SetProgress(percent); | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.