Browse Source

add

master
robin 8 years ago
commit
dcf08ab64d
93 changed files with 5635 additions and 0 deletions
  1. +69
    -0
      BLUtil/BLUtil.csproj
  2. +11
    -0
      BLUtil/BaseInforObj.cs
  3. +178
    -0
      BLUtil/DbUtil.cs
  4. +56
    -0
      BLUtil/EncodeString.cs
  5. +60
    -0
      BLUtil/LoginRpc.cs
  6. +36
    -0
      BLUtil/Properties/AssemblyInfo.cs
  7. +29
    -0
      BLUtil/WeightTable.cs
  8. +56
    -0
      BWPClientForTianRou.sln
  9. +17
    -0
      BWPClientForTianRou/App.config
  10. BIN
      BWPClientForTianRou/AppDb.mdb
  11. +111
    -0
      BWPClientForTianRou/AutoSizeFormClass.cs
  12. +157
    -0
      BWPClientForTianRou/BWPClientForTianRou.csproj
  13. +1
    -0
      BWPClientForTianRou/Config.txt
  14. +62
    -0
      BWPClientForTianRou/ConfigUtil.cs
  15. +65
    -0
      BWPClientForTianRou/FormProcessBar.Designer.cs
  16. +25
    -0
      BWPClientForTianRou/FormProcessBar.cs
  17. +120
    -0
      BWPClientForTianRou/FormProcessBar.resx
  18. BIN
      BWPClientForTianRou/Image/u15.png
  19. BIN
      BWPClientForTianRou/Image/u17.png
  20. BIN
      BWPClientForTianRou/Image/u19.png
  21. BIN
      BWPClientForTianRou/Image/u37.png
  22. +125
    -0
      BWPClientForTianRou/KeyPad.csproj
  23. +21
    -0
      BWPClientForTianRou/KeyPad/Converter/BoolToVisibilityConverter.cs
  24. +148
    -0
      BWPClientForTianRou/KeyPad/KeyPad.csproj
  25. +61
    -0
      BWPClientForTianRou/KeyPad/Keypad.xaml
  26. +88
    -0
      BWPClientForTianRou/KeyPad/Keypad.xaml.cs
  27. +55
    -0
      BWPClientForTianRou/KeyPad/Properties/AssemblyInfo.cs
  28. +71
    -0
      BWPClientForTianRou/KeyPad/Properties/Resources.Designer.cs
  29. +117
    -0
      BWPClientForTianRou/KeyPad/Properties/Resources.resx
  30. +30
    -0
      BWPClientForTianRou/KeyPad/Properties/Settings.Designer.cs
  31. +7
    -0
      BWPClientForTianRou/KeyPad/Properties/Settings.settings
  32. +353
    -0
      BWPClientForTianRou/KeyPad/VirtualKeyboard.xaml
  33. +128
    -0
      BWPClientForTianRou/KeyPad/VirtualKeyboard.xaml.cs
  34. +3
    -0
      BWPClientForTianRou/KeyPad/app.config
  35. BIN
      BWPClientForTianRou/KeyPad/bin/Debug/KeyPad.dll
  36. +3
    -0
      BWPClientForTianRou/KeyPad/bin/Debug/KeyPad.dll.config
  37. BIN
      BWPClientForTianRou/KeyPad/bin/Debug/KeyPad.pdb
  38. BIN
      BWPClientForTianRou/KeyPad/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  39. BIN
      BWPClientForTianRou/KeyPad/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  40. +62
    -0
      BWPClientForTianRou/KeyPad/obj/Debug/GeneratedInternalTypeHelper.g.cs
  41. +62
    -0
      BWPClientForTianRou/KeyPad/obj/Debug/GeneratedInternalTypeHelper.g.i.cs
  42. BIN
      BWPClientForTianRou/KeyPad/obj/Debug/KeyPad.Properties.Resources.resources
  43. +30
    -0
      BWPClientForTianRou/KeyPad/obj/Debug/KeyPad.csproj.FileListAbsolute.txt
  44. BIN
      BWPClientForTianRou/KeyPad/obj/Debug/KeyPad.csproj.GenerateResource.Cache
  45. BIN
      BWPClientForTianRou/KeyPad/obj/Debug/KeyPad.dll
  46. BIN
      BWPClientForTianRou/KeyPad/obj/Debug/KeyPad.g.resources
  47. BIN
      BWPClientForTianRou/KeyPad/obj/Debug/KeyPad.pdb
  48. +20
    -0
      BWPClientForTianRou/KeyPad/obj/Debug/KeyPad_MarkupCompile.cache
  49. +20
    -0
      BWPClientForTianRou/KeyPad/obj/Debug/KeyPad_MarkupCompile.i.cache
  50. +4
    -0
      BWPClientForTianRou/KeyPad/obj/Debug/KeyPad_MarkupCompile.lref
  51. BIN
      BWPClientForTianRou/KeyPad/obj/Debug/Keypad.baml
  52. +112
    -0
      BWPClientForTianRou/KeyPad/obj/Debug/Keypad.g.cs
  53. +112
    -0
      BWPClientForTianRou/KeyPad/obj/Debug/Keypad.g.i.cs
  54. BIN
      BWPClientForTianRou/KeyPad/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
  55. BIN
      BWPClientForTianRou/KeyPad/obj/Debug/VirtualKeyboard.baml
  56. +146
    -0
      BWPClientForTianRou/KeyPad/obj/Debug/VirtualKeyboard.g.cs
  57. +146
    -0
      BWPClientForTianRou/KeyPad/obj/Debug/VirtualKeyboard.g.i.cs
  58. BIN
      BWPClientForTianRou/KeyPad/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache
  59. BIN
      BWPClientForTianRou/KeyPad/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  60. +62
    -0
      BWPClientForTianRou/KeyPad/obj/x86/Debug/GeneratedInternalTypeHelper.g.cs
  61. +62
    -0
      BWPClientForTianRou/KeyPad/obj/x86/Debug/GeneratedInternalTypeHelper.g.i.cs
  62. BIN
      BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad.Properties.Resources.resources
  63. +15
    -0
      BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad.csproj.FileListAbsolute.txt
  64. BIN
      BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad.csproj.GenerateResource.Cache
  65. BIN
      BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad.dll
  66. BIN
      BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad.g.resources
  67. BIN
      BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad.pdb
  68. +20
    -0
      BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad_MarkupCompile.cache
  69. +20
    -0
      BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad_MarkupCompile.i.cache
  70. +4
    -0
      BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad_MarkupCompile.lref
  71. BIN
      BWPClientForTianRou/KeyPad/obj/x86/Debug/Keypad.baml
  72. +112
    -0
      BWPClientForTianRou/KeyPad/obj/x86/Debug/Keypad.g.cs
  73. +112
    -0
      BWPClientForTianRou/KeyPad/obj/x86/Debug/Keypad.g.i.cs
  74. BIN
      BWPClientForTianRou/KeyPad/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll
  75. BIN
      BWPClientForTianRou/KeyPad/obj/x86/Debug/VirtualKeyboard.baml
  76. +146
    -0
      BWPClientForTianRou/KeyPad/obj/x86/Debug/VirtualKeyboard.g.cs
  77. +146
    -0
      BWPClientForTianRou/KeyPad/obj/x86/Debug/VirtualKeyboard.g.i.cs
  78. +144
    -0
      BWPClientForTianRou/LoginForm.Designer.cs
  79. +99
    -0
      BWPClientForTianRou/LoginForm.cs
  80. +206
    -0
      BWPClientForTianRou/LoginForm.resx
  81. +364
    -0
      BWPClientForTianRou/MainForm.Designer.cs
  82. +341
    -0
      BWPClientForTianRou/MainForm.cs
  83. +144
    -0
      BWPClientForTianRou/MainForm.resx
  84. +22
    -0
      BWPClientForTianRou/Program.cs
  85. +36
    -0
      BWPClientForTianRou/Properties/AssemblyInfo.cs
  86. +62
    -0
      BWPClientForTianRou/Properties/Resources.Designer.cs
  87. +117
    -0
      BWPClientForTianRou/Properties/Resources.resx
  88. +37
    -0
      BWPClientForTianRou/Properties/Settings.Designer.cs
  89. +14
    -0
      BWPClientForTianRou/Properties/Settings.settings
  90. +138
    -0
      BWPClientForTianRou/SelectGoodsForm.Designer.cs
  91. +81
    -0
      BWPClientForTianRou/SelectGoodsForm.cs
  92. +123
    -0
      BWPClientForTianRou/SelectGoodsForm.resx
  93. +31
    -0
      BWPClientForTianRou/WinApiSendMessage.cs

+ 69
- 0
BLUtil/BLUtil.csproj View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7E4543F1-5E83-40BF-B47A-29C40429EC2C}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BLUtil</RootNamespace>
<AssemblyName>BLUtil</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</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="Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" />
<Reference Include="forks.json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\tsref\release\forks.json.dll</HintPath>
</Reference>
<Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\tsref\release\Forks.JsonRpc.Client.dll</HintPath>
</Reference>
<Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Forms" />
<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="BaseInforObj.cs" />
<Compile Include="EncodeString.cs" />
<Compile Include="DbUtil.cs" />
<Compile Include="LoginRpc.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WeightTable.cs" />
</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>

+ 11
- 0
BLUtil/BaseInforObj.cs View File

@ -0,0 +1,11 @@
namespace BLUtil
{
public class BaseInforObj {
public long ID { get; set; }
public string Name { get; set; }
public string Code { get; set; }
public string Spell { get; set; }
public int RowVersion { get; set; }
public string Unit { get; set; }
}
}

+ 178
- 0
BLUtil/DbUtil.cs View File

@ -0,0 +1,178 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Windows.Forms;
using Forks.EnterpriseServices;
using Forks.Utils.Data;
namespace BLUtil {
public class DbUtil {
public static string ConnectionStr = "";
public static object DialogReturnValue { get; set; }
private static int _startTime = 12;//默认12点
private static DateTime NewToday {
get {
if (DateTime.Now.Hour >= _startTime) {
return new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, _startTime, 0, 0);
}
return new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, _startTime, 0, 0).AddDays(-1);
}
}
private static DateTime NextNewToday {
get { return NewToday.AddHours(24); }
}
public static void Init() {
ConnectionStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Directory.GetCurrentDirectory() + "\\AppDb.mdb";
}
public static int GetSequence() {
using (var sqlUtil = DbFactory.GetSqlUtil(ConnectionStr, DbProviderType.OleDb)) {
var sql = string.Format("select top 1 Sequence from [Weight] where [DateTime] >= @P1 and [DateTime] < @P2 order by Sequence desc");
var paramList = "@P1;@P2";
var obj = sqlUtil.ExecuteScalar(sql, paramList , NewToday, NextNewToday);
return obj != null ? (int.Parse(obj.ToString()) + 1) : 1;
}
}
private static string _querySql = "SELECT [ID], Sequence, [DateTime] ,Goods_ID, Goods_Name, Goods_Code, Weight, Unit FROM [Weight] where Finish = 0 order by [ID] desc";
public static DataSet GetWeight() {
using (var sqlUtil = DbFactory.GetSqlUtil(ConnectionStr, DbProviderType.OleDb)) {
DataSet data = null;
try {
data = sqlUtil.ExecuteSql(_querySql);
sqlUtil.Close();
} catch (Exception ex) {
MessageBox.Show(ex.Message);
}
return data;
}
}
public static void InsertGoods(List<BaseInforObj> infos, bool clearFirst = false) {
using (var sqlUtil = DbFactory.GetSqlUtil(ConnectionStr, DbProviderType.OleDb)) {
if (clearFirst) {
var delete = "Delete FROM Goods";
sqlUtil.ExecuteNonQuery(delete);
}
foreach (var obj in infos) {
var sql = String.Format(
"Insert into Goods([Goods_ID],[Goods_Name],[Goods_Spell],[Goods_Code],[Unit],[RowVersion]) values (@P1, @P2, @P3, @P4, @P5, @P6)");
string paramList = "@P1;@P2;@P3;@P4;@P5;@P6";
sqlUtil.ExecuteNonQuery(sql, paramList, obj.ID, obj.Name, obj.Spell, obj.Code, obj.Unit, obj.RowVersion);
}
sqlUtil.Commit();
}
}
public static List<BaseInforObj> SelectGoods(string searchKey) {
var infos = new List<BaseInforObj>();
using (var sqlUtil = DbFactory.GetSqlUtil(ConnectionStr, DbProviderType.OleDb)) {
var sql = String.Format(
"Select top 30 [Goods_ID],[Goods_Name], [Goods_Code],[Unit] From Goods Where ([Goods_Name] like @P1) or ([Goods_Spell] like @2) or ([Goods_Code] like @P3) order by [Goods_ID] ");
var paramList = "@P1;@P2;@P3;";
using (var reader = sqlUtil.ExecuteReader(sql, paramList, "%" + searchKey + "%", "%" + searchKey + "%", "%" + searchKey + "%")) {
while (reader.Read()) {
var obj = new BaseInforObj();
obj.ID = (int)reader["Goods_ID"];
obj.Name = (string)reader["Goods_Name"];
obj.Code = (string)reader["Goods_Code"];
obj.Unit = (string)reader["Unit"];
infos.Add(obj);
}
}
}
return infos;
}
public static List<BaseInforObj> SelectStore(string searchKey) {
var infos = new List<BaseInforObj>();
using (var sqlUtil = DbFactory.GetSqlUtil(ConnectionStr, DbProviderType.OleDb)) {
var sql = String.Format(
"Select top 30 [Store_ID],[Store_Name] From [Store] Where ([Store_Name] like @P1) or ([Store_Spell] like @P2) order by [Store_ID] ");
var paramList = "@P1;@P2;";
using (var reader = sqlUtil.ExecuteReader(sql, paramList, "%" + searchKey + "%", "%" + searchKey + "%")) {
while (reader.Read()) {
var obj = new BaseInforObj();
obj.ID = (int)reader["Store_ID"];
obj.Name = (string)reader["Store_Name"];
infos.Add(obj);
}
}
}
return infos;
}
public static void InsertStore(List<BaseInforObj> infos) {
using (var sqlUtil = DbFactory.GetSqlUtil(ConnectionStr, DbProviderType.OleDb)) {
var delete = "Delete FROM Store";
sqlUtil.ExecuteNonQuery(delete);
int i = 0;
foreach (var obj in infos) {
i++;
var sql = String.Format(
"Insert into Store([Store_ID],[Store_Name],[Store_Spell],[RowVersion]) values (@P1, @P2, @P3, @P4 )");
string paramList = "@P1;@P2;@P3;@P4 ";
sqlUtil.ExecuteNonQuery(sql, paramList, obj.ID, obj.Name, obj.Spell, obj.RowVersion);
}
sqlUtil.Commit();
}
}
public static void InsertWeight(WeightTable bo) {
using (var sqlUtil = DbFactory.GetSqlUtil(ConnectionStr, DbProviderType.OleDb)) {
var sql = String.Format(
"Insert into Weight([Goods_ID],[Goods_Name],[Goods_Code],[Unit],[Weight],[DateTime],[Sequence],[Finish]) values (@P1, @P2, @P3, @P4 ,@P5, @P6 , @P7,0 )");
string paramList = "@P1;@P2;@P3;@P4;@P5;@P6;@P7 ";
sqlUtil.ExecuteNonQuery(sql, paramList, bo.Goods_ID, bo.Goods_Name, bo.Goods_Code, bo.Unit, bo.Weight, bo.DateTime, bo.Sequence);
sqlUtil.Commit();
}
}
public void GetLogList(string conStr, string sql) {
//using (var conn = new OleDbConnection(conStr)) {
// conn.Open();
// var myCommand = new OleDbCommand(sql, conn);
// using (var reader = myCommand.ExecuteReader()) {
// while (reader.Read()) {
// var log = new FrmMain.AttLog();
// log.EnrNo = (string)reader["EnrNo"];
// log.DateTime = (DateTime)reader["DateTime"];
// log.TyVerifype = (int)reader["Verify"];
// log.ID = (int)reader["ID"];
// log.IP = (string)reader["IP"];
// list.Add(log);
// }
// }
// conn.Close();
//}
//return list;
}
//public static void UpdateState(List<FrmMain.AttLog> logs) {
// using (var conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
// Directory.GetCurrentDirectory() + "\\AttDB.mdb")) {
// conn.Open();
// var sql = String.Format(
// "update AttLog set [Uploaded]=1 where [ID] in ({0})", string.Join(",", logs.Select(x => x.ID)));
// var cmd = new OleDbCommand(sql, conn);
// cmd.ExecuteNonQuery();
// conn.Close();
// }
//}
}
}

+ 56
- 0
BLUtil/EncodeString.cs View File

@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BLUtil {
public class EncodeString {
public static string Encode(string str) {
int length = str.Length;
byte[] buffer = new byte[length];
int i = 0;
foreach (char c in str) {
byte b = (byte)c;
byte tem = b;
byte bit0 = (byte)(b & 1);
byte bit1 = (byte)((b >> 1) & 1);
byte bit2 = (byte)((b >> 2) & 1);
byte bit3 = (byte)((b >> 3) & 1);
byte bit4 = (byte)((b >> 4) & 1);
byte bit5 = (byte)((b >> 5) & 1);
byte bit6 = (byte)((b >> 6) & 1);
byte bit7 = (byte)((b >> 7) & 1);
tem = (byte)(tem & 0);
tem = (byte)((bit0 << 7) | tem);
tem = (byte)((bit1 << 6) | tem);
tem = (byte)((bit2 << 3) | tem);
tem = (byte)((bit3 << 2) | tem);
tem = (byte)((bit4 << 5) | tem);
tem = (byte)((bit5 << 4) | tem);
tem = (byte)((bit6 << 1) | tem);
tem = (byte)(bit7 | tem);
buffer[i] = tem;
i++;
}
char[] ch = new char[length];
int j = 0;
foreach (byte b in buffer) {
ch[j] = (char)b;
j++;
}
return new string(ch);
}
public static readonly object RwLocker = new object();
public static string UserName = "";
public static string Password="";
}
}

+ 60
- 0
BLUtil/LoginRpc.cs View File

@ -0,0 +1,60 @@
using System;
using Forks.JsonRpc.Client;
namespace BLUtil {
public static class RpcUtil {
const string WpfUserMethod = "/MainSystem/B3TianJinMeatUnite/Rpcs/ClientRpc/GetWpfUserInfoByIds";
public const string GetGoods = "/MainSystem/B3TianJinMeatUnite/Rpcs/ClientRpc/GetGoodsInfor";
public const string GetStore = "/MainSystem/B3TianJinMeatUnite/Rpcs/ClientRpc/GetStoreInfor";
public static string OnLineLoadNameByCode(string code, out string error) {
try {
error = string.Empty;
return RpcFacade.Call<string>(WpfUserMethod, code);
} catch (Exception ex) {
error = ex.ToString();
}
return string.Empty;
}
public static bool Login(string name, string password, out string error) {
error = string.Empty;
try {
RpcFacade.Login(name, password);
} catch (Exception e) {
error = e.Message;
return false;
}
return true;
}
public static bool Logout(out string error) {
error = string.Empty;
try {
RpcFacade.Logout();
} catch (Exception e) {
error = e.Message;
return false;
}
return true;
}
public static T Call<T>(string relativeMethod, params object[] parameters) {
bool logedIn;
try {
logedIn = RpcFacade.IsLogedIn;
} catch {
logedIn = false;
}
if (!logedIn) {
RpcFacade.Login(EncodeString.UserName, EncodeString.Password);
}
return RpcFacade.Call<T>(relativeMethod, parameters);
}
}
}

+ 36
- 0
BLUtil/Properties/AssemblyInfo.cs View File

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

+ 29
- 0
BLUtil/WeightTable.cs View File

@ -0,0 +1,29 @@
using System;
using System.Data;
using Forks.EnterpriseServices;
using Forks.EnterpriseServices.DomainObjects2;
namespace BLUtil
{
[MapToTable("Weight")]
public class WeightTable {
public long ID { get; set; }
public long Goods_ID { get; set; }
public string Goods_Name { get; set; }
public string Goods_Code { get; set; }
public string Unit { get; set; }
public decimal? Weight { get; set; }
[LogicName("ÈÕÆÚ")]
[DbColumn(DbType = SqlDbType.DateTime)]
public DateTime DateTime { get; set; }
[LogicName("˳ÐòºÅ")]
public long Sequence { get; set; }
}
}

+ 56
- 0
BWPClientForTianRou.sln View File

