Explorar o código

去除Config程序集,直接使用.net的ConfigurationManager xml配置

tanghai %!s(int64=13) %!d(string=hai) anos
pai
achega
c361a2a1e0

+ 0 - 148
CSharp/App/Config/Config.cs

@@ -1,148 +0,0 @@
-using System.Collections.Generic;
-using System.IO;
-using System.Runtime.Serialization;
-using Helper;
-
-namespace Modules.Robot
-{
-	[DataContract]
-	public class ServerConfig
-	{
-		[DataMember(Order = 1, IsRequired = true)]
-		public string Host { get; set; }
-
-		[DataMember(Order = 2, IsRequired = true)]
-		public string Name { get; set; }
-
-		[DataMember(Order = 3, IsRequired = true)]
-		public uint Port { get; set; }
-	}
-
-	[DataContract]
-	public class CityServerConfig
-	{
-		[DataMember(Order = 1, IsRequired = true)]
-		public string CityServerName { get; set; }
-
-		[DataMember(Order = 2, IsRequired = true)]
-		public ServerConfig ServerConfig { get; set; }
-
-		[DataMember(Order = 3, IsRequired = true)]
-		public int FrameMilliseconds { get; set; }
-
-		[DataMember(Order = 4, IsRequired = true)]
-		public int Icon { get; set; }
-
-		[DataMember(Order = 5, IsRequired = true)]
-		public int Color { get; set; }
-
-		[DataMember(Order = 6, IsRequired = true)]
-		public int TimeZone { get; set; }
-
-		[DataMember(Order = 7, IsRequired = true)]
-		public int AllowedSecurityLevel { get; set; }
-
-		[DataMember(Order = 8, IsRequired = true)]
-		public double Population { get; set; }
-
-		[DataMember(Order = 9, IsRequired = true)]
-		public string RealmBuilds { get; set; }
-
-		[DataMember(Order = 10, IsRequired = true)]
-		public string CityDisplayName { get; set; }
-
-		[DataMember(Order = 11, IsRequired = true)]
-		public string MapConfigFilePath { get; set; }
-
-		[DataMember(Order = 13, IsRequired = true)]
-		public string FriendConfigFilePath { get; set; }
-
-		[DataMember(Order = 14, IsRequired = true)]
-		public string GmCommandPermitFile { get; set; }
-
-		[DataMember(Order = 15, IsRequired = true)]
-		public string AchievementProtoPath { get; set; }
-
-		[DataMember(Order = 16, IsRequired = true)]
-		public string CityTaskPath { get; set; }
-
-		[DataMember(Order = 17, IsRequired = true)]
-		public int MaxPlayers { get; set; }
-
-		[DataMember(Order = 18, IsRequired = true)]
-		public int DenyRoomInviteCooldownSeconds { get; set; }
-
-		[DataMember(Order = 19, IsRequired = true)]
-		public string CityNpcPath { get; set; }
-
-		[DataMember(Order = 20, IsRequired = true)]
-		public string PythonDataPath { get; set; }
-
-		[DataMember(Order = 21, IsRequired = true)]
-		public string CityDataPath { get; set; }
-	}
-
-	[DataContract]
-	public class MapServerConfig 
-	{
-		[DataMember(Order = 1, IsRequired = true)]
-		public string MapServerName { get; set; }
-
-		[DataMember(Order = 2, IsRequired = true)]
-		public ServerConfig ServerConfig { get; set; }
-
-		[DataMember(Order = 3, IsRequired = true)]
-		public int FrameMilliseconds { get; set; }
-
-		[DataMember(Order = 4, IsRequired = true)]
-		public string MapConfigFilePath { get; set; }
-
-		[DataMember(Order = 5, IsRequired = true)]
-		public string CityTaskPath { get; set; }
-
-		[DataMember(Order = 7, IsRequired = true)]
-		public string MapDataPath { get; set; }
-
-		[DataMember(Order = 6, IsRequired = true)]
-		public string PythonDataPath { get; set; }
-
-		[DataMember(Order = 8, IsRequired = true)]
-		public string AchievementProtoPath { get; set; }
-	}
-
-	[DataContract]
-	public class WorldServiceConfig
-	{
-		[DataMember(Order = 1, IsRequired = true)]
-		public List<CityServerConfig> CityServerConfig { get; set; }
-
-		[DataMember(Order = 2, IsRequired = true)]
-		public List<MapServerConfig> MapServerConfig { get; set; }
-	}
-
-	[DataContract]
-	public class Config
-	{
-		private static readonly Config instance;
-
-		static Config()
-		{
-			string content = File.ReadAllText(@"..\App\Config\Config.json");
-			instance = JsonHelper.FromString<Config>(content);
-		}
-
-		public static Config Instance
-		{
-			get
-			{
-				return instance;
-			}
-		}
-
-		[DataMember(Order = 1, IsRequired = true)]
-		public string IP { get; set; }
-
-		[DataMember(Order = 2, IsRequired = true)]
-		public ushort Port { get; set; }
-	}
-}

