Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Version 1.6 :
Browse files Browse the repository at this point in the history
- vérifications supplémentaires des droits lecture/écriture ;
- corrections de texte ;
- correction de vérification de version Windows NT ;
- i18n encore à corriger en (clés renommées)
  • Loading branch information
geeooff committed Aug 20, 2012
1 parent 39896f8 commit caaf89d
Show file tree
Hide file tree
Showing 8 changed files with 594 additions and 122 deletions.
51 changes: 51 additions & 0 deletions Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,32 @@ public static T GetPropertyValue<T>(this DirectoryEntry entry, String propertyNa
return defaultValue;
}

public static String GetIisLegacyVersionString(this OperatingSystem os)
{
switch (os.Version.Major)
{
case 5:
switch (os.Version.Minor)
{
case 0: return "IIS 5.0";
case 1: return "IIS 5.1";
case 2: return "IIS 6.0";
}
break;

case 6:
switch (os.Version.Minor)
{
case 0:
case 1:
case 2:
return "IIS 6.0";
}
break;
}
return Strings.MsgUnknownIisVersionString;
}

public static String GetIisVersionString(this OperatingSystem os)
{
switch (os.Version.Major)
Expand All @@ -100,5 +126,30 @@ public static String GetIisVersionString(this OperatingSystem os)
}
return Strings.MsgUnknownIisVersionString;
}

public static bool LessThan(this OperatingSystem os, int major, int minor)
{
return (os.Version.Major < major || (os.Version.Major == major && os.Version.Minor < minor));
}

public static bool LessThanEqual(this OperatingSystem os, int major, int minor)
{
return (os.Version.Major < major || (os.Version.Major == major && os.Version.Minor <= minor));
}

public static bool Equal(this OperatingSystem os, int major, int minor)
{
return (os.Version.Major == major && os.Version.Minor == minor);
}

public static bool GreaterThan(this OperatingSystem os, int major, int minor)
{
return (os.Version.Major > major || (os.Version.Major == major && os.Version.Minor > minor));
}

public static bool GreaterThanEqual(this OperatingSystem os, int major, int minor)
{
return (os.Version.Major > major || (os.Version.Major == major && os.Version.Minor >= minor));
}
}
}
1 change: 1 addition & 0 deletions LogRotator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
<DesignTime>True</DesignTime>
<DependentUpon>Strings.resx</DependentUpon>
</Compile>
<Compile Include="UserFileAccessRights.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="App.ico" />
Expand Down
Loading

0 comments on commit caaf89d

Please sign in to comment.