@ -0,0 +1,56 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BWPClientForTianRou", "BWPClientForTianRou\BWPClientForTianRou.csproj", "{C422269D-C1F6-48B4-B26C-6FF26F2FDD46}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyPad", "BWPClientForTianRou\KeyPad\KeyPad.csproj", "{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLUtil", "BLUtil\BLUtil.csproj", "{7E4543F1-5E83-40BF-B47A-29C40429EC2C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C422269D-C1F6-48B4-B26C-6FF26F2FDD46}.Debug|Any CPU.ActiveCfg = Debug|x86
{C422269D-C1F6-48B4-B26C-6FF26F2FDD46}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{C422269D-C1F6-48B4-B26C-6FF26F2FDD46}.Debug|Mixed Platforms.Build.0 = Debug|x86
{C422269D-C1F6-48B4-B26C-6FF26F2FDD46}.Debug|x86.ActiveCfg = Debug|x86
{C422269D-C1F6-48B4-B26C-6FF26F2FDD46}.Debug|x86.Build.0 = Debug|x86
{C422269D-C1F6-48B4-B26C-6FF26F2FDD46}.Release|Any CPU.ActiveCfg = Release|x86
{C422269D-C1F6-48B4-B26C-6FF26F2FDD46}.Release|Mixed Platforms.ActiveCfg = Release|x86
{C422269D-C1F6-48B4-B26C-6FF26F2FDD46}.Release|Mixed Platforms.Build.0 = Release|x86
{C422269D-C1F6-48B4-B26C-6FF26F2FDD46}.Release|x86.ActiveCfg = Release|x86
{C422269D-C1F6-48B4-B26C-6FF26F2FDD46}.Release|x86.Build.0 = Release|x86
{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Debug|x86.ActiveCfg = Debug|x86
{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Debug|x86.Build.0 = Debug|x86
{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Release|Any CPU.Build.0 = Release|Any CPU
{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Release|x86.ActiveCfg = Release|x86
{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}.Release|x86.Build.0 = Release|x86
{7E4543F1-5E83-40BF-B47A-29C40429EC2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E4543F1-5E83-40BF-B47A-29C40429EC2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E4543F1-5E83-40BF-B47A-29C40429EC2C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{7E4543F1-5E83-40BF-B47A-29C40429EC2C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{7E4543F1-5E83-40BF-B47A-29C40429EC2C}.Debug|x86.ActiveCfg = Debug|Any CPU
{7E4543F1-5E83-40BF-B47A-29C40429EC2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E4543F1-5E83-40BF-B47A-29C40429EC2C}.Release|Any CPU.Build.0 = Release|Any CPU
{7E4543F1-5E83-40BF-B47A-29C40429EC2C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{7E4543F1-5E83-40BF-B47A-29C40429EC2C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{7E4543F1-5E83-40BF-B47A-29C40429EC2C}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

+ 17
- 0
BWPClientForTianRou/App.config View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="BWPClientForTianRou.Properties.Settings.AppDbConnectionString"
connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\AppDb.mdb;Persist Security Info=True"
providerName="System.Data.OleDb" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<appSettings>
<add key="UrlPath" value="http://localhost:2000/MainSystem/"/>
</appSettings>
</configuration>

BIN
BWPClientForTianRou/AppDb.mdb View File


+ 111
- 0
BWPClientForTianRou/AutoSizeFormClass.cs View File

@ -0,0 +1,111 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace BWPClientForTianRou {
class AutoSizeFormClass {
//(1).声明结构,只记录窗体和其控件的初始位置和大小。
public struct controlRect {
public int Left;
public int Top;
public int Width;
public int Height;
}
//(2).声明 1个对象
//注意这里不能使用控件列表记录 List nCtrl;,因为控件的关联性,记录的始终是当前的大小。
// public List oldCtrl= new List();//这里将西文的大于小于号都过滤掉了,只能改为中文的,使用中要改回西文
public List<controlRect> oldCtrl = new List<controlRect>();
int ctrlNo = 0;//1;
//(3). 创建两个函数
//(3.1)记录窗体和其控件的初始位置和大小,
public void ControllInitializeSize(Control mForm) {
controlRect cR;
cR.Left = mForm.Left;
cR.Top = mForm.Top;
cR.Width = mForm.Width;
cR.Height = mForm.Height;
oldCtrl.Add(cR);//第一个为"窗体本身",只加入一次即可
AddControl(mForm);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
//this.WindowState = (System.Windows.Forms.FormWindowState)(2);//记录完控件的初始位置和大小后,再最大化
//0 - Normalize , 1 - Minimize,2- Maximize
}
private void AddControl(Control ctl) {
foreach (Control c in ctl.Controls) { //**放在这里,是先记录控件的子控件,后记录控件本身
//if (c.Controls.Count > 0)
// AddControl(c);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
controlRect objCtrl;
objCtrl.Left = c.Left;
objCtrl.Top = c.Top;
objCtrl.Width = c.Width;
objCtrl.Height = c.Height;
oldCtrl.Add(objCtrl);
//**放在这里,是先记录控件本身,后记录控件的子控件
if (c.Controls.Count > 0)
AddControl(c);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
}
}
//(3.2)控件自适应大小,
public void controlAutoSize(Control mForm) {
if (ctrlNo == 0) { //*如果在窗体的Form1_Load中,记录控件原始的大小和位置,正常没有问题,但要加入皮肤就会出现问题,因为有些控件如dataGridView的的子控件还没有完成,个数少
//*要在窗体的Form1_SizeChanged中,第一次改变大小时,记录控件原始的大小和位置,这里所有控件的子控件都已经形成
controlRect cR;
// cR.Left = mForm.Left; cR.Top = mForm.Top; cR.Width = mForm.Width; cR.Height = mForm.Height;
cR.Left = 0;
cR.Top = 0;
cR.Width = mForm.PreferredSize.Width;
cR.Height = mForm.PreferredSize.Height;
oldCtrl.Add(cR);//第一个为"窗体本身",只加入一次即可
AddControl(mForm);//窗体内其余控件可能嵌套其它控件(比如panel),故单独抽出以便递归调用
}
float wScale = (float)mForm.Width / (float)oldCtrl[0].Width;//新旧窗体之间的比例,与最早的旧窗体
float hScale = (float)mForm.Height / (float)oldCtrl[0].Height;//.Height;
ctrlNo = 1;//进入=1,第0个为窗体本身,窗体内的控件,从序号1开始
AutoScaleControl(mForm, wScale, hScale);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
}
private void AutoScaleControl(Control ctl, float wScale, float hScale) {
int ctrLeft0, ctrTop0, ctrWidth0, ctrHeight0;
//int ctrlNo = 1;//第1个是窗体自身的 Left,Top,Width,Height,所以窗体控件从ctrlNo=1开始
foreach (Control c in ctl.Controls) { //**放在这里,是先缩放控件的子控件,后缩放控件本身
//if (c.Controls.Count > 0)
// AutoScaleControl(c, wScale, hScale);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
ctrLeft0 = oldCtrl[ctrlNo].Left;
ctrTop0 = oldCtrl[ctrlNo].Top;
ctrWidth0 = oldCtrl[ctrlNo].Width;
ctrHeight0 = oldCtrl[ctrlNo].Height;
//c.Left = (int)((ctrLeft0 - wLeft0) * wScale) + wLeft1;//新旧控件之间的线性比例
//c.Top = (int)((ctrTop0 - wTop0) * h) + wTop1;
c.Left = (int)((ctrLeft0) * wScale);//新旧控件之间的线性比例。控件位置只相对于窗体,所以不能加 + wLeft1
c.Top = (int)((ctrTop0) * hScale);//
c.Width = (int)(ctrWidth0 * wScale);//只与最初的大小相关,所以不能与现在的宽度相乘 (int)(c.Width * w);
c.Height = (int)(ctrHeight0 * hScale);//
ctrlNo++;//累加序号
//**放在这里,是先缩放控件本身,后缩放控件的子控件
if (c.Controls.Count > 0)
AutoScaleControl(c, wScale, hScale);//窗体内其余控件还可能嵌套控件(比如panel),要单独抽出,因为要递归调用
if (ctl is DataGridView) {
//var dgv = ctl as DataGridView;
//Cursor.Current = Cursors.WaitCursor;
//var widths = 0;
//for (int i = 0; i < dgv.Columns.Count; i++) {
// dgv.AutoResizeColumn(i, DataGridViewAutoSizeColumnMode.AllCells); // 自动调整列宽
// widths += dgv.Columns[i].Width; // 计算调整列后单元列的宽度和
//}
//if (widths >= ctl.Size.Width) // 如果调整列的宽度大于设定列宽
// dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; // 调整列的模式 自动
//else
// dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; // 如果小于 则填充
//Cursor.Current = Cursors.Default;
}
}
}
}
}

+ 157
- 0
BWPClientForTianRou/BWPClientForTianRou.csproj View File

@ -0,0 +1,157 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{C422269D-C1F6-48B4-B26C-6FF26F2FDD46}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BWPClientForTianRou</RootNamespace>
<AssemblyName>BWPClientForTianRou</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\tsref\release\Forks.EnterpriseServices.dll</HintPath>
</Reference>
<Reference Include="forks.json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\tsref\release\forks.json.dll</HintPath>
</Reference>
<Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" />
<Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\Projects\tsref\release\Forks.Utils.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="AutoSizeFormClass.cs" />
<Compile Include="WinApiSendMessage.cs" />
<Compile Include="ConfigUtil.cs" />
<Compile Include="SelectGoodsForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SelectGoodsForm.Designer.cs">
<DependentUpon>SelectGoodsForm.cs</DependentUpon>
</Compile>
<Compile Include="FormProcessBar.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FormProcessBar.Designer.cs">
<DependentUpon>FormProcessBar.cs</DependentUpon>
</Compile>
<Compile Include="LoginForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="LoginForm.Designer.cs">
<DependentUpon>LoginForm.cs</DependentUpon>
</Compile>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="SelectGoodsForm.resx">
<DependentUpon>SelectGoodsForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FormProcessBar.resx">
<DependentUpon>FormProcessBar.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="LoginForm.resx">
<DependentUpon>LoginForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<Content Include="AppDb.mdb" />
<Content Include="Config.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Image\u15.png" />
<Content Include="Image\u17.png" />
<Content Include="Image\u19.png" />
<Content Include="Image\u37.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BLUtil\BLUtil.csproj">
<Project>{7E4543F1-5E83-40BF-B47A-29C40429EC2C}</Project>
<Name>BLUtil</Name>
</ProjectReference>
<ProjectReference Include="KeyPad\KeyPad.csproj">
<Project>{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}</Project>
<Name>KeyPad</Name>
</ProjectReference>
</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>

+ 1
- 0
BWPClientForTianRou/Config.txt View File

@ -0,0 +1 @@


+ 62
- 0
BWPClientForTianRou/ConfigUtil.cs View File

@ -0,0 +1,62 @@
using System;
using System.IO;
using System.Windows.Forms;
using Forks.Utils.IO;
namespace BWPClientForTianRou {
public class ConfigUtil {
public static string ConfigFilePath = Application.StartupPath + "\\Config.txt";
public static string LivestockFilePath = Application.StartupPath + "\\Livestock.txt";
public static void Init() {
using (TextReader reader = FS.OpenReader(ConfigFilePath, true)) {
var nutFile = NutFile.Parse(reader);
LogFilePath = Application.StartupPath + "\\log\\" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt";
mStartTime = nutFile.AsInt32( StartTime, 12);
if (string.IsNullOrEmpty(nutFile.AsString( Seconds, "1"))) {
mSeconds = 1;
} else {
mSeconds = (short)nutFile.AsInt32( Seconds, 1);
}
mComName = nutFile.AsString( ComName, "COM1");
mBaundRate = nutFile.AsString( BaundRate, "9600");
mDataBits = nutFile.AsString( DataBits, "8");
mReadType = nutFile.AsString( ReadType, "0");
mCType = nutFile.AsString( CType, "");
mMinWeight = nutFile.AsDecimal( MinWeight, 25m);
mMaxWeight = nutFile.AsDecimal( MaxWeight, 300m);
}
}
public const string StartTime = "StartTime";
public const string Seconds = "Seconds";
public const string CType = "CType";
public const string ComName = "ComName";
public const string BaundRate = "BaundRate";
public const string DataBits = "DataBits";
public const string Assignment = "Assignment";
public const string MinWeight = "MinWeight";
public const string MaxWeight = "MaxWeight";
public const string ReadType = "ReadType";
public const string LastUser = "LastUser";
public static string LogFilePath;
public static short mSeconds;
public static short BaseCount;
public static string mComName;
public static string mBaundRate;
public static string mDataBits;
public static string mReadType;
public static string mAssignment;
public static decimal mMinWeight;
public static decimal mMaxWeight;
public static int mStartTime;
public static string mCType;
}
}

+ 65
- 0
BWPClientForTianRou/FormProcessBar.Designer.cs View File

@ -0,0 +1,65 @@
namespace BWPClientForTianRou {
partial class FormProcessBar {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.label1 = new System.Windows.Forms.Label();
this.prcBar = new System.Windows.Forms.ProgressBar();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(274, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(44, 18);
this.label1.TabIndex = 2;
this.label1.Text = "0";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// prcBar
//
this.prcBar.Location = new System.Drawing.Point(1, 4);
this.prcBar.Name = "prcBar";
this.prcBar.Size = new System.Drawing.Size(267, 28);
this.prcBar.TabIndex = 3;
//
// FormProcessBar
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(321, 38);
this.Controls.Add(this.label1);
this.Controls.Add(this.prcBar);
this.Name = "FormProcessBar";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "信息同步中,请稍后……";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ProgressBar prcBar;
}
}

+ 25
- 0
BWPClientForTianRou/FormProcessBar.cs View File

@ -0,0 +1,25 @@
using System.Windows.Forms;
namespace BWPClientForTianRou {
public partial class FormProcessBar : Form {
public FormProcessBar() {
InitializeComponent();
}
public bool Increase(int nValue) {
if (nValue > 0) {
if (prcBar.Value + nValue < prcBar.Maximum) {
prcBar.Value += nValue;
label1.Text = prcBar.Value + "/100";
return true;
} else {
prcBar.Value = prcBar.Maximum;
label1.Text = string.Empty;
this.Close();
return false;
}
}
return false;
}
}
}

+ 120
- 0
BWPClientForTianRou/FormProcessBar.resx View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

BIN
BWPClientForTianRou/Image/u15.png View File

Before After
Width: 130  |  Height: 40  |  Size: 1.4 KiB

BIN
BWPClientForTianRou/Image/u17.png View File

Before After
Width: 200  |  Height: 200  |  Size: 6.5 KiB

BIN
BWPClientForTianRou/Image/u19.png View File

Before After
Width: 200  |  Height: 200  |  Size: 6.0 KiB

BIN
BWPClientForTianRou/Image/u37.png View File

Before After
Width: 200  |  Height: 200  |  Size: 5.9 KiB

+ 125
- 0
BWPClientForTianRou/KeyPad.csproj View File

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>KeyPad</RootNamespace>
<AssemblyName>KeyPad</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<KeyContainerName>BwpApp</KeyContainerName></PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System"><SpecificVersion>False</SpecificVersion></Reference>
<Reference Include="System.Data"><SpecificVersion>False</SpecificVersion></Reference>
<Reference Include="System.Xml"><SpecificVersion>False</SpecificVersion></Reference>
<Reference Include="Microsoft.CSharp"><SpecificVersion>False</SpecificVersion><Private>False</Private></Reference>
<Reference Include="System.Core"><SpecificVersion>False</SpecificVersion></Reference>
<Reference Include="System.Xml.Linq"><SpecificVersion>False</SpecificVersion></Reference>
<Reference Include="System.Data.DataSetExtensions"><SpecificVersion>False</SpecificVersion></Reference>
<Reference Include="System.Xaml">
<SpecificVersion>False</SpecificVersion><Private>False</Private></Reference>
<Reference Include="WindowsBase"><SpecificVersion>False</SpecificVersion></Reference>
<Reference Include="PresentationCore"><SpecificVersion>False</SpecificVersion></Reference>
<Reference Include="PresentationFramework"><SpecificVersion>False</SpecificVersion></Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\version\Hardware_version.cs"><Link>Hardware_version.cs</Link></Compile><Compile Include="Converter\BoolToVisibilityConverter.cs" />
<Compile Include="VirtualKeyboard.xaml.cs">
<DependentUpon>VirtualKeyboard.xaml</DependentUpon>
</Compile>
<Page Include="Keypad.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="Keypad.xaml.cs">
<DependentUpon>Keypad.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="VirtualKeyboard.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</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>

+ 21
- 0
BWPClientForTianRou/KeyPad/Converter/BoolToVisibilityConverter.cs View File

@ -0,0 +1,21 @@
using System;
using System.Globalization;
using System.Windows.Data;
namespace KeyPad.Converter
{
class BoolToVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if ((bool?)value == true)
return System.Windows.Visibility.Visible;
return System.Windows.Visibility.Collapsed;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

+ 148
- 0
BWPClientForTianRou/KeyPad/KeyPad.csproj View File

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{3ADBFF38-915C-4115-9CDD-81C0CAD9733A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>KeyPad</RootNamespace>
<AssemblyName>KeyPad</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<KeyContainerName>BwpApp</KeyContainerName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Data">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Xml">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Microsoft.CSharp">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="System.Core">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Xml.Linq">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Xaml">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="WindowsBase">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="PresentationCore">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="PresentationFramework">
<SpecificVersion>False</SpecificVersion>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Converter\BoolToVisibilityConverter.cs" />
<Compile Include="VirtualKeyboard.xaml.cs">
<DependentUpon>VirtualKeyboard.xaml</DependentUpon>
</Compile>
<Page Include="Keypad.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="Keypad.xaml.cs">
<DependentUpon>Keypad.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="VirtualKeyboard.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</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>

+ 61
- 0
BWPClientForTianRou/KeyPad/Keypad.xaml View File

@ -0,0 +1,61 @@
<Window x:Class="KeyPad.Keypad"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="313" Width="299" ShowInTaskbar="False" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" >
<Window.Resources>
<DropShadowEffect x:Key="DropShadowEffect" ShadowDepth="1" Direction="-90" BlurRadius="3" />
<Style TargetType="Label">
<Setter Property="FontSize" Value="22"/>
<Setter Property="Label.Effect" Value="{StaticResource DropShadowEffect}"/>
</Style>
<LinearGradientBrush x:Key="IPhoneSteelBackground" EndPoint="0.5,1.272" StartPoint="0.5,0">
<GradientStop Color="#FF9097A3" Offset="0"/>
<GradientStop Color="#FF444D5B" Offset="1"/>
</LinearGradientBrush>
<Style TargetType="Button">
<EventSetter Event="Click" Handler="button_Click" />
<Setter Property="Margin" Value="4"/>
<Setter Property="Button.Effect" Value="{StaticResource DropShadowEffect}"/>
<Setter Property="FontSize" Value="22"/>
<Setter Property="Background" Value="WhiteSmoke"/>
<Setter Property="RenderTransform">
<Setter.Value>
<!-- Workaround for ATI video cards that don't render good with dropshadoweffect-->
<RotateTransform Angle="0.00000000001"/>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Background="{DynamicResource IPhoneSteelBackground}">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button Grid.Row="1" Grid.Column="0" BorderThickness="1" BorderBrush="Gray" CommandParameter="NUMPAD7" >7</Button>
<Button Grid.Row="1" Grid.Column="1" CommandParameter="NUMPAD8" BorderThickness="1" Content="8" />
<Button Grid.Row="1" Grid.Column="2" CommandParameter="NUMPAD9" Content="9" />
<Button Grid.Row="1" Grid.Column="3" CommandParameter="BACK" >
<Path Stretch="Fill" Width="36" Height="24" Data="F1M555.0371,274.4893L552.7871,276.7383L549.9861,273.9373L547.1991,276.7243L545.1131,274.6393L547.9001,271.8523L545.0101,268.9603L547.2601,266.7113L550.1501,269.6023L552.8921,266.8613L554.9761,268.9463L552.2361,271.6883z M555.3751,264.0003L544.8751,264.0003C543.1251,264.1253,535.0001,270.7503,535.0001,272.2503C535.0001,273.7503,543.1251,279.3753,544.8751,279.5003L555.3751,279.5003C558.8751,279.5003,559.3751,277.7093,559.3751,275.5003L559.3751,268.0003C559.3751,265.7913,558.7501,264.0003,555.3751,264.0003" Fill="#FF333333"/>
</Button>
<Button Grid.Row="2" Grid.Column="0" x:Name="button9" CommandParameter="NUMPAD4" Content="4"/>
<Button Grid.Row="2" Grid.Column="1" CommandParameter="NUMPAD5" Content="5" />
<Button Grid.Row="2" Grid.Column="2" CommandParameter="NUMPAD6" Content="6" />
<Button Grid.Row="3" Grid.Column="0" CommandParameter="NUMPAD1" Content="1"/>
<Button Grid.Row="3" Grid.Column="1" CommandParameter="NUMPAD2" Content="2"/>
<Button Grid.Row="3" Grid.Column="2" CommandParameter="NUMPAD3" Content="3" />
<Button Grid.Row="2" Grid.Column="3" Grid.RowSpan="3" CommandParameter="RETURN" Content="Enter"/>
<Button Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" CommandParameter="NUMPAD0" Content="0" />
<Button Grid.Row="4" Grid.Column="2" CommandParameter="DECIMAL" Content="." />
<Label Grid.Column="0" Grid.ColumnSpan="4" Content="{Binding Result}" HorizontalContentAlignment="Right" Background="WhiteSmoke" Margin="4"/>
</Grid>
</Window>

+ 88
- 0
BWPClientForTianRou/KeyPad/Keypad.xaml.cs View File

@ -0,0 +1,88 @@
/*
* Copyright (c) 2008, Andrzej Rusztowicz (ekus.net)
* All rights reserved.
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of ekus.net nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Added by Michele Cattafesta (mesta-automation.com) 29/2/2011
* The code has been totally rewritten to create a control that can be modified more easy even without knowing the MVVM pattern.
* If you need to check the original source code you can download it here: http://wosk.codeplex.com/
*/
using System;
using System.Windows;
using System.Windows.Controls;
using System.ComponentModel;
namespace KeyPad
{
/// <summary>
/// Logica di interazione per MainWindow.xaml
/// </summary>
public partial class Keypad : INotifyPropertyChanged
{
#region Public Properties
private string _result;
public string Result
{
get { return _result; }
private set { _result = value; OnPropertyChanged("Result"); }
}
#endregion
public Keypad()
{
InitializeComponent();
DataContext = this;
Result = "";
}
private void button_Click(object sender, RoutedEventArgs e)
{
var button = sender as Button;
if (button != null)
switch (button.CommandParameter.ToString())
{
case "ESC":
//this.DialogResult = false;
Close();
break;
case "RETURN":
DialogResult = true;
break;
case "BACK":
if (Result.Length > 0)
Result = Result.Remove(Result.Length - 1);
break;
default:
Result += button.Content.ToString();
break;
}
}
#region INotifyPropertyChanged members
public event PropertyChangedEventHandler PropertyChanged;
private void OnPropertyChanged(String info)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(info));
}
}
#endregion
}
}

+ 55
- 0
BWPClientForTianRou/KeyPad/Properties/AssemblyInfo.cs View File

@ -0,0 +1,55 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// Le informazioni generali relative a un assembly sono controllate dal seguente
// set di attributi. Per modificare le informazioni associate a un assembly
// occorre quindi modificare i valori di questi attributi.
[assembly: AssemblyTitle("KeyPad")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("KeyPad")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
// ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
// COM, impostare su true l'attributo ComVisible per tale tipo.
[assembly: ComVisible(false)]
//Per iniziare la compilazione delle applicazioni localizzabili, impostare
//<UICulture>CultureYouAreCodingWith</UICulture> nel file .csproj
//all'interno di un <PropertyGroup>. Ad esempio, se si utilizza l'inglese (Stati Uniti)
//nei file di origine, impostare <UICulture> su en-US. Rimuovere quindi il commento dall'attributo
//NeutralResourceLanguage riportato di seguito. Aggiornare "en-US" nella
//riga sottostante in modo che corrisponda all'impostazione UICulture nel file di progetto.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //dove si trovano i dizionari delle risorse specifiche del tema
//(in uso se non è possibile trovare una risorsa nella pagina
// oppure nei dizionari delle risorse dell'applicazione)
ResourceDictionaryLocation.SourceAssembly //dove si trova il dizionario delle risorse generiche
//(in uso se non è possibile trovare una risorsa nella pagina,
// nell'applicazione o nei dizionari delle risorse specifiche del tema)
)]
// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
//
// Numero di versione principale
// Numero di versione secondario
// Numero build
// Revisione
//
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
// utilizzando l'asterisco (*) come descritto di seguito:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

+ 71
- 0
BWPClientForTianRou/KeyPad/Properties/Resources.Designer.cs View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Codice generato da uno strumento.
// Versione runtime:4.0.30319.239
//
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse
// se il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------
namespace KeyPad.Properties
{
/// <summary>
/// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via.
/// </summary>
// Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder
// tramite uno strumento quale ResGen o Visual Studio.
// Per aggiungere o rimuovere un membro, modificare il file con estensione .ResX, quindi eseguire di nuovo ResGen
// con l'opzione /str oppure ricompilare il progetto VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Restituisce l'istanza di ResourceManager nella cache utilizzata da questa classe.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("KeyPad.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte
/// le ricerche di risorse che utilizzano questa classe di risorse fortemente tipizzata.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

+ 117
- 0
BWPClientForTianRou/KeyPad/Properties/Resources.resx View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

+ 30
- 0
BWPClientForTianRou/KeyPad/Properties/Settings.Designer.cs View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.239
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace KeyPad.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

+ 7
- 0
BWPClientForTianRou/KeyPad/Properties/Settings.settings View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

+ 353
- 0
BWPClientForTianRou/KeyPad/VirtualKeyboard.xaml View File

@ -0,0 +1,353 @@
<Window x:Class="KeyPad.VirtualKeyboard"
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"
xmlns:converter="clr-namespace:KeyPad.Converter"
Height="350" Width="1000" x:Name="Keyboard" WindowStartupLocation="CenterScreen" ShowInTaskbar="False" Title="Virtual Keyboard">
<Window.Resources>
<converter:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
<LinearGradientBrush x:Key="IPhoneSteelBackground" EndPoint="0.5,1.272" StartPoint="0.5,0">
<GradientStop Color="#FF9097A3" Offset="0"/>
<GradientStop Color="#FF444D5B" Offset="1"/>
</LinearGradientBrush>
<DropShadowEffect x:Key="DropShadowEffect" ShadowDepth="1" Direction="-90" BlurRadius="3" />
<Style TargetType="Button">
<EventSetter Event="Click" Handler="button_Click" />
<Setter Property="Margin" Value="4"/>
<Setter Property="Button.Effect" Value="{StaticResource DropShadowEffect}"/>
<Setter Property="FontSize" Value="22"/>
<Setter Property="Background" Value="WhiteSmoke"/>
<Setter Property="RenderTransform">
<Setter.Value>
<!-- Workaround for ATI video cards that don't render good with dropshadoweffect-->
<RotateTransform Angle="0.00000000001"/>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ToggleButton">
<Setter Property="ClickMode" Value="Press"/>
<Setter Property="Margin" Value="4"/>
<Setter Property="Background" Value="WhiteSmoke"/>
<Setter Property="Button.Effect" Value="{StaticResource DropShadowEffect}"/>
<Setter Property="FontSize" Value="22"/>
<Setter Property="RenderTransform">
<Setter.Value>
<!-- Workaround for ATI video cards that don't render good with dropshadoweffect-->
<RotateTransform Angle="0.00000000001"/>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Label">
<Setter Property="Label.Effect" Value="{StaticResource DropShadowEffect}"/>
<Setter Property="FontSize" Value="22"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="RenderTransform">
<Setter.Value>
<!-- Workaround for ATI video cards that don't render good with dropshadoweffect-->
<RotateTransform Angle="0.00000000001"/>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{DynamicResource IPhoneSteelBackground}" >
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" CommandParameter="ESC" Content="Esc" Height="50" Width="80" IsCancel="True"/>
<Label Content="{Binding Result, ElementName=Keyboard }" Background="WhiteSmoke" BorderBrush="Gray" BorderThickness="1" Grid.Column="1" Margin="5,5,5,5" FontSize="18" HorizontalAlignment="Stretch"/>
</Grid>
<Grid Grid.Row="1" VerticalAlignment="Stretch" x:Name="AlfaKeyboard" Background="{DynamicResource IPhoneSteelBackground}" >
<Grid.RowDefinitions>
<RowDefinition Height="0" />
<RowDefinition x:Name="NumberKeys" Height="0"/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0"/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button Grid.Column="1" CommandParameter="q" Content="q"/>
<Button Grid.Column="2" CommandParameter="w" Content="w"/>
<Button Grid.Column="3" CommandParameter="e" Content="e"/>
<Button Grid.Column="4" CommandParameter="r" Content="r"/>
<Button Grid.Column="5" CommandParameter="t" Content="t"/>
<Button Grid.Column="6" CommandParameter="y" Content="y"/>
<Button Grid.Column="7" CommandParameter="u" Content="u"/>
<Button Grid.Column="8" CommandParameter="i" Content="i"/>
<Button Grid.Column="9" CommandParameter="o" Content="o"/>
<Button Grid.Column="10" CommandParameter="p" Content="p"/>
<Button Grid.Column="13" CommandParameter="BACK">
<Path Stretch="Fill" Width="36" Height="24" Data="F1M555.0371,274.4893L552.7871,276.7383L549.9861,273.9373L547.1991,276.7243L545.1131,274.6393L547.9001,271.8523L545.0101,268.9603L547.2601,266.7113L550.1501,269.6023L552.8921,266.8613L554.9761,268.9463L552.2361,271.6883z M555.3751,264.0003L544.8751,264.0003C543.1251,264.1253,535.0001,270.7503,535.0001,272.2503C535.0001,273.7503,543.1251,279.3753,544.8751,279.5003L555.3751,279.5003C558.8751,279.5003,559.3751,277.7093,559.3751,275.5003L559.3751,268.0003C559.3751,265.7913,558.7501,264.0003,555.3751,264.0003" Fill="#FF333333"></Path>
</Button>
</Grid>
<Grid Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="1.55*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="1" CommandParameter="a" Content="a"/>
<Button Grid.Column="2" CommandParameter="s" Content="s"/>
<Button Grid.Column="3" CommandParameter="d" Content="d"/>
<Button Grid.Column="4" CommandParameter="f" Content="f"/>
<Button Grid.Column="5" CommandParameter="g" Content="g"/>
<Button Grid.Column="6" CommandParameter="h" Content="h"/>
<Button Grid.Column="7" CommandParameter="j" Content="j"/>
<Button Grid.Column="8" CommandParameter="k" Content="k"/>
<Button Grid.Column="9" CommandParameter="l" Content="l"/>
<Button Grid.Column="12" CommandParameter="RETURN" HorizontalContentAlignment="Right" Padding="10">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Return "/>
<TextBlock Text="8 " FontFamily="Wingdings 3" TextAlignment="Center" />
</StackPanel>
</Button>
</Grid>
<Grid Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="1.1*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" CommandParameter="LSHIFT">
<Path Fill="#FF333333" Stretch="Fill" Width="28" Height="24" Data="F1M269.5,262C269.026,262,268.552,262.168,268.171,262.505L259.671,270.505C259.05,271.057,258.835,271.935,259.131,272.71C259.425,273.487,260.169,274,261,274L265,274L265,278C265,279.104,265.896,280,267,280L272,280C273.104,280,274,279.104,274,278L274,274L278,274C278.81,274,279.538,273.513,279.849,272.766C280.157,272.018,279.986,271.158,279.415,270.585L270.914,262.586C270.524,262.197,270.013,262,269.5,262 M269.5,264L278,272L272,272L272,278L267,278L267,272L261,272L269.5,264"/>
</Button>
<Button Grid.Column="1" CommandParameter="z" Content="z"/>
<Button Grid.Column="2" CommandParameter="x" Content="x"/>
<Button Grid.Column="3" CommandParameter="c" Content="c"/>
<Button Grid.Column="4" CommandParameter="v" Content="v"/>
<Button Grid.Column="5" CommandParameter="b" Content="b"/>
<Button Grid.Column="6" CommandParameter="n" Content="n"/>
<Button Grid.Column="7" CommandParameter="m" Content="m"/>
<Button Grid.Column="8" CommandParameter="," Content=","/>
<Button Grid.Column="9" CommandParameter="." Content="."/>
<Button Grid.Column="11" CommandParameter="-" Content="-"/>
</Grid>
<Grid Grid.Row="5">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="5*" />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<ToggleButton IsChecked="{Binding ShowNumericKeyboard, ElementName=Keyboard}" Grid.Column="0" Grid.ColumnSpan="2" ClickMode="Press" Content=".?123" />
<Button Grid.Column="2" CommandParameter="CTRL" Content="Ctrl" />
<!-- wingdings Windows Logo: ÿ -->
<!-- wingdings apple cmd key: z -->
<Button Grid.Column="3" CommandParameter="SPACE" Content=" "/>
<Button Grid.Column="4" CommandParameter="ALT" Content="Alt" />
<ToggleButton IsChecked="{Binding ShowNumericKeyboard, ElementName=Keyboard}" Grid.Column="5" Grid.ColumnSpan="2" Command="{Binding Path=PressAndHold}" CommandParameter="IGNORE" Content=".?123" />
</Grid>
</Grid>
<!--<Grid Grid.Row="1" x:Name="NumKeyboard" Background="{DynamicResource IPhoneSteelBackground}" Margin="0,0,0,0" Visibility="Collapsed" >-->
<Grid Grid.Row="1" x:Name="NumKeyboard" Background="{DynamicResource IPhoneSteelBackground}" Margin="0,0,0,0" Visibility="{Binding ShowNumericKeyboard, ElementName=Keyboard, Converter={StaticResource BoolToVisibilityConverter}}" >
<Grid.RowDefinitions>
<RowDefinition Height="0"/>
<RowDefinition />
<RowDefinition/>
<RowDefinition Height="0"/>
<RowDefinition/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button Grid.Column="0" CommandParameter="_1" Content="1"/>
<Button Grid.Column="1" CommandParameter="_2" Content="2"/>
<Button Grid.Column="2" CommandParameter="_3" Content="3"/>
<Button Grid.Column="3" CommandParameter="_4" Content="4"/>
<Button Grid.Column="4" CommandParameter="_5" Content="5"/>
<Button Grid.Column="5" CommandParameter="_6" Content="6"/>
<Button Grid.Column="6" CommandParameter="_7" Content="7"/>
<Button Grid.Column="7" CommandParameter="_8" Content="8" />
<Button Grid.Column="8" CommandParameter="_9" Content="9"/>
<Button Grid.Column="9" CommandParameter="_0" Content="0"/>
<Button Grid.Column="13" CommandParameter="BACK" >
<Path Stretch="Fill" Width="36" Height="24" Data="F1M555.0371,274.4893L552.7871,276.7383L549.9861,273.9373L547.1991,276.7243L545.1131,274.6393L547.9001,271.8523L545.0101,268.9603L547.2601,266.7113L550.1501,269.6023L552.8921,266.8613L554.9761,268.9463L552.2361,271.6883z M555.3751,264.0003L544.8751,264.0003C543.1251,264.1253,535.0001,270.7503,535.0001,272.2503C535.0001,273.7503,543.1251,279.3753,544.8751,279.5003L555.3751,279.5003C558.8751,279.5003,559.3751,277.7093,559.3751,275.5003L559.3751,268.0003C559.3751,265.7913,558.7501,264.0003,555.3751,264.0003" Fill="#FF333333"/>
</Button>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="1.55*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="1" CommandParameter="Q" Content="-"/>
<Button Grid.Column="2" CommandParameter="W" Content="/"/>
<Button Grid.Column="3" CommandParameter="E" Content=":"/>
<Button Grid.Column="4" CommandParameter="R" Content=";"/>
<Button Grid.Column="5" CommandParameter="T" Content="(" />
<Button Grid.Column="6" CommandParameter="Y" Content=")"/>
<Button Grid.Column="7" CommandParameter="U" Content="$"/>
<Button Grid.Column="8" CommandParameter="I" Content="&amp;"/>
<Button Grid.Column="9" CommandParameter="O" Content="@"/>
<Button Grid.Column="10" CommandParameter="P" Content="&quot;"/>
<Button Grid.Column="12" CommandParameter="RETURN" HorizontalContentAlignment="Right" Padding="10">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Return "/>
<TextBlock Text="8 " FontFamily="Wingdings 3" TextAlignment="Center" />
</StackPanel>
</Button>
</Grid>
<!--<Grid Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="1.55*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="1" CommandParameter="A" Content="A"/>
<Button Grid.Column="2" CommandParameter="S" Content="S"/>
<Button Grid.Column="3" CommandParameter="D" Content="D"/>
<Button Grid.Column="4" CommandParameter="F" Content="F"/>
<Button Grid.Column="5" CommandParameter="G" Content="G"/>
<Button Grid.Column="6" CommandParameter="H" Content="H"/>
<Button Grid.Column="7" CommandParameter="J" Content="J"/>
<Button Grid.Column="8" CommandParameter="K" Content="K"/>
<Button Grid.Column="9" CommandParameter="L" Content="L"/>
<Button Grid.Column="12" CommandParameter="RETURN" Content="return" HorizontalContentAlignment="Right" Padding="10"/>-->
<!--</Grid>-->
<Grid Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="1.1*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Command="{Binding Path=PressAndHold}" CommandParameter="LSHIFT">
<Path Fill="#FF333333" Stretch="Fill" Width="28" Height="24" Data="F1M269.5,262C269.026,262,268.552,262.168,268.171,262.505L259.671,270.505C259.05,271.057,258.835,271.935,259.131,272.71C259.425,273.487,260.169,274,261,274L265,274L265,278C265,279.104,265.896,280,267,280L272,280C273.104,280,274,279.104,274,278L274,274L278,274C278.81,274,279.538,273.513,279.849,272.766C280.157,272.018,279.986,271.158,279.415,270.585L270.914,262.586C270.524,262.197,270.013,262,269.5,262 M269.5,264L278,272L272,272L272,278L267,278L267,272L261,272L269.5,264"/>
</Button>
<Button Grid.Column="1" CommandParameter="Z" Content="."/>
<Button Grid.Column="2" CommandParameter="X" Content=","/>
<Button Grid.Column="3" CommandParameter="C" Content="?"/>
<Button Grid.Column="4" CommandParameter="B" Content="'"/>
<Button Grid.Column="5" CommandParameter="N" Content="="/>
<Button Grid.Column="6" CommandParameter="M" Content="+"/>
<Button Grid.Column="7" CommandParameter="OEM_COMMA" >*</Button>
<Button Grid.Column="8" CommandParameter="OEM_PERIOD" >\</Button>
<Button Grid.Column="9" CommandParameter="OEM_PERIOD" >[</Button>
<Button Grid.Column="11" CommandParameter="OEM_PERIOD" >]</Button>
</Grid>
<Grid Grid.Row="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="5*" />
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" CommandParameter="RSHIFT" Content=".?123" />
<Button Grid.Column="1" CommandParameter="LCONTROL" Content="Ctrl" />
<Button Grid.Column="2" CommandParameter="LWIN" FontFamily="WingDings">
z</Button>
<!-- wingdings Windows Logo: ÿ -->
<!-- wingdings apple cmd key: z -->
<ToggleButton IsChecked="{Binding ShowNumericKeyboard, ElementName=Keyboard}" CommandParameter="IGNORE" Grid.Column="0" ClickMode="Press" Content="ABC" />
<Button Grid.Column="3" CommandParameter="SPACE" Content=" "/>
<Button Grid.Column="4" CommandParameter="MENU" Content="Alt" />
<Button Grid.Column="5" CommandParameter="LMENU" Content="Menu" />
<ToggleButton IsChecked="{Binding ShowNumericKeyboard, ElementName=Keyboard}" CommandParameter="IGNORE" Grid.Column="6" ClickMode="Press" Content="ABC" />
</Grid>
</Grid>
<!--<Image HorizontalAlignment="Left" Margin="-450,0,0,-377" Width="163" Stretch="Fill" VerticalAlignment="Bottom" Height="342" Grid.Row="1"/>-->
</Grid>
<!--<CheckBox Canvas.Left="894.223" Canvas.Top="17.02" Height="16.665" Name="checkBox1" Width="17.845" IsChecked="{Binding Source={DynamicResource virtualKeyboard}, Path=Shift, Mode=TwoWay, NotifyOnTargetUpdated=True}"></CheckBox>-->
</Window>

+ 128
- 0
BWPClientForTianRou/KeyPad/VirtualKeyboard.xaml.cs View File

@ -0,0 +1,128 @@
/*
* Copyright (c) 2008, Andrzej Rusztowicz (ekus.net)
* All rights reserved.
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of ekus.net nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Added by Michele Cattafesta (mesta-automation.com) 29/2/2011
* The code has been totally rewritten to create a control that can be modified more easy even without knowing the MVVM pattern.
* If you need to check the original source code you can download it here: http://wosk.codeplex.com/
*/
using System.Windows;
using System.Windows.Controls;
using System.ComponentModel;
using System.Text.RegularExpressions;
namespace KeyPad
{
/// <summary>
/// Logica di interazione per VirtualKeyboard.xaml
/// </summary>
public partial class VirtualKeyboard : INotifyPropertyChanged
{
#region Public Properties
private bool _showNumericKeyboard;
public bool ShowNumericKeyboard
{
get { return _showNumericKeyboard; }
set { _showNumericKeyboard = value; OnPropertyChanged("ShowNumericKeyboard"); }
}
private string _result;
public string Result
{
get { return _result; }
private set { _result = value; OnPropertyChanged("Result"); }
}
#endregion
#region Constructor
public VirtualKeyboard()
{
InitializeComponent();
DataContext = this;
Result = "";
}
#endregion
#region Callbacks
private void button_Click(object sender, RoutedEventArgs e)
{
var button = sender as Button;
if (button != null)
{
switch (button.CommandParameter.ToString())
{
case "LSHIFT":
var upperCaseRegex = new Regex("[A-Z]");
var lowerCaseRegex = new Regex("[a-z]");
Button btn;
foreach (UIElement elem in AlfaKeyboard.Children) //iterate the main grid
{
var grid = elem as Grid;
if (grid != null)
{
foreach (UIElement uiElement in grid.Children) //iterate the single rows
{
btn = uiElement as Button;
if (btn != null) // if button contains only 1 character
{
if (btn.Content.ToString().Length == 1)
{
if (upperCaseRegex.Match(btn.Content.ToString()).Success) // if the char is a letter and uppercase
btn.Content = btn.Content.ToString().ToLower();
else if (lowerCaseRegex.Match(button.Content.ToString()).Success) // if the char is a letter and lower case
btn.Content = btn.Content.ToString().ToUpper();
}
}
}
}
}
break;
case "ALT":
case "CTRL":
break;
case "RETURN":
DialogResult = true;
break;
case "BACK":
if (Result.Length > 0)
Result = Result.Remove(Result.Length - 1);
break;
default:
Result += button.Content.ToString();
break;
}
}
}
#endregion
#region INotifyPropertyChanged members
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
#endregion
}
}

+ 3
- 0
BWPClientForTianRou/KeyPad/app.config View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
</configuration>

BIN
BWPClientForTianRou/KeyPad/bin/Debug/KeyPad.dll View File


+ 3
- 0
BWPClientForTianRou/KeyPad/bin/Debug/KeyPad.dll.config View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
</configuration>

BIN
BWPClientForTianRou/KeyPad/bin/Debug/KeyPad.pdb View File


BIN
BWPClientForTianRou/KeyPad/obj/Debug/DesignTimeResolveAssemblyReferences.cache View File


BIN
BWPClientForTianRou/KeyPad/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache View File


+ 62
- 0
BWPClientForTianRou/KeyPad/obj/Debug/GeneratedInternalTypeHelper.g.cs View File

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18063
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

+ 62
- 0
BWPClientForTianRou/KeyPad/obj/Debug/GeneratedInternalTypeHelper.g.i.cs View File

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18063
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

BIN
BWPClientForTianRou/KeyPad/obj/Debug/KeyPad.Properties.Resources.resources View File


+ 30
- 0
BWPClientForTianRou/KeyPad/obj/Debug/KeyPad.csproj.FileListAbsolute.txt View File

@ -0,0 +1,30 @@
E:\BWPB3\src\B3HRClient\KeyPad\bin\Debug\KeyPad.dll.config
E:\BWPB3\src\B3HRClient\KeyPad\bin\Debug\KeyPad.dll
E:\BWPB3\src\B3HRClient\KeyPad\bin\Debug\KeyPad.pdb
E:\BWPB3\src\B3HRClient\KeyPad\obj\Debug\Keypad.baml
E:\BWPB3\src\B3HRClient\KeyPad\obj\Debug\Keypad.g.cs
E:\BWPB3\src\B3HRClient\KeyPad\obj\Debug\VirtualKeyboard.g.cs
E:\BWPB3\src\B3HRClient\KeyPad\obj\Debug\GeneratedInternalTypeHelper.g.cs
E:\BWPB3\src\B3HRClient\KeyPad\obj\Debug\KeyPad_MarkupCompile.cache
E:\BWPB3\src\B3HRClient\KeyPad\obj\Debug\KeyPad_MarkupCompile.lref
E:\BWPB3\src\B3HRClient\KeyPad\obj\Debug\VirtualKeyboard.baml
E:\BWPB3\src\B3HRClient\KeyPad\obj\Debug\KeyPad.g.resources
E:\BWPB3\src\B3HRClient\KeyPad\obj\Debug\KeyPad.Properties.Resources.resources
E:\BWPB3\src\B3HRClient\KeyPad\obj\Debug\KeyPad.csproj.GenerateResource.Cache
E:\BWPB3\src\B3HRClient\KeyPad\obj\Debug\KeyPad.dll
E:\BWPB3\src\B3HRClient\KeyPad\obj\Debug\KeyPad.pdb
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\bin\Debug\KeyPad.dll.config
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\bin\Debug\KeyPad.dll
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\bin\Debug\KeyPad.pdb
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\Keypad.baml
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\Keypad.g.cs
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\VirtualKeyboard.g.cs
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\GeneratedInternalTypeHelper.g.cs
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\KeyPad_MarkupCompile.cache
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\KeyPad_MarkupCompile.lref
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\VirtualKeyboard.baml
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\KeyPad.g.resources
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\KeyPad.Properties.Resources.resources
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\KeyPad.csproj.GenerateResource.Cache
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\KeyPad.dll
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\KeyPad.pdb

BIN
BWPClientForTianRou/KeyPad/obj/Debug/KeyPad.csproj.GenerateResource.Cache View File


BIN
BWPClientForTianRou/KeyPad/obj/Debug/KeyPad.dll View File


BIN
BWPClientForTianRou/KeyPad/obj/Debug/KeyPad.g.resources View File


BIN
BWPClientForTianRou/KeyPad/obj/Debug/KeyPad.pdb View File


+ 20
- 0
BWPClientForTianRou/KeyPad/obj/Debug/KeyPad_MarkupCompile.cache View File

@ -0,0 +1,20 @@
KeyPad
library
C#
.cs
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\
KeyPad
none
false
DEBUG;TRACE
2-823579839
6172285671
12-1381780322
Keypad.xaml;VirtualKeyboard.xaml;
False

+ 20
- 0
BWPClientForTianRou/KeyPad/obj/Debug/KeyPad_MarkupCompile.i.cache View File

@ -0,0 +1,20 @@
KeyPad
library
C#
.cs
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\
KeyPad
none
false
DEBUG;TRACE
2-823579839
71184260995
12-1381780322
Keypad.xaml;VirtualKeyboard.xaml;
False

+ 4
- 0
BWPClientForTianRou/KeyPad/obj/Debug/KeyPad_MarkupCompile.lref View File

@ -0,0 +1,4 @@
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\Debug\GeneratedInternalTypeHelper.g.cs
FE:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\VirtualKeyboard.xaml;;

BIN
BWPClientForTianRou/KeyPad/obj/Debug/Keypad.baml View File


+ 112
- 0
BWPClientForTianRou/KeyPad/obj/Debug/Keypad.g.cs View File

@ -0,0 +1,112 @@
#pragma checksum "..\..\Keypad.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "0EA72944CB3E823C356985C496EF3095"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18063
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace KeyPad {
/// <summary>
/// Keypad
/// </summary>
public partial class Keypad : System.Windows.Window, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
#line 50 "..\..\Keypad.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button button9;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/KeyPad;component/keypad.xaml", System.UriKind.Relative);
#line 1 "..\..\Keypad.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 2:
this.button9 = ((System.Windows.Controls.Button)(target));
return;
}
this._contentLoaded = true;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
System.Windows.EventSetter eventSetter;
switch (connectionId)
{
case 1:
eventSetter = new System.Windows.EventSetter();
eventSetter.Event = System.Windows.Controls.Primitives.ButtonBase.ClickEvent;
#line 17 "..\..\Keypad.xaml"
eventSetter.Handler = new System.Windows.RoutedEventHandler(this.button_Click);
#line default
#line hidden
((System.Windows.Style)(target)).Setters.Add(eventSetter);
break;
}
}
}
}

+ 112
- 0
BWPClientForTianRou/KeyPad/obj/Debug/Keypad.g.i.cs View File

@ -0,0 +1,112 @@
#pragma checksum "..\..\Keypad.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "0EA72944CB3E823C356985C496EF3095"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18063
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace KeyPad {
/// <summary>
/// Keypad
/// </summary>
public partial class Keypad : System.Windows.Window, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
#line 50 "..\..\Keypad.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button button9;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/KeyPad;component/keypad.xaml", System.UriKind.Relative);
#line 1 "..\..\Keypad.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 2:
this.button9 = ((System.Windows.Controls.Button)(target));
return;
}
this._contentLoaded = true;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
System.Windows.EventSetter eventSetter;
switch (connectionId)
{
case 1:
eventSetter = new System.Windows.EventSetter();
eventSetter.Event = System.Windows.Controls.Primitives.ButtonBase.ClickEvent;
#line 17 "..\..\Keypad.xaml"
eventSetter.Handler = new System.Windows.RoutedEventHandler(this.button_Click);
#line default
#line hidden
((System.Windows.Style)(target)).Setters.Add(eventSetter);
break;
}
}
}
}

BIN
BWPClientForTianRou/KeyPad/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll View File


BIN
BWPClientForTianRou/KeyPad/obj/Debug/VirtualKeyboard.baml View File


+ 146
- 0
BWPClientForTianRou/KeyPad/obj/Debug/VirtualKeyboard.g.cs View File

@ -0,0 +1,146 @@
#pragma checksum "..\..\VirtualKeyboard.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "3DA23B3C5AF81CB9225955DAE2A7B0E1"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18063
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using KeyPad.Converter;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace KeyPad {
/// <summary>
/// VirtualKeyboard
/// </summary>
public partial class VirtualKeyboard : System.Windows.Window, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
#line 7 "..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal KeyPad.VirtualKeyboard Keyboard;
#line default
#line hidden
#line 70 "..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Grid AlfaKeyboard;
#line default
#line hidden
#line 73 "..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.RowDefinition NumberKeys;
#line default
#line hidden
#line 193 "..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Grid NumKeyboard;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/KeyPad;component/virtualkeyboard.xaml", System.UriKind.Relative);
#line 1 "..\..\VirtualKeyboard.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
this.Keyboard = ((KeyPad.VirtualKeyboard)(target));
return;
case 3:
this.AlfaKeyboard = ((System.Windows.Controls.Grid)(target));
return;
case 4:
this.NumberKeys = ((System.Windows.Controls.RowDefinition)(target));
return;
case 5:
this.NumKeyboard = ((System.Windows.Controls.Grid)(target));
return;
}
this._contentLoaded = true;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
System.Windows.EventSetter eventSetter;
switch (connectionId)
{
case 2:
eventSetter = new System.Windows.EventSetter();
eventSetter.Event = System.Windows.Controls.Primitives.ButtonBase.ClickEvent;
#line 17 "..\..\VirtualKeyboard.xaml"
eventSetter.Handler = new System.Windows.RoutedEventHandler(this.button_Click);
#line default
#line hidden
((System.Windows.Style)(target)).Setters.Add(eventSetter);
break;
}
}
}
}

