Skip to content

async callback that pops a message box? #1695

Answered by tznind
GhostFire90 asked this question in Q&A
Discussion options

You must be logged in to vote

This shows how to block an async task while you wait for the user to make a choice and then act upon that choice in the thread. In this case a progress bar loads and periodically asks the user how long to wait before loading the next chunk of the bar.

Let me know if you have difficulty running this or don't understand or if it isn't relevant to your question.

using System.Collections.ObjectModel;
using Terminal.Gui;

namespace Tests
{
    class Program
    {
        static ProgressBar pb;

        static void Main(string[] args)
        {
            Application.Init();

            var win = new Window()
            {
                X = 0,
                Y = 0,

                Width =

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@BDisp
Comment options

@GhostFire90
Comment options

@BDisp
Comment options

Comment options

You must be logged in to vote
1 reply
@GhostFire90
Comment options

Answer selected by GhostFire90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants