예제 #1
0
        public string GetInstructions()
        {
            if (instructions != null)
            {
                return(BrandingService.BrandApplicationName(instructions));
            }

            if (requiresPlatform != null)
            {
                string[] platID;
                string   platName;
                if (Platform.IsMac)
                {
                    platID   = new[] { "mac" };
                    platName = "OS X";
                }
                else if (Platform.IsWindows)
                {
                    platID   = new[] { "win32", "windows", "win" };
                    platName = "Windows";
                }
                else
                {
                    platID   = new [] { "linux" };
                    platName = "Linux";
                }
                var plats = requiresPlatform.Split(';');
                if (!plats.Any(a => platID.Any(b => string.Equals(a, b, StringComparison.OrdinalIgnoreCase))))
                {
                    var msg = GettextCatalog.GetString("This project type is not supported by MonoDevelop on {0}.", platName);
                    return(BrandingService.BrandApplicationName(msg));
                }
            }

            if (!string.IsNullOrEmpty(requiresProduct))
            {
                return(GettextCatalog.GetString("This project type requires {0} to be installed.", requiresProduct));
            }

            if (!string.IsNullOrEmpty(requiresAddin))
            {
                return(GettextCatalog.GetString("The {0} extension is not installed.", requiresAddin));
            }

            if (!string.IsNullOrEmpty(instructions))
            {
                return(BrandingService.BrandApplicationName(Addin.Localizer.GetString(instructions)));
            }

            return(BrandingService.BrandApplicationLongName(GettextCatalog.GetString("This project type is not supported by MonoDevelop.")));
        }