+ 146
- 0
BWPClientForTianRou/KeyPad/obj/Debug/VirtualKeyboard.g.i.cs View File

@ -0,0 +1,146 @@
#pragma checksum "..\..\VirtualKeyboard.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "3DA23B3C5AF81CB9225955DAE2A7B0E1"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18063
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using KeyPad.Converter;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace KeyPad {
/// <summary>
/// VirtualKeyboard
/// </summary>
public partial class VirtualKeyboard : System.Windows.Window, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
#line 7 "..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal KeyPad.VirtualKeyboard Keyboard;
#line default
#line hidden
#line 70 "..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Grid AlfaKeyboard;
#line default
#line hidden
#line 73 "..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.RowDefinition NumberKeys;
#line default
#line hidden
#line 193 "..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Grid NumKeyboard;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/KeyPad;component/virtualkeyboard.xaml", System.UriKind.Relative);
#line 1 "..\..\VirtualKeyboard.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
this.Keyboard = ((KeyPad.VirtualKeyboard)(target));
return;
case 3:
this.AlfaKeyboard = ((System.Windows.Controls.Grid)(target));
return;
case 4:
this.NumberKeys = ((System.Windows.Controls.RowDefinition)(target));
return;
case 5:
this.NumKeyboard = ((System.Windows.Controls.Grid)(target));
return;
}
this._contentLoaded = true;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
System.Windows.EventSetter eventSetter;
switch (connectionId)
{
case 2:
eventSetter = new System.Windows.EventSetter();
eventSetter.Event = System.Windows.Controls.Primitives.ButtonBase.ClickEvent;
#line 17 "..\..\VirtualKeyboard.xaml"
eventSetter.Handler = new System.Windows.RoutedEventHandler(this.button_Click);
#line default
#line hidden
((System.Windows.Style)(target)).Setters.Add(eventSetter);
break;
}
}
}
}

