translate the IP to a country

using http://dev.maxmind.com/geoip/legacy/geolite/
code from https://github.com/maxmind/geoip-api-csharp2
This commit is contained in:
Matthias Mailänder
2013-08-07 19:06:02 +02:00
parent 00839cb77b
commit 781c680ad3
14 changed files with 6197 additions and 3 deletions

View File

@@ -35,6 +35,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.D2k", "OpenRA.M
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.TS", "OpenRA.Mods.TS\OpenRA.Mods.TS.csproj", "{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeoIP", "GeoIP\GeoIP.csproj", "{021DDD6A-A608-424C-9A9A-252D8A9989E0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -51,6 +53,14 @@ Global
{00038B75-405B-44F5-8691-BD2546DBE224}.Release|Any CPU.Build.0 = Release|Any CPU
{00038B75-405B-44F5-8691-BD2546DBE224}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{00038B75-405B-44F5-8691-BD2546DBE224}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Release|Any CPU.Build.0 = Release|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{021DDD6A-A608-424C-9A9A-252D8A9989E0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C4AEC1A-E7D5-4114-8CCD-3EEC82872981}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -157,6 +167,188 @@ Global
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = OpenRA.Game\OpenRA.Game.csproj
Policies = $0
$0.DotNetNamingPolicy = $1
$1.DirectoryNamespaceAssociation = None
$1.ResourceNamePolicy = FileFormatDefault
$0.TextStylePolicy = $2
$2.TabsToSpaces = False
$2.NoTabsAfterNonTabs = True
$2.inheritsSet = VisualStudio
$2.inheritsScope = text/plain
$2.scope = text/x-csharp
$0.CSharpFormattingPolicy = $3
$3.IndentSwitchBody = True
$3.AnonymousMethodBraceStyle = NextLine
$3.PropertyBraceStyle = NextLine
$3.PropertyGetBraceStyle = NextLine
$3.PropertySetBraceStyle = NextLine
$3.EventBraceStyle = NextLine
$3.EventAddBraceStyle = NextLine
$3.EventRemoveBraceStyle = NextLine
$3.StatementBraceStyle = NextLine
$3.ArrayInitializerBraceStyle = NextLine
$3.BeforeMethodDeclarationParentheses = False
$3.BeforeMethodCallParentheses = False
$3.BeforeConstructorDeclarationParentheses = False
$3.BeforeDelegateDeclarationParentheses = False
$3.NewParentheses = False
$3.inheritsSet = Mono
$3.inheritsScope = text/x-csharp
$3.scope = text/x-csharp
$0.TextStylePolicy = $4
$4.inheritsSet = VisualStudio
$4.inheritsScope = text/plain
$4.scope = text/plain
$0.TextStylePolicy = $5
$5.inheritsSet = null
$5.scope = text/microsoft-resx
$0.XmlFormattingPolicy = $6
$6.inheritsSet = null
$6.scope = text/microsoft-resx
$0.TextStylePolicy = $7
$7.inheritsSet = Mono
$7.inheritsScope = text/plain
$7.scope = application/xml
$0.XmlFormattingPolicy = $8
$8.inheritsSet = Mono
$8.inheritsScope = application/xml
$8.scope = application/xml
$0.StandardHeader = $9
$9.Text = @#region Copyright & License Information\n/*\n * Copyright 2007-${Year} The OpenRA Developers (see AUTHORS)\n * This file is part of OpenRA, which is free software. It is made\n * available to you under the terms of the GNU General Public License\n * as published by the Free Software Foundation. For more information,\n * see COPYING.\n */\n#endregion
$9.IncludeInNewFiles = True
$0.NameConventionPolicy = $10
$10.Rules = $11
$11.NamingRule = $12
$12.Name = Namespaces
$12.AffectedEntity = Namespace
$12.VisibilityMask = VisibilityMask
$12.NamingStyle = PascalCase
$12.IncludeInstanceMembers = True
$12.IncludeStaticEntities = True
$11.NamingRule = $13
$13.Name = Types
$13.AffectedEntity = Class, Struct, Enum, Delegate
$13.VisibilityMask = Public
$13.NamingStyle = PascalCase
$13.IncludeInstanceMembers = True
$13.IncludeStaticEntities = True
$11.NamingRule = $14
$14.Name = Interfaces
$14.RequiredPrefixes = $15
$15.String = I
$14.AffectedEntity = Interface
$14.VisibilityMask = Public
$14.NamingStyle = PascalCase
$14.IncludeInstanceMembers = True
$14.IncludeStaticEntities = True
$11.NamingRule = $16
$16.Name = Attributes
$16.RequiredSuffixes = $17
$17.String = Attribute
$16.AffectedEntity = CustomAttributes
$16.VisibilityMask = Public
$16.NamingStyle = PascalCase
$16.IncludeInstanceMembers = True
$16.IncludeStaticEntities = True
$11.NamingRule = $18
$18.Name = Event Arguments
$18.RequiredSuffixes = $19
$19.String = EventArgs
$18.AffectedEntity = CustomEventArgs
$18.VisibilityMask = Public
$18.NamingStyle = PascalCase
$18.IncludeInstanceMembers = True
$18.IncludeStaticEntities = True
$11.NamingRule = $20
$20.Name = Exceptions
$20.RequiredSuffixes = $21
$21.String = Exception
$20.AffectedEntity = CustomExceptions
$20.VisibilityMask = VisibilityMask
$20.NamingStyle = PascalCase
$20.IncludeInstanceMembers = True
$20.IncludeStaticEntities = True
$11.NamingRule = $22
$22.Name = Methods
$22.AffectedEntity = Methods
$22.VisibilityMask = Protected, Public
$22.NamingStyle = PascalCase
$22.IncludeInstanceMembers = True
$22.IncludeStaticEntities = True
$11.NamingRule = $23
$23.Name = Static Readonly Fields
$23.AffectedEntity = ReadonlyField
$23.VisibilityMask = Protected, Public
$23.NamingStyle = PascalCase
$23.IncludeInstanceMembers = False
$23.IncludeStaticEntities = True
$11.NamingRule = $24
$24.Name = Fields
$24.AffectedEntity = Field
$24.VisibilityMask = Protected, Public
$24.NamingStyle = PascalCase
$24.IncludeInstanceMembers = True
$24.IncludeStaticEntities = True
$11.NamingRule = $25
$25.Name = ReadOnly Fields
$25.AffectedEntity = ReadonlyField
$25.VisibilityMask = Protected, Public
$25.NamingStyle = PascalCase
$25.IncludeInstanceMembers = True
$25.IncludeStaticEntities = False
$11.NamingRule = $26
$26.Name = Constant Fields
$26.AffectedEntity = ConstantField
$26.VisibilityMask = Protected, Public
$26.NamingStyle = PascalCase
$26.IncludeInstanceMembers = True
$26.IncludeStaticEntities = True
$11.NamingRule = $27
$27.Name = Properties
$27.AffectedEntity = Property
$27.VisibilityMask = Protected, Public
$27.NamingStyle = PascalCase
$27.IncludeInstanceMembers = True
$27.IncludeStaticEntities = True
$11.NamingRule = $28
$28.Name = Events
$28.AffectedEntity = Event
$28.VisibilityMask = Protected, Public
$28.NamingStyle = PascalCase
$28.IncludeInstanceMembers = True
$28.IncludeStaticEntities = True
$11.NamingRule = $29
$29.Name = Enum Members
$29.AffectedEntity = EnumMember
$29.VisibilityMask = VisibilityMask
$29.NamingStyle = PascalCase
$29.IncludeInstanceMembers = True
$29.IncludeStaticEntities = True
$11.NamingRule = $30
$30.Name = Parameters
$30.AffectedEntity = Parameter
$30.VisibilityMask = VisibilityMask
$30.NamingStyle = CamelCase
$30.IncludeInstanceMembers = True
$30.IncludeStaticEntities = True
$11.NamingRule = $31
$31.Name = Type Parameters
$31.RequiredPrefixes = $32
$32.String = T
$31.AffectedEntity = TypeParameter
$31.VisibilityMask = VisibilityMask
$31.NamingStyle = PascalCase
$31.IncludeInstanceMembers = True
$31.IncludeStaticEntities = True
$0.VersionControlPolicy = $33
$33.inheritsSet = Mono
$0.ChangeLogPolicy = $34
$34.UpdateMode = None
$34.MessageStyle = $35
$35.LineAlign = 0
$34.inheritsSet = Mono
outputpath = .
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE