public async Task ShowMessageBox() { var options = new ShowMessageBoxOptions { Title = "TEST" }; await _electronService.Dialog.ShowMessageBox(options); }
public async Task SubscribeCloseAsync() { ActionId = await _electronService.MainWindow.SubscribeCloseAsync(async() => { var buttons = new List <string> { "Ok", "Cancel" }; var options = new ShowMessageBoxOptions { Title = "Are you sure", Buttons = buttons }; var result = await _electronService.Dialog.ShowMessageBox(options); if (buttons[result] == "Ok") { await _electronService.MainWindow.UnSubscribeEventAsync(ActionId); await _electronService.MainWindow.CloseAsync(); } }, true); }
public async Task <int> ShowMessageBox(ShowMessageBoxOptions options = null) { var result = await SendActionAsync(arguments : options); return(result.ToObject <int>()); }