+ 0 - 65
CSharp/App/Config/Config.csproj

@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Config</RootNamespace>
-    <AssemblyName>Config</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>..\..\Bin\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Runtime.Serialization" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Config.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\Platform\Helper\Helper.csproj">
-      <Project>{24233cd5-a5df-484b-a482-b79cb7a0d9cb}</Project>
-      <Name>Helper</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="Config.json">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>

+ 0 - 4
CSharp/App/Config/Config.json

@@ -1,4 +0,0 @@
-{
-	"IP"   : "192.168.11.95",
-	"Port" : 8888
-}

+ 0 - 36
CSharp/App/Config/Properties/AssemblyInfo.cs

@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// 有关程序集的常规信息通过以下
-// 特性集控制。更改这些特性值可修改
-// 与程序集关联的信息。
-[assembly: AssemblyTitle("Config")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Config")]
-[assembly: AssemblyCopyright("Copyright ©  2013")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// 将 ComVisible 设置为 false 使此程序集中的类型
-// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
-// 则将该类型上的 ComVisible 特性设置为 true。
-[assembly: ComVisible(false)]
-
-// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
-[assembly: Guid("4d6efcac-02b3-4c20-8797-8065b4b36226")]
-
-// 程序集的版本信息由下面四个值组成:
-//
-//      主版本
-//      次版本 
-//      生成号
-//      修订号
-//
-// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
-// 方法是按如下所示使用“*”:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 14 - 14
CSharp/App/DataCenter/App.config

@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
-  <configSections>
-    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
-    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
-  </configSections>
-  <entityFramework>
-    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
-      <parameters>
-        <parameter value="v11.0" />
-      </parameters>
-    </defaultConnectionFactory>
-  </entityFramework>
-  <connectionStrings>
-    <add name="DataCenterEntities" connectionString="metadata=res://*/DataCenter.csdl|res://*/DataCenter.ssdl|res://*/DataCenter.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=192.168.11.93;user id=tanghai;password=tanghai;persist security info=True;database=tanghai&quot;" providerName="System.Data.EntityClient" />
-  </connectionStrings>
+	<configSections>
+		<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+		<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+	</configSections>
+	<entityFramework>
+		<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
+			<parameters>
+				<parameter value="v11.0" />
+			</parameters>
+		</defaultConnectionFactory>
+	</entityFramework>
+	<connectionStrings>
+		<add name="DataCenterEntities" connectionString="metadata=res://*/DataCenter.csdl|res://*/DataCenter.ssdl|res://*/DataCenter.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=192.168.11.93;user id=tanghai;password=tanghai;persist security info=True;database=tanghai&quot;" providerName="System.Data.EntityClient" />
+	</connectionStrings>
 </configuration>

+ 2 - 0
CSharp/App/DataCenter/DataCenter.Context.cs

@@ -109,5 +109,7 @@ namespace DataCenter
         public DbSet<t_tutorial> t_tutorial { get; set; }
         public DbSet<t_tutorial_status_info> t_tutorial_status_info { get; set; }
         public DbSet<t_world_character> t_world_character { get; set; }
+        public DbSet<t_map_play_info_hero> t_map_play_info_hero { get; set; }
+        public DbSet<t_map_play_info_hero_pet> t_map_play_info_hero_pet { get; set; }
     }
 }

+ 1 - 1
CSharp/App/DataCenter/DataCenter.Designer.cs