BIN
BWPClientForTianRou/KeyPad/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache View File


BIN
BWPClientForTianRou/KeyPad/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache View File


+ 62
- 0
BWPClientForTianRou/KeyPad/obj/x86/Debug/GeneratedInternalTypeHelper.g.cs View File

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18063
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

+ 62
- 0
BWPClientForTianRou/KeyPad/obj/x86/Debug/GeneratedInternalTypeHelper.g.i.cs View File

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18063
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

BIN
BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad.Properties.Resources.resources View File


+ 15
- 0
BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad.csproj.FileListAbsolute.txt View File

@ -0,0 +1,15 @@
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\bin\Debug\KeyPad.dll.config
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\bin\Debug\KeyPad.dll
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\bin\Debug\KeyPad.pdb
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\x86\Debug\Keypad.baml
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\x86\Debug\Keypad.g.cs
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\x86\Debug\VirtualKeyboard.g.cs
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\x86\Debug\GeneratedInternalTypeHelper.g.cs
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\x86\Debug\KeyPad_MarkupCompile.cache
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\x86\Debug\KeyPad_MarkupCompile.lref
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\x86\Debug\VirtualKeyboard.baml
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\x86\Debug\KeyPad.g.resources
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\x86\Debug\KeyPad.Properties.Resources.resources
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\x86\Debug\KeyPad.csproj.GenerateResource.Cache
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\x86\Debug\KeyPad.dll
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\x86\Debug\KeyPad.pdb

BIN
BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad.csproj.GenerateResource.Cache View File


BIN
BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad.dll View File


BIN
BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad.g.resources View File


BIN
BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad.pdb View File


+ 20
- 0
BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad_MarkupCompile.cache View File

@ -0,0 +1,20 @@
KeyPad
library
C#
.cs
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\x86\Debug\
KeyPad
none
false
DEBUG;TRACE
2-823579839
6172285671
12-1381780322
Keypad.xaml;VirtualKeyboard.xaml;
False

+ 20
- 0
BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad_MarkupCompile.i.cache View File

@ -0,0 +1,20 @@
KeyPad
library
C#
.cs
E:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\obj\x86\Debug\
KeyPad
none
false
DEBUG;TRACE
2-823579839
71184260995
12-1381780322
Keypad.xaml;VirtualKeyboard.xaml;
False

+ 4
- 0
BWPClientForTianRou/KeyPad/obj/x86/Debug/KeyPad_MarkupCompile.lref View File

@ -0,0 +1,4 @@

FE:\BWPB3\src\其他\天肉客户端\BWPClientForTianRou\BWPClientForTianRou\KeyPad\VirtualKeyboard.xaml;;

BIN
BWPClientForTianRou/KeyPad/obj/x86/Debug/Keypad.baml View File


+ 112
- 0
BWPClientForTianRou/KeyPad/obj/x86/Debug/Keypad.g.cs View File

@ -0,0 +1,112 @@
#pragma checksum "..\..\..\Keypad.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "0EA72944CB3E823C356985C496EF3095"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18063
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace KeyPad {
/// <summary>
/// Keypad
/// </summary>
public partial class Keypad : System.Windows.Window, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
#line 50 "..\..\..\Keypad.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button button9;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/KeyPad;component/keypad.xaml", System.UriKind.Relative);
#line 1 "..\..\..\Keypad.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 2:
this.button9 = ((System.Windows.Controls.Button)(target));
return;
}
this._contentLoaded = true;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
System.Windows.EventSetter eventSetter;
switch (connectionId)
{
case 1:
eventSetter = new System.Windows.EventSetter();
eventSetter.Event = System.Windows.Controls.Primitives.ButtonBase.ClickEvent;
#line 17 "..\..\..\Keypad.xaml"
eventSetter.Handler = new System.Windows.RoutedEventHandler(this.button_Click);
#line default
#line hidden
((System.Windows.Style)(target)).Setters.Add(eventSetter);
break;
}
}
}
}

+ 112
- 0
BWPClientForTianRou/KeyPad/obj/x86/Debug/Keypad.g.i.cs View File

@ -0,0 +1,112 @@
#pragma checksum "..\..\..\Keypad.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "0EA72944CB3E823C356985C496EF3095"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18063
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace KeyPad {
/// <summary>
/// Keypad
/// </summary>
public partial class Keypad : System.Windows.Window, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
#line 50 "..\..\..\Keypad.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button button9;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/KeyPad;component/keypad.xaml", System.UriKind.Relative);
#line 1 "..\..\..\Keypad.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 2:
this.button9 = ((System.Windows.Controls.Button)(target));
return;
}
this._contentLoaded = true;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
System.Windows.EventSetter eventSetter;
switch (connectionId)
{
case 1:
eventSetter = new System.Windows.EventSetter();
eventSetter.Event = System.Windows.Controls.Primitives.ButtonBase.ClickEvent;
#line 17 "..\..\..\Keypad.xaml"
eventSetter.Handler = new System.Windows.RoutedEventHandler(this.button_Click);
#line default
#line hidden
((System.Windows.Style)(target)).Setters.Add(eventSetter);
break;
}
}
}
}

BIN
BWPClientForTianRou/KeyPad/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll View File


BIN
BWPClientForTianRou/KeyPad/obj/x86/Debug/VirtualKeyboard.baml View File


+ 146
- 0
BWPClientForTianRou/KeyPad/obj/x86/Debug/VirtualKeyboard.g.cs View File

@ -0,0 +1,146 @@
#pragma checksum "..\..\..\VirtualKeyboard.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "3DA23B3C5AF81CB9225955DAE2A7B0E1"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18063
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using KeyPad.Converter;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace KeyPad {
/// <summary>
/// VirtualKeyboard
/// </summary>
public partial class VirtualKeyboard : System.Windows.Window, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
#line 7 "..\..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal KeyPad.VirtualKeyboard Keyboard;
#line default
#line hidden
#line 70 "..\..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Grid AlfaKeyboard;
#line default
#line hidden
#line 73 "..\..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.RowDefinition NumberKeys;
#line default
#line hidden
#line 193 "..\..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Grid NumKeyboard;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/KeyPad;component/virtualkeyboard.xaml", System.UriKind.Relative);
#line 1 "..\..\..\VirtualKeyboard.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
this.Keyboard = ((KeyPad.VirtualKeyboard)(target));
return;
case 3:
this.AlfaKeyboard = ((System.Windows.Controls.Grid)(target));
return;
case 4:
this.NumberKeys = ((System.Windows.Controls.RowDefinition)(target));
return;
case 5:
this.NumKeyboard = ((System.Windows.Controls.Grid)(target));
return;
}
this._contentLoaded = true;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
System.Windows.EventSetter eventSetter;
switch (connectionId)
{
case 2:
eventSetter = new System.Windows.EventSetter();
eventSetter.Event = System.Windows.Controls.Primitives.ButtonBase.ClickEvent;
#line 17 "..\..\..\VirtualKeyboard.xaml"
eventSetter.Handler = new System.Windows.RoutedEventHandler(this.button_Click);
#line default
#line hidden
((System.Windows.Style)(target)).Setters.Add(eventSetter);
break;
}
}
}
}

+ 146
- 0
BWPClientForTianRou/KeyPad/obj/x86/Debug/VirtualKeyboard.g.i.cs View File

