public void Prompt(string message, DotNetCoreVersion requiredDotNetCoreVersion)
        {
            var items = new InfoBarItem [] {
                new InfoBarItem(GettextCatalog.GetString("Download .NET Core"), InfoBarItemKind.Button, DownloadButtonClicked, true)
            };

            downloadUrl = requiredDotNetCoreVersion != null?DotNetCoreDownloadUrl.GetDotNetCoreDownloadUrl(requiredDotNetCoreVersion) : DotNetCoreDownloadUrl.GetDotNetCoreDownloadUrl();

            IdeApp.Workbench.ShowInfoBar(false, new InfoBarOptions(message)
            {
                Items = items
            });
        }
        public void Show()
        {
            if (IsUnsupportedVersion || IsNetStandard)             //for .net standard we'll show generic message
            {
                Message = DotNetCoreSdk.GetNotSupportedVersionMessage();
            }
            else
            {
                Message     = DotNetCoreSdk.GetNotSupportedVersionMessage(RequiredDotNetCoreVersion.OriginalString);
                downloadUrl = DotNetCoreDownloadUrl.GetDotNetCoreDownloadUrl(RequiredDotNetCoreVersion);
            }

            MessageService.GenericAlert(message);
        }
Exemple #3
0
        public void Prompt()
        {
            var items = new InfoBarItem [] {
                new InfoBarItem(GettextCatalog.GetString("Download .NET Core"), InfoBarItemKind.Button, DownloadButtonClicked, true)
            };

            if (IsUnsupportedVersion || IsNetStandard || RequiredDotNetCoreVersion == null)             //for .net standard we'll show generic message
            {
                Message = DotNetCoreSdk.GetNotSupportedVersionMessage();
            }
            else
            {
                Message     = DotNetCoreSdk.GetNotSupportedVersionMessage(RequiredDotNetCoreVersion.OriginalString);
                downloadUrl = DotNetCoreDownloadUrl.GetDotNetCoreDownloadUrl(RequiredDotNetCoreVersion);
            }

            IdeApp.Workbench.ShowInfoBar(false, new InfoBarOptions(Message)
            {
                Items = items
            });
        }
Exemple #4
0
        internal static string GetNotSupportedVersionMessage(string version = "")
        {
            string GetMessage(DotNetCoreVersion currentVersion)
            {
                return(GettextCatalog.GetString(".NET Core {0}.{1} SDK version {2} is not compatible with this version of Visual Studio for Mac. Install the latest update to the .NET Core {0}.{1} SDK by visiting {3}", currentVersion.Major, currentVersion.Minor, currentVersion.ToString(), DotNetCoreDownloadUrl.GetDotNetCoreDownloadUrl(currentVersion)));
            }

            var installedVersion = Versions?.OrderByDescending(x => x).FirstOrDefault();

            if (installedVersion != null)
            {
                if (installedVersion < DotNetCoreVersion.MinimumSupportedSdkVersion)
                {
                    return(GetMessage(installedVersion));
                }
                else if (installedVersion.Major == 2 && installedVersion.Minor == 2 && installedVersion < DotNetCoreVersion.MinimumSupportedSdkVersion22)
                {
                    return(GetMessage(installedVersion));
                }
                else if (installedVersion.Major == 3 && installedVersion < DotNetCoreVersion.MinimumSupportedSdkVersion30)
                {
                    return(GetMessage(installedVersion));
                }
            }

            return(GettextCatalog.GetString(".NET Core {0} SDK is required to build this application, and is not installed. Install the latest update to the .NET Core {0} SDK by visiting {1}", version, DotNetCoreDownloadUrl.GetDotNetCoreDownloadUrl(version)));
        }
 internal static string GetNotInstalledVersionMessage(string version = "")
 {
     return(GettextCatalog.GetString(".NET Core {0} runtime is required to run this application, and is not installed. Install the latest update to the .NET Core {0} runtime by visiting {1}", version, DotNetCoreDownloadUrl.GetDotNetCoreDownloadUrl(version)));
 }