@@ -1,4 +1,4 @@
-// Default code generation is disabled for model 'E:\Source\Egametang\CSharp\App\DataCenter\DataCenter\DataCenter.edmx'. 
+// Default code generation is disabled for model 'E:\Source\Egametang\CSharp\App\DataCenter\DataCenter.edmx'. 
 // To enable default code generation, change the value of the 'Code Generation Strategy' designer
 // property to an alternate value. This property is available in the Properties Window when the model is
 // open in the designer.

+ 9 - 1
CSharp/App/DataCenter/DataCenter.csproj

@@ -44,6 +44,7 @@
       <HintPath>..\..\packages\MySQL.Data.Entities.6.5.4.0\lib\net40\MySql.Data.Entity.dll</HintPath>
     </Reference>
     <Reference Include="System" />
+    <Reference Include="System.ComponentModel.Composition" />
     <Reference Include="System.ComponentModel.DataAnnotations" />
     <Reference Include="System.Core" />
     <Reference Include="System.Data.Entity" />
@@ -276,6 +277,12 @@
     <Compile Include="t_map_play_info.cs">
       <DependentUpon>DataCenter.tt</DependentUpon>
     </Compile>
+    <Compile Include="t_map_play_info_hero.cs">
+      <DependentUpon>DataCenter.tt</DependentUpon>
+    </Compile>
+    <Compile Include="t_map_play_info_hero_pet.cs">
+      <DependentUpon>DataCenter.tt</DependentUpon>
+    </Compile>
     <Compile Include="t_meta.cs">
       <DependentUpon>DataCenter.tt</DependentUpon>
     </Compile>
@@ -326,11 +333,11 @@
     </Compile>
   </ItemGroup>
   <ItemGroup>
-    <None Include="App.config" />
     <EntityDeploy Include="DataCenter.edmx">
       <Generator>EntityModelCodeGenerator</Generator>
       <LastGenOutput>DataCenter.Designer.cs</LastGenOutput>
     </EntityDeploy>
+    <None Include="App.config" />
     <None Include="DataCenter.Context.tt">
       <Generator>TextTemplatingFileGenerator</Generator>
       <DependentUpon>DataCenter.edmx</DependentUpon>
@@ -338,6 +345,7 @@
     </None>
     <None Include="DataCenter.edmx.diagram">
       <DependentUpon>DataCenter.edmx</DependentUpon>
+      <SubType>Designer</SubType>
     </None>
     <None Include="DataCenter.tt">
       <Generator>TextTemplatingFileGenerator</Generator>

+ 89 - 7
CSharp/App/DataCenter/DataCenter.edmx

@@ -4,7 +4,7 @@
   <edmx:Runtime>
     <!-- SSDL content -->
     <edmx:StorageModels>
-      <Schema Namespace="DataCenterModel.Store" Alias="Self" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5.5" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
+    <Schema Namespace="DataCenterModel.Store" Alias="Self" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5.5" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
         <EntityContainer Name="DataCenterModelStoreContainer">
           <EntitySet Name="t_account" EntityType="DataCenterModel.Store.t_account" store:Type="Tables" Schema="tanghai" />
           <EntitySet Name="t_account_active_code" EntityType="DataCenterModel.Store.t_account_active_code" store:Type="Tables" Schema="tanghai" />
@@ -120,6 +120,8 @@
           <EntitySet Name="t_mail_item" EntityType="DataCenterModel.Store.t_mail_item" store:Type="Tables" Schema="tanghai" />
           <EntitySet Name="t_mall_items_sales_count" EntityType="DataCenterModel.Store.t_mall_items_sales_count" store:Type="Tables" Schema="tanghai" />
           <EntitySet Name="t_map_play_info" EntityType="DataCenterModel.Store.t_map_play_info" store:Type="Tables" Schema="tanghai" />
+          <EntitySet Name="t_map_play_info_hero" EntityType="DataCenterModel.Store.t_map_play_info_hero" store:Type="Tables" Schema="tanghai" />
+          <EntitySet Name="t_map_play_info_hero_pet" EntityType="DataCenterModel.Store.t_map_play_info_hero_pet" store:Type="Tables" Schema="tanghai" />
           <EntitySet Name="t_meta" EntityType="DataCenterModel.Store.t_meta" store:Type="Tables" Schema="tanghai" />
           <EntitySet Name="t_offline_message" EntityType="DataCenterModel.Store.t_offline_message" store:Type="Tables" Schema="tanghai" />
           <EntitySet Name="t_player_offline_message" EntityType="DataCenterModel.Store.t_player_offline_message" store:Type="Tables" Schema="tanghai" />
