tanghai 12 лет назад
Родитель
Сommit
47c55f6d56

+ 2 - 0
CSharp/App/Editor/Bootstrapper.cs

@@ -6,6 +6,7 @@ using Microsoft.Practices.Prism.Regions;
 using Modules.BehaviorTree;
 using Modules.Robot;
 using Modules.Login;
+using Modules.WCFClient;
 
 namespace Editor
 {
@@ -18,6 +19,7 @@ namespace Editor
 			this.AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof (BehaviorTreeModule).Assembly));
 			this.AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof (RobotModule).Assembly));
 			this.AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof (LoginModule).Assembly));
+			this.AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof (WCFClientModule).Assembly));
 		}
 
 		protected override void InitializeShell()

+ 7 - 1
CSharp/App/Editor/Editor.csproj

@@ -117,9 +117,15 @@
       <Project>{5d6ecbcd-be14-4dcb-baec-57089748b164}</Project>
       <Name>Robot</Name>
     </ProjectReference>
+    <ProjectReference Include="..\Modules\WCFClient\WCFClient.csproj">
+      <Project>{B07D70E7-F902-4F67-A486-B7AF27D6B813}</Project>
+      <Name>WCFClient</Name>
+    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <None Include="App.config" />
+    <None Include="App.config">
+      <SubType>Designer</SubType>
+    </None>
     <None Include="NLog.config">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
       <SubType>Designer</SubType>

+ 12 - 2
CSharp/App/Editor/Shell.xaml

@@ -3,7 +3,17 @@
 		xmlns:prism="http://www.codeplex.com/prism" Title="Editor" Height="800" Width="1280"
 		WindowStartupLocation="CenterScreen">
 	<Grid>
-		<ContentControl Name="login" prism:RegionManager.RegionName="LoginRegion" HorizontalAlignment="Center" VerticalAlignment="Center" />
-		<ContentControl Name="robot" prism:RegionManager.RegionName="RobotRegion" HorizontalAlignment="Left" VerticalAlignment="Top" />
+		<!--<ContentControl Name="login" prism:RegionManager.RegionName="LoginRegion" HorizontalAlignment="Center" VerticalAlignment="Center" />-->
+		<TabControl>
+			<TabItem Height="25" Width="80" Header="机器人">
+				<ContentControl Name="robot" prism:RegionManager.RegionName="RobotRegion" />
+			</TabItem>
+			<TabItem Height="25" Width="80" Header="行为树">
+				<ContentControl Name="behaviorTree" prism:RegionManager.RegionName="BehaviorTreeRegion" />
+			</TabItem>
+			<TabItem Height="25" Width="80" Header="WCFClient">
+				<ContentControl Name="wcfClient" prism:RegionManager.RegionName="WCFClientRegion" />
+			</TabItem>
+		</TabControl>
 	</Grid>
 </Window>

+ 21 - 21
CSharp/App/Editor/app.config

@@ -1,24 +1,24 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
-  <runtime>
-    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
-      <dependentAssembly>
-        <assemblyIdentity name="Microsoft.Practices.Prism" publicKeyToken="31bf3856ad364e35" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
-      </dependentAssembly>
-      <dependentAssembly>
-        <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-6.6.4.0" newVersion="6.6.4.0" />
-      </dependentAssembly>
-    </assemblyBinding>
-  </runtime>
-  <startup>
-    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
-  </startup>
-  <appSettings>
-    <add key="IP" value="192.168.11.95" />
-    <add key="Port" value="8888" />
-	<add key="Account" value="egametang@163.com" />
-	<add key="Password" value="163bio1" />
-  </appSettings>
+	<runtime>
+		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+			<dependentAssembly>
+				<assemblyIdentity name="Microsoft.Practices.Prism" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+				<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
+			</dependentAssembly>
+			<dependentAssembly>
+				<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
+				<bindingRedirect oldVersion="0.0.0.0-6.6.4.0" newVersion="6.6.4.0" />
+			</dependentAssembly>
+		</assemblyBinding>
+	</runtime>
+	<startup>
+		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+	</startup>
+	<appSettings>
+		<add key="IP" value="192.168.11.95" />
+		<add key="Port" value="8888" />
+		<add key="Account" value="egametang@163.com" />
+		<add key="Password" value="163bio1" />
+	</appSettings>
 </configuration>

+ 1 - 1
CSharp/App/Modules/BehaviorTree/BehaviorTreeView.xaml.cs

