Ejemplo n.º 1
0
    public static string GetUpdateInformation(string UserAgent, Version version)
    {
        if (UserAgent.Contains("Mac"))
        {
            return "It looks like you're running a Mac. There's no .NET Framework download from Microsoft for the Mac, but you might check out either <a href=\"http://www.microsoft.com/silverlight/resources/install.aspx\">Silverlight</a> which is a browser plugin that includes a small version of the .NET Framework. You could also check out <a href=\"http://www.go-mono.com/mono-downloads/download.html\">Mono</a>, which is an Open Source platform that can run .NET code on a Mac.";
        }

        if (UserAgent.Contains("nix"))
        {
            return "It looks like you're running a Unix machine. There's no .NET Framework download from Microsoft for Unix, but you might check out <a href=\"http://www.go-mono.com/mono-downloads/download.html\">Mono</a>, which is an Open Source platform that can run .NET code on Unix.";
        }

        if (UserAgent.Contains("fox"))
        {
            return MessageForBrowser("Firefox");
        }
        else if (UserAgent.Contains("Chrome"))
        {
            return MessageForBrowser("Chrome");
        }
        else if (UserAgent.Contains("Safari")) // Chrome also uses safari in the user agent so this check must come after
        {
            return MessageForBrowser("Safari");
        }
        else if(!UserAgent.Contains("MSIE"))
        {
            return UnknownBrowserMessage();
        }

        var windowsFactory = new WindowsVersionFactory();
        var latest = windowsFactory.GetLatestWindows();
        return latest.CheckOs(UserAgent);
    }
Ejemplo n.º 2
0
 public WindowsNt4(WindowsVersionFactory factory) : base(factory)
 {
 }
Ejemplo n.º 3
0
 public WindowsMe(WindowsVersionFactory factory)
     : base(factory)
 {
 }
Ejemplo n.º 4
0
 public NullWindowsVersion(WindowsVersionFactory factory) : base(factory)
 {
 }
Ejemplo n.º 5
0
 public WindowsVersionCheck(WindowsVersionFactory factory)
 {
     _factory = factory;
     _dotNetFactory = new DotNetVersionFactory();
 }
Ejemplo n.º 6
0
 public Windows2000(WindowsVersionFactory factory) : base(factory)
 {
 }
Ejemplo n.º 7
0
 public WindowsVersionCheck(WindowsVersionFactory factory)
 {
     _factory       = factory;
     _dotNetFactory = new DotNetVersionFactory();
 }
Ejemplo n.º 8
0
 public NullWindowsVersion(WindowsVersionFactory factory)
     : base(factory)
 {
 }
Ejemplo n.º 9
0
 public WindowsVista(WindowsVersionFactory factory) : base(factory)
 {
 }