@ -0,0 +1,146 @@
#pragma checksum "..\..\..\VirtualKeyboard.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "3DA23B3C5AF81CB9225955DAE2A7B0E1"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18063
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using KeyPad.Converter;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace KeyPad {
/// <summary>
/// VirtualKeyboard
/// </summary>
public partial class VirtualKeyboard : System.Windows.Window, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
#line 7 "..\..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal KeyPad.VirtualKeyboard Keyboard;
#line default
#line hidden
#line 70 "..\..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Grid AlfaKeyboard;
#line default
#line hidden
#line 73 "..\..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.RowDefinition NumberKeys;
#line default
#line hidden
#line 193 "..\..\..\VirtualKeyboard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Grid NumKeyboard;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/KeyPad;component/virtualkeyboard.xaml", System.UriKind.Relative);
#line 1 "..\..\..\VirtualKeyboard.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
this.Keyboard = ((KeyPad.VirtualKeyboard)(target));
return;
case 3:
this.AlfaKeyboard = ((System.Windows.Controls.Grid)(target));
return;
case 4:
this.NumberKeys = ((System.Windows.Controls.RowDefinition)(target));
return;
case 5:
this.NumKeyboard = ((System.Windows.Controls.Grid)(target));
return;
}
this._contentLoaded = true;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
System.Windows.EventSetter eventSetter;
switch (connectionId)
{
case 2:
eventSetter = new System.Windows.EventSetter();
eventSetter.Event = System.Windows.Controls.Primitives.ButtonBase.ClickEvent;
#line 17 "..\..\..\VirtualKeyboard.xaml"
eventSetter.Handler = new System.Windows.RoutedEventHandler(this.button_Click);
#line default
#line hidden
((System.Windows.Style)(target)).Setters.Add(eventSetter);
break;
}
}
}
}

+ 144
- 0
BWPClientForTianRou/LoginForm.Designer.cs View File

@ -0,0 +1,144 @@
namespace BWPClientForTianRou {
partial class LoginForm {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginForm));
this.btnLogin = new System.Windows.Forms.Button();
this.btnEmpty = new System.Windows.Forms.Button();
this.txtPassWord = new System.Windows.Forms.TextBox();
this.txtUserName = new System.Windows.Forms.TextBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.password = new System.Windows.Forms.Label();
this.userName = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// btnLogin
//
this.btnLogin.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLogin.Location = new System.Drawing.Point(106, 285);
this.btnLogin.Name = "btnLogin";
this.btnLogin.Size = new System.Drawing.Size(128, 40);
this.btnLogin.TabIndex = 12;
this.btnLogin.Text = "登 录";
this.btnLogin.UseVisualStyleBackColor = true;
this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
//
// btnEmpty
//
this.btnEmpty.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnEmpty.Location = new System.Drawing.Point(276, 285);
this.btnEmpty.Name = "btnEmpty";
this.btnEmpty.Size = new System.Drawing.Size(128, 40);
this.btnEmpty.TabIndex = 13;
this.btnEmpty.Text = "清 除";
this.btnEmpty.UseVisualStyleBackColor = true;
this.btnEmpty.Click += new System.EventHandler(this.btnEmpty_Click);
//
// txtPassWord
//
this.txtPassWord.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPassWord.Location = new System.Drawing.Point(188, 213);
this.txtPassWord.Multiline = true;
this.txtPassWord.Name = "txtPassWord";
this.txtPassWord.PasswordChar = '*';
this.txtPassWord.Size = new System.Drawing.Size(255, 35);
this.txtPassWord.TabIndex = 11;
this.txtPassWord.Click += new System.EventHandler(this.txtPassWord_Click);
//
// txtUserName
//
this.txtUserName.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUserName.Location = new System.Drawing.Point(188, 141);
this.txtUserName.Multiline = true;
this.txtUserName.Name = "txtUserName";
this.txtUserName.Size = new System.Drawing.Size(255, 35);
this.txtUserName.TabIndex = 10;
this.txtUserName.Click += new System.EventHandler(this.txtUserName_Click);
this.txtUserName.TextChanged += new System.EventHandler(this.txtUserName_TextChanged);
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(207, 13);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(96, 96);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 9;
this.pictureBox1.TabStop = false;
//
// password
//
this.password.AutoSize = true;
this.password.Font = new System.Drawing.Font("宋体", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.password.Location = new System.Drawing.Point(68, 213);
this.password.Name = "password";
this.password.Size = new System.Drawing.Size(103, 35);
this.password.TabIndex = 8;
this.password.Text = "密 码";
//
// userName
//
this.userName.AutoSize = true;
this.userName.Font = new System.Drawing.Font("宋体", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.userName.ForeColor = System.Drawing.Color.Black;
this.userName.Location = new System.Drawing.Point(68, 141);
this.userName.Name = "userName";
this.userName.Size = new System.Drawing.Size(103, 35);
this.userName.TabIndex = 7;
this.userName.Text = "用 户";
//
// LoginForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(510, 425);
this.Controls.Add(this.btnLogin);
this.Controls.Add(this.btnEmpty);
this.Controls.Add(this.txtPassWord);
this.Controls.Add(this.txtUserName);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.password);
this.Controls.Add(this.userName);
this.Name = "LoginForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Login";
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnLogin;
private System.Windows.Forms.Button btnEmpty;
private System.Windows.Forms.TextBox txtPassWord;
private System.Windows.Forms.TextBox txtUserName;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label password;
private System.Windows.Forms.Label userName;
}
}

+ 99
- 0
BWPClientForTianRou/LoginForm.cs View File

@ -0,0 +1,99 @@
using System;
using System.IO;
using System.Windows.Forms;
using BLUtil;
using Forks.Utils.IO;
using KeyPad;
namespace BWPClientForTianRou {
public partial class LoginForm : Form {
public LoginForm() {
InitializeComponent();
using (TextReader reader = FS.OpenReader(ConfigUtil.ConfigFilePath, true)) {
NutFile nutFile = NutFile.Parse(reader);
txtUserName.Text = nutFile.AsString(ConfigUtil.LastUser, "");
}
}
protected override void OnClosed(EventArgs e) {
base.OnClosed(e);
Environment.Exit(0);
}
private void Form1_Load(object sender, EventArgs e) {
txtUserName.LostFocus += txtUserName_LostFocus;
txtUserName.Leave += txtUserName_LostFocus;
}
private bool hasName = false;
void txtUserName_LostFocus(object sender, EventArgs e) {
if (hasName)
return;
string errorInfo;
var name = RpcUtil.OnLineLoadNameByCode(txtUserName.Text, out errorInfo);
if (!string.IsNullOrEmpty(name)) {
txtUserName.Text = name;
hasName = true;
}
if (!string.IsNullOrEmpty(errorInfo))
MessageBox.Show(errorInfo);
}
private void txtUserName_Click(object sender, EventArgs e) {
ShowKeyBoad(txtUserName);
}
private void txtPassWord_Click(object sender, EventArgs e) {
ShowKeyBoad(txtPassWord);
}
private void ShowKeyBoad(TextBox box) {
var virtualKeyboard = new VirtualKeyboard();
if (virtualKeyboard.ShowDialog() == true) {
if (!string.IsNullOrEmpty(virtualKeyboard.Result))
box.Text = virtualKeyboard.Result;
}
}
private void btnEmpty_Click(object sender, EventArgs e) {
txtUserName.Text = "";
txtPassWord.Text = "";
txtUserName.Focus();
}
private void btnLogin_Click(object sender, EventArgs e) {
if (txtUserName.Text == "") {
MessageBox.Show(@"用户名不能为空!");
return;
}
ConfigUtil.Init();
DbUtil.Init();
string errorInfo;
var success = RpcUtil.Login(txtUserName.Text, txtPassWord.Text, out errorInfo);
if (!success)
if (!string.IsNullOrEmpty(errorInfo) && errorInfo != "无法连接到远程服务器") {
MessageBox.Show(errorInfo);
return;
}
Hide();
EncodeString.UserName = txtUserName.Text;
EncodeString.Password = txtPassWord.Text;
using (var reader = FS.OpenReader(ConfigUtil.ConfigFilePath)) {
var nutFile = NutFile.Parse(reader);
nutFile.SetValue(ConfigUtil.LastUser, txtUserName.Text);
using (var writer = FS.OpenWriter(ConfigUtil.ConfigFilePath)) {
nutFile.Write(writer);
}
}
var form = new MainForm();
form.ShowDialog();
}
private void txtUserName_TextChanged(object sender, EventArgs e) {
hasName = false;
}
}
}

+ 206
- 0
BWPClientForTianRou/LoginForm.resx View File

@ -0,0 +1,206 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAABJtSURBVHhe7V3bkdxGEpQJZ4JMOA90Hkge7HkgekB5QHrA/ROPP+QXlnE/Sw8kDygPuB7cZfbU
rIazNQC6+oFqoDIigwxy0Kh+1LMbwA+BQCAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFA
IBAIBAKBQOB7fHx8/MeHafqJ/M/Dw+tnTtPH9w8Pj3Pkby6vObfDNqX5QGAMfPjvf//5/vPnn7mQZXH/
gb//rylxj3Qv3hP3pgwiTiCwHWjBv1MGbfFuyEulCW8T6IIUIk3Tmy6eoTYpM2RnH6Q7gUA5aIFhjd9h
cX1TF96IRF/YJ/ZNuhkIrMfvDw//2p1S3KIoC/ss3Q8EXkJyil+xWL6qC+kAZN85BpGzBJ6RKk/0FsqC
OTI5JlEROzAkjHJXffJGjlGEXwdCKIaNoSg7RyhGHYai7AyYzB9DMRpwmj5ybGWYA6OBlRhMJM8v6RPs
iO+n6S8suC+XTP+m/NYhX0fVazBggf0Cbr6HcV74+PMt+IqhSYnV5bVsg22xTTeKxLHGmIuYAa9IXuN0
+lWfyIaUhXr/4eHh31uUR3lP3psybKY0GPvwJk5BC5YsmTZxbfiE3OYTF6XHWJwyUTbKSFmvZG/H8Ca+
0NlrPDG0GXEDLW2IMizrpCxQzHfhTTZGmvQ+R0Pu92QV2ZfUJ72v1ci5GdGY7AI8M6RNSjUiAWaIsmcr
yL6lvIWVM20MKpH3kFsGWoOTSvetTUQVYrGwUiS3OwzY55aKEiFXB3CAMYltHlY6qGJco6miYO5CSRqB
sSwGuHqVCpbtUyjGS7RSlMhLGkAmq6pycK8gFGMZHKPq+yqYyxj7SkhJpDbIdrLM+Zs0H1gJjpmMnTam
JkbyXojayiHhVBywM4JjxzHUxtbKUBIjKivHU7j0ekCIxH2Uat4klCQTVZUDiWZUTupDKorVkvhQkpWo
7Dki12gMjvHVmJsZSrKAisoRIVVHcKw55ldzYGIoyQ2kfQ5lwLIZIdUmqBlyxT7JFSpuAt5Lk4GNwDm4
mpN8Yi2Ekghoebi7qg5UHiPfcAI5Vq/N0XrGsZQTOBDqAGUw4lZ/qJJPYm1Ic8cEPEfxqdxQDr+ooST0
RtLcsVBh8J4iTvWPGhWuwxnBGkn5qGVcxtXyKbY7MH18Z478DX878mfXMNfceVfncRWPlLRLObAo7xjN
ovA7HOhznQ/vsA20Ndq3PYojhqPkI6UVjlGUgx4OHqDtN0bQNu8xinUtVZLd5yOY0CJXO8IAQc47LNru
3xiRe96JGG4BGYv2SXZ7QqLCfofrTUDIt4liXHMERYF8ZiVh/3a5P1ISWmFQ/pRm3EEKDu4+6okxe/Qc
enFONbnXcHehlpT61M6uIA8eunzICYrxRpHXFyGjiOsKnFPIZy7/7irUErevdnSRDl/YlibXode4Scjq
0chwblV513AvVS24w1dqB1fQoytNlZiWlalWpMwOjU1R6I21Jc2MCdnzMC0mj3lHcS3fAT2Wyc35CNbW
0Ak7OmGtVrjLOyDTEB/jWUO+tlW65QIl+ciwCbt0Wu3UEr1ZOchU7bFSL/Q2xiWhuMf8ahEQ3OY9pumL
NOECXcIqPomnUfttRbozRPY+j/WgXJH3cFS7x4SVHbJTCEv5V0pM0faa+FnyuF94Da/V2iyio8Q97Slp
Mq7gUF4EApu8BxeBNLE5kpLXrVbd11B+WURFxzW+I/roaXEl46HJucwxvEiB93jyVJHAwqm1z3HfYgHK
ONdRFEd7CsljGhN2T4p+ExDUmnu4cfWQpzgpZ+myR7iYPEqdfMXNM/0FeZ9vLyLarwk+S097HiVx8AW7
Lzbe80qGbDoLtUz5lqco5AUgoGmSPFVToKx8ik+VcwWftuwLvTBluJJpNdl3aWpzFHgRv2+3wQBnn7mi
pZDLN0fBpJAunpEXD2h/BtxRqGvxIlyDcrkviPVShZ6jM+9hPVTp6gUSJUqyCy/iSMmfgYHN/m7EXryH
JyU/o6Q/yEXcHCU3epFPcrkPSMlRFXaOzryHKffABLo9C0TZNJmXuAcv4qrki4nIPkfjynsYK1dYSG6f
dDyDMmqyL9HTAoM82eEi16Rcvj0Q82VvqnmyvFZL6ykUuQXKqMm+xOHnx8vmpzm8cpTUwspakvNhDshR
1ivZF8kxkcs3h9XDu/CCdGWacHP0FJoMPfgrsRMjlh0qcm3K5dvBGF65iQ8hT/bmJibLV5VkBSB3vhdx
NE8WQ4y1ue2jE9ajJZ6sLwdRk3GWHuvsC6DMal9m6MkQWL3gpkdPLCU4b9ZXk3GBT3LpcKDsV32Z5zR9
k0tdgGtHlXOOWxozCJDttj3tfVjyjxHDqzMgf/Z8efL2xj2R7YopWCzZ1R9PAw5ZskugnhQ8F5YFxjGS
yzeHJcziGpXL+8IorKuNNciUnaB7WjC5sBgET4k6AXmyj55wrcrl/WBK+hxtPhGQKVtB5NJhofVpga6O
j3MNKTLOc4s8ZBhBZwCZsmNyuXRYoA+5xzZcKcgwhhmCZpdHvT3tld2HrevqFZDbZ29FCdPWwhbzpgoy
Q2/5BxEKsoIO+8y1pMo6Q7m0D0wJurP8gwgFWUGPCmII77sm6hi07DjQY3mU4YMm6006ej2OFbkK4tGw
QSbLsZN++S9uuIvyKOSKKtYy3b0EwVKuBvv1AzfLrv54fB0L5MpWEI/9WAtTgutQQYz96LejnuumQZfn
lyBXbBQukOGMXO4Kmqyz7JlLIXbPO2LiMNEj9rRg1sASu3s1CNm5VM8jJ5oAC3T59N0wNfVKyC5KgHKp
O0A2n5u8e4ljz4BVzT7bM2IeYpk37jfI5e4A+Xzmj6YKgrMjJpewWNURT/RaTvJybORyd3B7MtmiIF7j
WMISl2PhuHlv1FpQZq0vc/RsCNyuw70pCGQzPcrpuU/XsMwZ6TmUdLsOcaPdlUYZa2tyz3EkL2LxHt6L
ERYF6VKBxI32pyCGMIscIRexxOpkl8VUAIuCgO2LRbzJ1U0X6b3qg8E2hVmwsq4/ZJ8qV8bvLHJMpBmX
SH1T5F6gTwWRS10DcmbX1UnPoZYptDpxiLdGKnIvMRTECrMXARGO+DvKb5inM717jzM02RcYClICJqaa
/GvoKR+x5h3Ckd45rMk/x1CQEhgTv2d6UJJC5XD1Pt4laPIvMJL0UjBc0vqwmtP0RprqDt5blWklPYaK
t7CrJJ2WWS53Dxl4+0cwQSbHPY0C71WQkCdCOf4ayZAZvX17BbG48JEUhIAlNn2Q9DtO07f3nz//Kk02
A+/Be6ky5NDxeTkNJgXp0UeLYKMpCAG5TWXfa4plv5Nmq4FtYsKzPz1xg8Mk5me4XYdHURAJW0zf99OI
tr7S2mMszCVUXss22JZ2DwvZR2l+KLhdh8YvMrWP/RqACxKyF+UjKmn5kVBjsf88VzXi//E3/G1Fb3HJ
p5HyjktA9uxcuFuFTrv5AodUEEIMQn0l2Z5P3RZMA0B+v9sN2s1nOfBjqsQOlWRo5SC4ppR+zVIubY9s
4QZXEGJHSjK8chCu16Br7W2IHSjJLpSDUPo2z64KYoj/Sqo3npAqSRWrW71ImUdNyK8hxRO1nzPslwfz
YRpFgHkOthG1hOIjKR050hGSNeBa0vo5R65Zubw9WE/WhFjgsJUsDSncalN6rcvTLvvrvXhwAv3xf9xJ
E2KWO0jUk2vn/kXFjbquhEKXblZ6ANeS2r8ZyqX9wMNtmiA3CUsmlw6FtKN+Ou/k31tkEEr+yE1I6eZQ
4FrS+nSLXKtyaT9ggPNfuDZQBYWKAZlf507GaBRvWP2sWCtIJVHtyy1yrcrl/cCkRxNmjp6eursFhh8Y
0Hd7V4wXlFzFe6XLsu66JuhnMOnRhJnjJpq8EimUomIoch+KoigyLO7ANfRC5gV2T9DP0IRZolzqCpBr
96FULrEQv2JM3JXmNVmXKJf2BwYwu5rgadBpWdJC0OQMJmJ8Hr3kjlw7moyz3LJ6CgGy69Hg5g/nSDhV
9IjqAbl52AUZsh9i2yT/OMNYUej3pR8FyQo5CqcwHn/Syt0iS5TadZtwmv7Y0ptYvP3m3g9CZB/e2yJp
2jQJPy30t7Rm7Lt10ngtiTbpue+Tcmn3a0zuC4lI3SD9VuW5RRoXuXw7QBDLs9tdwywuSIv1MfIJ9/pE
ZehlvZ6Vhl5Hl6k60ceub27BPd2vMxWYFNMbQHoNbumL1NaQlooeggtVbrspZE64oNoezUeo2sMIcK2o
91+il4IQhMmeiB6bhhigohepreC9F6W4hWQgWnoWKknjuTQaOT+fHocw+e4PCZ9cXh3J4kzTR/W+hRRv
8apneFEDUOQf6eXQh1ZepVmVi2tFud8S/bzKCB0whVkt3LMoR/WDhVSMHl6vNSRcYZJfXVFYBJHbVIMl
OU/0El6dwQWkCjrPqlpOhcPAVC3h7kUxrtFKUWorCYsB2n3myDmTy/0Aglk2Das9ittAObhwdvWQlwZR
FEuF6CZrKQnXhtb+Cvqbt4LOFHsRTjImpVoZF219YpvS/CFAA4N+13yTZLGSoB2T4tYyutXBhaUJvMSS
DiULWC/neHIXu3YGxsAUCWgsURKrweUalCb8AZ2yJVRGL1JTOTiwR/Mat1DTm1iVBNdavYfrsrs1Wc/2
IlWVY8sDbU6RxrdSboLxzXqrSsonlXaW6DI5v4ZxU4eWJutrsbRMWjuZ3M2L1FpB5rO40pVTCeRa0NpY
4jDVRqsXWRv/0+Kr12eQIUSEVOsgFr1cSVYYI7OBHcF7nFHgRb4uLVoqkXZtFqfpSyhHHhgC06io47mW
0/RtLpTmnHANqNcucBjvcYbZi8zUsJMlK9/r8HMEYTDIAi5VkptHjPD/pgraUN7jDKsXIW+5Yg6u9vsM
hnIUooqSKEZQwjjtt4scznucUZCLvLAy+PfS+nwoRyXUUJLrcqzV+A3pPc7gIGidWslnK1NiXUhMpt/N
o0FRqiS49jnfxCI3vwj8WtGGAyyD+VkEdp6DWBJacRLPExGoizQ3BdUtzM27IiOKtSWijAsMgPWMVrIy
HETt/9YwlKM9xLvbS8AFRReuLRFjbJS40ALGJmAnYJGXl97zuZ+T1rTi5oTdyGErG4MCY17tkOMSuZZ2
FxkUxZqZpMeS2wY6oiTfzCHXktxyX+gRajHvkNsFOkPyzeIjKXPctfHrEWpF3rEtWuYjuwytrlG6p7HA
/SRuAwNe3PTg3BIPY/zQ2eoJHa2LNB/YGLTymJPaodaxjF/thG63iduggMEqfiThmXvYEMxFzXyELl2a
DTgCCybafOXwEHnHLdTKRyIx94cUZpWfvo7N3pJj8WfCUn0NJfEDzgXnRJurHMZmrwButHx/5PS0WuQh
GyNtCNd5gV9UJC+BAanyBo2wOtuhRjQgjGd3NNRI6hKn6Y00GegEjPvrF/NgINeANBm4RqpsVVIStNP1
C0hHBY+XcKy1Ocgl5z7mbAE1lSTFwgd/lWhLcGwr5RuhHDmoqiQg2noXg18PMj/VPogaymFAAyX5GlWu
ctQq4Z4ZylGA2kpCor3wJgbIXFT9jHYoRwVwABHn1n0QB3HzFt/6HhUcq1q5xjMxp6EcFYFBrfoVJBIW
LMKuGXBsOEba2BUy9jlaAAPb5LlnLILHUJS/IYpRpXR7TZ7yldsEWkB2a5s81slFgXDiZ7nV4cC+t1IM
8PBf7+oGqaRUTd4vibYZVtzJ7XYP9lX6rI5HKTlXcZi0M6Sq0uTRzjPTopmmNwg59vGCsgtwwbJvLRWD
5BxFMr4h5Mm1pm/SSJymP1jNGVlZKLtUpKp8um6BT5FvOEHrkOsFTwvsbgRloYyUFePTKrd4Qc5FhFQO
gcnp9na/MxmigNxAu/OwKJKxOHmJj5TtWt4OjOc4PKO7N7nm6YDkR/ydx7/vPkzTTy1icLbJtnmPdC/e
s/ZmXgbDawwGTBq9SfvcZC25e88y8snbUHkumRTpkvy3q9+85rVsY0tFUBi5xqiglcUEVt+BDz7zPipU
OwBdP6xulxcrH4IYywindojfH9ILBUJRrMTYcQxlOAN7RShKJkMxjglOOpLeprvxI5NjE4oROO0wn97N
5afqtR1ZlXrLMZHhCQT+RjotfMTwC32Od4oFVkO8yiuEGdttOjYm+8Y+hrcIFOFCWYbPV9iHUIpAUyAc
+YVx+gjeRbzEW8os4gcCfQFrzC/4/pas84ZKk5Th5OV+o0wiXiDgD0lp+OZBKs7Jgn9JVBZ2FqWd1CbP
m+EeoQyBXYJ5ABf3AiNXCAQCgUAgEAgEAoFAIBAIBAKBQCAQCFTGDz/8H9/6EG0I5Y9PAAAAAElFTkSu
QmCC
</value>
</data>
</root>