@@ -175,9 +177,9 @@
           <Property Name="active_code" Type="varchar" MaxLength="100" />
           <Property Name="active_code_used" Type="bool" />
           <Property Name="first_char_guid" Type="ubigint" />
+          <Property Name="gm_level" Type="int" />
           <Property Name="create_time" Type="datetime" />
           <Property Name="modify_time" Type="datetime" />
-          <Property Name="gm_level" Type="int" Nullable="false" />
         </EntityType>
         <EntityType Name="t_account_active_code">
           <Key>
@@ -1152,7 +1154,7 @@
           </Key>
           <Property Name="character_guid" Type="ubigint" Nullable="false" />
           <Property Name="hero_id" Type="int" Nullable="false" />
-          <Property Name="is_activated" Type="bool" />
+          <Property Name="level" Type="int" />
           <Property Name="cur_color_scheme_id" Type="int" Nullable="false" />
           <Property Name="create_time" Type="datetime" Nullable="false" />
           <Property Name="modify_time" Type="datetime" Nullable="false" />
@@ -1296,6 +1298,33 @@
           <Property Name="create_time" Type="datetime" Nullable="false" />
           <Property Name="modify_time" Type="datetime" Nullable="false" />
         </EntityType>
+        <EntityType Name="t_map_play_info_hero">
+          <Key>
+            <PropertyRef Name="character_guid" />
+            <PropertyRef Name="map_type" />
+            <PropertyRef Name="hero_id" />
+          </Key>
+          <Property Name="character_guid" Type="ubigint" Nullable="false" />
+          <Property Name="map_type" Type="varchar" Nullable="false" MaxLength="64" />
+          <Property Name="hero_id" Type="bigint" Nullable="false" />
+          <Property Name="play_count" Type="int" Nullable="false" />
+          <Property Name="create_time" Type="datetime" Nullable="false" />
+          <Property Name="modify_time" Type="datetime" Nullable="false" />
+        </EntityType>
+        <EntityType Name="t_map_play_info_hero_pet">
+          <Key>
+            <PropertyRef Name="character_guid" />
+            <PropertyRef Name="map_type" />
+            <PropertyRef Name="guid" />
+          </Key>
+          <Property Name="character_guid" Type="ubigint" Nullable="false" />
+          <Property Name="map_type" Type="varchar" Nullable="false" MaxLength="64" />
+          <Property Name="guid" Type="ubigint" Nullable="false" />
+          <Property Name="play_count" Type="int" Nullable="false" />
+          <Property Name="play_count_s" Type="int" Nullable="false" />
+          <Property Name="create_time" Type="datetime" Nullable="false" />
+          <Property Name="modify_time" Type="datetime" Nullable="false" />
+        </EntityType>
         <EntityType Name="t_meta">
           <Key>
             <PropertyRef Name="meta_key" />
@@ -1532,8 +1561,7 @@
           <Property Name="group_guid" Type="ubigint" Nullable="false" />
           <Property Name="room_guid" Type="ubigint" Nullable="false" />
         </EntityType>
-      </Schema>
-    </edmx:StorageModels>
+      </Schema></edmx:StorageModels>
     <!-- CSDL content -->
     <edmx:ConceptualModels>
       <Schema Namespace="DataCenterModel" Alias="Self" p1:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:p1="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
@@ -1622,6 +1650,8 @@
           <EntitySet Name="t_tutorial" EntityType="DataCenterModel.t_tutorial" />
           <EntitySet Name="t_tutorial_status_info" EntityType="DataCenterModel.t_tutorial_status_info" />
           <EntitySet Name="t_world_character" EntityType="DataCenterModel.t_world_character" />
+          <EntitySet Name="t_map_play_info_hero" EntityType="DataCenterModel.t_map_play_info_hero" />
+          <EntitySet Name="t_map_play_info_hero_pet" EntityType="DataCenterModel.t_map_play_info_hero_pet" />
         </EntityContainer>
         <EntityType Name="t_account">
           <Key>
