public bool AcceptLicenses(IEnumerable <IPackage> packages) { using (LicenseAcceptanceDialog dialog = CreateLicenseAcceptanceDialog(packages)) { int result = MessageService.ShowCustomDialog(dialog); return(result == (int)Gtk.ResponseType.Ok); } }
bool ShowLicenseAcceptanceDialog(IEnumerable <NuGetPackageLicense> licenses) { using (LicenseAcceptanceDialog dialog = CreateLicenseAcceptanceDialog(licenses)) { dialog.Modal = false; int result = MessageService.ShowCustomDialog(dialog, IdeApp.Workbench.RootWindow); return(result == (int)Gtk.ResponseType.Ok); } }
bool ShowLicenseAcceptanceDialog(IEnumerable <NuGetPackageLicense> licenses) { bool result = false; using (LicenseAcceptanceDialog dialog = CreateLicenseAcceptanceDialog(licenses)) { result = dialog.Run(Xwt.MessageDialog.RootWindow); } return(result); }
bool ShowLicenseAcceptanceDialog(IEnumerable <NuGetPackageLicense> licenses) { bool result = false; Xwt.Toolkit.NativeEngine.Invoke(delegate { using (LicenseAcceptanceDialog dialog = CreateLicenseAcceptanceDialog(licenses)) { result = dialog.Run(Xwt.MessageDialog.RootWindow); } }); return(result); }
Task <bool> ShowLicenseAcceptanceDialog(IEnumerable <NuGetPackageLicense> licenses) { var res = new TaskCompletionSource <bool> (); IdeApp.RunWhenIdle(() => { Xwt.Toolkit.NativeEngine.Invoke(delegate { using (LicenseAcceptanceDialog dialog = CreateLicenseAcceptanceDialog(licenses)) { res.SetResult(dialog.Run(Xwt.MessageDialog.RootWindow)); } }); }); return(res.Task); }