@@ -9,7 +9,7 @@ namespace Modules.BehaviorTree
 	/// <summary>
 	/// BehaviorTreeView.xaml 的交互逻辑
 	/// </summary>
-	[ViewExport(RegionName = "TreeCanvasRegion"), PartCreationPolicy(CreationPolicy.NonShared)]
+	[ViewExport(RegionName = "BehaviorTreeRegion"), PartCreationPolicy(CreationPolicy.NonShared)]
 	public partial class BehaviorTreeView
 	{
 		private const double DragThreshold = 5;

+ 6 - 0
CSharp/App/Modules/WCFClient/Packages.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="CommonServiceLocator" version="1.0" targetFramework="net45" />
+  <package id="Prism" version="4.1.0.0" targetFramework="net45" />
+  <package id="Prism.MEFExtensions" version="4.1.0.0" targetFramework="net45" />
+</packages>

+ 55 - 0
CSharp/App/Modules/WCFClient/Properties/AssemblyInfo.cs

@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// 有关程序集的常规信息通过以下
+// 特性集控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("WCFClient")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("WCFClient")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2013")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 使此程序集中的类型
+// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
+// 则将该类型上的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+//若要开始生成可本地化的应用程序,请在 
+//<PropertyGroup> 中的 .csproj 文件中
+//设置 <UICulture>CultureYouAreCodingWith</UICulture>。例如,如果您在源文件中
+//使用的是美国英语,请将 <UICulture> 设置为 en-US。然后取消
+//对以下 NeutralResourceLanguage 特性的注释。更新
+//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly:ThemeInfo(
+    ResourceDictionaryLocation.None, //主题特定资源词典所处位置
+                             //(在页面或应用程序资源词典中 
+                             // 未找到某个资源的情况下使用)
+    ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
+                                      //(在页面、应用程序或任何主题特定资源词典中 
+                                      // 未找到某个资源的情况下使用)
+)]
+
+
+// 程序集的版本信息由下面四个值组成:
+//
+//      主版本
+//      次版本 
+//      生成号
+//      修订号
+//
+// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
+// 方法是按如下所示使用“*”:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 114 - 0
CSharp/App/Modules/WCFClient/WCFClient.csproj

@@ -0,0 +1,114 @@
+<?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>{B07D70E7-F902-4F67-A486-B7AF27D6B813}</ProjectGuid>
+    <OutputType>library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>WCFClient</RootNamespace>
+    <AssemblyName>WCFClient</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <WarningLevel>4</WarningLevel>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir>
+    <RestorePackages>true</RestorePackages>
+  </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="Microsoft.Expression.Interactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\Prism.4.1.0.0\lib\NET40\Microsoft.Expression.Interactions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Practices.Prism">
+      <HintPath>..\..\..\packages\Prism.4.1.0.0\lib\NET40\Microsoft.Practices.Prism.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Practices.Prism.Interactivity">
+      <HintPath>..\..\..\packages\Prism.4.1.0.0\lib\NET40\Microsoft.Practices.Prism.Interactivity.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Practices.Prism.MefExtensions">
+      <HintPath>..\..\..\packages\Prism.MEFExtensions.4.1.0.0\lib\NET40\Microsoft.Practices.Prism.MefExtensions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Practices.ServiceLocation">
+      <HintPath>..\..\..\packages\CommonServiceLocator.1.0\lib\NET35\Microsoft.Practices.ServiceLocation.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.ComponentModel.Composition" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.ServiceModel" />
+    <Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\..\..\packages\Prism.4.1.0.0\lib\NET40\System.Windows.Interactivity.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Xml" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Xaml">
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="WindowsBase" />
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="WCFClientViewModel.cs" />
+    <Page Include="WCFClientView.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Compile Include="WCFClientModule.cs" />
+    <Compile Include="WCFClientView.xaml.cs">
+      <DependentUpon>WCFClientView.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <None Include="Packages.config" />
+    <AppDesigner Include="Properties\" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\Contract\RealmContract\RealmContract.csproj">
+      <Project>{E62B0633-1767-44A0-9479-C8E9D19DA4B8}</Project>
+      <Name>RealmContract</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\Platform\Log\Log.csproj">
+      <Project>{72e16572-fc1f-4a9e-bc96-035417239298}</Project>
+      <Name>Log</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\Infrastructure\Infrastructure.csproj">
+      <Project>{48A2E149-0DAC-41B4-BB54-DFBCCD6D42B3}</Project>
+      <Name>Infrastructure</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.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>

+ 13 - 0
CSharp/App/Modules/WCFClient/WCFClientModule.cs