@@ -2606,10 +2636,10 @@
           </Key>
           <Property Name="character_guid" Type="Decimal" Nullable="false" />
           <Property Name="hero_id" Type="Int32" Nullable="false" />
-          <Property Name="is_activated" Type="Boolean" />
           <Property Name="cur_color_scheme_id" Type="Int32" Nullable="false" />
           <Property Name="create_time" Type="DateTime" Nullable="false" />
           <Property Name="modify_time" Type="DateTime" Nullable="false" />
+          <Property Type="Int32" Name="level" />
         </EntityType>
         <EntityType Name="t_illegal_term_rules">
           <Key>
@@ -2977,6 +3007,33 @@
           <Property Name="group_guid" Type="Decimal" Nullable="false" />
           <Property Name="room_guid" Type="Decimal" Nullable="false" />
         </EntityType>
+        <EntityType Name="t_map_play_info_hero">
+          <Key>
+            <PropertyRef Name="character_guid" />
+            <PropertyRef Name="map_type" />
+            <PropertyRef Name="hero_id" />
+          </Key>
+          <Property Type="Decimal" Name="character_guid" Nullable="false" />
+          <Property Type="String" Name="map_type" Nullable="false" MaxLength="64" FixedLength="false" Unicode="false" />
+          <Property Type="Int64" Name="hero_id" Nullable="false" />
+          <Property Type="Int32" Name="play_count" Nullable="false" />
+          <Property Type="DateTime" Name="create_time" Nullable="false" />
+          <Property Type="DateTime" Name="modify_time" Nullable="false" />
+        </EntityType>
+        <EntityType Name="t_map_play_info_hero_pet">
+          <Key>
+            <PropertyRef Name="character_guid" />
+            <PropertyRef Name="map_type" />
+            <PropertyRef Name="guid" />
+          </Key>
+          <Property Type="Decimal" Name="character_guid" Nullable="false" />
+          <Property Type="String" Name="map_type" Nullable="false" MaxLength="64" FixedLength="false" Unicode="false" />
+          <Property Type="Decimal" Name="guid" Nullable="false" />
+          <Property Type="Int32" Name="play_count" Nullable="false" />
+          <Property Type="Int32" Name="play_count_s" Nullable="false" />
+          <Property Type="DateTime" Name="create_time" Nullable="false" />
+          <Property Type="DateTime" Name="modify_time" Nullable="false" />
+        </EntityType>
       </Schema>
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
@@ -3976,9 +4033,9 @@
           <EntitySetMapping Name="t_hero_unlock_hero">
             <EntityTypeMapping TypeName="DataCenterModel.t_hero_unlock_hero">
               <MappingFragment StoreEntitySet="t_hero_unlock_hero">
+                <ScalarProperty Name="level" ColumnName="level" />
                 <ScalarProperty Name="character_guid" ColumnName="character_guid" />
                 <ScalarProperty Name="hero_id" ColumnName="hero_id" />
-                <ScalarProperty Name="is_activated" ColumnName="is_activated" />
                 <ScalarProperty Name="cur_color_scheme_id" ColumnName="cur_color_scheme_id" />
                 <ScalarProperty Name="create_time" ColumnName="create_time" />
                 <ScalarProperty Name="modify_time" ColumnName="modify_time" />
@@ -4328,6 +4385,31 @@
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
+          <EntitySetMapping Name="t_map_play_info_hero">
+            <EntityTypeMapping TypeName="DataCenterModel.t_map_play_info_hero">
+              <MappingFragment StoreEntitySet="t_map_play_info_hero">
+                <ScalarProperty Name="modify_time" ColumnName="modify_time" />
+                <ScalarProperty Name="create_time" ColumnName="create_time" />
+                <ScalarProperty Name="play_count" ColumnName="play_count" />
+                <ScalarProperty Name="hero_id" ColumnName="hero_id" />
+                <ScalarProperty Name="map_type" ColumnName="map_type" />
+                <ScalarProperty Name="character_guid" ColumnName="character_guid" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="t_map_play_info_hero_pet">
+            <EntityTypeMapping TypeName="DataCenterModel.t_map_play_info_hero_pet">
+              <MappingFragment StoreEntitySet="t_map_play_info_hero_pet">
+                <ScalarProperty Name="modify_time" ColumnName="modify_time" />
+                <ScalarProperty Name="create_time" ColumnName="create_time" />
+                <ScalarProperty Name="play_count_s" ColumnName="play_count_s" />
+                <ScalarProperty Name="play_count" ColumnName="play_count" />
+                <ScalarProperty Name="guid" ColumnName="guid" />
+                <ScalarProperty Name="map_type" ColumnName="map_type" />
+                <ScalarProperty Name="character_guid" ColumnName="character_guid" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
         </EntityContainerMapping>
       </Mapping>
     </edmx:Mappings>

