示例#1
0
 public bool AcceptLicenses(IEnumerable <IPackage> packages)
 {
     using (LicenseAcceptanceDialog dialog = CreateLicenseAcceptanceDialog(packages)) {
         int result = MessageService.ShowCustomDialog(dialog);
         return(result == (int)Gtk.ResponseType.Ok);
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
        bool ShowLicenseAcceptanceDialog(IEnumerable <NuGetPackageLicense> licenses)
        {
            bool result = false;

            using (LicenseAcceptanceDialog dialog = CreateLicenseAcceptanceDialog(licenses)) {
                result = dialog.Run(Xwt.MessageDialog.RootWindow);
            }
            return(result);
        }
示例#4
0
        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);
        }