+ 364
- 0
BWPClientForTianRou/MainForm.Designer.cs View File

@ -0,0 +1,364 @@
using System.Drawing;
namespace BWPClientForTianRou {
partial class MainForm {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
_mainProcessIsRun = false;
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
this.button1 = new System.Windows.Forms.Button();
this.lblDisplay = new System.Windows.Forms.Label();
this.dataGridView = new System.Windows.Forms.DataGridView();
this.ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Sequence = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DateTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GoodsNameCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GoodsCodeCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.UnitCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DeleteDetail = new System.Windows.Forms.DataGridViewButtonColumn();
this.GoodsIDCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.syncButton = new System.Windows.Forms.Button();
this.tbxSequence = new System.Windows.Forms.TextBox();
this.lblNumber = new System.Windows.Forms.Label();
this.readBt = new System.Windows.Forms.Button();
this.selectStoreBt = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.userLabel = new System.Windows.Forms.Label();
this.storeLable = new System.Windows.Forms.Label();
this.goodsLabel = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// button1
//
this.button1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(346, 4);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(112, 30);
this.button1.TabIndex = 0;
this.button1.Text = "注销";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// lblDisplay
//
this.lblDisplay.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblDisplay.BackColor = System.Drawing.Color.Black;
this.lblDisplay.Font = new System.Drawing.Font("宋体", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblDisplay.ForeColor = System.Drawing.Color.LimeGreen;
this.lblDisplay.Location = new System.Drawing.Point(3, 201);
this.lblDisplay.Name = "lblDisplay";
this.lblDisplay.Size = new System.Drawing.Size(447, 50);
this.lblDisplay.TabIndex = 4;
this.lblDisplay.Text = "24.56";
this.lblDisplay.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// dataGridView
//
this.dataGridView.AllowUserToAddRows = false;
this.dataGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 10F);
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.ID,
this.Sequence,
this.DateTime,
this.GoodsNameCol,
this.GoodsCodeCol,
this.Weight,
this.UnitCol,
this.DeleteDetail,
this.GoodsIDCol});
this.dataGridView.Font = new System.Drawing.Font("宋体", 10F);
this.dataGridView.Location = new System.Drawing.Point(-1, 40);
this.dataGridView.Name = "dataGridView";
this.dataGridView.RowTemplate.Height = 30;
this.dataGridView.Size = new System.Drawing.Size(817, 718);
this.dataGridView.TabIndex = 5;
this.dataGridView.TabStop = false;
//
// ID
//
this.ID.DataPropertyName = "ID";
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
this.ID.DefaultCellStyle = dataGridViewCellStyle2;
this.ID.FillWeight = 0.02F;
this.ID.HeaderText = "ID";
this.ID.Name = "ID";
this.ID.ReadOnly = true;
//
// Sequence
//
this.Sequence.DataPropertyName = "Sequence";
this.Sequence.FillWeight = 0.01F;
this.Sequence.HeaderText = "顺序号";
this.Sequence.Name = "Sequence";
this.Sequence.ReadOnly = true;
//
// DateTime
//
this.DateTime.DataPropertyName = "DateTime";
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle3.Format = "yyyy-MM-dd HH:mm:ss";
this.DateTime.DefaultCellStyle = dataGridViewCellStyle3;
this.DateTime.FillWeight = 0.5F;
this.DateTime.HeaderText = "时间";
this.DateTime.Name = "DateTime";
this.DateTime.ReadOnly = true;
//
// GoodsNameCol
//
this.GoodsNameCol.DataPropertyName = "Goods_Name";
this.GoodsNameCol.FillWeight = 0.5F;
this.GoodsNameCol.HeaderText = "产品";
this.GoodsNameCol.Name = "GoodsNameCol";
//
// GoodsCodeCol
//
this.GoodsCodeCol.DataPropertyName = "Goods_Code";
this.GoodsCodeCol.FillWeight = 0.3F;
this.GoodsCodeCol.HeaderText = "编号";
this.GoodsCodeCol.Name = "GoodsCodeCol";
//
// Weight
//
this.Weight.DataPropertyName = "Weight";
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
dataGridViewCellStyle4.Format = "0.00";
this.Weight.DefaultCellStyle = dataGridViewCellStyle4;
this.Weight.FillWeight = 0.3F;
this.Weight.HeaderText = "重量";
this.Weight.Name = "Weight";
//
// UnitCol
//
this.UnitCol.DataPropertyName = "Unit";
this.UnitCol.FillWeight = 0.2F;
this.UnitCol.HeaderText = "单位";
this.UnitCol.Name = "UnitCol";
//
// DeleteDetail
//
this.DeleteDetail.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.DeleteDetail.FillWeight = 1F;
this.DeleteDetail.HeaderText = "删除";
this.DeleteDetail.Name = "DeleteDetail";
this.DeleteDetail.Text = "删除";
this.DeleteDetail.UseColumnTextForButtonValue = true;
this.DeleteDetail.Width = 41;
//
// GoodsIDCol
//
this.GoodsIDCol.DataPropertyName = "Goods_ID";
this.GoodsIDCol.HeaderText = "GoodsID";
this.GoodsIDCol.Name = "GoodsIDCol";
this.GoodsIDCol.Visible = false;
//
// splitContainer1
//
this.splitContainer1.BackColor = System.Drawing.Color.LightGray;
this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.dataGridView);
this.splitContainer1.Panel1.Controls.Add(this.syncButton);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.tbxSequence);
this.splitContainer1.Panel2.Controls.Add(this.lblNumber);
this.splitContainer1.Panel2.Controls.Add(this.readBt);
this.splitContainer1.Panel2.Controls.Add(this.selectStoreBt);
this.splitContainer1.Panel2.Controls.Add(this.button2);
this.splitContainer1.Panel2.Controls.Add(this.userLabel);
this.splitContainer1.Panel2.Controls.Add(this.button1);
this.splitContainer1.Panel2.Controls.Add(this.storeLable);
this.splitContainer1.Panel2.Controls.Add(this.goodsLabel);
this.splitContainer1.Panel2.Controls.Add(this.lblDisplay);
this.splitContainer1.Size = new System.Drawing.Size(1292, 749);
this.splitContainer1.SplitterDistance = 825;
this.splitContainer1.TabIndex = 6;
//
// syncButton
//
this.syncButton.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.syncButton.Location = new System.Drawing.Point(705, 4);
this.syncButton.Name = "syncButton";
this.syncButton.Size = new System.Drawing.Size(112, 30);
this.syncButton.TabIndex = 7;
this.syncButton.Text = "同步信息";
this.syncButton.UseVisualStyleBackColor = true;
this.syncButton.Click += new System.EventHandler(this.syncButton_Click);
//
// tbxSequence
//
this.tbxSequence.Font = new System.Drawing.Font("宋体", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tbxSequence.Location = new System.Drawing.Point(95, 261);
this.tbxSequence.Name = "tbxSequence";
this.tbxSequence.ReadOnly = true;
this.tbxSequence.Size = new System.Drawing.Size(138, 38);
this.tbxSequence.TabIndex = 11;
//
// lblNumber
//
this.lblNumber.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblNumber.Location = new System.Drawing.Point(6, 273);
this.lblNumber.Name = "lblNumber";
this.lblNumber.Size = new System.Drawing.Size(83, 27);
this.lblNumber.TabIndex = 12;
this.lblNumber.Text = "顺序号 :";
//
// readBt
//
this.readBt.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.readBt.Location = new System.Drawing.Point(335, 264);
this.readBt.Name = "readBt";
this.readBt.Size = new System.Drawing.Size(115, 37);
this.readBt.TabIndex = 8;
this.readBt.Text = "读入";
this.readBt.UseVisualStyleBackColor = true;
this.readBt.Click += new System.EventHandler(this.readBt_Click);
//
// selectStoreBt
//
this.selectStoreBt.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.selectStoreBt.Location = new System.Drawing.Point(335, 146);
this.selectStoreBt.Name = "selectStoreBt";
this.selectStoreBt.Size = new System.Drawing.Size(115, 37);
this.selectStoreBt.TabIndex = 7;
this.selectStoreBt.Text = "选择仓库";
this.selectStoreBt.UseVisualStyleBackColor = true;
this.selectStoreBt.Click += new System.EventHandler(this.selectStoreBt_Click);
//
// button2
//
this.button2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button2.Location = new System.Drawing.Point(335, 97);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(115, 37);
this.button2.TabIndex = 7;
this.button2.Text = "选择产品";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.selectGoodsBt_Click);
//
// userLabel
//
this.userLabel.Cursor = System.Windows.Forms.Cursors.Default;
this.userLabel.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.userLabel.Location = new System.Drawing.Point(3, 8);
this.userLabel.Name = "userLabel";
this.userLabel.Size = new System.Drawing.Size(101, 20);
this.userLabel.TabIndex = 5;
this.userLabel.Text = "用户:";
//
// storeLable
//
this.storeLable.BackColor = System.Drawing.SystemColors.MenuBar;
this.storeLable.Font = new System.Drawing.Font("宋体", 15F);
this.storeLable.Location = new System.Drawing.Point(3, 146);
this.storeLable.Name = "storeLable";
this.storeLable.Size = new System.Drawing.Size(327, 37);
this.storeLable.TabIndex = 5;
//
// goodsLabel
//
this.goodsLabel.BackColor = System.Drawing.SystemColors.MenuBar;
this.goodsLabel.Cursor = System.Windows.Forms.Cursors.Default;
this.goodsLabel.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.goodsLabel.Location = new System.Drawing.Point(3, 97);
this.goodsLabel.Name = "goodsLabel";
this.goodsLabel.Size = new System.Drawing.Size(326, 37);
this.goodsLabel.TabIndex = 5;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1292, 749);
this.Controls.Add(this.splitContainer1);
this.Name = "MainForm";
this.Text = "青花瓷客户端";
this.Load += new System.EventHandler(this.MainForm_Load);
this.SizeChanged += new System.EventHandler(this.Main_Resize);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label lblDisplay;
private System.Windows.Forms.DataGridView dataGridView;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Label storeLable;
private System.Windows.Forms.Label goodsLabel;
private System.Windows.Forms.Label userLabel;
private System.Windows.Forms.Button syncButton;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button selectStoreBt;
private System.Windows.Forms.Button readBt;
private System.Windows.Forms.TextBox tbxSequence;
private System.Windows.Forms.Label lblNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn ID;
private System.Windows.Forms.DataGridViewTextBoxColumn Sequence;
private System.Windows.Forms.DataGridViewTextBoxColumn DateTime;
private System.Windows.Forms.DataGridViewTextBoxColumn GoodsNameCol;
private System.Windows.Forms.DataGridViewTextBoxColumn GoodsCodeCol;
private System.Windows.Forms.DataGridViewTextBoxColumn Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn UnitCol;
private System.Windows.Forms.DataGridViewButtonColumn DeleteDetail;
private System.Windows.Forms.DataGridViewTextBoxColumn GoodsIDCol;
}
}