+ 16 - 14
CSharp/App/DataCenter/DataCenter.edmx.diagram

@@ -5,20 +5,20 @@
     <!-- Diagram content (shape and connector positions) -->
     <edmx:Diagrams>
       <Diagram DiagramId="646f5fee9e9a464ea8816c1d62bee588" Name="Diagram">
-        <EntityTypeShape EntityType="DataCenterModel.t_account" Width="1.5" PointX="0.75" PointY="0.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="DataCenterModel.t_account_active_code" Width="1.5" PointX="2.75" PointY="0.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="DataCenterModel.t_account_login_auth_response_cookie" Width="1.5" PointX="2.75" PointY="3.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="DataCenterModel.t_account_tutorial_status_info" Width="1.5" PointX="4.75" PointY="0.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="DataCenterModel.t_active_code" Width="1.5" PointX="6.75" PointY="0.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="DataCenterModel.t_attribute" Width="1.5" PointX="6.75" PointY="3.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="DataCenterModel.t_auction_item" Width="1.5" PointX="4.75" PointY="7.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="DataCenterModel.t_available_map" Width="1.5" PointX="6.75" PointY="7.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="DataCenterModel.t_battle_gameover_statistic" Width="1.5" PointX="8.75" PointY="0.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="DataCenterModel.t_battle_kill_detail" Width="1.5" PointX="8.75" PointY="3.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="DataCenterModel.t_battle_summary" Width="1.5" PointX="8.75" PointY="7.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="DataCenterModel.t_beginner_group_config" Width="1.5" PointX="10.75" PointY="0.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="DataCenterModel.t_beginner_group_cong" Width="1.5" PointX="10.75" PointY="3.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="DataCenterModel.t_beginner_group_event" Width="1.5" PointX="10.75" PointY="6.75" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_account" Width="1.5" PointX="1.25" PointY="1.25" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_account_active_code" Width="1.5" PointX="3" PointY="1.25" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_account_login_auth_response_cookie" Width="1.5" PointX="3" PointY="3.375" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_account_tutorial_status_info" Width="1.5" PointX="4.75" PointY="1.25" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_active_code" Width="1.5" PointX="6.5" PointY="1.25" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_attribute" Width="1.5" PointX="6.5" PointY="3.625" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_auction_item" Width="1.5" PointX="4.75" PointY="6.25" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_available_map" Width="1.5" PointX="6.5" PointY="6.25" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_battle_gameover_statistic" Width="1.5" PointX="8.25" PointY="1.25" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_battle_kill_detail" Width="1.5" PointX="8.25" PointY="3.625" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_battle_summary" Width="1.5" PointX="8.25" PointY="7" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_beginner_group_config" Width="1.5" PointX="10" PointY="1.25" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_beginner_group_cong" Width="1.5" PointX="10" PointY="3.625" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_beginner_group_event" Width="1.5" PointX="10" PointY="7" IsExpanded="true" />
         <EntityTypeShape EntityType="DataCenterModel.t_celebration_reward" Width="1.5" PointX="10.75" PointY="9.75" IsExpanded="true" />
         <EntityTypeShape EntityType="DataCenterModel.t_challenge_activity" Width="1.5" PointX="12.75" PointY="0.75" IsExpanded="true" />
         <EntityTypeShape EntityType="DataCenterModel.t_challenge_activity_schedule" Width="1.5" PointX="0.75" PointY="12.75" IsExpanded="true" />
