using System; using System.Threading.Tasks; using AutoCatCore.MVVM; using Terminal.Gui; namespace ACTerm { class DialogService : IDialogService { public async Task ShowErrorDialogAsync(string message, string title = "Error") { //var ok = new Button("OK"); //var text = new Label(message) { X = 1, Y = 1, Width = Dim.Fill() - 1, Height = Dim.Fill() - 1, TextAlignment = TextAlignment.Centered }; //var dialog = new Dialog(title, 40, 8, ok); //dialog.Add(text); //ok.Clicked += () => { Application.RequestStop(); }; //Application.Run(dialog); MessageBox.ErrorQuery(title, message, "OK"); } } }