| @ -0,0 +1,7 @@ | |||
| .* | |||
| *.TMP | |||
| *.suo | |||
| *.user | |||
| obj | |||
| bin | |||
| _ReSharper.B3ButcherManageClient | |||
| @ -0,0 +1,46 @@ | |||
| | |||
| Microsoft Visual Studio Solution File, Format Version 12.00 | |||
| # Visual Studio 2013 | |||
| VisualStudioVersion = 12.0.40629.0 | |||
| MinimumVisualStudioVersion = 10.0.40219.1 | |||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BO", "BO\BO.csproj", "{8968F14A-C7C7-4751-96CE-B114FBFD65EF}" | |||
| EndProject | |||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BWP.WinFormControl", "BWP.WinFormControl\BWP.WinFormControl.csproj", "{A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}" | |||
| EndProject | |||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ButcherManageClient", "ButcherManageClient\ButcherManageClient.csproj", "{59B13436-4884-4533-9C7E-80E8580CBF55}" | |||
| EndProject | |||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ButcherOrder", "ButcherOrder\ButcherOrder.csproj", "{B9E62966-DA6C-4075-91A3-CB66C4FBBC6A}" | |||
| EndProject | |||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ButcherWeight", "ButcherWeight\ButcherWeight.csproj", "{17F58766-89EB-44C0-8EEF-4787849979EC}" | |||
| EndProject | |||
| Global | |||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
| Debug|Any CPU = Debug|Any CPU | |||
| Release|Any CPU = Release|Any CPU | |||
| EndGlobalSection | |||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
| {8968F14A-C7C7-4751-96CE-B114FBFD65EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
| {8968F14A-C7C7-4751-96CE-B114FBFD65EF}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
| {8968F14A-C7C7-4751-96CE-B114FBFD65EF}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
| {8968F14A-C7C7-4751-96CE-B114FBFD65EF}.Release|Any CPU.Build.0 = Release|Any CPU | |||
| {A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
| {A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
| {A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
| {A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}.Release|Any CPU.Build.0 = Release|Any CPU | |||
| {59B13436-4884-4533-9C7E-80E8580CBF55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
| {59B13436-4884-4533-9C7E-80E8580CBF55}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
| {59B13436-4884-4533-9C7E-80E8580CBF55}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
| {59B13436-4884-4533-9C7E-80E8580CBF55}.Release|Any CPU.Build.0 = Release|Any CPU | |||
| {B9E62966-DA6C-4075-91A3-CB66C4FBBC6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
| {B9E62966-DA6C-4075-91A3-CB66C4FBBC6A}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
| {B9E62966-DA6C-4075-91A3-CB66C4FBBC6A}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
| {B9E62966-DA6C-4075-91A3-CB66C4FBBC6A}.Release|Any CPU.Build.0 = Release|Any CPU | |||
| {17F58766-89EB-44C0-8EEF-4787849979EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
| {17F58766-89EB-44C0-8EEF-4787849979EC}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
| {17F58766-89EB-44C0-8EEF-4787849979EC}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
| {17F58766-89EB-44C0-8EEF-4787849979EC}.Release|Any CPU.Build.0 = Release|Any CPU | |||
| EndGlobalSection | |||
| GlobalSection(SolutionProperties) = preSolution | |||
| HideSolutionNode = FALSE | |||
| EndGlobalSection | |||
| EndGlobal | |||
| @ -0,0 +1,78 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||
| <PropertyGroup> | |||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
| <ProjectGuid>{8968F14A-C7C7-4751-96CE-B114FBFD65EF}</ProjectGuid> | |||
| <OutputType>Library</OutputType> | |||
| <AppDesignerFolder>Properties</AppDesignerFolder> | |||
| <RootNamespace>BO</RootNamespace> | |||
| <AssemblyName>BO</AssemblyName> | |||
| <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |||
| <FileAlignment>512</FileAlignment> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||
| <DebugSymbols>true</DebugSymbols> | |||
| <DebugType>full</DebugType> | |||
| <Optimize>false</Optimize> | |||
| <OutputPath>bin\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"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>D:\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>D:\BwpB3Project\tsref\Debug\Forks.Utils.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="System" /> | |||
| <Reference Include="System.Core" /> | |||
| <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="BO\Bill\WeightBill\WeightBill.cs" /> | |||
| <Compile Include="BO\Bill\WeightBill\WeightBill_AbnormalDetail.cs" /> | |||
| <Compile Include="BO\Bill\WeightBill\WeightBill_Detail.cs" /> | |||
| <Compile Include="BO\Bill\WeightBill\WeightBill_FarmerDetail.cs" /> | |||
| <Compile Include="BO\Bill\WeightBill\WeightBill_HouseDetail.cs" /> | |||
| <Compile Include="Properties\AssemblyInfo.cs" /> | |||
| <Compile Include="Utils\BaseInfoRpcUtil.cs" /> | |||
| <Compile Include="Utils\BillRpc\WeightBillRpc.cs" /> | |||
| <Compile Include="Utils\LoginRpcUtil.cs" /> | |||
| <Compile Include="Utils\LoginUserInfo.cs" /> | |||
| <Compile Include="Utils\ServerUrlConfig.cs" /> | |||
| <Compile Include="Utils\XmlUtil.cs" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <Folder Include="BO\BaseInfo\" /> | |||
| </ItemGroup> | |||
| <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||
| <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |||
| Other similar extension points exist, see Microsoft.Common.targets. | |||
| <Target Name="BeforeBuild"> | |||
| </Target> | |||
| <Target Name="AfterBuild"> | |||
| </Target> | |||
| --> | |||
| </Project> | |||
| @ -0,0 +1,63 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace BO.BO | |||
| { | |||
| public class WeightBill | |||
| { | |||
| public string CreaterName { get; set; } | |||
| public long? Supplier_ID { get; set; } | |||
| public string Supplier_Name { get; set; } | |||
| public short? PurchaseType_ID { get; set; } | |||
| public string PurchaseType_Name { get; set; } | |||
| public DateTime? WeightTime { get; set; } | |||
| public long? Car_ID { get; set; } | |||
| public string Car_Name { get; set; } | |||
| public long? Livestock_ID { get; set; } | |||
| public string Livestock_Name { get; set; } | |||
| public long? Employee_ID { get; set; } | |||
| public string Employee_Name { get; set; } | |||
| public long? HogGrade_ID { get; set; } | |||
| public string HogGrade_Name { get; set; } | |||
| public long? Zone_ID { get; set; } | |||
| public string Zone_Name { get; set; } | |||
| public decimal? PenWeight { get; set; } | |||
| public decimal? PenPrice { get; set; } | |||
| public decimal? PenMoney { get; set; } | |||
| public string AnimalTestNumber { get; set; } | |||
| public DateTime? AnimalTestDate { get; set; } | |||
| public string AnimalTestMan { get; set; } | |||
| public string Remark { get; set; } | |||
| public long? Inspector_ID { get; set; } | |||
| public long? Inspector_Name { get; set; } | |||
| // List<WeightBill_FarmerDetail> _farmerDetails = new List<WeightBill_FarmerDetail>(); | |||
| //public List<WeightBill_FarmerDetail> FarmerDetails { get { return _farmerDetails; } } | |||
| } | |||
| } | |||
| @ -0,0 +1,12 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace BO.BO | |||
| { | |||
| public class WeightBill_AbnormalDetail | |||
| { | |||
| } | |||
| } | |||
| @ -0,0 +1,12 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace BO.BO | |||
| { | |||
| public class WeightBill_Detail | |||
| { | |||
| } | |||
| } | |||
| @ -0,0 +1,19 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace BO.BO | |||
| { | |||
| public class WeightBill_FarmerDetail | |||
| { | |||
| public int Index { get; set; } | |||
| public long? Farmer_ID { get; set; } | |||
| public string Farmer_Name { get; set; } | |||
| public int? Number { get; set; } | |||
| } | |||
| } | |||
| @ -0,0 +1,12 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace BO.BO | |||
| { | |||
| public class WeightBill_HouseDetail | |||
| { | |||
| } | |||
| } | |||
| @ -0,0 +1,36 @@ | |||
| using System.Reflection; | |||
| using System.Runtime.CompilerServices; | |||
| using System.Runtime.InteropServices; | |||
| // 有关程序集的常规信息通过以下 | |||
| // 特性集控制。更改这些特性值可修改 | |||
| // 与程序集关联的信息。 | |||
| [assembly: AssemblyTitle("BO")] | |||
| [assembly: AssemblyDescription("")] | |||
| [assembly: AssemblyConfiguration("")] | |||
| [assembly: AssemblyCompany("")] | |||
| [assembly: AssemblyProduct("BO")] | |||
| [assembly: AssemblyCopyright("Copyright © 2017")] | |||
| [assembly: AssemblyTrademark("")] | |||
| [assembly: AssemblyCulture("")] | |||
| // 将 ComVisible 设置为 false 使此程序集中的类型 | |||
| // 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, | |||
| // 则将该类型上的 ComVisible 特性设置为 true。 | |||
| [assembly: ComVisible(false)] | |||
| // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||
| [assembly: Guid("a97530c2-6a46-4900-9444-a0e3e2ab1d02")] | |||
| // 程序集的版本信息由下面四个值组成: | |||
| // | |||
| // 主版本 | |||
| // 次版本 | |||
| // 生成号 | |||
| // 修订号 | |||
| // | |||
| // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, | |||
| // 方法是按如下所示使用“*”: | |||
| // [assembly: AssemblyVersion("1.0.*")] | |||
| [assembly: AssemblyVersion("1.0.0.0")] | |||
| [assembly: AssemblyFileVersion("1.0.0.0")] | |||
| @ -0,0 +1,29 @@ | |||
| using BO.BO; | |||
| using Forks.JsonRpc.Client; | |||
| using Forks.JsonRpc.Client.Data; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace BO.Utils | |||
| { | |||
| public static class BaseInfoRpcUtil | |||
| { | |||
| //public static List<BaseInfoEntity> GetBaseInfoEntity(string rpcName) | |||
| //{ | |||
| // var list = RpcFacade.Call<List<RpcObject>>(string.Format("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/{0}", rpcName)); | |||
| // var result = new List<BaseInfoEntity>(); | |||
| // foreach (RpcObject o in list) | |||
| // { | |||
| // var entity = new BaseInfoEntity(); | |||
| // entity.ID = o.Get<long>("ID"); | |||
| // entity.Name = o.Get<string>("Name"); | |||
| // entity.Spell = o.Get<string>("Spell"); | |||
| // result.Add(entity); | |||
| // } | |||
| // return result; | |||
| //} | |||
| } | |||
| } | |||
| @ -0,0 +1,46 @@ | |||
| using BO.BO; | |||
| using Forks.JsonRpc.Client; | |||
| using Forks.JsonRpc.Client.Data; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace BO.Utils.BillRpc | |||
| { | |||
| public static class WeightBillRpc | |||
| { | |||
| public static bool Send(WeightBill bo) | |||
| { | |||
| const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/WeightBillRpc/UploadBill"; | |||
| var obj = new RpcObject("/MainSystem/B3ClientService/BO/WeightBill"); | |||
| obj.Set("CreaterName", bo.CreaterName); | |||
| obj.Set("Supplier_ID", bo.Supplier_ID); | |||
| obj.Set("Supplier_Name", bo.Supplier_Name); | |||
| obj.Set("PurchaseType_ID", bo.PurchaseType_ID); | |||
| obj.Set("PurchaseType_Name", bo.PurchaseType_Name); | |||
| obj.Set("WeightTime", bo.WeightTime); | |||
| obj.Set("Car_ID", bo.Car_ID); | |||
| obj.Set("Car_Name", bo.Car_Name); | |||
| obj.Set("Livestock_ID", bo.Livestock_ID); | |||
| obj.Set("Livestock_Name", bo.Livestock_Name); | |||
| obj.Set("Employee_ID", bo.Employee_ID); | |||
| obj.Set("Employee_Name", bo.Employee_Name); | |||
| obj.Set("HogGrade_ID", bo.HogGrade_ID); | |||
| obj.Set("HogGrade_Name", bo.HogGrade_Name); | |||
| obj.Set("Zone_ID", bo.Zone_ID); | |||
| obj.Set("Zone_Name", bo.Zone_Name); | |||
| obj.Set("PenWeight", bo.PenWeight); | |||
| obj.Set("PenPrice", bo.PenPrice); | |||
| obj.Set("PenMoney", bo.PenMoney); | |||
| obj.Set("AnimalTestNumber", bo.AnimalTestNumber); | |||
| obj.Set("AnimalTestDate", bo.AnimalTestDate); | |||
| obj.Set("AnimalTestMan", bo.AnimalTestMan); | |||
| obj.Set("Remark", bo.Remark); | |||
| return RpcFacade.Call<bool>(method, obj); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,46 @@ | |||
| using Forks.JsonRpc.Client; | |||
| using Forks.JsonRpc.Client.Data; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace BO.Utils | |||
| { | |||
| public class LoginRpcUtil | |||
| { | |||
| public static string GetUserNameByCode(string code, out string error) | |||
| { | |||
| try | |||
| { | |||
| error = string.Empty; | |||
| const string wpfUserMethod = "/MainSystem/B3ClientService/Rpcs/UserInfoRpc/GetUserName"; | |||
| return RpcFacade.Call<string>(wpfUserMethod, code); | |||
| } | |||
| catch (Exception ex) | |||
| { | |||
| error = ex.ToString(); | |||
| } | |||
| return string.Empty; | |||
| } | |||
| public static void FillUserEmpInfo(string name,LoginUserInfo userInfo) | |||
| { | |||
| const string wpfUserMethod = "/MainSystem/B3ClientService/Rpcs/UserInfoRpc/GetUserEmpInfo"; | |||
| var obj= RpcFacade.Call<RpcObject>(wpfUserMethod, name); | |||
| if (obj != null) | |||
| { | |||
| userInfo.ID = obj.Get<long>("User_ID"); | |||
| userInfo.UserName = obj.Get<string>("User_Name"); | |||
| userInfo.Domain_ID = obj.Get<long>("Domain_ID"); | |||
| userInfo.AccountingUnit_ID = obj.Get<long?>("AccountingUnit_ID"); | |||
| userInfo.AccountingUnit_Name = obj.Get<string>("AccountingUnit_Name"); | |||
| userInfo.Department_ID = obj.Get<long?>("Department_ID"); | |||
| userInfo.Department_Name = obj.Get<string>("Department_Name"); | |||
| userInfo.Employee_ID = obj.Get<long>("Employee_ID"); | |||
| userInfo.Employee_Name = obj.Get<string>("Employee_Name"); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,29 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace BO.Utils | |||
| { | |||
| public class LoginUserInfo | |||
| { | |||
| public long ID { get; set; } | |||
| public string UserName { get; set; } | |||
| public long Domain_ID { get; set; } | |||
| public long? AccountingUnit_ID { get; set; } | |||
| public string AccountingUnit_Name { get; set; } | |||
| public long? Department_ID { get; set; } | |||
| public string Department_Name { get; set; } | |||
| public long Employee_ID { get; set; } | |||
| public string Employee_Name { get; set; } | |||
| } | |||
| } | |||
| @ -0,0 +1,13 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace BO.Utils | |||
| { | |||
| public class ServerUrlConfig | |||
| { | |||
| public string ServerUrl { get; set; } | |||
| } | |||
| } | |||
| @ -0,0 +1,46 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.IO; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Xml.Serialization; | |||
| namespace BO.Utils | |||
| { | |||
| public static class XmlUtil | |||
| { | |||
| public static void SerializerObjToFile(object obj, string fileName = "") | |||
| { | |||
| if (string.IsNullOrWhiteSpace(fileName)) | |||
| { | |||
| fileName = obj.GetType().Name + ".xml"; | |||
| } | |||
| var ser = new XmlSerializer(obj.GetType()); | |||
| using (var stream = File.Open(fileName, FileMode.Create)) | |||
| { | |||
| ser.Serialize(stream, obj); | |||
| } | |||
| } | |||
| public static T DeserializeFromFile<T>(string fileName = "") | |||
| { | |||
| if (string.IsNullOrWhiteSpace(fileName)) | |||
| { | |||
| fileName = typeof(T).Name + ".xml"; | |||
| } | |||
| if (!File.Exists(fileName)) | |||
| { | |||
| throw new FileNotFoundException("不存在文件:" + fileName); | |||
| } | |||
| using (var reader = new StreamReader(fileName)) | |||
| { | |||
| var xs = new XmlSerializer(typeof(T)); | |||
| object obj = xs.Deserialize(reader); | |||
| reader.Close(); | |||
| return (T)obj; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,109 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||
| <PropertyGroup> | |||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
| <ProjectGuid>{A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}</ProjectGuid> | |||
| <OutputType>Library</OutputType> | |||
| <AppDesignerFolder>Properties</AppDesignerFolder> | |||
| <RootNamespace>BWP.WinFormControl</RootNamespace> | |||
| <AssemblyName>BWP.WinFormControl</AssemblyName> | |||
| <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |||
| <FileAlignment>512</FileAlignment> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||
| <DebugSymbols>true</DebugSymbols> | |||
| <DebugType>full</DebugType> | |||
| <Optimize>false</Optimize> | |||
| <OutputPath>bin\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.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="PresentationCore" /> | |||
| <Reference Include="PresentationFramework" /> | |||
| <Reference Include="System" /> | |||
| <Reference Include="System.Core" /> | |||
| <Reference Include="System.Drawing" /> | |||
| <Reference Include="System.Windows.Forms" /> | |||
| <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.Xml" /> | |||
| <Reference Include="WindowsBase" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <Compile Include="BoolToVisibilityConverter.cs" /> | |||
| <Compile Include="Calendar.xaml.cs"> | |||
| <DependentUpon>Calendar.xaml</DependentUpon> | |||
| </Compile> | |||
| <Compile Include="ComboBoxHelper.cs" /> | |||
| <Compile Include="ComponentUtil.cs" /> | |||
| <Compile Include="NumberPad.xaml.cs"> | |||
| <DependentUpon>NumberPad.xaml</DependentUpon> | |||
| </Compile> | |||
| <Compile Include="Properties\AssemblyInfo.cs" /> | |||
| <Compile Include="UComboBox.cs"> | |||
| <SubType>Component</SubType> | |||
| </Compile> | |||
| <Compile Include="UDatePicker.cs"> | |||
| <SubType>Component</SubType> | |||
| </Compile> | |||
| <Compile Include="UTextBoxWithPad.cs"> | |||
| <SubType>Component</SubType> | |||
| </Compile> | |||
| <Compile Include="VirtualKeyPad.xaml.cs"> | |||
| <DependentUpon>VirtualKeyPad.xaml</DependentUpon> | |||
| </Compile> | |||
| <Compile Include="WeightControl.cs"> | |||
| <SubType>UserControl</SubType> | |||
| </Compile> | |||
| <Compile Include="WeightControl.Designer.cs"> | |||
| <DependentUpon>WeightControl.cs</DependentUpon> | |||
| </Compile> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <Page Include="Calendar.xaml"> | |||
| <SubType>Designer</SubType> | |||
| <Generator>MSBuild:Compile</Generator> | |||
| </Page> | |||
| <Page Include="NumberPad.xaml"> | |||
| <SubType>Designer</SubType> | |||
| <Generator>MSBuild:Compile</Generator> | |||
| </Page> | |||
| <Page Include="VirtualKeyPad.xaml"> | |||
| <SubType>Designer</SubType> | |||
| <Generator>MSBuild:Compile</Generator> | |||
| </Page> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <EmbeddedResource Include="Images\today.png" /> | |||
| <EmbeddedResource Include="WeightControl.resx"> | |||
| <DependentUpon>WeightControl.cs</DependentUpon> | |||
| </EmbeddedResource> | |||
| </ItemGroup> | |||
| <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||
| <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |||
| Other similar extension points exist, see Microsoft.Common.targets. | |||
| <Target Name="BeforeBuild"> | |||
| </Target> | |||
| <Target Name="AfterBuild"> | |||
| </Target> | |||
| --> | |||
| </Project> | |||
| @ -0,0 +1,24 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Data; | |||
| namespace BWP.WinFormControl.Converter | |||
| { | |||
| class BoolToVisibilityConverter : IValueConverter | |||
| { | |||
| public object Convert(object value, Type targetType, object parameter, System.Globalization.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, System.Globalization.CultureInfo culture) | |||
| { | |||
| throw new NotImplementedException(); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,730 @@ | |||
| <Window x:Class="BWP.WinFormControl.CalendarSelecter" | |||
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||
| WindowStartupLocation="CenterScreen" | |||
| Title="MainWindow" | |||
| Width="500" | |||
| Height="500" | |||
| WindowStyle="None" Background="{x:Null}" | |||
| AllowsTransparency="True" | |||
| MouseLeftButtonDown="DragWindow" | |||
| > | |||
| <Window.Resources> | |||
| <Style x:Key="CalendarStyle1" | |||
| TargetType="{x:Type Calendar}"> | |||
| <!--日历控件的背景色,也可以改成绑定的--> | |||
| <Setter Property="Background" | |||
| Value="#f6f6f6" /> | |||
| <Setter Property="Template"> | |||
| <Setter.Value> | |||
| <ControlTemplate TargetType="{x:Type Calendar}"> | |||
| <StackPanel x:Name="PART_Root" | |||
| HorizontalAlignment="Center" | |||
| VerticalAlignment="Center"> | |||
| <!--这个是日历控件的主体元件,也是内部元件PART_CalendarItem名称不要更改,可以改它的其它样式属性--> | |||
| <CalendarItem x:Name="PART_CalendarItem" | |||
| BorderBrush="{TemplateBinding BorderBrush}" | |||
| BorderThickness="{TemplateBinding BorderThickness}" | |||
| Background="{TemplateBinding Background}" | |||
| Style="{TemplateBinding CalendarItemStyle}" | |||
| Height="{TemplateBinding Height}" | |||
| Width="{TemplateBinding Width}" | |||
| HorizontalAlignment="Stretch" | |||
| VerticalAlignment="Stretch" /> | |||
| </StackPanel> | |||
| </ControlTemplate> | |||
| </Setter.Value> | |||
| </Setter> | |||
| </Style> | |||
| <!--日历主体样式表--> | |||
| <Style x:Key="CalendarItemStyle1" | |||
| TargetType="{x:Type CalendarItem}"> | |||
| <Setter Property="Template"> | |||
| <Setter.Value> | |||
| <ControlTemplate TargetType="{x:Type CalendarItem}"> | |||
| <ControlTemplate.Resources> | |||
| <DataTemplate x:Key="{x:Static CalendarItem.DayTitleTemplateResourceKey}"> | |||
| <!--日历星期几的绑定样式,我格式化成周一,周二等--> | |||
| <TextBlock Foreground="#666666" | |||
| FontSize="16" | |||
| FontFamily="微软雅黑" | |||
| HorizontalAlignment="Center" | |||
| Margin="0 15" | |||
| Text="{Binding StringFormat=周{0} }" | |||
| VerticalAlignment="Center" /> | |||
| </DataTemplate> | |||
| </ControlTemplate.Resources> | |||
| <Grid x:Name="PART_Root"> | |||
| <Grid.Resources> | |||
| <!--设置日历控件 IsEnable=false 时的不可用遮罩层颜色,并且会播放过渡动画--> | |||
| <SolidColorBrush x:Key="DisabledColor" | |||
| Color="#A5FFFFFF" /> | |||
| </Grid.Resources> | |||
| <VisualStateManager.VisualStateGroups> | |||
| <VisualStateGroup x:Name="CommonStates"> | |||
| <VisualState x:Name="Normal" /> | |||
| <VisualState x:Name="Disabled"> | |||
| <!--设置日历控件 IsEnable=false 时遮罩层透明度0-1变色动画--> | |||
| <Storyboard> | |||
| <DoubleAnimation Duration="0" | |||
| To="1" | |||
| Storyboard.TargetProperty="Opacity" | |||
| Storyboard.TargetName="PART_DisabledVisual" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| </VisualStateGroup> | |||
| </VisualStateManager.VisualStateGroups> | |||
| <Border BorderBrush="#cfcfcf" | |||
| BorderThickness="0" | |||
| Background="{TemplateBinding Background}" | |||
| CornerRadius="2"> | |||
| <Border> | |||
| <Grid> | |||
| <Grid.Resources> | |||
| <!--日历头左箭头按钮样式模版--> | |||
| <ControlTemplate x:Key="PreviousButtonTemplate" | |||
| TargetType="{x:Type Button}"> | |||
| <!--鼠标悬停在左箭头按钮上时改变鼠标指针样式--> | |||
| <Grid Cursor="Hand"> | |||
| <VisualStateManager.VisualStateGroups> | |||
| <VisualStateGroup x:Name="CommonStates"> | |||
| <VisualState x:Name="Normal" /> | |||
| <VisualState x:Name="MouseOver"> | |||
| <!--鼠标悬停在左箭头按钮上时左箭头颜色变化动画--> | |||
| <Storyboard> | |||
| <ColorAnimation Duration="0" | |||
| To="#FF73A9D8" | |||
| Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" | |||
| Storyboard.TargetName="path" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| <VisualState x:Name="Disabled"> | |||
| <Storyboard> | |||
| <DoubleAnimation Duration="0" | |||
| To=".5" | |||
| Storyboard.TargetProperty="(Shape.Fill).(Brush.Opacity)" | |||
| Storyboard.TargetName="path" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| </VisualStateGroup> | |||
| </VisualStateManager.VisualStateGroups> | |||
| <!--左箭头整个区域矩形块--> | |||
| <Rectangle Fill="#363636" | |||
| Opacity="1" | |||
| Stretch="Fill" /> | |||
| <Grid> | |||
| <!--左箭头--> | |||
| <Path x:Name="path" | |||
| Data="M288.75,232.25 L288.75,240.625 L283,236.625 z" | |||
| Fill="#e0e0e0" | |||
| HorizontalAlignment="Left" | |||
| Height="15" | |||
| Width="15" | |||
| Margin="20,0,0,0" | |||
| Stretch="Fill" | |||
| VerticalAlignment="Center" /> | |||
| </Grid> | |||
| </Grid> | |||
| </ControlTemplate> | |||
| <!--日历头右箭头按钮样式模版,这块跟左箭头样式模版没什么区别--> | |||
| <ControlTemplate x:Key="NextButtonTemplate" | |||
| TargetType="{x:Type Button}"> | |||
| <Grid Cursor="Hand"> | |||
| <VisualStateManager.VisualStateGroups> | |||
| <VisualStateGroup x:Name="CommonStates"> | |||
| <VisualState x:Name="Normal" /> | |||
| <VisualState x:Name="MouseOver"> | |||
| <Storyboard> | |||
| <ColorAnimation Duration="0" | |||
| To="#FF73A9D8" | |||
| Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" | |||
| Storyboard.TargetName="path" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| <VisualState x:Name="Disabled"> | |||
| <Storyboard> | |||
| <DoubleAnimation Duration="0" | |||
| To=".5" | |||
| Storyboard.TargetProperty="(Shape.Fill).(Brush.Opacity)" | |||
| Storyboard.TargetName="path" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| </VisualStateGroup> | |||
| </VisualStateManager.VisualStateGroups> | |||
| <Rectangle Fill="#363636" | |||
| Opacity="1" | |||
| Stretch="Fill" /> | |||
| <Grid> | |||
| <Path x:Name="path" | |||
| Data="M282.875,231.875 L282.875,240.375 L288.625,236 z" | |||
| Fill="#e0e0e0" | |||
| HorizontalAlignment="Right" | |||
| Height="15" | |||
| Width="15" | |||
| Margin="0,0,20,0" | |||
| Stretch="Fill" | |||
| VerticalAlignment="Center" /> | |||
| </Grid> | |||
| </Grid> | |||
| </ControlTemplate> | |||
| <!--日历头中间年按钮样式模版--> | |||
| <ControlTemplate x:Key="HeaderButtonTemplate" | |||
| TargetType="{x:Type Button}"> | |||
| <Grid Cursor="Hand"> | |||
| <VisualStateManager.VisualStateGroups> | |||
| <VisualStateGroup x:Name="CommonStates"> | |||
| <VisualState x:Name="Normal" /> | |||
| <VisualState x:Name="MouseOver"> | |||
| <Storyboard> | |||
| <ColorAnimation Duration="0" | |||
| To="#FF73A9D8" | |||
| Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" | |||
| Storyboard.TargetName="buttonContent" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| <VisualState x:Name="Disabled"> | |||
| <Storyboard> | |||
| <DoubleAnimation Duration="0" | |||
| To=".5" | |||
| Storyboard.TargetProperty="Opacity" | |||
| Storyboard.TargetName="buttonContent" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| </VisualStateGroup> | |||
| </VisualStateManager.VisualStateGroups> | |||
| <ContentPresenter x:Name="buttonContent" | |||
| ContentTemplate="{TemplateBinding ContentTemplate}" | |||
| Content="{TemplateBinding Content}" | |||
| TextElement.Foreground="#e0e0e0" | |||
| HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" | |||
| Margin="1,4,1,9" | |||
| VerticalAlignment="{TemplateBinding VerticalContentAlignment}" /> | |||
| </Grid> | |||
| </ControlTemplate> | |||
| </Grid.Resources> | |||
| <Grid.RowDefinitions> | |||
| <!--日历头,左箭头,年,右箭头--> | |||
| <RowDefinition Height="Auto" /> | |||
| <!--日历内容,星期几和具体的日期几号几号--> | |||
| <RowDefinition Height="*" /> | |||
| </Grid.RowDefinitions> | |||
| <Grid.ColumnDefinitions> | |||
| <!--左箭头--> | |||
| <ColumnDefinition Width="Auto" /> | |||
| <!--年--> | |||
| <ColumnDefinition Width="*" /> | |||
| <!--右箭头--> | |||
| <ColumnDefinition Width="Auto" /> | |||
| </Grid.ColumnDefinitions> | |||
| <!--头,左箭头,年,右箭头,整体的背景色--> | |||
| <Border Grid.Row="0" | |||
| Grid.ColumnSpan="3" | |||
| Background="#363636"></Border> | |||
| <!--左箭头--> | |||
| <Button x:Name="PART_PreviousButton" | |||
| Grid.Column="0" | |||
| Focusable="False" | |||
| HorizontalAlignment="Left" | |||
| Grid.Row="0" | |||
| Template="{StaticResource PreviousButtonTemplate}" /> | |||
| <!--年--> | |||
| <Button x:Name="PART_HeaderButton" | |||
| Grid.Column="1" | |||
| FontFamily="微软雅黑" | |||
| Focusable="False" | |||
| FontSize="26" | |||
| HorizontalAlignment="Center" | |||
| Grid.Row="0" | |||
| Template="{StaticResource HeaderButtonTemplate}" | |||
| VerticalAlignment="Center" /> | |||
| <!--右箭头--> | |||
| <Button x:Name="PART_NextButton" | |||
| Grid.Column="2" | |||
| Focusable="False" | |||
| HorizontalAlignment="Right" | |||
| Grid.Row="0" | |||
| Template="{StaticResource NextButtonTemplate}" /> | |||
| <!--日期几号几号内容显示--> | |||
| <Border Grid.Row="1" | |||
| Grid.ColumnSpan="3" | |||
| Margin="0" | |||
| BorderBrush="#cfcfcf" | |||
| BorderThickness="3,0,3,3"> | |||
| <Grid x:Name="PART_MonthView" | |||
| HorizontalAlignment="Center" | |||
| Visibility="Visible"> | |||
| <Grid.ColumnDefinitions> | |||
| <ColumnDefinition Width="*" /> | |||
| <ColumnDefinition Width="*" /> | |||
| <ColumnDefinition Width="*" /> | |||
| <ColumnDefinition Width="*" /> | |||
| <ColumnDefinition Width="*" /> | |||
| <ColumnDefinition Width="*" /> | |||
| <ColumnDefinition Width="*" /> | |||
| </Grid.ColumnDefinitions> | |||
| <Grid.RowDefinitions> | |||
| <RowDefinition Height="auto" /> | |||
| <RowDefinition Height="*" /> | |||
| <RowDefinition Height="*" /> | |||
| <RowDefinition Height="*" /> | |||
| <RowDefinition Height="*" /> | |||
| <RowDefinition Height="*" /> | |||
| <RowDefinition Height="*" /> | |||
| </Grid.RowDefinitions> | |||
| </Grid> | |||
| </Border> | |||
| <!--月和年内容显示--> | |||
| <Grid x:Name="PART_YearView" | |||
| Grid.ColumnSpan="3" | |||
| HorizontalAlignment="Center" | |||
| Margin="6,-3,7,6" | |||
| Grid.Row="1" | |||
| Visibility="Hidden" | |||
| VerticalAlignment="Center"> | |||
| <Grid.ColumnDefinitions> | |||
| <ColumnDefinition Width="*" /> | |||
| <ColumnDefinition Width="*" /> | |||
| <ColumnDefinition Width="*" /> | |||
| <ColumnDefinition Width="*" /> | |||
| </Grid.ColumnDefinitions> | |||
| <Grid.RowDefinitions> | |||
| <RowDefinition Height="*" /> | |||
| <RowDefinition Height="*" /> | |||
| <RowDefinition Height="*" /> | |||
| </Grid.RowDefinitions> | |||
| </Grid> | |||
| </Grid> | |||
| </Border> | |||
| </Border> | |||
| <!--日历不可用的遮罩层--> | |||
| <Rectangle x:Name="PART_DisabledVisual" | |||
| Fill="{StaticResource DisabledColor}" | |||
| Opacity="0" | |||
| RadiusY="2" | |||
| RadiusX="2" | |||
| Stretch="Fill" | |||
| Stroke="{StaticResource DisabledColor}" | |||
| StrokeThickness="1" | |||
| Visibility="Collapsed" /> | |||
| </Grid> | |||
| <!--触发器属性--> | |||
| <ControlTemplate.Triggers> | |||
| <Trigger Property="IsEnabled" | |||
| Value="False"> | |||
| <Setter Property="Visibility" | |||
| TargetName="PART_DisabledVisual" | |||
| Value="Visible" /> | |||
| </Trigger> | |||
| <DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" | |||
| Value="Year"> | |||
| <Setter Property="Visibility" | |||
| TargetName="PART_MonthView" | |||
| Value="Hidden" /> | |||
| <Setter Property="Visibility" | |||
| TargetName="PART_YearView" | |||
| Value="Visible" /> | |||
| </DataTrigger> | |||
| <DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" | |||
| Value="Decade"> | |||
| <Setter Property="Visibility" | |||
| TargetName="PART_MonthView" | |||
| Value="Hidden" /> | |||
| <Setter Property="Visibility" | |||
| TargetName="PART_YearView" | |||
| Value="Visible" /> | |||
| </DataTrigger> | |||
| </ControlTemplate.Triggers> | |||
| </ControlTemplate> | |||
| </Setter.Value> | |||
| </Setter> | |||
| </Style> | |||
| <!--单个几号几号按钮的样式模版--> | |||
| <Style x:Key="CalendarDayButtonStyle1" | |||
| TargetType="{x:Type CalendarDayButton}" > | |||
| <Setter Property="Margin" | |||
| Value="1" /> | |||
| <Setter Property="MinWidth" | |||
| Value="5" /> | |||
| <Setter Property="MinHeight" | |||
| Value="5" /> | |||
| <Setter Property="FontSize" | |||
| Value="22" /> | |||
| <Setter Property="FontFamily" | |||
| Value="微软雅黑" /> | |||
| <Setter Property="HorizontalContentAlignment" | |||
| Value="Center" /> | |||
| <Setter Property="VerticalContentAlignment" | |||
| Value="Center" /> | |||
| <Setter Property="Template"> | |||
| <Setter.Value> | |||
| <ControlTemplate TargetType="{x:Type CalendarDayButton}"> | |||
| <Grid> | |||
| <VisualStateManager.VisualStateGroups> | |||
| <VisualStateGroup x:Name="CommonStates"> | |||
| <VisualStateGroup.Transitions> | |||
| <VisualTransition GeneratedDuration="0:0:0.1" /> | |||
| </VisualStateGroup.Transitions> | |||
| <VisualState x:Name="Normal" /> | |||
| <!--悬停的颜色动画--> | |||
| <VisualState x:Name="MouseOver"> | |||
| <Storyboard> | |||
| <DoubleAnimation Duration="0" | |||
| To="0.5" | |||
| Storyboard.TargetProperty="Opacity" | |||
| Storyboard.TargetName="HighlightBackground" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| <!--按下后动画--> | |||
| <VisualState x:Name="Pressed"> | |||
| <Storyboard> | |||
| <DoubleAnimation Duration="0" | |||
| To="0.5" | |||
| Storyboard.TargetProperty="Opacity" | |||
| Storyboard.TargetName="HighlightBackground" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| <!--不可用动画--> | |||
| <VisualState x:Name="Disabled"> | |||
| <Storyboard> | |||
| <DoubleAnimation Duration="0" | |||
| To="0" | |||
| Storyboard.TargetProperty="Opacity" | |||
| Storyboard.TargetName="HighlightBackground" /> | |||
| <DoubleAnimation Duration="0" | |||
| To=".35" | |||
| Storyboard.TargetProperty="Opacity" | |||
| Storyboard.TargetName="NormalText" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| </VisualStateGroup> | |||
| <VisualStateGroup x:Name="SelectionStates"> | |||
| <VisualStateGroup.Transitions> | |||
| <VisualTransition GeneratedDuration="0" /> | |||
| </VisualStateGroup.Transitions> | |||
| <VisualState x:Name="Unselected" /> | |||
| <!--选中某日期的样式--> | |||
| <VisualState x:Name="Selected"> | |||
| <Storyboard> | |||
| <DoubleAnimation Duration="0" | |||
| To=".75" | |||
| Storyboard.TargetProperty="Opacity" | |||
| Storyboard.TargetName="SelectedBackground" /> | |||
| <ColorAnimation Duration="0" | |||
| To="white" | |||
| Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" | |||
| Storyboard.TargetName="NormalText" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| </VisualStateGroup> | |||
| <VisualStateGroup x:Name="CalendarButtonFocusStates"> | |||
| <VisualStateGroup.Transitions> | |||
| <VisualTransition GeneratedDuration="0" /> | |||
| </VisualStateGroup.Transitions> | |||
| <VisualState x:Name="CalendarButtonFocused"> | |||
| <Storyboard> | |||
| <ObjectAnimationUsingKeyFrames Duration="0" | |||
| Storyboard.TargetProperty="Visibility" | |||
| Storyboard.TargetName="DayButtonFocusVisual"> | |||
| <DiscreteObjectKeyFrame KeyTime="0"> | |||
| <DiscreteObjectKeyFrame.Value> | |||
| <Visibility>Visible</Visibility> | |||
| </DiscreteObjectKeyFrame.Value> | |||
| </DiscreteObjectKeyFrame> | |||
| </ObjectAnimationUsingKeyFrames> | |||
| </Storyboard> | |||
| </VisualState> | |||
| <VisualState x:Name="CalendarButtonUnfocused"> | |||
| <Storyboard> | |||
| <ObjectAnimationUsingKeyFrames Duration="0" | |||
| Storyboard.TargetProperty="Visibility" | |||
| Storyboard.TargetName="DayButtonFocusVisual"> | |||
| <DiscreteObjectKeyFrame KeyTime="0"> | |||
| <DiscreteObjectKeyFrame.Value> | |||
| <Visibility>Collapsed</Visibility> | |||
| </DiscreteObjectKeyFrame.Value> | |||
| </DiscreteObjectKeyFrame> | |||
| </ObjectAnimationUsingKeyFrames> | |||
| </Storyboard> | |||
| </VisualState> | |||
| </VisualStateGroup> | |||
| <VisualStateGroup x:Name="ActiveStates"> | |||
| <VisualStateGroup.Transitions> | |||
| <VisualTransition GeneratedDuration="0" /> | |||
| </VisualStateGroup.Transitions> | |||
| <VisualState x:Name="Active" /> | |||
| <VisualState x:Name="Inactive"> | |||
| <Storyboard> | |||
| <ColorAnimation Duration="0" | |||
| To="#b4b3b3" | |||
| Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" | |||
| Storyboard.TargetName="NormalText" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| </VisualStateGroup> | |||
| <VisualStateGroup x:Name="DayStates"> | |||
| <VisualStateGroup.Transitions> | |||
| <VisualTransition GeneratedDuration="0" /> | |||
| </VisualStateGroup.Transitions> | |||
| <VisualState x:Name="RegularDay" /> | |||
| <!--今天的样式--> | |||
| <VisualState x:Name="Today"> | |||
| <Storyboard> | |||
| <DoubleAnimation Duration="0" | |||
| To="1" | |||
| Storyboard.TargetProperty="Opacity" | |||
| Storyboard.TargetName="TodayBackground" /> | |||
| <ColorAnimation Duration="0" | |||
| To="#666666" | |||
| Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" | |||
| Storyboard.TargetName="NormalText" /> | |||
| <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" | |||
| Storyboard.TargetName="imgToday"> | |||
| <DiscreteObjectKeyFrame KeyTime="0"> | |||
| <DiscreteObjectKeyFrame.Value> | |||
| <Visibility>Visible</Visibility> | |||
| </DiscreteObjectKeyFrame.Value> | |||
| </DiscreteObjectKeyFrame> | |||
| </ObjectAnimationUsingKeyFrames> | |||
| </Storyboard> | |||
| </VisualState> | |||
| </VisualStateGroup> | |||
| <!--过期日期的--> | |||
| <VisualStateGroup x:Name="BlackoutDayStates"> | |||
| <VisualStateGroup.Transitions> | |||
| <VisualTransition GeneratedDuration="0" /> | |||
| </VisualStateGroup.Transitions> | |||
| <VisualState x:Name="NormalDay" /> | |||
| <VisualState x:Name="BlackoutDay"> | |||
| <Storyboard> | |||
| <DoubleAnimation Duration="0" | |||
| To=".2" | |||
| Storyboard.TargetProperty="Opacity" | |||
| Storyboard.TargetName="Blackout" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| </VisualStateGroup> | |||
| </VisualStateManager.VisualStateGroups> | |||
| <Border BorderBrush="#bbbbbb" | |||
| BorderThickness="1"> | |||
| <Border BorderBrush="white" | |||
| BorderThickness="2,2,0,0" | |||
| Margin="1,1,0,0"></Border> | |||
| </Border> | |||
| <Rectangle x:Name="TodayBackground" | |||
| Fill="#c6c6c6" | |||
| Opacity="0" | |||
| RadiusY="1" | |||
| RadiusX="1" /> | |||
| <Rectangle x:Name="SelectedBackground" | |||
| Fill="#6eafbf" | |||
| Opacity="0" | |||
| RadiusY="1" | |||
| RadiusX="1" /> | |||
| <Border BorderBrush="{TemplateBinding BorderBrush}" | |||
| BorderThickness="{TemplateBinding BorderThickness}" | |||
| Background="{TemplateBinding Background}" /> | |||
| <Rectangle x:Name="HighlightBackground" | |||
| Fill="#FFBADDE9" | |||
| Opacity="0" | |||
| RadiusY="1" | |||
| RadiusX="1" /> | |||
| <ContentPresenter x:Name="NormalText" | |||
| TextElement.Foreground="#666666" | |||
| HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" | |||
| VerticalAlignment="{TemplateBinding VerticalContentAlignment}" /> | |||
| <Path x:Name="Blackout" | |||
| Data="M8.1772461,11.029181 L10.433105,11.029181 L11.700684,12.801641 L12.973633,11.029181 L15.191895,11.029181 L12.844727,13.999395 L15.21875,17.060919 L12.962891,17.060919 L11.673828,15.256231 L10.352539,17.060919 L8.1396484,17.060919 L10.519043,14.042364 z" | |||
| Fill="#FF000000" | |||
| HorizontalAlignment="Stretch" | |||
| Margin="3" | |||
| Opacity="0" | |||
| RenderTransformOrigin="0.5,0.5" | |||
| Stretch="Fill" | |||
| VerticalAlignment="Stretch" /> | |||
| <Rectangle x:Name="DayButtonFocusVisual" | |||
| IsHitTestVisible="false" | |||
| RadiusY="1" | |||
| RadiusX="1" | |||
| Stroke="#FF45D6FA" | |||
| Visibility="Collapsed" /> | |||
| <Image x:Name="imgToday" | |||
| Width="44" | |||
| Height="34" | |||
| VerticalAlignment="Top" | |||
| HorizontalAlignment="Left" | |||
| Initialized="imgToday_Initialized" | |||
| Visibility="Hidden" /> | |||
| </Grid> | |||
| </ControlTemplate> | |||
| </Setter.Value> | |||
| </Setter> | |||
| </Style> | |||
| <Style x:Key="CalendarButtonStyle1" | |||
| TargetType="{x:Type CalendarButton}" > | |||
| <Setter Property="Background" | |||
| Value="#FFBADDE9" /> | |||
| <Setter Property="MinWidth" | |||
| Value="80" /> | |||
| <Setter Property="MinHeight" | |||
| Value="80" /> | |||
| <Setter Property="Margin" | |||
| Value="20" /> | |||
| <Setter Property="FontSize" | |||
| Value="25" /> | |||
| <Setter Property="HorizontalContentAlignment" | |||
| Value="Center" /> | |||
| <Setter Property="VerticalContentAlignment" | |||
| Value="Center" /> | |||
| <Setter Property="Template"> | |||
| <Setter.Value> | |||
| <ControlTemplate TargetType="{x:Type CalendarButton}"> | |||
| <Grid> | |||
| <VisualStateManager.VisualStateGroups> | |||
| <VisualStateGroup x:Name="CommonStates"> | |||
| <VisualStateGroup.Transitions> | |||
| <VisualTransition GeneratedDuration="0:0:0.1" /> | |||
| </VisualStateGroup.Transitions> | |||
| <VisualState x:Name="Normal" /> | |||
| <VisualState x:Name="MouseOver"> | |||
| <Storyboard> | |||
| <DoubleAnimation Duration="0" | |||
| To=".5" | |||
| Storyboard.TargetProperty="Opacity" | |||
| Storyboard.TargetName="Background" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| <VisualState x:Name="Pressed"> | |||
| <Storyboard> | |||
| <DoubleAnimation Duration="0" | |||
| To=".5" | |||
| Storyboard.TargetProperty="Opacity" | |||
| Storyboard.TargetName="Background" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| </VisualStateGroup> | |||
| <VisualStateGroup x:Name="SelectionStates"> | |||
| <VisualStateGroup.Transitions> | |||
| <VisualTransition GeneratedDuration="0" /> | |||
| </VisualStateGroup.Transitions> | |||
| <VisualState x:Name="Unselected" /> | |||
| <VisualState x:Name="Selected"> | |||
| <Storyboard> | |||
| <DoubleAnimation Duration="0" | |||
| To=".75" | |||
| Storyboard.TargetProperty="Opacity" | |||
| Storyboard.TargetName="SelectedBackground" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| </VisualStateGroup> | |||
| <VisualStateGroup x:Name="ActiveStates"> | |||
| <VisualStateGroup.Transitions> | |||
| <VisualTransition GeneratedDuration="0" /> | |||
| </VisualStateGroup.Transitions> | |||
| <VisualState x:Name="Active" /> | |||
| <VisualState x:Name="Inactive"> | |||
| <Storyboard> | |||
| <ColorAnimation Duration="0" | |||
| To="#FF777777" | |||
| Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" | |||
| Storyboard.TargetName="NormalText" /> | |||
| </Storyboard> | |||
| </VisualState> | |||
| </VisualStateGroup> | |||
| <VisualStateGroup x:Name="CalendarButtonFocusStates"> | |||
| <VisualStateGroup.Transitions> | |||
| <VisualTransition GeneratedDuration="0" /> | |||
| </VisualStateGroup.Transitions> | |||
| <VisualState x:Name="CalendarButtonFocused"> | |||
| <Storyboard> | |||
| <ObjectAnimationUsingKeyFrames Duration="0" | |||
| Storyboard.TargetProperty="Visibility" | |||
| Storyboard.TargetName="CalendarButtonFocusVisual"> | |||
| <DiscreteObjectKeyFrame KeyTime="0"> | |||
| <DiscreteObjectKeyFrame.Value> | |||
| <Visibility>Visible</Visibility> | |||
| </DiscreteObjectKeyFrame.Value> | |||
| </DiscreteObjectKeyFrame> | |||
| </ObjectAnimationUsingKeyFrames> | |||
| </Storyboard> | |||
| </VisualState> | |||
| <VisualState x:Name="CalendarButtonUnfocused"> | |||
| <Storyboard> | |||
| <ObjectAnimationUsingKeyFrames Duration="0" | |||
| Storyboard.TargetProperty="Visibility" | |||
| Storyboard.TargetName="CalendarButtonFocusVisual"> | |||
| <DiscreteObjectKeyFrame KeyTime="0"> | |||
| <DiscreteObjectKeyFrame.Value> | |||
| <Visibility>Collapsed</Visibility> | |||
| </DiscreteObjectKeyFrame.Value> | |||
| </DiscreteObjectKeyFrame> | |||
| </ObjectAnimationUsingKeyFrames> | |||
| </Storyboard> | |||
| </VisualState> | |||
| </VisualStateGroup> | |||
| </VisualStateManager.VisualStateGroups> | |||
| <Rectangle x:Name="SelectedBackground" | |||
| Fill="{TemplateBinding Background}" | |||
| Opacity="0" | |||
| RadiusY="1" | |||
| RadiusX="1" /> | |||
| <Rectangle x:Name="Background" | |||
| Fill="{TemplateBinding Background}" | |||
| Opacity="0" | |||
| RadiusY="1" | |||
| RadiusX="1" /> | |||
| <ContentPresenter x:Name="NormalText" | |||
| TextElement.Foreground="#FF333333" | |||
| HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" | |||
| Margin="1,0,1,1" | |||
| VerticalAlignment="{TemplateBinding VerticalContentAlignment}" /> | |||
| <Rectangle x:Name="CalendarButtonFocusVisual" | |||
| IsHitTestVisible="false" | |||
| RadiusY="1" | |||
| RadiusX="1" | |||
| Stroke="#FF45D6FA" | |||
| Visibility="Collapsed" /> | |||
| </Grid> | |||
| <ControlTemplate.Triggers> | |||
| <Trigger Property="IsFocused" | |||
| Value="True"> | |||
| <Setter Property="Visibility" | |||
| TargetName="CalendarButtonFocusVisual" | |||
| Value="Visible" /> | |||
| </Trigger> | |||
| </ControlTemplate.Triggers> | |||
| </ControlTemplate> | |||
| </Setter.Value> | |||
| </Setter> | |||
| </Style> | |||
| </Window.Resources> | |||
| <Grid x:Name="LayoutRoot"> | |||
| <Calendar x:Name="MC" Style="{DynamicResource CalendarStyle1}" | |||
| CalendarItemStyle="{DynamicResource CalendarItemStyle1}" | |||
| CalendarDayButtonStyle="{DynamicResource CalendarDayButtonStyle1}" | |||
| CalendarButtonStyle="{DynamicResource CalendarButtonStyle1}" | |||
| SelectedDatesChanged="MC_SelectedDatesChanged" | |||
| Width="500" | |||
| Height="500"> | |||
| </Calendar> | |||
| </Grid> | |||
| </Window> | |||
| @ -0,0 +1,73 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel; | |||
| using System.IO; | |||
| using System.Linq; | |||
| using System.Reflection; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows; | |||
| using System.Windows.Controls; | |||
| using System.Windows.Data; | |||
| using System.Windows.Documents; | |||
| using System.Windows.Input; | |||
| using System.Windows.Media; | |||
| using System.Windows.Media.Imaging; | |||
| using System.Windows.Navigation; | |||
| using System.Windows.Shapes; | |||
| namespace BWP.WinFormControl | |||
| { | |||
| /// <summary> | |||
| /// Calendar.xaml 的交互逻辑 | |||
| /// </summary> | |||
| public partial class CalendarSelecter : Window, INotifyPropertyChanged | |||
| { | |||
| public CalendarSelecter() | |||
| { | |||
| InitializeComponent(); | |||
| } | |||
| public void DragWindow(object sender, MouseButtonEventArgs args) | |||
| { | |||
| this.DragMove(); | |||
| } | |||
| private DateTime _result; | |||
| public DateTime Result | |||
| { | |||
| get { return _result; } | |||
| private set { _result = value; OnPropertyChanged("Result"); } | |||
| } | |||
| private void MC_SelectedDatesChanged(object sender, RoutedEventArgs e) | |||
| { | |||
| Result = MC.SelectedDate.Value; | |||
| DialogResult = true; | |||
| } | |||
| public event PropertyChangedEventHandler PropertyChanged; | |||
| protected void OnPropertyChanged(string propertyName) | |||
| { | |||
| if (PropertyChanged != null) | |||
| PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); | |||
| } | |||
| private void imgToday_Initialized(object sender, EventArgs e) | |||
| { | |||
| Assembly myAssembly = Assembly.GetExecutingAssembly(); | |||
| //格式为:项目名称-文件夹地址-文件名称 | |||
| Stream myStream = myAssembly.GetManifestResourceStream("BWP.WinFormControl.Images.today.png"); | |||
| //图片格式 | |||
| BitmapImage image = new BitmapImage(); | |||
| image.BeginInit(); | |||
| image.StreamSource = myStream; | |||
| image.EndInit(); | |||
| myStream.Dispose(); | |||
| myStream.Close(); | |||
| var imagePanel = (sender as Image); | |||
| imagePanel.Source = image; | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,47 @@ | |||
| using Forks.JsonRpc.Client; | |||
| using Forks.JsonRpc.Client.Data; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace BWP.WinFormControl | |||
| { | |||
| internal static class ComboBoxHelper | |||
| { | |||
| public static List<WordPair> GetList(string rpc, string input, string codeArg, int range) | |||
| { | |||
| var list = RpcFacade.Call<List<RpcObject>>(rpc, input, codeArg, range); | |||
| var result = new List<WordPair>(); | |||
| foreach (var item in list) | |||
| { | |||
| result.Add(new WordPair(item.Get<string>("DisplayName"), item.Get<string>("PhyName"))); | |||
| } | |||
| return result; | |||
| } | |||
| } | |||
| public sealed class WordPair | |||
| { | |||
| public string DisplayName { get; private set; } | |||
| public string PhyName { get; private set; } | |||
| public WordPair() | |||
| { } | |||
| public WordPair(string display) | |||
| { | |||
| DisplayName = display; | |||
| } | |||
| public WordPair(string display, string phy) | |||
| { | |||
| DisplayName = display; | |||
| PhyName = phy; | |||
| } | |||
| public override string ToString() | |||
| { | |||
| return DisplayName; | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,29 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace BWP.WinFormControl | |||
| { | |||
| static class ComponentUtil | |||
| { | |||
| public static Form GetParentFormm(Control control) | |||
| { | |||
| if (control.Parent != null) | |||
| { | |||
| if (control.Parent is Form) | |||
| { | |||
| return control.Parent as Form; ; | |||
| } | |||
| else | |||
| { | |||
| return GetParentFormm(control.Parent); | |||
| } | |||
| } | |||
| return control as Form; | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,63 @@ | |||
| <Window x:Class="BWP.WinFormControl.NumberPad" | |||
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||
| Title="数字键盘" 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> | |||
| @ -0,0 +1,69 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows; | |||
| using System.Windows.Controls; | |||
| using System.Windows.Data; | |||
| using System.Windows.Documents; | |||
| using System.Windows.Input; | |||
| using System.Windows.Media; | |||
| using System.Windows.Media.Imaging; | |||
| using System.Windows.Navigation; | |||
| using System.Windows.Shapes; | |||
| namespace BWP.WinFormControl | |||
| { | |||
| public partial class NumberPad : INotifyPropertyChanged | |||
| { | |||
| private string _result; | |||
| public string Result | |||
| { | |||
| get { return _result; } | |||
| private set { _result = value; OnPropertyChanged("Result"); } | |||
| } | |||
| public NumberPad() | |||
| { | |||
| InitializeComponent(); | |||
| DataContext = this; | |||
| Result = string.Empty; | |||
| } | |||
| private void button_Click(object sender, RoutedEventArgs e) | |||
| { | |||
| var button = sender as Button; | |||
| if (button != null) | |||
| switch (button.CommandParameter.ToString()) | |||
| { | |||
| case "ESC": | |||
| 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; | |||
| } | |||
| } | |||
| public event PropertyChangedEventHandler PropertyChanged; | |||
| private void OnPropertyChanged(String info) | |||
| { | |||
| if (PropertyChanged != null) | |||
| { | |||
| PropertyChanged(this, new PropertyChangedEventArgs(info)); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,36 @@ | |||
| using System.Reflection; | |||
| using System.Runtime.CompilerServices; | |||
| using System.Runtime.InteropServices; | |||
| // 有关程序集的常规信息通过以下 | |||
| // 特性集控制。更改这些特性值可修改 | |||
| // 与程序集关联的信息。 | |||
| [assembly: AssemblyTitle("BWP.WinFormControl")] | |||
| [assembly: AssemblyDescription("")] | |||
| [assembly: AssemblyConfiguration("")] | |||
| [assembly: AssemblyCompany("")] | |||
| [assembly: AssemblyProduct("BWP.WinFormControl")] | |||
| [assembly: AssemblyCopyright("Copyright © 2017")] | |||
| [assembly: AssemblyTrademark("")] | |||
| [assembly: AssemblyCulture("")] | |||
| // 将 ComVisible 设置为 false 使此程序集中的类型 | |||
| // 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, | |||
| // 则将该类型上的 ComVisible 特性设置为 true。 | |||
| [assembly: ComVisible(false)] | |||
| // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||
| [assembly: Guid("6d34d96e-7995-42bd-89bf-40cc1329d752")] | |||
| // 程序集的版本信息由下面四个值组成: | |||
| // | |||
| // 主版本 | |||
| // 次版本 | |||
| // 生成号 | |||
| // 修订号 | |||
| // | |||
| // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, | |||
| // 方法是按如下所示使用“*”: | |||
| // [assembly: AssemblyVersion("1.0.*")] | |||
| [assembly: AssemblyVersion("1.0.0.0")] | |||
| [assembly: AssemblyFileVersion("1.0.0.0")] | |||
| @ -0,0 +1,161 @@ | |||
| using System; | |||
| using System.Collections; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Runtime.InteropServices; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace BWP.WinFormControl | |||
| { | |||
| public class UComboBox : ComboBox | |||
| { | |||
| ToolTip itemTip = null; | |||
| public UComboBox() | |||
| { | |||
| this.DropDown += (sender, de) => | |||
| { | |||
| CRefreshItems(); | |||
| //if (string.IsNullOrEmpty(this.Text)) | |||
| // return; | |||
| //if (_enableTopItem && Items.Count > 1) | |||
| // this.SelectedIndex = 1; | |||
| //else if (!_enableTopItem && Items.Count > 0) | |||
| // this.SelectedIndex = 0; | |||
| }; | |||
| this.DrawMode = DrawMode.OwnerDrawFixed; | |||
| this.DrawItem += new DrawItemEventHandler(cb_DrawItem); | |||
| this.DropDownClosed += new EventHandler(cb_DropDownClosed); | |||
| itemTip = new ToolTip(); | |||
| itemTip.SetToolTip(this, ""); | |||
| } | |||
| void cb_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e) | |||
| { | |||
| // 绘制背景 | |||
| e.DrawBackground(); | |||
| //绘制列表项目 | |||
| e.Graphics.DrawString(this.Items[e.Index].ToString(), e.Font, System.Drawing.Brushes.Black, e.Bounds); | |||
| //将高亮的列表项目的文字传递到toolTip1(之前建立ToolTip的一个实例) | |||
| if ((e.State & DrawItemState.Selected) == DrawItemState.Selected) | |||
| itemTip.Show(this.Items[e.Index].ToString(), this, e.Bounds.X + e.Bounds.Width, e.Bounds.Y + e.Bounds.Height); | |||
| e.DrawFocusRectangle(); | |||
| } | |||
| void cb_DropDownClosed(object sender, EventArgs e) | |||
| { | |||
| itemTip.Hide(this); | |||
| } | |||
| public string DefaultServerPath = "/MainSystem/B3ClientService/Rpcs/"; | |||
| public string CodeArgs { get; set; } | |||
| private bool _enableTopItem = true; | |||
| public bool EnableTopItem | |||
| { | |||
| get { return _enableTopItem; } | |||
| set { _enableTopItem = value; } | |||
| } | |||
| private int range = 10; | |||
| public int Range | |||
| { | |||
| get { return range; } | |||
| set { range = value; } | |||
| } | |||
| private string rpcPath; | |||
| public void Init(string _rpcPath) | |||
| { | |||
| rpcPath = _rpcPath; | |||
| if (string.IsNullOrEmpty(rpcPath)) | |||
| return; | |||
| rpcPath = string.Format("{0}{1}", DefaultServerPath, rpcPath); | |||
| } | |||
| protected override void OnKeyUp(KeyEventArgs e) | |||
| { | |||
| base.OnKeyUp(e); | |||
| if (e.KeyCode == System.Windows.Forms.Keys.Enter) | |||
| { | |||
| if (string.IsNullOrEmpty(this.Text) || this.DisplayValue != this.Text || string.IsNullOrEmpty(this.SelectedText)) | |||
| { | |||
| if (!this.DroppedDown) | |||
| this.DroppedDown = true; | |||
| } | |||
| } | |||
| } | |||
| private new WordPair SelectedValue | |||
| { | |||
| get | |||
| { | |||
| if (this.SelectedItem == null) | |||
| return null; | |||
| var result = this.SelectedItem as WordPair; | |||
| if (string.IsNullOrEmpty(result.PhyName) && string.IsNullOrEmpty(result.DisplayName)) | |||
| return null; | |||
| return result; | |||
| } | |||
| } | |||
| void CRefreshItems() | |||
| { | |||
| var inputArgs = string.Empty; | |||
| if (this.SelectedValue == null) | |||
| inputArgs = this.Text; | |||
| var list = ComboBoxHelper.GetList(rpcPath, inputArgs, CodeArgs, Range); | |||
| if (_enableTopItem) | |||
| list.Insert(0, new WordPair(string.Empty)); | |||
| this.Items.Clear(); | |||
| foreach (var item in list) | |||
| this.Items.Add(item); | |||
| this.DisplayMember = "DisplayName"; | |||
| this.ValueMember = "PhyName"; | |||
| } | |||
| public void Fill(string displayValue, string phyValue) | |||
| { | |||
| this.SelectedItem = new WordPair(displayValue, phyValue); | |||
| } | |||
| public bool IsEmpty | |||
| { | |||
| get { return SelectedValue == null; } | |||
| } | |||
| public string DisplayValue | |||
| { | |||
| get | |||
| { | |||
| if (SelectedValue == null) | |||
| return string.Empty; | |||
| return SelectedValue.DisplayName; | |||
| } | |||
| } | |||
| public string Value | |||
| { | |||
| get | |||
| { | |||
| if (SelectedValue == null) | |||
| return string.Empty; | |||
| return SelectedValue.PhyName; | |||
| } | |||
| } | |||
| public long? LongValue | |||
| { | |||
| get | |||
| { | |||
| if (SelectedValue == null) | |||
| return null; | |||
| long v; | |||
| if (long.TryParse(SelectedValue.PhyName, out v)) | |||
| return v; | |||
| return null; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,72 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Drawing; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace BWP.WinFormControl | |||
| { | |||
| public class UDatePicker : Label | |||
| { | |||
| public DateTime? Date | |||
| { | |||
| set | |||
| { | |||
| if (value == null) | |||
| { | |||
| this.Text = string.Empty; | |||
| return; | |||
| } | |||
| var format = "yyyy/MM/dd"; | |||
| if (_type == DateTimeType.DateTime) | |||
| format = "yyyy/MM/dd HH:mm:ss"; | |||
| this.Text = value.Value.ToString(format); | |||
| } | |||
| get | |||
| { | |||
| if (string.IsNullOrEmpty(this.Text)) | |||
| return null; | |||
| return DateTime.Parse(this.Text); | |||
| } | |||
| } | |||
| private DateTimeType _type = DateTimeType.Date; | |||
| public DateTimeType Type | |||
| { | |||
| get { return _type; } | |||
| set { _type = value; } | |||
| } | |||
| public UDatePicker() | |||
| { | |||
| this.BorderStyle = BorderStyle.FixedSingle; | |||
| this.BackColor = Color.White; | |||
| this.Font = new Font("宋体", 15); | |||
| this.TextAlign = ContentAlignment.MiddleLeft; | |||
| AutoSize = false; | |||
| } | |||
| protected override void InitLayout() | |||
| { | |||
| base.InitLayout(); | |||
| Date = DateTime.Now; | |||
| } | |||
| protected override void OnClick(EventArgs e) | |||
| { | |||
| var cs = new CalendarSelecter(); | |||
| if (cs.ShowDialog() == true) | |||
| { | |||
| Date = cs.Result + new TimeSpan(DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second); | |||
| } | |||
| } | |||
| } | |||
| public enum DateTimeType | |||
| { | |||
| Date, | |||
| DateTime | |||
| } | |||
| } | |||
| @ -0,0 +1,47 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Drawing; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace BWP.WinFormControl | |||
| { | |||
| public class UTextBoxWithPad: TextBox | |||
| { | |||
| public enum TextBoxType | |||
| { | |||
| Normal, | |||
| Number | |||
| } | |||
| public UTextBoxWithPad() | |||
| { | |||
| this.Font = new Font("宋体", 20); | |||
| } | |||
| public TextBoxType Type { get; set; } | |||
| protected override void OnClick(EventArgs e) | |||
| { | |||
| if (this.Type == TextBoxType.Normal) | |||
| { | |||
| var keyBoard = new VirtualKeyPad(); | |||
| if (keyBoard.ShowDialog() == true) | |||
| this.Text = keyBoard.Result; | |||
| } | |||
| else | |||
| { | |||
| var keyBoard = new NumberPad(); | |||
| if (keyBoard.ShowDialog() == true) | |||
| this.Text = keyBoard.Result; | |||
| } | |||
| base.OnClick(e); | |||
| var form = ComponentUtil.GetParentFormm(this); | |||
| form.Activate(); | |||
| this.Focus(); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,355 @@ | |||
| <Window x:Class="BWP.WinFormControl.VirtualKeyPad" | |||
| 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:BWP.WinFormControl.Converter" | |||
| Height="350" Width="1000" x:Name="Keyboard" WindowStartupLocation="CenterScreen" ShowInTaskbar="False" Title="键盘"> | |||
| <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="&"/> | |||
| <Button Grid.Column="9" CommandParameter="O" Content="@"/> | |||
| <Button Grid.Column="10" CommandParameter="P" Content="""/> | |||
| <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> | |||
| @ -0,0 +1,104 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Text.RegularExpressions; | |||
| using System.Threading.Tasks; | |||
| using System.Windows; | |||
| using System.Windows.Controls; | |||
| using System.Windows.Data; | |||
| using System.Windows.Documents; | |||
| using System.Windows.Input; | |||
| using System.Windows.Media; | |||
| using System.Windows.Media.Imaging; | |||
| using System.Windows.Navigation; | |||
| using System.Windows.Shapes; | |||
| namespace BWP.WinFormControl | |||
| { | |||
| /// <summary> | |||
| /// VirtualKeyPad.xaml 的交互逻辑 | |||
| /// </summary> | |||
| public partial class VirtualKeyPad : INotifyPropertyChanged | |||
| { | |||
| 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"); } | |||
| } | |||
| public VirtualKeyPad() | |||
| { | |||
| 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 "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; | |||
| } | |||
| } | |||
| } | |||
| public event PropertyChangedEventHandler PropertyChanged; | |||
| protected void OnPropertyChanged(string propertyName) | |||
| { | |||
| if (PropertyChanged != null) | |||
| PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,90 @@ | |||
| namespace BWP.WinFormControl | |||
| { | |||
| partial class WeightControl | |||
| { | |||
| /// <summary> | |||
| /// 必需的设计器变量。 | |||
| /// </summary> | |||
| private System.ComponentModel.IContainer components = null; | |||
| /// <summary> | |||
| /// 清理所有正在使用的资源。 | |||
| /// </summary> | |||
| /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> | |||
| protected override void Dispose(bool disposing) | |||
| { | |||
| if (disposing && (components != null)) | |||
| { | |||
| components.Dispose(); | |||
| } | |||
| base.Dispose(disposing); | |||
| } | |||
| #region 组件设计器生成的代码 | |||
| /// <summary> | |||
| /// 设计器支持所需的方法 - 不要 | |||
| /// 使用代码编辑器修改此方法的内容。 | |||
| /// </summary> | |||
| private void InitializeComponent() | |||
| { | |||
| this.panel1 = new System.Windows.Forms.Panel(); | |||
| this.weightLabel = new System.Windows.Forms.Label(); | |||
| this.enableWeightBox = new System.Windows.Forms.CheckBox(); | |||
| this.panel1.SuspendLayout(); | |||
| this.SuspendLayout(); | |||
| // | |||
| // panel1 | |||
| // | |||
| this.panel1.BackColor = System.Drawing.Color.Black; | |||
| this.panel1.Controls.Add(this.weightLabel); | |||
| this.panel1.Location = new System.Drawing.Point(0, 0); | |||
| this.panel1.Name = "panel1"; | |||
| this.panel1.Size = new System.Drawing.Size(155, 57); | |||
| this.panel1.TabIndex = 0; | |||
| // | |||
| // weightLabel | |||
| // | |||
| this.weightLabel.AutoSize = true; | |||
| this.weightLabel.BackColor = System.Drawing.Color.Transparent; | |||
| this.weightLabel.Font = new System.Drawing.Font("宋体", 22F, System.Drawing.FontStyle.Bold); | |||
| this.weightLabel.ForeColor = System.Drawing.Color.Red; | |||
| this.weightLabel.Location = new System.Drawing.Point(5, 13); | |||
| this.weightLabel.Name = "weightLabel"; | |||
| this.weightLabel.Size = new System.Drawing.Size(77, 30); | |||
| this.weightLabel.TabIndex = 0; | |||
| this.weightLabel.Text = "0.00"; | |||
| // | |||
| // enableWeightBox | |||
| // | |||
| this.enableWeightBox.AutoSize = true; | |||
| this.enableWeightBox.Font = new System.Drawing.Font("宋体", 18F); | |||
| this.enableWeightBox.Location = new System.Drawing.Point(16, 60); | |||
| this.enableWeightBox.Name = "enableWeightBox"; | |||
| this.enableWeightBox.Size = new System.Drawing.Size(125, 28); | |||
| this.enableWeightBox.TabIndex = 1; | |||
| this.enableWeightBox.Text = "启用称重"; | |||
| this.enableWeightBox.UseVisualStyleBackColor = true; | |||
| // | |||
| // WeightControl | |||
| // | |||
| this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); | |||
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |||
| this.Controls.Add(this.enableWeightBox); | |||
| this.Controls.Add(this.panel1); | |||
| this.Name = "WeightControl"; | |||
| this.Size = new System.Drawing.Size(156, 92); | |||
| this.panel1.ResumeLayout(false); | |||
| this.panel1.PerformLayout(); | |||
| this.ResumeLayout(false); | |||
| this.PerformLayout(); | |||
| } | |||
| #endregion | |||
| private System.Windows.Forms.Panel panel1; | |||
| private System.Windows.Forms.Label weightLabel; | |||
| private System.Windows.Forms.CheckBox enableWeightBox; | |||
| } | |||
| } | |||
| @ -0,0 +1,24 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel; | |||
| using System.Drawing; | |||
| using System.Data; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace BWP.WinFormControl | |||
| { | |||
| public partial class WeightControl : UserControl | |||
| { | |||
| public Label WeightLabel { get { return weightLabel; } } | |||
| public CheckBox EnableCheckBox { get { return enableWeightBox; } } | |||
| public WeightControl() | |||
| { | |||
| InitializeComponent(); | |||
| } | |||
| } | |||
| } | |||
| @ -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> | |||
| @ -0,0 +1,49 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.IO; | |||
| using System.Linq; | |||
| using System.Reflection; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace ButcherManageClient | |||
| { | |||
| public interface IAfterLogin | |||
| { | |||
| string RoleName { get; } | |||
| Form Generate(); | |||
| } | |||
| internal static class AfterLoginUtil | |||
| { | |||
| static List<Tuple<string, string>> roleToAssemblies = new List<Tuple<string, string>> { | |||
| new Tuple<string,string>("1测试",@"C:\B3Service\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), | |||
| new Tuple<string,string>("_1",@"C:\B3Service\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), | |||
| new Tuple<string,string>("小新",""), | |||
| }; | |||
| public static Form CreateForm(string role) | |||
| { | |||
| var first = roleToAssemblies.FirstOrDefault(x => x.Item1 == role); | |||
| if (first == null) | |||
| throw new Exception("未注册的角色"); | |||
| //var filePath = Path.Combine(Application.StartupPath, string.Format("{0}.dll", first.Item2)); | |||
| var filePath = string.Format("{0}.dll", first.Item2); | |||
| if (!File.Exists(filePath)) | |||
| throw new Exception("相关模块不存在"); | |||
| var formType = typeof(IAfterLogin); | |||
| foreach (var type in Assembly.LoadFile(filePath).GetTypes()) | |||
| { | |||
| if (formType.IsAssignableFrom(type)) | |||
| { | |||
| var instance = (IAfterLogin)Activator.CreateInstance(type); | |||
| if (role == instance.RoleName) | |||
| return instance.Generate(); | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,6 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
| <configuration> | |||
| <startup> | |||
| <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | |||
| </startup> | |||
| </configuration> | |||
| @ -0,0 +1,61 @@ | |||
| using BO.Utils; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.IO; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace ButcherManageClient | |||
| { | |||
| public class AppContext | |||
| { | |||
| private static string loginConfigPath = Application.StartupPath + "\\Config.xml"; | |||
| public ServerUrlConfig UrlConfig | |||
| { | |||
| get; | |||
| set; | |||
| } | |||
| public LoginUserInfo UserConfig | |||
| { | |||
| get; | |||
| set; | |||
| } | |||
| private AppContext() | |||
| { | |||
| UrlConfig = new ServerUrlConfig(); | |||
| UserConfig = new LoginUserInfo(); | |||
| } | |||
| public static AppContext Context | |||
| { | |||
| get | |||
| { | |||
| if (_appContext == null) | |||
| _appContext = CreateAppContext(); | |||
| return _appContext; | |||
| } | |||
| } | |||
| private static AppContext _appContext; | |||
| static AppContext CreateAppContext() | |||
| { | |||
| var config = new AppContext(); | |||
| if (!File.Exists(loginConfigPath)) | |||
| { | |||
| XmlUtil.SerializerObjToFile(config, loginConfigPath); | |||
| } | |||
| else | |||
| config = XmlUtil.DeserializeFromFile<AppContext>(loginConfigPath); | |||
| return config; | |||
| } | |||
| public void Save() | |||
| { | |||
| XmlUtil.SerializerObjToFile(_appContext, loginConfigPath); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,125 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||
| <PropertyGroup> | |||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
| <ProjectGuid>{59B13436-4884-4533-9C7E-80E8580CBF55}</ProjectGuid> | |||
| <OutputType>WinExe</OutputType> | |||
| <AppDesignerFolder>Properties</AppDesignerFolder> | |||
| <RootNamespace>ButcherManageClient</RootNamespace> | |||
| <AssemblyName>ButcherManageClient</AssemblyName> | |||
| <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |||
| <FileAlignment>512</FileAlignment> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||
| <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|AnyCPU' "> | |||
| <PlatformTarget>AnyCPU</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>..\..\..\..\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.Utils.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="PresentationCore" /> | |||
| <Reference Include="PresentationFramework" /> | |||
| <Reference Include="System" /> | |||
| <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="AfterLoginUtil.cs" /> | |||
| <Compile Include="AppContext.cs" /> | |||
| <Compile Include="Login.cs"> | |||
| <SubType>Form</SubType> | |||
| </Compile> | |||
| <Compile Include="Login.Designer.cs"> | |||
| <DependentUpon>Login.cs</DependentUpon> | |||
| </Compile> | |||
| <Compile Include="Program.cs" /> | |||
| <Compile Include="Properties\AssemblyInfo.cs" /> | |||
| <Compile Include="SettingForm.cs"> | |||
| <SubType>Form</SubType> | |||
| </Compile> | |||
| <Compile Include="SettingForm.Designer.cs"> | |||
| <DependentUpon>SettingForm.cs</DependentUpon> | |||
| </Compile> | |||
| <EmbeddedResource Include="Login.resx"> | |||
| <DependentUpon>Login.cs</DependentUpon> | |||
| </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> | |||
| <EmbeddedResource Include="SettingForm.resx"> | |||
| <DependentUpon>SettingForm.cs</DependentUpon> | |||
| </EmbeddedResource> | |||
| <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" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <ProjectReference Include="..\BO\BO.csproj"> | |||
| <Project>{8968f14a-c7c7-4751-96ce-b114fbfd65ef}</Project> | |||
| <Name>BO</Name> | |||
| </ProjectReference> | |||
| <ProjectReference Include="..\BWP.WinFormControl\BWP.WinFormControl.csproj"> | |||
| <Project>{a782b23e-be6d-4f51-b5cb-5cd259ba97cc}</Project> | |||
| <Name>BWP.WinFormControl</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> | |||
| @ -0,0 +1,144 @@ | |||
| namespace ButcherManageClient | |||
| { | |||
| partial class Login | |||
| { | |||
| /// <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.closeBtn = new System.Windows.Forms.Button(); | |||
| this.loginBtn = new System.Windows.Forms.Button(); | |||
| this.settingBtn = new System.Windows.Forms.Button(); | |||
| this.pwdTxt = new System.Windows.Forms.TextBox(); | |||
| this.userNameTxt = new System.Windows.Forms.TextBox(); | |||
| this.label2 = new System.Windows.Forms.Label(); | |||
| this.label1 = new System.Windows.Forms.Label(); | |||
| this.SuspendLayout(); | |||
| // | |||
| // closeBtn | |||
| // | |||
| this.closeBtn.Font = new System.Drawing.Font("宋体", 20F); | |||
| this.closeBtn.Location = new System.Drawing.Point(233, 211); | |||
| this.closeBtn.Name = "closeBtn"; | |||
| this.closeBtn.Size = new System.Drawing.Size(81, 53); | |||
| this.closeBtn.TabIndex = 13; | |||
| this.closeBtn.Text = "关闭"; | |||
| this.closeBtn.UseVisualStyleBackColor = true; | |||
| this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); | |||
| // | |||
| // loginBtn | |||
| // | |||
| this.loginBtn.Font = new System.Drawing.Font("宋体", 20F); | |||
| this.loginBtn.Location = new System.Drawing.Point(86, 211); | |||
| this.loginBtn.Name = "loginBtn"; | |||
| this.loginBtn.Size = new System.Drawing.Size(81, 53); | |||
| this.loginBtn.TabIndex = 12; | |||
| this.loginBtn.Text = "登录"; | |||
| this.loginBtn.UseVisualStyleBackColor = true; | |||
| this.loginBtn.Click += new System.EventHandler(this.loginBtn_Click); | |||
| // | |||
| // settingBtn | |||
| // | |||
| this.settingBtn.Font = new System.Drawing.Font("宋体", 20F); | |||
| this.settingBtn.Location = new System.Drawing.Point(381, 211); | |||
| this.settingBtn.Name = "settingBtn"; | |||
| this.settingBtn.Size = new System.Drawing.Size(81, 53); | |||
| this.settingBtn.TabIndex = 11; | |||
| this.settingBtn.Text = "设置"; | |||
| this.settingBtn.UseVisualStyleBackColor = true; | |||
| this.settingBtn.Click += new System.EventHandler(this.settingBtn_Click); | |||
| // | |||
| // pwdTxt | |||
| // | |||
| this.pwdTxt.Font = new System.Drawing.Font("宋体", 25F); | |||
| this.pwdTxt.Location = new System.Drawing.Point(243, 127); | |||
| this.pwdTxt.Name = "pwdTxt"; | |||
| this.pwdTxt.PasswordChar = '*'; | |||
| this.pwdTxt.Size = new System.Drawing.Size(219, 46); | |||
| this.pwdTxt.TabIndex = 10; | |||
| this.pwdTxt.Click += new System.EventHandler(this.pwdTxt_Click); | |||
| // | |||
| // userNameTxt | |||
| // | |||
| this.userNameTxt.Font = new System.Drawing.Font("宋体", 25F); | |||
| this.userNameTxt.Location = new System.Drawing.Point(243, 50); | |||
| this.userNameTxt.Name = "userNameTxt"; | |||
| this.userNameTxt.Size = new System.Drawing.Size(219, 46); | |||
| this.userNameTxt.TabIndex = 9; | |||
| this.userNameTxt.Click += new System.EventHandler(this.userNameTxt_Click); | |||
| // | |||
| // label2 | |||
| // | |||
| this.label2.AutoSize = true; | |||
| this.label2.Font = new System.Drawing.Font("宋体", 30F); | |||
| this.label2.Location = new System.Drawing.Point(79, 133); | |||
| this.label2.Name = "label2"; | |||
| this.label2.Size = new System.Drawing.Size(177, 40); | |||
| this.label2.TabIndex = 8; | |||
| this.label2.Text = "密 码:"; | |||
| // | |||
| // label1 | |||
| // | |||
| this.label1.AutoSize = true; | |||
| this.label1.Font = new System.Drawing.Font("宋体", 30F); | |||
| this.label1.Location = new System.Drawing.Point(79, 50); | |||
| this.label1.Name = "label1"; | |||
| this.label1.Size = new System.Drawing.Size(177, 40); | |||
| this.label1.TabIndex = 7; | |||
| this.label1.Text = "用户名:"; | |||
| // | |||
| // Login | |||
| // | |||
| this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); | |||
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |||
| this.ClientSize = new System.Drawing.Size(540, 314); | |||
| this.Controls.Add(this.closeBtn); | |||
| this.Controls.Add(this.loginBtn); | |||
| this.Controls.Add(this.settingBtn); | |||
| this.Controls.Add(this.pwdTxt); | |||
| this.Controls.Add(this.userNameTxt); | |||
| this.Controls.Add(this.label2); | |||
| this.Controls.Add(this.label1); | |||
| this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; | |||
| this.MaximizeBox = false; | |||
| this.Name = "Login"; | |||
| this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; | |||
| this.Text = "青花瓷屠宰称重客户端"; | |||
| this.ResumeLayout(false); | |||
| this.PerformLayout(); | |||
| } | |||
| #endregion | |||
| private System.Windows.Forms.Button closeBtn; | |||
| private System.Windows.Forms.Button loginBtn; | |||
| private System.Windows.Forms.Button settingBtn; | |||
| private System.Windows.Forms.TextBox pwdTxt; | |||
| private System.Windows.Forms.TextBox userNameTxt; | |||
| private System.Windows.Forms.Label label2; | |||
| private System.Windows.Forms.Label label1; | |||
| } | |||
| } | |||
| @ -0,0 +1,101 @@ | |||
| using BO.Utils; | |||
| using BWP.WinFormControl; | |||
| using Forks.JsonRpc.Client; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel; | |||
| using System.Data; | |||
| using System.Drawing; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace ButcherManageClient | |||
| { | |||
| public partial class Login : Form | |||
| { | |||
| bool rpcFacadeInited = false; | |||
| void IniteRpcFacade() | |||
| { | |||
| if (rpcFacadeInited) | |||
| return; | |||
| if (string.IsNullOrEmpty(AppContext.Context.UrlConfig.ServerUrl)) | |||
| throw new Exception("请先设置服务器地址"); | |||
| RpcFacade.Init(AppContext.Context.UrlConfig.ServerUrl, "B3ButcherManageClient"); | |||
| rpcFacadeInited = true; | |||
| } | |||
| public Login() | |||
| { | |||
| InitializeComponent(); | |||
| userNameTxt.Text = AppContext.Context.UserConfig.UserName; | |||
| pwdTxt.Text = "123"; | |||
| } | |||
| private void settingBtn_Click(object sender, EventArgs e) | |||
| { | |||
| var f = new SettingForm(); | |||
| f.ShowDialog(); | |||
| } | |||
| private async void loginBtn_Click(object sender, EventArgs e) | |||
| { | |||
| var username = userNameTxt.Text.Trim(); | |||
| var pwd = pwdTxt.Text; | |||
| if (string.IsNullOrEmpty(username)) | |||
| throw new Exception("请输入用户名"); | |||
| IniteRpcFacade(); | |||
| await Task.Factory.StartNew(() => RpcFacade.Login(username, pwd)); | |||
| LoginRpcUtil.FillUserEmpInfo(username, AppContext.Context.UserConfig); | |||
| AppContext.Context.Save(); | |||
| var form = AfterLoginUtil.CreateForm("_1"); | |||
| if (form == null) | |||
| throw new Exception("权限不符"); | |||
| form.FormClosing += delegate { SubFormClosing(); }; | |||
| form.Show(); | |||
| Hide(); | |||
| } | |||
| void SubFormClosing() | |||
| { | |||
| foreach (Form form in Application.OpenForms) | |||
| { | |||
| if (form is Login) | |||
| { | |||
| form.Show(); | |||
| return; | |||
| } | |||
| } | |||
| } | |||
| private void closeBtn_Click(object sender, EventArgs e) | |||
| { | |||
| Application.Exit(); | |||
| } | |||
| private void userNameTxt_Click(object sender, EventArgs e) | |||
| { | |||
| IniteRpcFacade(); | |||
| var keyBoard = new NumberPad(); | |||
| if (keyBoard.ShowDialog() == true) | |||
| { | |||
| string errorInfo; | |||
| userNameTxt.Text = LoginRpcUtil.GetUserNameByCode(keyBoard.Result, out errorInfo); | |||
| if (string.IsNullOrEmpty(userNameTxt.Text)) | |||
| throw new Exception("工号输入错误"); | |||
| if (!string.IsNullOrEmpty(errorInfo)) | |||
| MessageBox.Show(errorInfo); | |||
| } | |||
| } | |||
| private void pwdTxt_Click(object sender, EventArgs e) | |||
| { | |||
| var keyBoard = new VirtualKeyPad(); | |||
| if (keyBoard.ShowDialog() == true) | |||
| pwdTxt.Text = keyBoard.Result; | |||
| } | |||
| } | |||
| } | |||
| @ -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> | |||
| @ -0,0 +1,76 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Diagnostics; | |||
| using System.Linq; | |||
| using System.Threading; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace ButcherManageClient | |||
| { | |||
| static class Program | |||
| { | |||
| /// <summary> | |||
| /// 应用程序的主入口点。 | |||
| /// </summary> | |||
| [STAThread] | |||
| static void Main() | |||
| { | |||
| try | |||
| { | |||
| //处理未捕获的异常 | |||
| Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); | |||
| //处理UI线程异常 | |||
| Application.ThreadException += Application_ThreadException; | |||
| //处理非UI线程异常 | |||
| AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; | |||
| var aProcessName = Process.GetCurrentProcess().ProcessName; | |||
| if ((Process.GetProcessesByName(aProcessName)).GetUpperBound(0) > 0) | |||
| { | |||
| MessageBox.Show(@"系统已经在运行中,如果要重新启动,请从进程中关闭...", @"系统警告", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); | |||
| } | |||
| else | |||
| { | |||
| Application.EnableVisualStyles(); | |||
| Application.SetCompatibleTextRenderingDefault(false); | |||
| Application.Run(new Login()); | |||
| } | |||
| } | |||
| catch (Exception e) | |||
| { | |||
| // LogUtil.WriteError(e); | |||
| MessageBox.Show("错误:" + e.Message); | |||
| } | |||
| } | |||
| ///<summary> | |||
| /// 在发生未处理异常时处理的方法 | |||
| ///</summary> | |||
| ///<param name="sender"> </param> | |||
| ///<param name="e"> </param> | |||
| private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) | |||
| { | |||
| var ex = e.Exception; | |||
| var err = String.Empty; | |||
| if (ex != null) | |||
| { | |||
| //LogUtil.WriteError(ex); | |||
| err = ex.Message; | |||
| } | |||
| MessageBox.Show("错误:" + err); | |||
| } | |||
| private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) | |||
| { | |||
| var err = String.Empty; | |||
| var ex = e.ExceptionObject as Exception; | |||
| if (ex != null) | |||
| { | |||
| //LogUtil.WriteError(ex); | |||
| err = ex.Message; | |||
| } | |||
| MessageBox.Show("错误:" + err); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,36 @@ | |||
| using System.Reflection; | |||
| using System.Runtime.CompilerServices; | |||
| using System.Runtime.InteropServices; | |||
| // 有关程序集的常规信息通过以下 | |||
| // 特性集控制。更改这些特性值可修改 | |||
| // 与程序集关联的信息。 | |||
| [assembly: AssemblyTitle("ButcherManageClient")] | |||
| [assembly: AssemblyDescription("")] | |||
| [assembly: AssemblyConfiguration("")] | |||
| [assembly: AssemblyCompany("")] | |||
| [assembly: AssemblyProduct("ButcherManageClient")] | |||
| [assembly: AssemblyCopyright("Copyright © 2017")] | |||
| [assembly: AssemblyTrademark("")] | |||
| [assembly: AssemblyCulture("")] | |||
| // 将 ComVisible 设置为 false 使此程序集中的类型 | |||
| // 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, | |||
| // 则将该类型上的 ComVisible 特性设置为 true。 | |||
| [assembly: ComVisible(false)] | |||
| // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||
| [assembly: Guid("7d7adcde-b772-47d2-a1a4-56615da2452c")] | |||
| // 程序集的版本信息由下面四个值组成: | |||
| // | |||
| // 主版本 | |||
| // 次版本 | |||
| // 生成号 | |||
| // 修订号 | |||
| // | |||
| // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, | |||
| // 方法是按如下所示使用“*”: | |||
| // [assembly: AssemblyVersion("1.0.*")] | |||
| [assembly: AssemblyVersion("1.0.0.0")] | |||
| [assembly: AssemblyFileVersion("1.0.0.0")] | |||
| @ -0,0 +1,71 @@ | |||
| //------------------------------------------------------------------------------ | |||
| // <auto-generated> | |||
| // 此代码由工具生成。 | |||
| // 运行时版本: 4.0.30319.42000 | |||
| // | |||
| // 对此文件的更改可能会导致不正确的行为,并且如果 | |||
| // 重新生成代码,这些更改将丢失。 | |||
| // </auto-generated> | |||
| //------------------------------------------------------------------------------ | |||
| namespace ButcherManageClient.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("ButcherManageClient.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; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -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> | |||
| @ -0,0 +1,30 @@ | |||
| //------------------------------------------------------------------------------ | |||
| // <auto-generated> | |||
| // This code was generated by a tool. | |||
| // Runtime Version:4.0.30319.42000 | |||
| // | |||
| // Changes to this file may cause incorrect behavior and will be lost if | |||
| // the code is regenerated. | |||
| // </auto-generated> | |||
| //------------------------------------------------------------------------------ | |||
| namespace ButcherManageClient.Properties | |||
| { | |||
| [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |||
| [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,7 @@ | |||
| <?xml version='1.0' encoding='utf-8'?> | |||
| <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> | |||
| <Profiles> | |||
| <Profile Name="(Default)" /> | |||
| </Profiles> | |||
| <Settings /> | |||
| </SettingsFile> | |||
| @ -0,0 +1,103 @@ | |||
| namespace ButcherManageClient | |||
| { | |||
| partial class SettingForm | |||
| { | |||
| /// <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.cancelBtn = new System.Windows.Forms.Button(); | |||
| this.saveBtn = new System.Windows.Forms.Button(); | |||
| this.uTextBoxWithPad1 = new BWP.WinFormControl.UTextBoxWithPad(); | |||
| this.label1 = new System.Windows.Forms.Label(); | |||
| this.SuspendLayout(); | |||
| // | |||
| // cancelBtn | |||
| // | |||
| this.cancelBtn.Font = new System.Drawing.Font("宋体", 20F); | |||
| this.cancelBtn.Location = new System.Drawing.Point(241, 110); | |||
| this.cancelBtn.Name = "cancelBtn"; | |||
| this.cancelBtn.Size = new System.Drawing.Size(81, 53); | |||
| this.cancelBtn.TabIndex = 7; | |||
| this.cancelBtn.Text = "关闭"; | |||
| this.cancelBtn.UseVisualStyleBackColor = true; | |||
| this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click); | |||
| // | |||
| // saveBtn | |||
| // | |||
| this.saveBtn.Font = new System.Drawing.Font("宋体", 20F); | |||
| this.saveBtn.Location = new System.Drawing.Point(100, 110); | |||
| this.saveBtn.Name = "saveBtn"; | |||
| this.saveBtn.Size = new System.Drawing.Size(81, 53); | |||
| this.saveBtn.TabIndex = 6; | |||
| this.saveBtn.Text = "保存"; | |||
| this.saveBtn.UseVisualStyleBackColor = true; | |||
| this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click); | |||
| // | |||
| // uTextBoxWithPad1 | |||
| // | |||
| this.uTextBoxWithPad1.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.uTextBoxWithPad1.Location = new System.Drawing.Point(140, 41); | |||
| this.uTextBoxWithPad1.Name = "uTextBoxWithPad1"; | |||
| this.uTextBoxWithPad1.Size = new System.Drawing.Size(246, 30); | |||
| this.uTextBoxWithPad1.TabIndex = 5; | |||
| this.uTextBoxWithPad1.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Normal; | |||
| // | |||
| // label1 | |||
| // | |||
| this.label1.AutoSize = true; | |||
| this.label1.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.label1.Location = new System.Drawing.Point(18, 44); | |||
| this.label1.Name = "label1"; | |||
| this.label1.Size = new System.Drawing.Size(129, 20); | |||
| this.label1.TabIndex = 4; | |||
| this.label1.Text = "服务器地址:"; | |||
| // | |||
| // SettingForm | |||
| // | |||
| this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); | |||
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |||
| this.ClientSize = new System.Drawing.Size(404, 205); | |||
| this.Controls.Add(this.cancelBtn); | |||
| this.Controls.Add(this.saveBtn); | |||
| this.Controls.Add(this.uTextBoxWithPad1); | |||
| this.Controls.Add(this.label1); | |||
| this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; | |||
| this.MaximizeBox = false; | |||
| this.Name = "SettingForm"; | |||
| this.Text = "服务器配置"; | |||
| this.ResumeLayout(false); | |||
| this.PerformLayout(); | |||
| } | |||
| #endregion | |||
| private System.Windows.Forms.Button cancelBtn; | |||
| private System.Windows.Forms.Button saveBtn; | |||
| private BWP.WinFormControl.UTextBoxWithPad uTextBoxWithPad1; | |||
| private System.Windows.Forms.Label label1; | |||
| } | |||
| } | |||
| @ -0,0 +1,33 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel; | |||
| using System.Data; | |||
| using System.Drawing; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace ButcherManageClient | |||
| { | |||
| public partial class SettingForm : Form | |||
| { | |||
| public SettingForm() | |||
| { | |||
| InitializeComponent(); | |||
| uTextBoxWithPad1.Text = AppContext.Context.UrlConfig.ServerUrl; | |||
| } | |||
| private void cancelBtn_Click(object sender, EventArgs e) | |||
| { | |||
| this.Close(); | |||
| } | |||
| private void saveBtn_Click(object sender, EventArgs e) | |||
| { | |||
| AppContext.Context.UrlConfig.ServerUrl = this.uTextBoxWithPad1.Text.Trim(); | |||
| AppContext.Context.Save(); | |||
| MessageBox.Show("设置保存成功!"); | |||
| } | |||
| } | |||
| } | |||
| @ -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> | |||
| @ -0,0 +1,6 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
| <configuration> | |||
| <startup> | |||
| <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | |||
| </startup> | |||
| </configuration> | |||
| @ -0,0 +1,61 @@ | |||
| //using BO.Utils; | |||
| //using System; | |||
| //using System.Collections.Generic; | |||
| //using System.IO; | |||
| //using System.Linq; | |||
| //using System.Text; | |||
| //using System.Threading.Tasks; | |||
| //using System.Windows.Forms; | |||
| //namespace ButcherOrder | |||
| //{ | |||
| // public class AppContext | |||
| // { | |||
| // private static string loginConfigPath = Application.StartupPath + "\\Config.xml"; | |||
| // public ServerUrlConfig UrlConfig | |||
| // { | |||
| // get; | |||
| // set; | |||
| // } | |||
| // public LoginUserInfo UserConfig | |||
| // { | |||
| // get; | |||
| // set; | |||
| // } | |||
| // private AppContext() | |||
| // { | |||
| // UrlConfig = new ServerUrlConfig(); | |||
| // UserConfig = new LoginUserInfo(); | |||
| // } | |||
| // public static AppContext Context | |||
| // { | |||
| // get | |||
| // { | |||
| // if (_appContext == null) | |||
| // _appContext = CreateAppContext(); | |||
| // return _appContext; | |||
| // } | |||
| // } | |||
| // private static AppContext _appContext; | |||
| // static AppContext CreateAppContext() | |||
| // { | |||
| // var config = new AppContext(); | |||
| // if (!File.Exists(loginConfigPath)) | |||
| // { | |||
| // XmlUtil.SerializerObjToFile(config, loginConfigPath); | |||
| // } | |||
| // else | |||
| // config = XmlUtil.DeserializeFromFile<AppContext>(loginConfigPath); | |||
| // return config; | |||
| // } | |||
| // public void Save() | |||
| // { | |||
| // XmlUtil.SerializerObjToFile(_appContext, loginConfigPath); | |||
| // } | |||
| // } | |||
| //} | |||
| @ -0,0 +1,114 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||
| <PropertyGroup> | |||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
| <ProjectGuid>{2D425E5E-A44F-4781-8F7A-9CDDB8431684}</ProjectGuid> | |||
| <OutputType>WinExe</OutputType> | |||
| <AppDesignerFolder>Properties</AppDesignerFolder> | |||
| <RootNamespace>ButcherOrder</RootNamespace> | |||
| <AssemblyName>ButcherOrder</AssemblyName> | |||
| <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |||
| <FileAlignment>512</FileAlignment> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||
| <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|AnyCPU' "> | |||
| <PlatformTarget>AnyCPU</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>D:\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>D:\BwpB3Project\tsref\Debug\Forks.Utils.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="PresentationCore" /> | |||
| <Reference Include="PresentationFramework" /> | |||
| <Reference Include="System" /> | |||
| <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="AppContext.cs" /> | |||
| <Compile Include="ButcherOrderForm.cs"> | |||
| <SubType>Form</SubType> | |||
| </Compile> | |||
| <Compile Include="ButcherOrderForm.Designer.cs"> | |||
| <DependentUpon>ButcherOrderForm.cs</DependentUpon> | |||
| </Compile> | |||
| <Compile Include="Properties\AssemblyInfo.cs" /> | |||
| <EmbeddedResource Include="ButcherOrderForm.resx"> | |||
| <DependentUpon>ButcherOrderForm.cs</DependentUpon> | |||
| </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" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <ProjectReference Include="..\BO\BO.csproj"> | |||
| <Project>{8968f14a-c7c7-4751-96ce-b114fbfd65ef}</Project> | |||
| <Name>BO</Name> | |||
| </ProjectReference> | |||
| <ProjectReference Include="..\BWP.WinFormControl\BWP.WinFormControl.csproj"> | |||
| <Project>{A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}</Project> | |||
| <Name>BWP.WinFormControl</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> | |||
| @ -0,0 +1,63 @@ | |||
| namespace ButcherOrder | |||
| { | |||
| partial class ButcherOrderForm | |||
| { | |||
| /// <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.SuspendLayout(); | |||
| // | |||
| // label1 | |||
| // | |||
| this.label1.AutoSize = true; | |||
| this.label1.Font = new System.Drawing.Font("宋体", 18F); | |||
| this.label1.Location = new System.Drawing.Point(20, 24); | |||
| this.label1.Name = "label1"; | |||
| this.label1.Size = new System.Drawing.Size(130, 24); | |||
| this.label1.TabIndex = 0; | |||
| this.label1.Text = "宰杀日期:"; | |||
| // | |||
| // ButcherOrderForm | |||
| // | |||
| this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); | |||
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |||
| this.ClientSize = new System.Drawing.Size(1020, 690); | |||
| this.Controls.Add(this.label1); | |||
| this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; | |||
| this.MaximizeBox = false; | |||
| this.Name = "ButcherOrderForm"; | |||
| this.Text = "排宰挑选"; | |||
| this.ResumeLayout(false); | |||
| this.PerformLayout(); | |||
| } | |||
| #endregion | |||
| private System.Windows.Forms.Label label1; | |||
| } | |||
| } | |||
| @ -0,0 +1,20 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel; | |||
| using System.Data; | |||
| using System.Drawing; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace ButcherOrder | |||
| { | |||
| public partial class ButcherOrderForm : Form | |||
| { | |||
| public ButcherOrderForm() | |||
| { | |||
| InitializeComponent(); | |||
| } | |||
| } | |||
| } | |||
| @ -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> | |||
| @ -0,0 +1,36 @@ | |||
| using System.Reflection; | |||
| using System.Runtime.CompilerServices; | |||
| using System.Runtime.InteropServices; | |||
| // 有关程序集的常规信息通过以下 | |||
| // 特性集控制。更改这些特性值可修改 | |||
| // 与程序集关联的信息。 | |||
| [assembly: AssemblyTitle("ButcherOrder")] | |||
| [assembly: AssemblyDescription("")] | |||
| [assembly: AssemblyConfiguration("")] | |||
| [assembly: AssemblyCompany("")] | |||
| [assembly: AssemblyProduct("ButcherOrder")] | |||
| [assembly: AssemblyCopyright("Copyright © 2017")] | |||
| [assembly: AssemblyTrademark("")] | |||
| [assembly: AssemblyCulture("")] | |||
| // 将 ComVisible 设置为 false 使此程序集中的类型 | |||
| // 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, | |||
| // 则将该类型上的 ComVisible 特性设置为 true。 | |||
| [assembly: ComVisible(false)] | |||
| // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||
| [assembly: Guid("304dabe0-ecb3-451b-b97a-ad824562b183")] | |||
| // 程序集的版本信息由下面四个值组成: | |||
| // | |||
| // 主版本 | |||
| // 次版本 | |||
| // 生成号 | |||
| // 修订号 | |||
| // | |||
| // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, | |||
| // 方法是按如下所示使用“*”: | |||
| // [assembly: AssemblyVersion("1.0.*")] | |||
| [assembly: AssemblyVersion("1.0.0.0")] | |||
| [assembly: AssemblyFileVersion("1.0.0.0")] | |||
| @ -0,0 +1,71 @@ | |||
| //------------------------------------------------------------------------------ | |||
| // <auto-generated> | |||
| // 此代码由工具生成。 | |||
| // 运行时版本: 4.0.30319.42000 | |||
| // | |||
| // 对此文件的更改可能会导致不正确的行为,并且如果 | |||
| // 重新生成代码,这些更改将丢失。 | |||
| // </auto-generated> | |||
| //------------------------------------------------------------------------------ | |||
| namespace ButcherOrder.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("ButcherOrder.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; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -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> | |||
| @ -0,0 +1,30 @@ | |||
| //------------------------------------------------------------------------------ | |||
| // <auto-generated> | |||
| // This code was generated by a tool. | |||
| // Runtime Version:4.0.30319.42000 | |||
| // | |||
| // Changes to this file may cause incorrect behavior and will be lost if | |||
| // the code is regenerated. | |||
| // </auto-generated> | |||
| //------------------------------------------------------------------------------ | |||
| namespace ButcherOrder.Properties | |||
| { | |||
| [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |||
| [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,7 @@ | |||
| <?xml version='1.0' encoding='utf-8'?> | |||
| <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> | |||
| <Profiles> | |||
| <Profile Name="(Default)" /> | |||
| </Profiles> | |||
| <Settings /> | |||
| </SettingsFile> | |||
| @ -0,0 +1,92 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||
| <PropertyGroup> | |||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
| <ProjectGuid>{B9E62966-DA6C-4075-91A3-CB66C4FBBC6A}</ProjectGuid> | |||
| <OutputType>Library</OutputType> | |||
| <AppDesignerFolder>Properties</AppDesignerFolder> | |||
| <RootNamespace>ButcherOrder</RootNamespace> | |||
| <AssemblyName>ButcherOrder</AssemblyName> | |||
| <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |||
| <FileAlignment>512</FileAlignment> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||
| <DebugSymbols>true</DebugSymbols> | |||
| <DebugType>full</DebugType> | |||
| <Optimize>false</Optimize> | |||
| <OutputPath>bin\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="PresentationCore" /> | |||
| <Reference Include="PresentationFramework" /> | |||
| <Reference Include="System" /> | |||
| <Reference Include="System.Core" /> | |||
| <Reference Include="System.Drawing" /> | |||
| <Reference Include="System.Windows.Forms" /> | |||
| <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.Xml" /> | |||
| <Reference Include="WindowsBase" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <Compile Include="ButcherOrderForm.cs"> | |||
| <SubType>Form</SubType> | |||
| </Compile> | |||
| <Compile Include="ButcherOrderForm.Designer.cs"> | |||
| <DependentUpon>ButcherOrderForm.cs</DependentUpon> | |||
| </Compile> | |||
| <Compile Include="Properties\AssemblyInfo.cs" /> | |||
| <Compile Include="ViewDetail.cs"> | |||
| <SubType>Form</SubType> | |||
| </Compile> | |||
| <Compile Include="ViewDetail.Designer.cs"> | |||
| <DependentUpon>ViewDetail.cs</DependentUpon> | |||
| </Compile> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <ProjectReference Include="..\BO\BO.csproj"> | |||
| <Project>{8968f14a-c7c7-4751-96ce-b114fbfd65ef}</Project> | |||
| <Name>BO</Name> | |||
| </ProjectReference> | |||
| <ProjectReference Include="..\ButcherManageClient\ButcherManageClient.csproj"> | |||
| <Project>{59b13436-4884-4533-9c7e-80e8580cbf55}</Project> | |||
| <Name>ButcherManageClient</Name> | |||
| </ProjectReference> | |||
| <ProjectReference Include="..\BWP.WinFormControl\BWP.WinFormControl.csproj"> | |||
| <Project>{A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}</Project> | |||
| <Name>BWP.WinFormControl</Name> | |||
| </ProjectReference> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <EmbeddedResource Include="ButcherOrderForm.resx"> | |||
| <DependentUpon>ButcherOrderForm.cs</DependentUpon> | |||
| </EmbeddedResource> | |||
| <EmbeddedResource Include="ViewDetail.resx"> | |||
| <DependentUpon>ViewDetail.cs</DependentUpon> | |||
| </EmbeddedResource> | |||
| </ItemGroup> | |||
| <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||
| <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |||
| Other similar extension points exist, see Microsoft.Common.targets. | |||
| <Target Name="BeforeBuild"> | |||
| </Target> | |||
| <Target Name="AfterBuild"> | |||
| </Target> | |||
| --> | |||
| </Project> | |||
| @ -0,0 +1,206 @@ | |||
| namespace ButcherOrder | |||
| { | |||
| partial class ButcherOrderForm | |||
| { | |||
| /// <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.syncBtn = new System.Windows.Forms.Button(); | |||
| this.label2 = new System.Windows.Forms.Label(); | |||
| this.orderLabel = new System.Windows.Forms.Label(); | |||
| this.dataGridView1 = new System.Windows.Forms.DataGridView(); | |||
| this.existBtn = new System.Windows.Forms.Button(); | |||
| this.label3 = new System.Windows.Forms.Label(); | |||
| this.numberInput = new System.Windows.Forms.TextBox(); | |||
| this.keyPanel = new System.Windows.Forms.FlowLayoutPanel(); | |||
| this.okBtn = new System.Windows.Forms.Button(); | |||
| this.updateBtn = new System.Windows.Forms.Button(); | |||
| this.uDatePicker1 = new BWP.WinFormControl.UDatePicker(); | |||
| ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); | |||
| this.SuspendLayout(); | |||
| // | |||
| // label1 | |||
| // | |||
| this.label1.AutoSize = true; | |||
| this.label1.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.label1.Location = new System.Drawing.Point(58, 28); | |||
| this.label1.Name = "label1"; | |||
| this.label1.Size = new System.Drawing.Size(109, 20); | |||
| this.label1.TabIndex = 0; | |||
| this.label1.Text = "宰杀日期:"; | |||
| // | |||
| // syncBtn | |||
| // | |||
| this.syncBtn.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.syncBtn.Location = new System.Drawing.Point(339, 18); | |||
| this.syncBtn.Name = "syncBtn"; | |||
| this.syncBtn.Size = new System.Drawing.Size(108, 41); | |||
| this.syncBtn.TabIndex = 2; | |||
| this.syncBtn.Text = "同步数据"; | |||
| this.syncBtn.UseVisualStyleBackColor = true; | |||
| this.syncBtn.Click += new System.EventHandler(this.syncBtn_Click); | |||
| // | |||
| // label2 | |||
| // | |||
| this.label2.AutoSize = true; | |||
| this.label2.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.label2.Location = new System.Drawing.Point(466, 28); | |||
| this.label2.Name = "label2"; | |||
| this.label2.Size = new System.Drawing.Size(109, 20); | |||
| this.label2.TabIndex = 3; | |||
| this.label2.Text = "排宰顺序:"; | |||
| // | |||
| // orderLabel | |||
| // | |||
| this.orderLabel.AutoSize = true; | |||
| this.orderLabel.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.orderLabel.Location = new System.Drawing.Point(564, 28); | |||
| this.orderLabel.Name = "orderLabel"; | |||
| this.orderLabel.Size = new System.Drawing.Size(19, 20); | |||
| this.orderLabel.TabIndex = 4; | |||
| this.orderLabel.Text = "0"; | |||
| // | |||
| // dataGridView1 | |||
| // | |||
| this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; | |||
| this.dataGridView1.Location = new System.Drawing.Point(30, 91); | |||
| this.dataGridView1.Name = "dataGridView1"; | |||
| this.dataGridView1.RowTemplate.Height = 23; | |||
| this.dataGridView1.Size = new System.Drawing.Size(595, 569); | |||
| this.dataGridView1.TabIndex = 5; | |||
| // | |||
| // existBtn | |||
| // | |||
| this.existBtn.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.existBtn.Location = new System.Drawing.Point(900, 18); | |||
| this.existBtn.Name = "existBtn"; | |||
| this.existBtn.Size = new System.Drawing.Size(108, 41); | |||
| this.existBtn.TabIndex = 6; | |||
| this.existBtn.Text = "退出"; | |||
| this.existBtn.UseVisualStyleBackColor = true; | |||
| this.existBtn.Click += new System.EventHandler(this.existBtn_Click); | |||
| // | |||
| // label3 | |||
| // | |||
| this.label3.AutoSize = true; | |||
| this.label3.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.label3.Location = new System.Drawing.Point(710, 95); | |||
| this.label3.Name = "label3"; | |||
| this.label3.Size = new System.Drawing.Size(109, 20); | |||
| this.label3.TabIndex = 7; | |||
| this.label3.Text = "烫褪头数:"; | |||
| // | |||
| // numberInput | |||
| // | |||
| this.numberInput.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.numberInput.Location = new System.Drawing.Point(821, 92); | |||
| this.numberInput.Name = "numberInput"; | |||
| this.numberInput.Size = new System.Drawing.Size(141, 30); | |||
| this.numberInput.TabIndex = 8; | |||
| // | |||
| // keyPanel | |||
| // | |||
| this.keyPanel.Location = new System.Drawing.Point(719, 150); | |||
| this.keyPanel.Name = "keyPanel"; | |||
| this.keyPanel.Size = new System.Drawing.Size(250, 333); | |||
| this.keyPanel.TabIndex = 9; | |||
| // | |||
| // okBtn | |||
| // | |||
| this.okBtn.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.okBtn.Location = new System.Drawing.Point(715, 509); | |||
| this.okBtn.Name = "okBtn"; | |||
| this.okBtn.Size = new System.Drawing.Size(108, 41); | |||
| this.okBtn.TabIndex = 10; | |||
| this.okBtn.Text = "确定"; | |||
| this.okBtn.UseVisualStyleBackColor = true; | |||
| this.okBtn.Click += new System.EventHandler(this.okBtn_Click); | |||
| // | |||
| // updateBtn | |||
| // | |||
| this.updateBtn.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.updateBtn.Location = new System.Drawing.Point(855, 509); | |||
| this.updateBtn.Name = "updateBtn"; | |||
| this.updateBtn.Size = new System.Drawing.Size(108, 41); | |||
| this.updateBtn.TabIndex = 11; | |||
| this.updateBtn.Text = "更新"; | |||
| this.updateBtn.UseVisualStyleBackColor = true; | |||
| this.updateBtn.Click += new System.EventHandler(this.updateBtn_Click); | |||
| // | |||
| // uDatePicker1 | |||
| // | |||
| this.uDatePicker1.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.uDatePicker1.Location = new System.Drawing.Point(166, 23); | |||
| this.uDatePicker1.Name = "uDatePicker1"; | |||
| this.uDatePicker1.Size = new System.Drawing.Size(150, 30); | |||
| this.uDatePicker1.TabIndex = 1; | |||
| this.uDatePicker1.Text = "2017/09/05"; | |||
| // | |||
| // ButcherOrderForm | |||
| // | |||
| this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); | |||
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |||
| this.ClientSize = new System.Drawing.Size(1020, 690); | |||
| this.Controls.Add(this.updateBtn); | |||
| this.Controls.Add(this.okBtn); | |||
| this.Controls.Add(this.keyPanel); | |||
| this.Controls.Add(this.numberInput); | |||
| this.Controls.Add(this.label3); | |||
| this.Controls.Add(this.existBtn); | |||
| this.Controls.Add(this.dataGridView1); | |||
| this.Controls.Add(this.orderLabel); | |||
| this.Controls.Add(this.label2); | |||
| this.Controls.Add(this.syncBtn); | |||
| this.Controls.Add(this.uDatePicker1); | |||
| this.Controls.Add(this.label1); | |||
| this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; | |||
| this.MaximizeBox = false; | |||
| this.Name = "ButcherOrderForm"; | |||
| this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; | |||
| this.Text = "屠宰顺序同步"; | |||
| ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); | |||
| this.ResumeLayout(false); | |||
| this.PerformLayout(); | |||
| } | |||
| #endregion | |||
| private System.Windows.Forms.Label label1; | |||
| private BWP.WinFormControl.UDatePicker uDatePicker1; | |||
| private System.Windows.Forms.Button syncBtn; | |||
| private System.Windows.Forms.Label label2; | |||
| private System.Windows.Forms.Label orderLabel; | |||
| private System.Windows.Forms.DataGridView dataGridView1; | |||
| private System.Windows.Forms.Button existBtn; | |||
| private System.Windows.Forms.Label label3; | |||
| private System.Windows.Forms.TextBox numberInput; | |||
| private System.Windows.Forms.FlowLayoutPanel keyPanel; | |||
| private System.Windows.Forms.Button okBtn; | |||
| private System.Windows.Forms.Button updateBtn; | |||
| } | |||
| } | |||
| @ -0,0 +1,92 @@ | |||
| using ButcherManageClient; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel; | |||
| using System.Data; | |||
| using System.Drawing; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace ButcherOrder | |||
| { | |||
| public partial class ButcherOrderForm : Form, IAfterLogin | |||
| { | |||
| public ButcherOrderForm() | |||
| { | |||
| InitializeComponent(); | |||
| dataGridView1.AutoGenerateColumns = false; | |||
| AddKeyPad(); | |||
| } | |||
| #region IAfterLogin | |||
| public string RoleName | |||
| { | |||
| get | |||
| { | |||
| return "测试"; | |||
| } | |||
| } | |||
| public Form Generate() | |||
| { | |||
| return this; | |||
| } | |||
| # endregion | |||
| private void AddKeyPad() | |||
| { | |||
| for (var i = 1; i < 10; i++) | |||
| { | |||
| var btn = new Button() { Name = "_" + i, Text = i.ToString(), Size = new Size(60, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) }; | |||
| btn.Click += (sender, e) => | |||
| { | |||
| numberInput.Text += btn.Text; | |||
| }; | |||
| keyPanel.Controls.Add(btn); | |||
| } | |||
| var zero = new Button() { Name = "_0", Text = "0", Size = new Size(60, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) }; | |||
| zero.Click += (sender, e) => | |||
| { | |||
| if (!string.IsNullOrEmpty(numberInput.Text)) | |||
| numberInput.Text += "0"; | |||
| }; | |||
| keyPanel.Controls.Add(zero); | |||
| var back = new Button() { Name = "_back", Text = "←", Size = new Size(60, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) }; | |||
| back.Click += (sender, e) => | |||
| { | |||
| if (!string.IsNullOrEmpty(numberInput.Text)) | |||
| numberInput.Text = numberInput.Text.Substring(0, numberInput.Text.Length - 1); | |||
| }; | |||
| keyPanel.Controls.Add(back); | |||
| var clear = new Button() { Name = "_clear", Text = "清空", Size = new Size(60, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) }; | |||
| clear.Click += (sender, e) => | |||
| { | |||
| numberInput.Text = null; | |||
| }; | |||
| keyPanel.Controls.Add(clear); | |||
| } | |||
| private void existBtn_Click(object sender, EventArgs e) | |||
| { | |||
| this.Close(); | |||
| } | |||
| private void syncBtn_Click(object sender, EventArgs e) | |||
| { | |||
| } | |||
| private void okBtn_Click(object sender, EventArgs e) | |||
| { | |||
| } | |||
| private void updateBtn_Click(object sender, EventArgs e) | |||
| { | |||
| } | |||
| } | |||
| } | |||
| @ -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> | |||
| @ -0,0 +1,36 @@ | |||
| using System.Reflection; | |||
| using System.Runtime.CompilerServices; | |||
| using System.Runtime.InteropServices; | |||
| // 有关程序集的常规信息通过以下 | |||
| // 特性集控制。更改这些特性值可修改 | |||
| // 与程序集关联的信息。 | |||
| [assembly: AssemblyTitle("ButcherOrder")] | |||
| [assembly: AssemblyDescription("")] | |||
| [assembly: AssemblyConfiguration("")] | |||
| [assembly: AssemblyCompany("")] | |||
| [assembly: AssemblyProduct("ButcherOrder")] | |||
| [assembly: AssemblyCopyright("Copyright © 2017")] | |||
| [assembly: AssemblyTrademark("")] | |||
| [assembly: AssemblyCulture("")] | |||
| // 将 ComVisible 设置为 false 使此程序集中的类型 | |||
| // 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, | |||
| // 则将该类型上的 ComVisible 特性设置为 true。 | |||
| [assembly: ComVisible(false)] | |||
| // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||
| [assembly: Guid("222f6d63-665a-484c-8b5f-e5f6c442f9f8")] | |||
| // 程序集的版本信息由下面四个值组成: | |||
| // | |||
| // 主版本 | |||
| // 次版本 | |||
| // 生成号 | |||
| // 修订号 | |||
| // | |||
| // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, | |||
| // 方法是按如下所示使用“*”: | |||
| // [assembly: AssemblyVersion("1.0.*")] | |||
| [assembly: AssemblyVersion("1.0.0.0")] | |||
| [assembly: AssemblyFileVersion("1.0.0.0")] | |||
| @ -0,0 +1,171 @@ | |||
| namespace ButcherOrder | |||
| { | |||
| partial class ViewDetail | |||
| { | |||
| /// <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.label2 = new System.Windows.Forms.Label(); | |||
| this.label3 = new System.Windows.Forms.Label(); | |||
| this.label4 = new System.Windows.Forms.Label(); | |||
| this.label5 = new System.Windows.Forms.Label(); | |||
| this.label6 = new System.Windows.Forms.Label(); | |||
| this.dataGridView1 = new System.Windows.Forms.DataGridView(); | |||
| this.closeBtn = new System.Windows.Forms.Button(); | |||
| this.deleteBtn = new System.Windows.Forms.Button(); | |||
| ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); | |||
| this.SuspendLayout(); | |||
| // | |||
| // label1 | |||
| // | |||
| this.label1.AutoSize = true; | |||
| this.label1.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.label1.Location = new System.Drawing.Point(50, 30); | |||
| this.label1.Name = "label1"; | |||
| this.label1.Size = new System.Drawing.Size(109, 20); | |||
| this.label1.TabIndex = 0; | |||
| this.label1.Text = "排宰顺序:"; | |||
| // | |||
| // label2 | |||
| // | |||
| this.label2.AutoSize = true; | |||
| this.label2.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.label2.Location = new System.Drawing.Point(153, 30); | |||
| this.label2.Name = "label2"; | |||
| this.label2.Size = new System.Drawing.Size(19, 20); | |||
| this.label2.TabIndex = 0; | |||
| this.label2.Text = "0"; | |||
| // | |||
| // label3 | |||
| // | |||
| this.label3.AutoSize = true; | |||
| this.label3.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.label3.Location = new System.Drawing.Point(216, 30); | |||
| this.label3.Name = "label3"; | |||
| this.label3.Size = new System.Drawing.Size(89, 20); | |||
| this.label3.TabIndex = 0; | |||
| this.label3.Text = "总头数:"; | |||
| // | |||
| // label4 | |||
| // | |||
| this.label4.AutoSize = true; | |||
| this.label4.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.label4.Location = new System.Drawing.Point(361, 30); | |||
| this.label4.Name = "label4"; | |||
| this.label4.Size = new System.Drawing.Size(109, 20); | |||
| this.label4.TabIndex = 0; | |||
| this.label4.Text = "合计烫褪:"; | |||
| // | |||
| // label5 | |||
| // | |||
| this.label5.AutoSize = true; | |||
| this.label5.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.label5.Location = new System.Drawing.Point(299, 30); | |||
| this.label5.Name = "label5"; | |||
| this.label5.Size = new System.Drawing.Size(19, 20); | |||
| this.label5.TabIndex = 0; | |||
| this.label5.Text = "0"; | |||
| // | |||
| // label6 | |||
| // | |||
| this.label6.AutoSize = true; | |||
| this.label6.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.label6.Location = new System.Drawing.Point(464, 30); | |||
| this.label6.Name = "label6"; | |||
| this.label6.Size = new System.Drawing.Size(19, 20); | |||
| this.label6.TabIndex = 0; | |||
| this.label6.Text = "0"; | |||
| // | |||
| // dataGridView1 | |||
| // | |||
| this.dataGridView1.AllowUserToAddRows = false; | |||
| this.dataGridView1.AllowUserToDeleteRows = false; | |||
| this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; | |||
| this.dataGridView1.Location = new System.Drawing.Point(44, 80); | |||
| this.dataGridView1.Name = "dataGridView1"; | |||
| this.dataGridView1.ReadOnly = true; | |||
| this.dataGridView1.RowTemplate.Height = 23; | |||
| this.dataGridView1.Size = new System.Drawing.Size(488, 287); | |||
| this.dataGridView1.TabIndex = 1; | |||
| // | |||
| // closeBtn | |||
| // | |||
| this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.closeBtn.Location = new System.Drawing.Point(169, 384); | |||
| this.closeBtn.Name = "closeBtn"; | |||
| this.closeBtn.Size = new System.Drawing.Size(91, 37); | |||
| this.closeBtn.TabIndex = 2; | |||
| this.closeBtn.Text = "关闭"; | |||
| this.closeBtn.UseVisualStyleBackColor = true; | |||
| // | |||
| // deleteBtn | |||
| // | |||
| this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.deleteBtn.Location = new System.Drawing.Point(313, 384); | |||
| this.deleteBtn.Name = "deleteBtn"; | |||
| this.deleteBtn.Size = new System.Drawing.Size(91, 37); | |||
| this.deleteBtn.TabIndex = 3; | |||
| this.deleteBtn.Text = "删除"; | |||
| this.deleteBtn.UseVisualStyleBackColor = true; | |||
| // | |||
| // ViewDetail | |||
| // | |||
| this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); | |||
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |||
| this.ClientSize = new System.Drawing.Size(576, 436); | |||
| this.Controls.Add(this.deleteBtn); | |||
| this.Controls.Add(this.closeBtn); | |||
| this.Controls.Add(this.dataGridView1); | |||
| this.Controls.Add(this.label6); | |||
| this.Controls.Add(this.label5); | |||
| this.Controls.Add(this.label4); | |||
| this.Controls.Add(this.label3); | |||
| this.Controls.Add(this.label2); | |||
| this.Controls.Add(this.label1); | |||
| this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; | |||
| this.MaximizeBox = false; | |||
| this.Name = "ViewDetail"; | |||
| this.Text = "查看明细"; | |||
| ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); | |||
| this.ResumeLayout(false); | |||
| this.PerformLayout(); | |||
| } | |||
| #endregion | |||
| private System.Windows.Forms.Label label1; | |||
| private System.Windows.Forms.Label label2; | |||
| private System.Windows.Forms.Label label3; | |||
| private System.Windows.Forms.Label label4; | |||
| private System.Windows.Forms.Label label5; | |||
| private System.Windows.Forms.Label label6; | |||
| private System.Windows.Forms.DataGridView dataGridView1; | |||
| private System.Windows.Forms.Button closeBtn; | |||
| private System.Windows.Forms.Button deleteBtn; | |||
| } | |||
| } | |||
| @ -0,0 +1,20 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel; | |||
| using System.Data; | |||
| using System.Drawing; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace ButcherOrder | |||
| { | |||
| public partial class ViewDetail : Form | |||
| { | |||
| public ViewDetail() | |||
| { | |||
| InitializeComponent(); | |||
| } | |||
| } | |||
| } | |||
| @ -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> | |||
| @ -0,0 +1,95 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||
| <PropertyGroup> | |||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
| <ProjectGuid>{17F58766-89EB-44C0-8EEF-4787849979EC}</ProjectGuid> | |||
| <OutputType>Library</OutputType> | |||
| <AppDesignerFolder>Properties</AppDesignerFolder> | |||
| <RootNamespace>ButcherWeight</RootNamespace> | |||
| <AssemblyName>ButcherWeight</AssemblyName> | |||
| <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |||
| <FileAlignment>512</FileAlignment> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||
| <DebugSymbols>true</DebugSymbols> | |||
| <DebugType>full</DebugType> | |||
| <Optimize>false</Optimize> | |||
| <OutputPath>bin\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"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.Utils.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="PresentationCore" /> | |||
| <Reference Include="PresentationFramework" /> | |||
| <Reference Include="System" /> | |||
| <Reference Include="System.Core" /> | |||
| <Reference Include="System.Drawing" /> | |||
| <Reference Include="System.Windows.Forms" /> | |||
| <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.Xml" /> | |||
| <Reference Include="WindowsBase" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <Compile Include="Properties\AssemblyInfo.cs" /> | |||
| <Compile Include="WeightForm.cs"> | |||
| <SubType>Form</SubType> | |||
| </Compile> | |||
| <Compile Include="WeightForm.Designer.cs"> | |||
| <DependentUpon>WeightForm.cs</DependentUpon> | |||
| </Compile> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <ProjectReference Include="..\BO\BO.csproj"> | |||
| <Project>{8968f14a-c7c7-4751-96ce-b114fbfd65ef}</Project> | |||
| <Name>BO</Name> | |||
| </ProjectReference> | |||
| <ProjectReference Include="..\ButcherManageClient\ButcherManageClient.csproj"> | |||
| <Project>{59b13436-4884-4533-9c7e-80e8580cbf55}</Project> | |||
| <Name>ButcherManageClient</Name> | |||
| </ProjectReference> | |||
| <ProjectReference Include="..\BWP.WinFormControl\BWP.WinFormControl.csproj"> | |||
| <Project>{A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}</Project> | |||
| <Name>BWP.WinFormControl</Name> | |||
| </ProjectReference> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <EmbeddedResource Include="WeightForm.resx"> | |||
| <DependentUpon>WeightForm.cs</DependentUpon> | |||
| </EmbeddedResource> | |||
| </ItemGroup> | |||
| <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||
| <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |||
| Other similar extension points exist, see Microsoft.Common.targets. | |||
| <Target Name="BeforeBuild"> | |||
| </Target> | |||
| <Target Name="AfterBuild"> | |||
| </Target> | |||
| --> | |||
| </Project> | |||
| @ -0,0 +1,36 @@ | |||
| using System.Reflection; | |||
| using System.Runtime.CompilerServices; | |||
| using System.Runtime.InteropServices; | |||
| // 有关程序集的常规信息通过以下 | |||
| // 特性集控制。更改这些特性值可修改 | |||
| // 与程序集关联的信息。 | |||
| [assembly: AssemblyTitle("ButcherWeight")] | |||
| [assembly: AssemblyDescription("")] | |||
| [assembly: AssemblyConfiguration("")] | |||
| [assembly: AssemblyCompany("")] | |||
| [assembly: AssemblyProduct("ButcherWeight")] | |||
| [assembly: AssemblyCopyright("Copyright © 2017")] | |||
| [assembly: AssemblyTrademark("")] | |||
| [assembly: AssemblyCulture("")] | |||
| // 将 ComVisible 设置为 false 使此程序集中的类型 | |||
| // 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, | |||
| // 则将该类型上的 ComVisible 特性设置为 true。 | |||
| [assembly: ComVisible(false)] | |||
| // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||
| [assembly: Guid("8e158775-07dd-4847-b20c-2e7ebf022a47")] | |||
| // 程序集的版本信息由下面四个值组成: | |||
| // | |||
| // 主版本 | |||
| // 次版本 | |||
| // 生成号 | |||
| // 修订号 | |||
| // | |||
| // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, | |||
| // 方法是按如下所示使用“*”: | |||
| // [assembly: AssemblyVersion("1.0.*")] | |||
| [assembly: AssemblyVersion("1.0.0.0")] | |||
| [assembly: AssemblyFileVersion("1.0.0.0")] | |||
| @ -0,0 +1,183 @@ | |||
| using BO.BO; | |||
| using BO.Utils; | |||
| using BO.Utils.BillRpc; | |||
| using ButcherManageClient; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel; | |||
| using System.Data; | |||
| using System.Drawing; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace ButcherWeight | |||
| { | |||
| public partial class WeightForm : Form, IAfterLogin | |||
| { | |||
| public WeightForm() | |||
| { | |||
| InitializeComponent(); | |||
| supplierSelect.Init("BaseInfoRpc/GetSupplierList"); | |||
| purchaseTypeSelect.Init("BaseInfoRpc/GetPurchaseTypeList"); | |||
| carSelect.Init("BaseInfoRpc/GetCarList"); | |||
| liveVarietiesSelect.Init("BaseInfoRpc/GetLiveVarietiesList"); | |||
| employeeSelect.Init("BaseInfoRpc/GetEmployeeList"); | |||
| hogGradeSelect.Init("BaseInfoRpc/GetHogGradeList"); | |||
| zoneSelect.Init("BaseInfoRpc/GetZoneList"); | |||
| farmerSelect.Init("BaseInfoRpc/GetFarmerList"); | |||
| } | |||
| #region IAfterLogin Member | |||
| public string RoleName | |||
| { | |||
| get { return "_1"; } | |||
| } | |||
| public Form Generate() | |||
| { | |||
| return this; | |||
| } | |||
| #endregion | |||
| private void exitBtn_Click(object sender, EventArgs e) | |||
| { | |||
| this.Close(); | |||
| } | |||
| private void commitBtn_Click(object sender, EventArgs e) | |||
| { | |||
| GetFromUI(); | |||
| //var result = WeightBillRpc.Send(Dmo); | |||
| //if (result) | |||
| // MessageBox.Show("保存成功!"); | |||
| } | |||
| private void readMaoBtn_Click(object sender, EventArgs e) | |||
| { | |||
| } | |||
| private void readPiBtn_Click(object sender, EventArgs e) | |||
| { | |||
| } | |||
| private void farmerSelect_SelectedIndexChanged(object sender, EventArgs e) | |||
| { | |||
| } | |||
| WeightBill _dmo = new WeightBill() { CreaterName = AppContext.Context.UserConfig.UserName }; | |||
| WeightBill Dmo { get { return _dmo; } } | |||
| void GetFromUI() | |||
| { | |||
| if (!supplierSelect.IsEmpty) | |||
| { | |||
| Dmo.Supplier_ID = long.Parse(supplierSelect.Value); | |||
| Dmo.Supplier_Name = supplierSelect.DisplayValue; | |||
| } | |||
| if (!purchaseTypeSelect.IsEmpty) | |||
| { | |||
| Dmo.PurchaseType_ID = short.Parse(purchaseTypeSelect.Value); | |||
| Dmo.PurchaseType_Name = purchaseTypeSelect.DisplayValue; | |||
| } | |||
| Dmo.WeightTime = weightTimeSelect.Date; | |||
| if (!carSelect.IsEmpty) | |||
| { | |||
| Dmo.Car_ID = long.Parse(carSelect.Value); | |||
| Dmo.Car_Name = carSelect.DisplayValue; | |||
| } | |||
| if (!liveVarietiesSelect.IsEmpty) | |||
| { | |||
| Dmo.Livestock_ID = long.Parse(liveVarietiesSelect.Value); | |||
| Dmo.Livestock_Name = liveVarietiesSelect.DisplayValue; | |||
| } | |||
| if (!employeeSelect.IsEmpty) | |||
| { | |||
| Dmo.Employee_ID = long.Parse(employeeSelect.Value); | |||
| Dmo.Employee_Name = employeeSelect.DisplayValue; | |||
| } | |||
| if (!hogGradeSelect.IsEmpty) | |||
| { | |||
| Dmo.HogGrade_ID = long.Parse(hogGradeSelect.Value); | |||
| Dmo.HogGrade_Name = hogGradeSelect.DisplayValue; | |||
| } | |||
| if (!zoneSelect.IsEmpty) | |||
| { | |||
| Dmo.Zone_ID = long.Parse(zoneSelect.Value); | |||
| Dmo.Zone_Name = zoneSelect.DisplayValue; | |||
| } | |||
| if (!string.IsNullOrEmpty(penWeightInput.Text)) | |||
| { | |||
| decimal pw = 0; | |||
| if (!decimal.TryParse(penWeightInput.Text.Trim(), out pw)) | |||
| throw new Exception("棚前重量输入错误"); | |||
| Dmo.PenWeight = pw; | |||
| } | |||
| if (!string.IsNullOrEmpty(penPriceInput.Text)) | |||
| { | |||
| decimal pp = 0; | |||
| if (!decimal.TryParse(penPriceInput.Text.Trim(), out pp)) | |||
| throw new Exception("棚前单价输入错误"); | |||
| Dmo.PenPrice = pp; | |||
| } | |||
| Dmo.PenMoney = Dmo.PenPrice * Dmo.PenWeight; | |||
| if (!string.IsNullOrEmpty(testCardNumberInput.Text)) | |||
| Dmo.AnimalTestNumber = testCardNumberInput.Text; | |||
| if (!string.IsNullOrEmpty(testTimeInput.Text)) | |||
| Dmo.AnimalTestDate = testTimeInput.Date; | |||
| if (!string.IsNullOrEmpty(testManInput.Text)) | |||
| Dmo.AnimalTestMan = testManInput.Text; | |||
| if (!string.IsNullOrEmpty(remarkInput.Text)) | |||
| Dmo.Remark = remarkInput.Text; | |||
| } | |||
| void AppToUI() | |||
| { | |||
| if (Dmo.Supplier_ID.HasValue) | |||
| supplierSelect.Fill(Dmo.Supplier_Name, Dmo.Supplier_ID.ToString()); | |||
| if (Dmo.PurchaseType_ID.HasValue) | |||
| purchaseTypeSelect.Fill(Dmo.PurchaseType_Name, Dmo.PurchaseType_ID.ToString()); | |||
| weightTimeSelect.Date = Dmo.WeightTime.Value; | |||
| Dmo.WeightTime = weightTimeSelect.Date; | |||
| if (Dmo.Car_ID.HasValue) | |||
| carSelect.Fill(Dmo.Car_Name, Dmo.Car_ID.ToString()); | |||
| if (Dmo.Livestock_ID.HasValue) | |||
| liveVarietiesSelect.Fill(Dmo.Livestock_Name, Dmo.Livestock_ID.ToString()); | |||
| if (Dmo.Employee_ID.HasValue) | |||
| employeeSelect.Fill(Dmo.Employee_Name, Dmo.Employee_ID.ToString()); | |||
| if (Dmo.HogGrade_ID.HasValue) | |||
| hogGradeSelect.Fill(Dmo.HogGrade_Name, Dmo.HogGrade_ID.ToString()); | |||
| if (Dmo.Zone_ID.HasValue) | |||
| zoneSelect.Fill(Dmo.Zone_Name, Dmo.Zone_ID.ToString()); | |||
| if (Dmo.PenWeight.HasValue) | |||
| penWeightInput.Text = Dmo.PenWeight.Value.ToString(); | |||
| if (Dmo.PenPrice.HasValue) | |||
| penPriceInput.Text = Dmo.PenPrice.Value.ToString(); | |||
| if (Dmo.PenMoney.HasValue) | |||
| penMoneyInput.Text = Dmo.PenMoney.Value.ToString(); | |||
| if (!string.IsNullOrEmpty(Dmo.AnimalTestNumber)) | |||
| testCardNumberInput.Text = Dmo.AnimalTestNumber; | |||
| if (Dmo.AnimalTestDate.HasValue) | |||
| testTimeInput.Date = Dmo.AnimalTestDate.Value; | |||
| if (!string.IsNullOrEmpty(Dmo.AnimalTestMan)) | |||
| testManInput.Text = Dmo.AnimalTestMan; | |||
| if (!string.IsNullOrEmpty(Dmo.Remark)) | |||
| remarkInput.Text = Dmo.Remark; | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,252 @@ | |||
| <?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="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column9.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column9.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column11.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column12.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column11.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column12.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column13.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column14.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column15.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column16.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column17.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column18.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column19.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column20.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column21.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column22.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column13.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column14.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column15.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column16.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column17.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column18.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column19.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column20.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column21.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| <metadata name="Column22.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
| <value>True</value> | |||
| </metadata> | |||
| </root> | |||
| @ -0,0 +1,6 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
| <configuration> | |||
| <startup> | |||
| <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | |||
| </startup> | |||
| </configuration> | |||
| @ -0,0 +1,39 @@ | |||
| namespace WeighAndGrading | |||
| { | |||
| partial class Form1 | |||
| { | |||
| /// <summary> | |||
| /// 必需的设计器变量。 | |||
| /// </summary> | |||
| private System.ComponentModel.IContainer components = null; | |||
| /// <summary> | |||
| /// 清理所有正在使用的资源。 | |||
| /// </summary> | |||
| /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> | |||
| protected override void Dispose(bool disposing) | |||
| { | |||
| if (disposing && (components != null)) | |||
| { | |||
| components.Dispose(); | |||
| } | |||
| base.Dispose(disposing); | |||
| } | |||
| #region Windows 窗体设计器生成的代码 | |||
| /// <summary> | |||
| /// 设计器支持所需的方法 - 不要 | |||
| /// 使用代码编辑器修改此方法的内容。 | |||
| /// </summary> | |||
| private void InitializeComponent() | |||
| { | |||
| this.components = new System.ComponentModel.Container(); | |||
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |||
| this.Text = "Form1"; | |||
| } | |||
| #endregion | |||
| } | |||
| } | |||
| @ -0,0 +1,20 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel; | |||
| using System.Data; | |||
| using System.Drawing; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace WeighAndGrading | |||
| { | |||
| public partial class Form1 : Form | |||
| { | |||
| public Form1() | |||
| { | |||
| InitializeComponent(); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,22 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace WeighAndGrading | |||
| { | |||
| static class Program | |||
| { | |||
| /// <summary> | |||
| /// 应用程序的主入口点。 | |||
| /// </summary> | |||
| [STAThread] | |||
| static void Main() | |||
| { | |||
| Application.EnableVisualStyles(); | |||
| Application.SetCompatibleTextRenderingDefault(false); | |||
| Application.Run(new Form1()); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,36 @@ | |||
| using System.Reflection; | |||
| using System.Runtime.CompilerServices; | |||
| using System.Runtime.InteropServices; | |||
| // 有关程序集的常规信息通过以下 | |||
| // 特性集控制。更改这些特性值可修改 | |||
| // 与程序集关联的信息。 | |||
| [assembly: AssemblyTitle("WeighAndGrading")] | |||
| [assembly: AssemblyDescription("")] | |||
| [assembly: AssemblyConfiguration("")] | |||
| [assembly: AssemblyCompany("")] | |||
| [assembly: AssemblyProduct("WeighAndGrading")] | |||
| [assembly: AssemblyCopyright("Copyright © 2017")] | |||
| [assembly: AssemblyTrademark("")] | |||
| [assembly: AssemblyCulture("")] | |||
| // 将 ComVisible 设置为 false 使此程序集中的类型 | |||
| // 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, | |||
| // 则将该类型上的 ComVisible 特性设置为 true。 | |||
| [assembly: ComVisible(false)] | |||
| // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||
| [assembly: Guid("3e34be44-2699-42dc-a5de-c743919db7a2")] | |||
| // 程序集的版本信息由下面四个值组成: | |||
| // | |||
| // 主版本 | |||
| // 次版本 | |||
| // 生成号 | |||
| // 修订号 | |||
| // | |||
| // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, | |||
| // 方法是按如下所示使用“*”: | |||
| // [assembly: AssemblyVersion("1.0.*")] | |||
| [assembly: AssemblyVersion("1.0.0.0")] | |||
| [assembly: AssemblyFileVersion("1.0.0.0")] | |||
| @ -0,0 +1,71 @@ | |||
| //------------------------------------------------------------------------------ | |||
| // <auto-generated> | |||
| // 此代码由工具生成。 | |||
| // 运行时版本: 4.0.30319.42000 | |||
| // | |||
| // 对此文件的更改可能会导致不正确的行为,并且如果 | |||
| // 重新生成代码,这些更改将丢失。 | |||
| // </auto-generated> | |||
| //------------------------------------------------------------------------------ | |||
| namespace WeighAndGrading.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("WeighAndGrading.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; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -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> | |||
| @ -0,0 +1,30 @@ | |||
| //------------------------------------------------------------------------------ | |||
| // <auto-generated> | |||
| // This code was generated by a tool. | |||
| // Runtime Version:4.0.30319.42000 | |||
| // | |||
| // Changes to this file may cause incorrect behavior and will be lost if | |||
| // the code is regenerated. | |||
| // </auto-generated> | |||
| //------------------------------------------------------------------------------ | |||
| namespace WeighAndGrading.Properties | |||
| { | |||
| [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |||
| [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,7 @@ | |||
| <?xml version='1.0' encoding='utf-8'?> | |||
| <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> | |||
| <Profiles> | |||
| <Profile Name="(Default)" /> | |||
| </Profiles> | |||
| <Settings /> | |||
| </SettingsFile> | |||
| @ -0,0 +1,93 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||
| <PropertyGroup> | |||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
| <ProjectGuid>{71598ACD-6C4A-4D61-937B-51147A5EA36E}</ProjectGuid> | |||
| <OutputType>WinExe</OutputType> | |||
| <AppDesignerFolder>Properties</AppDesignerFolder> | |||
| <RootNamespace>WeighAndGrading</RootNamespace> | |||
| <AssemblyName>WeighAndGrading</AssemblyName> | |||
| <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |||
| <FileAlignment>512</FileAlignment> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||
| <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|AnyCPU' "> | |||
| <PlatformTarget>AnyCPU</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>D:\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>D:\BwpB3Project\tsref\Debug\Forks.Utils.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="System" /> | |||
| <Reference Include="System.Core" /> | |||
| <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" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <Compile Include="Form1.cs"> | |||
| <SubType>Form</SubType> | |||
| </Compile> | |||
| <Compile Include="Form1.Designer.cs"> | |||
| <DependentUpon>Form1.cs</DependentUpon> | |||
| </Compile> | |||
| <Compile Include="Program.cs" /> | |||
| <Compile Include="Properties\AssemblyInfo.cs" /> | |||
| <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" /> | |||
| </ItemGroup> | |||
| <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||
| <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |||
| Other similar extension points exist, see Microsoft.Common.targets. | |||
| <Target Name="BeforeBuild"> | |||
| </Target> | |||
| <Target Name="AfterBuild"> | |||
| </Target> | |||
| --> | |||
| </Project> | |||
| @ -0,0 +1,6 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
| <configuration> | |||
| <startup> | |||
| <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | |||
| </startup> | |||
| </configuration> | |||
| @ -0,0 +1,61 @@ | |||
| using BO.Utils; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.IO; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace WeightClient | |||
| { | |||
| public class AppContext | |||
| { | |||
| private static string loginConfigPath = Application.StartupPath + "\\Config.xml"; | |||
| public ServerUrlConfig UrlConfig | |||
| { | |||
| get; | |||
| set; | |||
| } | |||
| public LoginUserInfo UserConfig | |||
| { | |||
| get; | |||
| set; | |||
| } | |||
| private AppContext() | |||
| { | |||
| UrlConfig = new ServerUrlConfig(); | |||
| UserConfig = new LoginUserInfo(); | |||
| } | |||
| public static AppContext Context | |||
| { | |||
| get | |||
| { | |||
| if (_appContext == null) | |||
| _appContext = CreateAppContext(); | |||
| return _appContext; | |||
| } | |||
| } | |||
| private static AppContext _appContext; | |||
| static AppContext CreateAppContext() | |||
| { | |||
| var config = new AppContext(); | |||
| if (!File.Exists(loginConfigPath)) | |||
| { | |||
| XmlUtil.SerializerObjToFile(config, loginConfigPath); | |||
| } | |||
| else | |||
| config = XmlUtil.DeserializeFromFile<AppContext>(loginConfigPath); | |||
| return config; | |||
| } | |||
| public void Save() | |||
| { | |||
| XmlUtil.SerializerObjToFile(_appContext, loginConfigPath); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,143 @@ | |||
| namespace WeightClient | |||
| { | |||
| partial class Login | |||
| { | |||
| /// <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.closeBtn = new System.Windows.Forms.Button(); | |||
| this.loginBtn = new System.Windows.Forms.Button(); | |||
| this.settingBtn = new System.Windows.Forms.Button(); | |||
| this.pwdTxt = new System.Windows.Forms.TextBox(); | |||
| this.userNameTxt = new System.Windows.Forms.TextBox(); | |||
| this.label2 = new System.Windows.Forms.Label(); | |||
| this.label1 = new System.Windows.Forms.Label(); | |||
| this.SuspendLayout(); | |||
| // | |||
| // closeBtn | |||
| // | |||
| this.closeBtn.Font = new System.Drawing.Font("宋体", 20F); | |||
| this.closeBtn.Location = new System.Drawing.Point(218, 208); | |||
| this.closeBtn.Name = "closeBtn"; | |||
| this.closeBtn.Size = new System.Drawing.Size(81, 53); | |||
| this.closeBtn.TabIndex = 13; | |||
| this.closeBtn.Text = "关闭"; | |||
| this.closeBtn.UseVisualStyleBackColor = true; | |||
| this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); | |||
| // | |||
| // loginBtn | |||
| // | |||
| this.loginBtn.Font = new System.Drawing.Font("宋体", 20F); | |||
| this.loginBtn.Location = new System.Drawing.Point(71, 208); | |||
| this.loginBtn.Name = "loginBtn"; | |||
| this.loginBtn.Size = new System.Drawing.Size(81, 53); | |||
| this.loginBtn.TabIndex = 12; | |||
| this.loginBtn.Text = "登录"; | |||
| this.loginBtn.UseVisualStyleBackColor = true; | |||
| this.loginBtn.Click += new System.EventHandler(this.loginBtn_Click); | |||
| // | |||
| // settingBtn | |||
| // | |||
| this.settingBtn.Font = new System.Drawing.Font("宋体", 20F); | |||
| this.settingBtn.Location = new System.Drawing.Point(366, 208); | |||
| this.settingBtn.Name = "settingBtn"; | |||
| this.settingBtn.Size = new System.Drawing.Size(81, 53); | |||
| this.settingBtn.TabIndex = 11; | |||
| this.settingBtn.Text = "设置"; | |||
| this.settingBtn.UseVisualStyleBackColor = true; | |||
| this.settingBtn.Click += new System.EventHandler(this.settingBtn_Click); | |||
| // | |||
| // pwdTxt | |||
| // | |||
| this.pwdTxt.Font = new System.Drawing.Font("宋体", 25F); | |||
| this.pwdTxt.Location = new System.Drawing.Point(228, 124); | |||
| this.pwdTxt.Name = "pwdTxt"; | |||
| this.pwdTxt.PasswordChar = '*'; | |||
| this.pwdTxt.Size = new System.Drawing.Size(219, 46); | |||
| this.pwdTxt.TabIndex = 10; | |||
| // | |||
| // userNameTxt | |||
| // | |||
| this.userNameTxt.Font = new System.Drawing.Font("宋体", 25F); | |||
| this.userNameTxt.Location = new System.Drawing.Point(228, 47); | |||
| this.userNameTxt.Name = "userNameTxt"; | |||
| this.userNameTxt.Size = new System.Drawing.Size(219, 46); | |||
| this.userNameTxt.TabIndex = 9; | |||
| this.userNameTxt.Click += new System.EventHandler(this.userNameTxt_Click); | |||
| // | |||
| // label2 | |||
| // | |||
| this.label2.AutoSize = true; | |||
| this.label2.Font = new System.Drawing.Font("宋体", 30F); | |||
| this.label2.Location = new System.Drawing.Point(64, 130); | |||
| this.label2.Name = "label2"; | |||
| this.label2.Size = new System.Drawing.Size(177, 40); | |||
| this.label2.TabIndex = 8; | |||
| this.label2.Text = "密 码:"; | |||
| // | |||
| // label1 | |||
| // | |||
| this.label1.AutoSize = true; | |||
| this.label1.Font = new System.Drawing.Font("宋体", 30F); | |||
| this.label1.Location = new System.Drawing.Point(64, 47); | |||
| this.label1.Name = "label1"; | |||
| this.label1.Size = new System.Drawing.Size(177, 40); | |||
| this.label1.TabIndex = 7; | |||
| this.label1.Text = "用户名:"; | |||
| // | |||
| // Login | |||
| // | |||
| this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); | |||
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |||
| this.ClientSize = new System.Drawing.Size(540, 314); | |||
| this.Controls.Add(this.closeBtn); | |||
| this.Controls.Add(this.loginBtn); | |||
| this.Controls.Add(this.settingBtn); | |||
| this.Controls.Add(this.pwdTxt); | |||
| this.Controls.Add(this.userNameTxt); | |||
| this.Controls.Add(this.label2); | |||
| this.Controls.Add(this.label1); | |||
| this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; | |||
| this.MaximizeBox = false; | |||
| this.Name = "Login"; | |||
| this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; | |||
| this.Text = "Login"; | |||
| this.ResumeLayout(false); | |||
| this.PerformLayout(); | |||
| } | |||
| #endregion | |||
| private System.Windows.Forms.Button closeBtn; | |||
| private System.Windows.Forms.Button loginBtn; | |||
| private System.Windows.Forms.Button settingBtn; | |||
| private System.Windows.Forms.TextBox pwdTxt; | |||
| private System.Windows.Forms.TextBox userNameTxt; | |||
| private System.Windows.Forms.Label label2; | |||
| private System.Windows.Forms.Label label1; | |||
| } | |||
| } | |||
| @ -0,0 +1,87 @@ | |||
| using BO.Utils; | |||
| using BWP.WinFormControl; | |||
| using Forks.JsonRpc.Client; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel; | |||
| using System.Data; | |||
| using System.Drawing; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace WeightClient | |||
| { | |||
| public partial class Login : Form | |||
| { | |||
| bool rpcFacadeInited = false; | |||
| void IniteRpcFacade() | |||
| { | |||
| if (rpcFacadeInited) | |||
| return; | |||
| if (string.IsNullOrEmpty(AppContext.Context.UrlConfig.ServerUrl)) | |||
| throw new Exception("请先设置服务器地址"); | |||
| RpcFacade.Init(AppContext.Context.UrlConfig.ServerUrl, "B3ButcherManageClient"); | |||
| rpcFacadeInited = true; | |||
| } | |||
| public Login() | |||
| { | |||
| InitializeComponent(); | |||
| userNameTxt.Text = AppContext.Context.UserConfig.UserName; | |||
| } | |||
| private void settingBtn_Click(object sender, EventArgs e) | |||
| { | |||
| var f = new SettingForm(); | |||
| f.ShowDialog(); | |||
| } | |||
| private async void loginBtn_Click(object sender, EventArgs e) | |||
| { | |||
| var username = userNameTxt.Text.Trim(); | |||
| var pwd = pwdTxt.Text; | |||
| if (string.IsNullOrEmpty(username)) | |||
| throw new Exception("请输入用户名"); | |||
| IniteRpcFacade(); | |||
| await Task.Factory.StartNew(() => RpcFacade.Login(username, pwd)); | |||
| AppContext.Context.UserConfig.ID = 1; | |||
| AppContext.Context.UserConfig.UserName = username; | |||
| AppContext.Context.Save(); | |||
| // var form = new ButcherOrderForm(); | |||
| //form.Show(); | |||
| Hide(); | |||
| } | |||
| private void closeBtn_Click(object sender, EventArgs e) | |||
| { | |||
| Application.Exit(); | |||
| } | |||
| private void userNameTxt_Click(object sender, EventArgs e) | |||
| { | |||
| IniteRpcFacade(); | |||
| var keyBoard = new NumberPad(); | |||
| if (keyBoard.ShowDialog() == true) | |||
| { | |||
| string errorInfo; | |||
| userNameTxt.Text = LoginRpcUtil.GetUserNameByCode(keyBoard.Result, out errorInfo); | |||
| //if (string.IsNullOrEmpty(userNameTxt.Text)) | |||
| // throw new Exception("工号输入错误"); | |||
| if (!string.IsNullOrEmpty(errorInfo)) | |||
| MessageBox.Show(errorInfo); | |||
| } | |||
| } | |||
| private void pwdTxt_Click(object sender, EventArgs e) | |||
| { | |||
| var keyBoard = new VirtualKeyPad(); | |||
| if (keyBoard.ShowDialog() == true) | |||
| pwdTxt.Text = keyBoard.Result; | |||
| } | |||
| } | |||
| } | |||
| @ -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> | |||
| @ -0,0 +1,76 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Diagnostics; | |||
| using System.Linq; | |||
| using System.Threading; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace WeightClient | |||
| { | |||
| static class Program | |||
| { | |||
| /// <summary> | |||
| /// 应用程序的主入口点。 | |||
| /// </summary> | |||
| [STAThread] | |||
| static void Main() | |||
| { | |||
| try | |||
| { | |||
| //处理未捕获的异常 | |||
| Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); | |||
| //处理UI线程异常 | |||
| Application.ThreadException += Application_ThreadException; | |||
| //处理非UI线程异常 | |||
| AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; | |||
| var aProcessName = Process.GetCurrentProcess().ProcessName; | |||
| if ((Process.GetProcessesByName(aProcessName)).GetUpperBound(0) > 0) | |||
| { | |||
| MessageBox.Show(@"系统已经在运行中,如果要重新启动,请从进程中关闭...", @"系统警告", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); | |||
| } | |||
| else | |||
| { | |||
| Application.EnableVisualStyles(); | |||
| Application.SetCompatibleTextRenderingDefault(false); | |||
| Application.Run(new Login()); | |||
| } | |||
| } | |||
| catch (Exception e) | |||
| { | |||
| // LogUtil.WriteError(e); | |||
| MessageBox.Show("错误:" + e.Message); | |||
| } | |||
| } | |||
| ///<summary> | |||
| /// 在发生未处理异常时处理的方法 | |||
| ///</summary> | |||
| ///<param name="sender"> </param> | |||
| ///<param name="e"> </param> | |||
| private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) | |||
| { | |||
| var ex = e.Exception; | |||
| var err = String.Empty; | |||
| if (ex != null) | |||
| { | |||
| //LogUtil.WriteError(ex); | |||
| err = ex.Message; | |||
| } | |||
| MessageBox.Show("错误:" + err); | |||
| } | |||
| private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) | |||
| { | |||
| var err = String.Empty; | |||
| var ex = e.ExceptionObject as Exception; | |||
| if (ex != null) | |||
| { | |||
| //LogUtil.WriteError(ex); | |||
| err = ex.Message; | |||
| } | |||
| MessageBox.Show("错误:" + err); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,36 @@ | |||
| using System.Reflection; | |||
| using System.Runtime.CompilerServices; | |||
| using System.Runtime.InteropServices; | |||
| // 有关程序集的常规信息通过以下 | |||
| // 特性集控制。更改这些特性值可修改 | |||
| // 与程序集关联的信息。 | |||
| [assembly: AssemblyTitle("WeightClient")] | |||
| [assembly: AssemblyDescription("")] | |||
| [assembly: AssemblyConfiguration("")] | |||
| [assembly: AssemblyCompany("")] | |||
| [assembly: AssemblyProduct("WeightClient")] | |||
| [assembly: AssemblyCopyright("Copyright © 2017")] | |||
| [assembly: AssemblyTrademark("")] | |||
| [assembly: AssemblyCulture("")] | |||
| // 将 ComVisible 设置为 false 使此程序集中的类型 | |||
| // 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, | |||
| // 则将该类型上的 ComVisible 特性设置为 true。 | |||
| [assembly: ComVisible(false)] | |||
| // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||
| [assembly: Guid("062ee4a6-19d4-47a4-afe6-57869c15442b")] | |||
| // 程序集的版本信息由下面四个值组成: | |||
| // | |||
| // 主版本 | |||
| // 次版本 | |||
| // 生成号 | |||
| // 修订号 | |||
| // | |||
| // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, | |||
| // 方法是按如下所示使用“*”: | |||
| // [assembly: AssemblyVersion("1.0.*")] | |||
| [assembly: AssemblyVersion("1.0.0.0")] | |||
| [assembly: AssemblyFileVersion("1.0.0.0")] | |||
| @ -0,0 +1,71 @@ | |||
| //------------------------------------------------------------------------------ | |||
| // <auto-generated> | |||
| // 此代码由工具生成。 | |||
| // 运行时版本: 4.0.30319.42000 | |||
| // | |||
| // 对此文件的更改可能会导致不正确的行为,并且如果 | |||
| // 重新生成代码,这些更改将丢失。 | |||
| // </auto-generated> | |||
| //------------------------------------------------------------------------------ | |||
| namespace WeightClient.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("WeightClient.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; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -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> | |||
| @ -0,0 +1,30 @@ | |||
| //------------------------------------------------------------------------------ | |||
| // <auto-generated> | |||
| // This code was generated by a tool. | |||
| // Runtime Version:4.0.30319.42000 | |||
| // | |||
| // Changes to this file may cause incorrect behavior and will be lost if | |||
| // the code is regenerated. | |||
| // </auto-generated> | |||
| //------------------------------------------------------------------------------ | |||
| namespace WeightClient.Properties | |||
| { | |||
| [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |||
| [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,7 @@ | |||
| <?xml version='1.0' encoding='utf-8'?> | |||
| <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> | |||
| <Profiles> | |||
| <Profile Name="(Default)" /> | |||
| </Profiles> | |||
| <Settings /> | |||
| </SettingsFile> | |||
| @ -0,0 +1,103 @@ | |||
| namespace WeightClient | |||
| { | |||
| partial class SettingForm | |||
| { | |||
| /// <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.cancelBtn = new System.Windows.Forms.Button(); | |||
| this.saveBtn = new System.Windows.Forms.Button(); | |||
| this.uTextBoxWithPad1 = new BWP.WinFormControl.UTextBoxWithPad(); | |||
| this.label1 = new System.Windows.Forms.Label(); | |||
| this.SuspendLayout(); | |||
| // | |||
| // cancelBtn | |||
| // | |||
| this.cancelBtn.Font = new System.Drawing.Font("宋体", 20F); | |||
| this.cancelBtn.Location = new System.Drawing.Point(241, 110); | |||
| this.cancelBtn.Name = "cancelBtn"; | |||
| this.cancelBtn.Size = new System.Drawing.Size(81, 53); | |||
| this.cancelBtn.TabIndex = 7; | |||
| this.cancelBtn.Text = "关闭"; | |||
| this.cancelBtn.UseVisualStyleBackColor = true; | |||
| this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click); | |||
| // | |||
| // saveBtn | |||
| // | |||
| this.saveBtn.Font = new System.Drawing.Font("宋体", 20F); | |||
| this.saveBtn.Location = new System.Drawing.Point(100, 110); | |||
| this.saveBtn.Name = "saveBtn"; | |||
| this.saveBtn.Size = new System.Drawing.Size(81, 53); | |||
| this.saveBtn.TabIndex = 6; | |||
| this.saveBtn.Text = "保存"; | |||
| this.saveBtn.UseVisualStyleBackColor = true; | |||
| this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click); | |||
| // | |||
| // uTextBoxWithPad1 | |||
| // | |||
| this.uTextBoxWithPad1.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.uTextBoxWithPad1.Location = new System.Drawing.Point(140, 41); | |||
| this.uTextBoxWithPad1.Name = "uTextBoxWithPad1"; | |||
| this.uTextBoxWithPad1.Size = new System.Drawing.Size(246, 30); | |||
| this.uTextBoxWithPad1.TabIndex = 5; | |||
| this.uTextBoxWithPad1.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Normal; | |||
| // | |||
| // label1 | |||
| // | |||
| this.label1.AutoSize = true; | |||
| this.label1.Font = new System.Drawing.Font("宋体", 15F); | |||
| this.label1.Location = new System.Drawing.Point(18, 44); | |||
| this.label1.Name = "label1"; | |||
| this.label1.Size = new System.Drawing.Size(129, 20); | |||
| this.label1.TabIndex = 4; | |||
| this.label1.Text = "服务器地址:"; | |||
| // | |||
| // SettingForm | |||
| // | |||
| this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); | |||
| this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |||
| this.ClientSize = new System.Drawing.Size(404, 205); | |||
| this.Controls.Add(this.cancelBtn); | |||
| this.Controls.Add(this.saveBtn); | |||
| this.Controls.Add(this.uTextBoxWithPad1); | |||
| this.Controls.Add(this.label1); | |||
| this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; | |||
| this.MaximizeBox = false; | |||
| this.Name = "SettingForm"; | |||
| this.Text = "SettingForm"; | |||
| this.ResumeLayout(false); | |||
| this.PerformLayout(); | |||
| } | |||
| #endregion | |||
| private System.Windows.Forms.Button cancelBtn; | |||
| private System.Windows.Forms.Button saveBtn; | |||
| private BWP.WinFormControl.UTextBoxWithPad uTextBoxWithPad1; | |||
| private System.Windows.Forms.Label label1; | |||
| } | |||
| } | |||
| @ -0,0 +1,33 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel; | |||
| using System.Data; | |||
| using System.Drawing; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Windows.Forms; | |||
| namespace WeightClient | |||
| { | |||
| public partial class SettingForm : Form | |||
| { | |||
| public SettingForm() | |||
| { | |||
| InitializeComponent(); | |||
| uTextBoxWithPad1.Text = AppContext.Context.UrlConfig.ServerUrl; | |||
| } | |||
| private void cancelBtn_Click(object sender, EventArgs e) | |||
| { | |||
| this.Close(); | |||
| } | |||
| private void saveBtn_Click(object sender, EventArgs e) | |||
| { | |||
| AppContext.Context.UrlConfig.ServerUrl = this.uTextBoxWithPad1.Text.Trim(); | |||
| AppContext.Context.Save(); | |||
| MessageBox.Show("设置保存成功!"); | |||
| } | |||
| } | |||
| } | |||
| @ -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> | |||
| @ -0,0 +1,124 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||
| <PropertyGroup> | |||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
| <ProjectGuid>{CB51A020-8823-4D64-898D-CC1632A298DB}</ProjectGuid> | |||
| <OutputType>WinExe</OutputType> | |||
| <AppDesignerFolder>Properties</AppDesignerFolder> | |||
| <RootNamespace>WeightClient</RootNamespace> | |||
| <AssemblyName>WeightClient</AssemblyName> | |||
| <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |||
| <FileAlignment>512</FileAlignment> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||
| <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|AnyCPU' "> | |||
| <PlatformTarget>AnyCPU</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>..\..\..\..\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> | |||
| <SpecificVersion>False</SpecificVersion> | |||
| <HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.Utils.dll</HintPath> | |||
| </Reference> | |||
| <Reference Include="PresentationCore" /> | |||
| <Reference Include="PresentationFramework" /> | |||
| <Reference Include="System" /> | |||
| <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="AppContext.cs" /> | |||
| <Compile Include="Login.cs"> | |||
| <SubType>Form</SubType> | |||
| </Compile> | |||
| <Compile Include="Login.Designer.cs"> | |||
| <DependentUpon>Login.cs</DependentUpon> | |||
| </Compile> | |||
| <Compile Include="Program.cs" /> | |||
| <Compile Include="Properties\AssemblyInfo.cs" /> | |||
| <Compile Include="SettingForm.cs"> | |||
| <SubType>Form</SubType> | |||
| </Compile> | |||
| <Compile Include="SettingForm.Designer.cs"> | |||
| <DependentUpon>SettingForm.cs</DependentUpon> | |||
| </Compile> | |||
| <EmbeddedResource Include="Login.resx"> | |||
| <DependentUpon>Login.cs</DependentUpon> | |||
| </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> | |||
| <EmbeddedResource Include="SettingForm.resx"> | |||
| <DependentUpon>SettingForm.cs</DependentUpon> | |||
| </EmbeddedResource> | |||
| <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" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <ProjectReference Include="..\BO\BO.csproj"> | |||
| <Project>{8968f14a-c7c7-4751-96ce-b114fbfd65ef}</Project> | |||
| <Name>BO</Name> | |||
| </ProjectReference> | |||
| <ProjectReference Include="..\BWP.WinFormControl\BWP.WinFormControl.csproj"> | |||
| <Project>{a782b23e-be6d-4f51-b5cb-5cd259ba97cc}</Project> | |||
| <Name>BWP.WinFormControl</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> | |||