@@ -89,6 +89,8 @@
         <EntityTypeShape EntityType="DataCenterModel.t_tutorial" Width="1.5" PointX="26.75" PointY="15.75" IsExpanded="true" />
         <EntityTypeShape EntityType="DataCenterModel.t_tutorial_status_info" Width="1.5" PointX="26.75" PointY="19.75" IsExpanded="true" />
         <EntityTypeShape EntityType="DataCenterModel.t_world_character" Width="1.5" PointX="26.75" PointY="23.75" IsExpanded="true" />
+        <EntityTypeShape EntityType="DataCenterModel.t_map_play_info_hero" Width="1.5" PointX="4.4261802734929043" PointY="20.105384880725939" />
+        <EntityTypeShape EntityType="DataCenterModel.t_map_play_info_hero_pet" Width="1.5" PointX="5.9247470525674277" PointY="15.372352055913002" />
       </Diagram>
     </edmx:Diagrams>
   </edmx:Designer>

+ 1 - 0
CSharp/App/DataCenter/t_hero_unlock_hero.cs

@@ -20,5 +20,6 @@ namespace DataCenter
         public int cur_color_scheme_id { get; set; }
         public System.DateTime create_time { get; set; }
         public System.DateTime modify_time { get; set; }
+        public Nullable<int> level { get; set; }
     }
 }

+ 24 - 0
CSharp/App/DataCenter/t_map_play_info_hero.cs

@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    此代码是根据模板生成的。
+//
+//    手动更改此文件可能会导致应用程序中发生异常行为。
+//    如果重新生成代码,则将覆盖对此文件的手动更改。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace DataCenter
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class t_map_play_info_hero
+    {
+        public decimal character_guid { get; set; }
+        public string map_type { get; set; }
+        public long hero_id { get; set; }
+        public int play_count { get; set; }
+        public System.DateTime create_time { get; set; }
+        public System.DateTime modify_time { get; set; }
+    }
+}

+ 25 - 0
CSharp/App/DataCenter/t_map_play_info_hero_pet.cs

@@ -0,0 +1,25 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    此代码是根据模板生成的。
+//
+//    手动更改此文件可能会导致应用程序中发生异常行为。
+//    如果重新生成代码,则将覆盖对此文件的手动更改。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace DataCenter
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class t_map_play_info_hero_pet
+    {
+        public decimal character_guid { get; set; }
+        public string map_type { get; set; }
+        public decimal guid { get; set; }
+        public int play_count { get; set; }
+        public int play_count_s { get; set; }
+        public System.DateTime create_time { get; set; }
+        public System.DateTime modify_time { get; set; }
+    }
+}

+ 5 - 1
CSharp/App/Editor/app.config

@@ -12,6 +12,10 @@
 		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
 	</startup>
 	<connectionStrings>
-		<add name="DataCenterEntities" connectionString="metadata=res://*/DataCenter.csdl|res://*/DataCenter.ssdl|res://*/DataCenter.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=192.168.11.93;user id=tanghai;persist security info=True;database=tanghai&quot;" providerName="System.Data.EntityClient" />
+		<add name="DataCenterEntities" connectionString="metadata=res://*/DataCenter.csdl|res://*/DataCenter.ssdl|res://*/DataCenter.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=192.168.11.93;user id=tanghai;password=tanghai;persist security info=True;database=tanghai&quot;" providerName="System.Data.EntityClient" />
 	</connectionStrings>
+	<appSettings>
+		<add key="IP" value="192.168.11.95"/>
+		<add key="Port" value="8888"/>
+	</appSettings>
 </configuration>

+ 1 - 4
CSharp/App/Modules/Robot/Robot.csproj

@@ -58,6 +58,7 @@
     <Reference Include="System" />
     <Reference Include="System.ComponentModel.Composition" />
     <Reference Include="System.ComponentModel.DataAnnotations" />
+    <Reference Include="System.Configuration" />
     <Reference Include="System.Core" />
     <Reference Include="System.Data" />
     <Reference Include="System.Data.Entity" />
@@ -103,10 +104,6 @@
       <Project>{8650195a-7904-4ebc-9d81-b392a7e9b9b3}</Project>
       <Name>BossClient</Name>
     </ProjectReference>