@@ -0,0 +1,13 @@
+using Microsoft.Practices.Prism.MefExtensions.Modularity;
+using Microsoft.Practices.Prism.Modularity;
+
+namespace Modules.WCFClient
+{
+	[ModuleExport(moduleType: typeof(WCFClientModule))]
+	public class WCFClientModule : IModule
+	{
+		public void Initialize()
+		{
+		}
+	}
+}

+ 11 - 0
CSharp/App/Modules/WCFClient/WCFClientView.xaml

@@ -0,0 +1,11 @@
+<UserControl x:Class="Modules.WCFClient.WCFClientView"
+		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+		xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+		mc:Ignorable="d" 
+		d:DesignHeight="300" d:DesignWidth="300">
+    <Grid>
+		<Button Content="Button" HorizontalAlignment="Left" Margin="108,118,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
+	</Grid>
+</UserControl>

+ 21 - 0
CSharp/App/Modules/WCFClient/WCFClientView.xaml.cs

@@ -0,0 +1,21 @@
+using System.ComponentModel.Composition;
+using Infrastructure;
+
+namespace Modules.WCFClient
+{
+    /// <summary>
+	/// WCFClientView.xaml 的交互逻辑
+    /// </summary>
+	[ViewExport(RegionName = "WCFClientRegion"), PartCreationPolicy(CreationPolicy.NonShared)]
+    public partial class WCFClientView
+    {
+		public WCFClientView()
+        {
+            InitializeComponent();
+        }
+
+		private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
+		{
+		}
+    }
+}

+ 10 - 0
CSharp/App/Modules/WCFClient/WCFClientViewModel.cs

@@ -0,0 +1,10 @@
+using System.ComponentModel.Composition;
+
+namespace Modules.WCFClient
+{
+	[Export(contractType: typeof(WCFClientViewModel)),
+		PartCreationPolicy(creationPolicy: CreationPolicy.NonShared)]
+	public class WCFClientViewModel
+	{
+	}
+}

+ 15 - 0
CSharp/CSharp.sln

@@ -54,6 +54,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BossBase", "App\BossBase\Bo
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BossCommand", "App\BossCommand\BossCommand.csproj", "{6C16281F-5550-4024-9504-295C63889E4F}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WCFClient", "App\Modules\WCFClient\WCFClient.csproj", "{B07D70E7-F902-4F67-A486-B7AF27D6B813}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -274,6 +276,18 @@ Global
 		{6C16281F-5550-4024-9504-295C63889E4F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
 		{6C16281F-5550-4024-9504-295C63889E4F}.Release|Win32.ActiveCfg = Release|Any CPU
 		{6C16281F-5550-4024-9504-295C63889E4F}.Release|x86.ActiveCfg = Release|Any CPU
+		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Release|Win32.ActiveCfg = Release|Any CPU
+		{B07D70E7-F902-4F67-A486-B7AF27D6B813}.Release|x86.ActiveCfg = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -294,6 +308,7 @@ Global
 		{6CD185D1-08E0-4729-A999-2D5B57BA8193} = {C4C64188-4FAE-4CC3-A9E6-D9D4AF7429B6}
 		{5D6ECBCD-BE14-4DCB-BAEC-57089748B164} = {C4C64188-4FAE-4CC3-A9E6-D9D4AF7429B6}
 		{5AA48F9A-455D-4CD8-A605-A3AC38283E60} = {C4C64188-4FAE-4CC3-A9E6-D9D4AF7429B6}
+		{B07D70E7-F902-4F67-A486-B7AF27D6B813} = {C4C64188-4FAE-4CC3-A9E6-D9D4AF7429B6}
 		{87537C92-B2C7-4E46-A6FB-02B73215C100} = {FD5F443E-CBEE-443E-821D-C47C86E09534}
 		{15B3E0D2-6217-493A-A690-158C497F5318} = {4FF1FBF3-F552-4D3D-AD97-E29385069206}
 		{E62B0633-1767-44A0-9479-C8E9D19DA4B8} = {01501C44-C95B-45B7-A898-76B4A7AC4EE8}

+ 1 - 1
CSharp/Contract/RealmContract/ICalculator.cs

@@ -2,7 +2,7 @@
 
 namespace RealmContract
 {
-	[ServiceContract(Name = "Calculator", Namespace = "http://www.egametang.com/")]
+	[ServiceContract(Name = "Calculator")]
 	public interface ICalculator
 	{
 		[OperationContract]