Skip to content
Discussion options

You must be logged in to vote

Maybe something like this?

static class Program {
	public static ListView lstView;
	public static List<string> logList = new ();
	public static Dialog dlg;

	static void Main ()
	{
		Application.Init ();
		var top = Application.Top;
		var btnStart = new Button ("Start Process");
		btnStart.Clicked += () => {
			RegisterLog ("Starting logging...");
			Application.MainLoop.AddTimeout (TimeSpan.FromMilliseconds (100), PrepareBackgroundProcess);
			StartBackgroundProcessDialog ();
			RegisterLog ("Finished logging...");
		};
		lstView = new ListView (logList) {
			Y = Pos.Y (btnStart) + 1,
			Width = Dim.Fill (),
			Height = Dim.Fill ()
		};
		var win = new Window ("Background Process Sample");

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by migueldeicaza
Comment options

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

@hindermath
Comment options

@hindermath
Comment options

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