-    <ProjectReference Include="..\..\Config\Config.csproj">
-      <Project>{1d1aec85-08c1-4b6b-9615-8a79fd9ed377}</Project>
-      <Name>Config</Name>
-    </ProjectReference>
     <ProjectReference Include="..\..\DataCenter\DataCenter.csproj">
       <Project>{a829a025-5e90-4085-8dd4-e3b8c1282635}</Project>
       <Name>DataCenter</Name>

+ 4 - 3
CSharp/App/Modules/Robot/RobotViewModel.cs

@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.ComponentModel.Composition;
+using System.Configuration;
 using System.Linq;
 using System.Windows.Threading;
 using BossClient;
@@ -151,9 +152,9 @@ namespace Modules.Robot
 
 		public async void Login()
 		{
-			var config = Config.Instance;
-			await this.bossClient.Login(config.IP, config.Port, 
-				this.Account, this.Password);
+			string ip = ConfigurationManager.AppSettings["IP"];
+			ushort port = UInt16.Parse(ConfigurationManager.AppSettings["Port"]);
+			await this.bossClient.Login(ip, port, this.Account, this.Password);
 
 			this.IsButtonEnable = true;
 

+ 0 - 15
CSharp/CSharp.sln

@@ -50,8 +50,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ENetTest", "Platform\ENetTe
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BossClient", "App\BossClient\BossClient.csproj", "{8650195A-7904-4EBC-9D81-B392A7E9B9B3}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Config", "App\Config\Config.csproj", "{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataCenter", "App\DataCenter\DataCenter.csproj", "{A829A025-5E90-4085-8DD4-E3B8C1282635}"
 EndProject
 Global
@@ -250,18 +248,6 @@ Global
 		{8650195A-7904-4EBC-9D81-B392A7E9B9B3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
 		{8650195A-7904-4EBC-9D81-B392A7E9B9B3}.Release|Win32.ActiveCfg = Release|Any CPU
 		{8650195A-7904-4EBC-9D81-B392A7E9B9B3}.Release|x86.ActiveCfg = Release|Any CPU
-		{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
-		{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
-		{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377}.Debug|Win32.ActiveCfg = Debug|Any CPU
-		{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377}.Release|Any CPU.Build.0 = Release|Any CPU
-		{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
-		{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377}.Release|Mixed Platforms.Build.0 = Release|Any CPU
-		{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377}.Release|Win32.ActiveCfg = Release|Any CPU
-		{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377}.Release|x86.ActiveCfg = Release|Any CPU
 		{A829A025-5E90-4085-8DD4-E3B8C1282635}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{A829A025-5E90-4085-8DD4-E3B8C1282635}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{A829A025-5E90-4085-8DD4-E3B8C1282635}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -283,7 +269,6 @@ Global
 		{C46F3337-0F48-4A72-84AD-8FDD1F159BB0} = {6E9D97F0-4243-452E-B832-1A855B8118EB}
 		{48A2E149-0DAC-41B4-BB54-DFBCCD6D42B3} = {6E9D97F0-4243-452E-B832-1A855B8118EB}
 		{8650195A-7904-4EBC-9D81-B392A7E9B9B3} = {6E9D97F0-4243-452E-B832-1A855B8118EB}
-		{1D1AEC85-08C1-4B6B-9615-8A79FD9ED377} = {6E9D97F0-4243-452E-B832-1A855B8118EB}
 		{A829A025-5E90-4085-8DD4-E3B8C1282635} = {6E9D97F0-4243-452E-B832-1A855B8118EB}
 		{3A98B35C-DEA8-489C-9203-263FFB6B065D} = {ADBF5F67-B480-4A93-9D50-C81856FC61A9}
 		{72E16572-FC1F-4A9E-BC96-035417239298} = {ADBF5F67-B480-4A93-9D50-C81856FC61A9}

+ 0 - 4
CSharp/Platform/ENet/ENet.csproj

@@ -55,10 +55,6 @@
     <Folder Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\ENetCpp\ENetCpp.vcxproj">
-      <Project>{c9992b7c-313e-4c9f-a954-640d01edfb58}</Project>
-      <Name>ENetCpp</Name>
-    </ProjectReference>
     <ProjectReference Include="..\Log\Log.csproj">
       <Project>{72E16572-FC1F-4A9E-BC96-035417239298}</Project>
       <Name>Log</Name>