+ 341
- 0
BWPClientForTianRou/MainForm.cs View File

@ -0,0 +1,341 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.Threading;
using System.Windows.Forms;
using BLUtil;
using Forks.EnterpriseServices;
using Forks.JsonRpc.Client.Data;
using Forks.Utils.Data;
namespace BWPClientForTianRou {
public partial class MainForm : Form {
private readonly Queue<WeightTable> _weightTableCache = new Queue<WeightTable>();
readonly AutoSizeFormClass _asc = new AutoSizeFormClass();
private DataSet _resultDataSet = new DataSet();
private BaseInforObj _currentGoods;
private BaseInforObj CurrentStore;
private readonly object _queLocker = new object();
private readonly ManualResetEvent _rwSychEvent = new ManualResetEvent(false);
private const int WmQueryData = 0x0500 + 10;
private const int WmUpdDisplayMessage = 0x0500 + 11;
private const int WmUpdLanStateMessage = 0x0500 + 12;
private bool _mainProcessIsRun;
private string _displayValue;
private readonly Thread _insertThread;//后台插入称重
public MainForm() {
InitializeComponent();
userLabel.Text = "用户:" + EncodeString.UserName;
_currentGoods = new BaseInforObj();
CurrentStore = new BaseInforObj();
_mainProcessIsRun = true;
CheckForIllegalCrossThreadCalls = false;
_insertThread = new Thread(DoInser) { IsBackground = true };
_insertThread.Start(new object());
ID.Width = 30;
Sequence.Width = 20;
DateTime.Width = 110;
GoodsNameCol.Width = 200;
GoodsCodeCol.Width = 70;
Weight.Width = 45;
UnitCol.Width = 35;
DeleteDetail.Width = 50;
}
protected override void OnClosed(EventArgs e) {
base.OnClosed(e);
Environment.Exit(0);
}
private void Main_Resize(object sender, EventArgs e) {
_asc.controlAutoSize(this);
}
private void MainForm_Load(object sender, EventArgs e) {
_asc.ControllInitializeSize(this);
WindowState = FormWindowState.Maximized;
InitSequenceText();
GetWeightData();
_displayValue = "display";
}
//消息处理
protected override void DefWndProc(ref Message m) {
switch (m.Msg) {
case WmQueryData:
QueryResult();
break;
case WmUpdDisplayMessage:
lblDisplay.Text = _displayValue;
break;
case WmUpdLanStateMessage: // Refresh net state
// this.lblLanState.Refresh();
break;
default:
base.DefWndProc(ref m);
break;
}
}
#region 进度条
private FormProcessBar _myProcessBar;
private delegate bool IncreaseHandle(int nValue);
private IncreaseHandle _myIncrease;
private Thread _syncBaseInfoThread;
private int _handle;
protected int MainHandle {
get {
if (_handle == 0) {
_handle = WinApiSendMessage.FindWindow(null, @"青花瓷客户端");
}
return _handle;
}
}
private void ShowProcessBar() {
_myProcessBar = new FormProcessBar();
_myIncrease = _myProcessBar.Increase;
_myProcessBar.ShowDialog();
}
#endregion
#region 控件事件
private void button1_Click(object sender, EventArgs e) {
string errorInfo;
var success = RpcUtil.Logout(out errorInfo);
if (!success)
if (!string.IsNullOrEmpty(errorInfo)) {
MessageBox.Show(errorInfo);
}
Hide();
new LoginForm().Show();
}
private void syncButton_Click(object sender, EventArgs e) {
_syncBaseInfoThread = new Thread(BaseInfosSync);
_syncBaseInfoThread.IsBackground = true;
_syncBaseInfoThread.Start();
ShowProcessBar();
}
private void selectGoodsBt_Click(object sender, EventArgs e) {
var form = new SelectGoodsForm();
var result = form.ShowDialog();
if (result != DialogResult.OK) {
return;
}
var goods = DbUtil.DialogReturnValue as BaseInforObj;
if (goods == null) {
return;
}
_currentGoods = goods;
goodsLabel.Text = goods.Name;
}
private void selectStoreBt_Click(object sender, EventArgs e) {
var form = new SelectGoodsForm(true);
var result = form.ShowDialog();
if (result != DialogResult.OK) {
return;
}
var info = BLUtil.DbUtil.DialogReturnValue as BaseInforObj;
if (info == null) {
return;
}
CurrentStore = info;
storeLable.Text = info.Name;
}
private void readBt_Click(object sender, EventArgs e) {
decimal w = 0;
if (!decimal.TryParse(lblDisplay.Text, out w)) {
MessageBox.Show("重量值格式错误!");
return;
}
if (_currentGoods.ID == 0) {
MessageBox.Show("请选择产品!");
return;
}
var bo = new WeightTable();
bo.DateTime = System.DateTime.Now;
bo.Weight = w;
bo.Goods_Code = _currentGoods.Code;
bo.Goods_Name = _currentGoods.Name;
bo.Goods_ID = _currentGoods.ID;
bo.Unit = _currentGoods.Unit;
long sq;
if (long.TryParse(tbxSequence.Text, out sq))
bo.Sequence = sq;
EnQueue(bo);
}
#endregion
#region 方法
private void QueryResult() {
// 查询出数据
lock (EncodeString.RwLocker) {
if (_resultDataSet != null) {
dataGridView.DataSource = _resultDataSet.Tables[0];
if (dataGridView.Rows.Count > 0) {
dataGridView.Rows[0].DefaultCellStyle.BackColor = Color.LawnGreen;
}
}
}
}
void GetWeightData() {
_resultDataSet = DbUtil.GetWeight();
if (_resultDataSet != null)
dataGridView.DataSource = _resultDataSet.Tables[0];
}
private void InitSequenceText() {
var s = DbUtil.GetSequence();
tbxSequence.Text = s.ToString();
}
/// <summary>
/// 同步基础信息
/// </summary>
private void BaseInfosSync() {
SyncGoods();
SyncStore();
Invoke(_myIncrease, new object[] { 10 });
MessageBox.Show("数据同步完成");
}
private void SyncStore() {
var objList = RpcUtil.Call<IList<RpcObject>>(RpcUtil.GetStore);
var list = new List<BaseInforObj>();
foreach (var goods in objList) {
var obj = new BaseInforObj();
obj.ID = goods.Get<long>("ID");
obj.Name = goods.Get<string>("Name");
obj.RowVersion = goods.Get<int>("RowVersion");
obj.Spell = goods.Get<string>("Spell");
list.Add(obj);
}
Invoke(_myIncrease, new object[] { 10 });
DbUtil.InsertStore(list);
Invoke(_myIncrease, new object[] { 15 });
}
private void SyncGoods() {
var objList = RpcUtil.Call<IList<RpcObject>>(RpcUtil.GetGoods);
var list = new List<BaseInforObj>();
foreach (var goods in objList) {
var obj = new BaseInforObj();
obj.ID = goods.Get<long>("ID");
obj.Name = goods.Get<string>("Name");
obj.Code = goods.Get<string>("Code");
obj.RowVersion = goods.Get<int>("RowVersion");
obj.Unit = goods.Get<string>("Unit");
obj.Spell = goods.Get<string>("Spell");
list.Add(obj);
//测试时值读取少量数据
if (list.Count >= 1202)
break;
}
Invoke(_myIncrease, new object[] { 5 });
var count = list.Count;
if (count > 100) {
var index = 0;
var part = count / 100.0;
for (int i = 0; i < part; i++) {
var currentList = new List<BaseInforObj>();
var thisCount = 0;
while (thisCount < 100) {
if (index >= count)
break;
currentList.Add(list[index]);
thisCount++;
index++;
}
DbUtil.InsertGoods(currentList, i == 0);
Invoke(_myIncrease, new object[] { (int)(Math.Floor(70 / part)) });
}
} else {
DbUtil.InsertGoods(list, true);
Invoke(_myIncrease, new object[] { 70 });
}
}
//将称重信息放到集合
private void EnQueue(WeightTable bo) {
Monitor.Enter(_queLocker);
_weightTableCache.Enqueue(bo);
_rwSychEvent.Set();
Monitor.Exit(_queLocker);
}
//将称重信息取出
private WeightTable DeQueue() {
Monitor.Enter(_queLocker);
WeightTable cBo = null;
if (_weightTableCache.Count > 0) {
cBo = _weightTableCache.Dequeue();
}
Monitor.Exit(this._queLocker);
return cBo;
}
//将称重信息插入数据表
private void DoInser(object o) {
_rwSychEvent.WaitOne();
while (_mainProcessIsRun) {
var bo = DeQueue();
if (bo == null)
continue;
var err = string.Empty;
try {
DbUtil.InsertWeight(bo);
tbxSequence.Text = (bo.Sequence + 1).ToString();
} catch (Exception ex) {
err = ex.Message;
} finally {
lock (EncodeString.RwLocker) {
_resultDataSet = DbUtil.GetWeight();
}
}
if (!string.IsNullOrEmpty(err))
MessageBox.Show(err);
// 同步主线程
WinApiSendMessage.SendMessage(MainHandle, WmQueryData, 0, 0);
}
}
#endregion
}
}

+ 144
- 0
BWPClientForTianRou/MainForm.resx View File

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Sequence.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="DateTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GoodsNameCol.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GoodsCodeCol.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="UnitCol.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="GoodsIDCol.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

+ 22
- 0
BWPClientForTianRou/Program.cs View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Windows.Forms;
using Forks.JsonRpc.Client;
namespace BWPClientForTianRou {
static class Program {
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); //指定服务器地址
var path = ConfigurationManager.AppSettings["UrlPath"];
RpcFacade.Init(path, "BWPClientForTianRou");
Application.Run(new LoginForm());
}
}
}

+ 36
- 0
BWPClientForTianRou/Properties/AssemblyInfo.cs View File

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

+ 62
- 0
BWPClientForTianRou/Properties/Resources.Designer.cs View File

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.18063
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace BWPClientForTianRou.Properties {
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的、缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if ((resourceMan == null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BWPClientForTianRou.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 为所有资源查找重写当前线程的 CurrentUICulture 属性,
/// 方法是使用此强类型资源类。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

+ 117
- 0
BWPClientForTianRou/Properties/Resources.resx View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

+ 37
- 0
BWPClientForTianRou/Properties/Settings.Designer.cs View File

@ -0,0 +1,37 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18063
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace BWPClientForTianRou.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
[global::System.Configuration.DefaultSettingValueAttribute("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\AppDb.mdb;Persist Se" +
"curity Info=True")]
public string AppDbConnectionString {
get {
return ((string)(this["AppDbConnectionString"]));
}
}
}
}

+ 14
- 0
BWPClientForTianRou/Properties/Settings.settings View File

@ -0,0 +1,14 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="BWPClientForTianRou.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="AppDbConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\AppDb.mdb;Persist Security Info=True&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.OleDb&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\AppDb.mdb;Persist Security Info=True</Value>
</Setting>
</Settings>
</SettingsFile>

+ 138
- 0
BWPClientForTianRou/SelectGoodsForm.Designer.cs View File

@ -0,0 +1,138 @@
namespace BWPClientForTianRou {
partial class SelectGoodsForm {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
this.btnQuery = new System.Windows.Forms.Button();
this.listView1 = new System.Windows.Forms.ListView();
this.colID = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colCode = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.button1 = new System.Windows.Forms.Button();
this.textBoxSearch = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// btnQuery
//
this.btnQuery.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnQuery.Location = new System.Drawing.Point(789, 1);
this.btnQuery.Name = "btnQuery";
this.btnQuery.Size = new System.Drawing.Size(224, 48);
this.btnQuery.TabIndex = 8;
this.btnQuery.Text = "查 找";
this.btnQuery.Click += new System.EventHandler(this.btnQuery_Click);
//
// listView1
//
this.listView1.Activation = System.Windows.Forms.ItemActivation.OneClick;
this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colID,
this.colName,
this.colCode});
this.listView1.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.listView1.FullRowSelect = true;
this.listView1.GridLines = true;
this.listView1.Location = new System.Drawing.Point(-5, 53);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(1260, 633);
this.listView1.SmallImageList = this.imageList1;
this.listView1.TabIndex = 7;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Details;
this.listView1.ItemActivate += new System.EventHandler(this.listView1_ItemActivate);
//
// colID
//
this.colID.Text = "ID";
this.colID.Width = 85;
//
// colName
//
this.colName.Text = "名称";
this.colName.Width = 253;
//
// colCode
//
this.colCode.Text = "编码";
this.colCode.Width = 181;
//
// imageList1
//
this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
this.imageList1.ImageSize = new System.Drawing.Size(16, 45);
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
//
// button1
//
this.button1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(1031, 1);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(224, 48);
this.button1.TabIndex = 6;
this.button1.Text = "重 置";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBoxSearch
//
this.textBoxSearch.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBoxSearch.Location = new System.Drawing.Point(3, 1);
this.textBoxSearch.Multiline = true;
this.textBoxSearch.Name = "textBoxSearch";
this.textBoxSearch.Size = new System.Drawing.Size(767, 46);
this.textBoxSearch.TabIndex = 5;
//
// SelectGoodsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1267, 700);
this.Controls.Add(this.btnQuery);
this.Controls.Add(this.listView1);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBoxSearch);
this.Name = "SelectGoodsForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "选择产品";
this.Load += new System.EventHandler(this.SelectGoodsForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnQuery;
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.ColumnHeader colID;
private System.Windows.Forms.ColumnHeader colName;
private System.Windows.Forms.ColumnHeader colCode;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBoxSearch;
private System.Windows.Forms.ImageList imageList1;
}
}

+ 81
- 0
BWPClientForTianRou/SelectGoodsForm.cs View File

@ -0,0 +1,81 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using BLUtil;
namespace BWPClientForTianRou {
public partial class SelectGoodsForm : Form {
private bool _isStore = false;
public SelectGoodsForm(bool isStore)
: this() {
if (isStore)
Text = "选择仓库";
_isStore = isStore;
}
public SelectGoodsForm() {
InitializeComponent();
listView1.Columns[1].Width = 800;
listView1.Columns[2].Width = 300;
}
private void SelectGoodsForm_Load(object sender, EventArgs e) {
Query();
}
private void btnQuery_Click(object sender, EventArgs e)
{
Query();
}
private void Query()
{
var searchKey = textBoxSearch.Text.Trim();
List<BaseInforObj> list;
if (_isStore)
{
list = DbUtil.SelectStore(searchKey);
}
else
{
list = DbUtil.SelectGoods(searchKey);
}
listView1.BeginUpdate();
listView1.Items.Clear();
foreach (var detail in list)
{
AddItem(detail);
}
listView1.EndUpdate();
listView1.Focus();
}
private void AddItem(BaseInforObj goods) {
var item = new ListViewItem(goods.ID.ToString());
item.Tag = goods;
item.SubItems.Add(goods.Name);
item.SubItems.Add(goods.Code);
listView1.Items.Add(item);
}
private void button1_Click(object sender, EventArgs e) {
textBoxSearch.Text = "";
listView1.BeginUpdate();
listView1.Items.Clear();
listView1.EndUpdate();
}
private void listView1_ItemActivate(object sender, EventArgs e) {
DbUtil.DialogReturnValue = listView1.FocusedItem.Tag;
DialogResult = DialogResult.OK;
Close();
}
}
}

+ 123
- 0
BWPClientForTianRou/SelectGoodsForm.resx View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

+ 31
- 0
BWPClientForTianRou/WinApiSendMessage.cs View File

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace BWPClientForTianRou {
public class WinApiSendMessage {
//声明 API 函数
[DllImport("User32.dll", EntryPoint = "SendMessage")]
public static extern int SendMessage(int hWnd, int msg, int wParam, int lParam);
[DllImport("User32.dll", EntryPoint = "FindWindow")]
public static extern int FindWindow(string lpClassName, string lpWindowName);
[DllImport("wininet.dll")]
public extern static bool InternetGetConnectedState(out int connectionDescription, int reservedValue);
const int SndAsync = 1;
const int SndFileName = 0X20000;
[DllImport("winmm.dll", EntryPoint = "PlaySound")]
private static extern int PlaySound(string lpxzName, int hModul, int dwFlags);
public static int WinApiPlaySound(string fileName) {
return PlaySound(Application.StartupPath + fileName, 1, SndFileName | SndAsync);
}
}
}

Loading…
Cancel
Save