commit f84c98beb53b876db11576ce80347ed58af4c337
Author: yibo <361071264@qq.com>
Date: Thu Sep 7 08:09:58 2017 +0800
init
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..708eb27
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+.*
+*.TMP
+*.suo
+*.user
+obj
+bin
+_ReSharper.B3ButcherManageClient
diff --git a/B3ButcherManageClient.sln b/B3ButcherManageClient.sln
new file mode 100644
index 0000000..8122299
--- /dev/null
+++ b/B3ButcherManageClient.sln
@@ -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
diff --git a/BO/BO.csproj b/BO/BO.csproj
new file mode 100644
index 0000000..6f5f4d6
--- /dev/null
+++ b/BO/BO.csproj
@@ -0,0 +1,78 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {8968F14A-C7C7-4751-96CE-B114FBFD65EF}
+ Library
+ Properties
+ BO
+ BO
+ v4.5
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ D:\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll
+
+
+ False
+ ..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll
+
+
+ False
+ D:\BwpB3Project\tsref\Debug\Forks.Utils.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BO/BO/Bill/WeightBill/WeightBill.cs b/BO/BO/Bill/WeightBill/WeightBill.cs
new file mode 100644
index 0000000..4d529f7
--- /dev/null
+++ b/BO/BO/Bill/WeightBill/WeightBill.cs
@@ -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 _farmerDetails = new List();
+ //public List FarmerDetails { get { return _farmerDetails; } }
+ }
+}
diff --git a/BO/BO/Bill/WeightBill/WeightBill_AbnormalDetail.cs b/BO/BO/Bill/WeightBill/WeightBill_AbnormalDetail.cs
new file mode 100644
index 0000000..493c08a
--- /dev/null
+++ b/BO/BO/Bill/WeightBill/WeightBill_AbnormalDetail.cs
@@ -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
+ {
+ }
+}
diff --git a/BO/BO/Bill/WeightBill/WeightBill_Detail.cs b/BO/BO/Bill/WeightBill/WeightBill_Detail.cs
new file mode 100644
index 0000000..f174074
--- /dev/null
+++ b/BO/BO/Bill/WeightBill/WeightBill_Detail.cs
@@ -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
+ {
+ }
+}
diff --git a/BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs b/BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs
new file mode 100644
index 0000000..8847e98
--- /dev/null
+++ b/BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs
@@ -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; }
+ }
+}
diff --git a/BO/BO/Bill/WeightBill/WeightBill_HouseDetail.cs b/BO/BO/Bill/WeightBill/WeightBill_HouseDetail.cs
new file mode 100644
index 0000000..ed895df
--- /dev/null
+++ b/BO/BO/Bill/WeightBill/WeightBill_HouseDetail.cs
@@ -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
+ {
+ }
+}
diff --git a/BO/Properties/AssemblyInfo.cs b/BO/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..61343e6
--- /dev/null
+++ b/BO/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/BO/Utils/BaseInfoRpcUtil.cs b/BO/Utils/BaseInfoRpcUtil.cs
new file mode 100644
index 0000000..7237c67
--- /dev/null
+++ b/BO/Utils/BaseInfoRpcUtil.cs
@@ -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 GetBaseInfoEntity(string rpcName)
+ //{
+ // var list = RpcFacade.Call>(string.Format("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/{0}", rpcName));
+ // var result = new List();
+ // foreach (RpcObject o in list)
+ // {
+ // var entity = new BaseInfoEntity();
+ // entity.ID = o.Get("ID");
+ // entity.Name = o.Get("Name");
+ // entity.Spell = o.Get("Spell");
+ // result.Add(entity);
+ // }
+ // return result;
+ //}
+ }
+}
diff --git a/BO/Utils/BillRpc/WeightBillRpc.cs b/BO/Utils/BillRpc/WeightBillRpc.cs
new file mode 100644
index 0000000..9980562
--- /dev/null
+++ b/BO/Utils/BillRpc/WeightBillRpc.cs
@@ -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(method, obj);
+ }
+ }
+}
diff --git a/BO/Utils/LoginRpcUtil.cs b/BO/Utils/LoginRpcUtil.cs
new file mode 100644
index 0000000..599ea31
--- /dev/null
+++ b/BO/Utils/LoginRpcUtil.cs
@@ -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(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(wpfUserMethod, name);
+ if (obj != null)
+ {
+ userInfo.ID = obj.Get("User_ID");
+ userInfo.UserName = obj.Get("User_Name");
+ userInfo.Domain_ID = obj.Get("Domain_ID");
+ userInfo.AccountingUnit_ID = obj.Get("AccountingUnit_ID");
+ userInfo.AccountingUnit_Name = obj.Get("AccountingUnit_Name");
+ userInfo.Department_ID = obj.Get("Department_ID");
+ userInfo.Department_Name = obj.Get("Department_Name");
+ userInfo.Employee_ID = obj.Get("Employee_ID");
+ userInfo.Employee_Name = obj.Get("Employee_Name");
+ }
+ }
+ }
+}
diff --git a/BO/Utils/LoginUserInfo.cs b/BO/Utils/LoginUserInfo.cs
new file mode 100644
index 0000000..7c776e4
--- /dev/null
+++ b/BO/Utils/LoginUserInfo.cs
@@ -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; }
+ }
+}
diff --git a/BO/Utils/ServerUrlConfig.cs b/BO/Utils/ServerUrlConfig.cs
new file mode 100644
index 0000000..ec24b2d
--- /dev/null
+++ b/BO/Utils/ServerUrlConfig.cs
@@ -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; }
+ }
+}
diff --git a/BO/Utils/XmlUtil.cs b/BO/Utils/XmlUtil.cs
new file mode 100644
index 0000000..5a886e9
--- /dev/null
+++ b/BO/Utils/XmlUtil.cs
@@ -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(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;
+ }
+ }
+ }
+}
diff --git a/BWP.WinFormControl/BWP.WinFormControl.csproj b/BWP.WinFormControl/BWP.WinFormControl.csproj
new file mode 100644
index 0000000..8151e56
--- /dev/null
+++ b/BWP.WinFormControl/BWP.WinFormControl.csproj
@@ -0,0 +1,109 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}
+ Library
+ Properties
+ BWP.WinFormControl
+ BWP.WinFormControl
+ v4.5
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Calendar.xaml
+
+
+
+
+ NumberPad.xaml
+
+
+
+ Component
+
+
+ Component
+
+
+ Component
+
+
+ VirtualKeyPad.xaml
+
+
+ UserControl
+
+
+ WeightControl.cs
+
+
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+
+ WeightControl.cs
+
+
+
+
+
\ No newline at end of file
diff --git a/BWP.WinFormControl/BoolToVisibilityConverter.cs b/BWP.WinFormControl/BoolToVisibilityConverter.cs
new file mode 100644
index 0000000..5d11236
--- /dev/null
+++ b/BWP.WinFormControl/BoolToVisibilityConverter.cs
@@ -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();
+ }
+ }
+}
diff --git a/BWP.WinFormControl/Calendar.xaml b/BWP.WinFormControl/Calendar.xaml
new file mode 100644
index 0000000..370a6e7
--- /dev/null
+++ b/BWP.WinFormControl/Calendar.xaml
@@ -0,0 +1,730 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BWP.WinFormControl/Calendar.xaml.cs b/BWP.WinFormControl/Calendar.xaml.cs
new file mode 100644
index 0000000..bd56cca
--- /dev/null
+++ b/BWP.WinFormControl/Calendar.xaml.cs
@@ -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
+{
+ ///
+ /// Calendar.xaml 的交互逻辑
+ ///
+ 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;
+ }
+ }
+}
diff --git a/BWP.WinFormControl/ComboBoxHelper.cs b/BWP.WinFormControl/ComboBoxHelper.cs
new file mode 100644
index 0000000..6fa2878
--- /dev/null
+++ b/BWP.WinFormControl/ComboBoxHelper.cs
@@ -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 GetList(string rpc, string input, string codeArg, int range)
+ {
+ var list = RpcFacade.Call>(rpc, input, codeArg, range);
+ var result = new List();
+ foreach (var item in list)
+ {
+ result.Add(new WordPair(item.Get("DisplayName"), item.Get("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;
+ }
+ }
+}
diff --git a/BWP.WinFormControl/ComponentUtil.cs b/BWP.WinFormControl/ComponentUtil.cs
new file mode 100644
index 0000000..b042ae0
--- /dev/null
+++ b/BWP.WinFormControl/ComponentUtil.cs
@@ -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;
+
+ }
+ }
+}
diff --git a/BWP.WinFormControl/Images/today.png b/BWP.WinFormControl/Images/today.png
new file mode 100644
index 0000000..d9d9098
Binary files /dev/null and b/BWP.WinFormControl/Images/today.png differ
diff --git a/BWP.WinFormControl/NumberPad.xaml b/BWP.WinFormControl/NumberPad.xaml
new file mode 100644
index 0000000..df58e19
--- /dev/null
+++ b/BWP.WinFormControl/NumberPad.xaml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BWP.WinFormControl/NumberPad.xaml.cs b/BWP.WinFormControl/NumberPad.xaml.cs
new file mode 100644
index 0000000..5ff217f
--- /dev/null
+++ b/BWP.WinFormControl/NumberPad.xaml.cs
@@ -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));
+ }
+ }
+ }
+}
diff --git a/BWP.WinFormControl/Properties/AssemblyInfo.cs b/BWP.WinFormControl/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..df72c5a
--- /dev/null
+++ b/BWP.WinFormControl/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/BWP.WinFormControl/UComboBox.cs b/BWP.WinFormControl/UComboBox.cs
new file mode 100644
index 0000000..906097b
--- /dev/null
+++ b/BWP.WinFormControl/UComboBox.cs
@@ -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;
+ }
+ }
+ }
+}
diff --git a/BWP.WinFormControl/UDatePicker.cs b/BWP.WinFormControl/UDatePicker.cs
new file mode 100644
index 0000000..c9758d3
--- /dev/null
+++ b/BWP.WinFormControl/UDatePicker.cs
@@ -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
+ }
+}
diff --git a/BWP.WinFormControl/UTextBoxWithPad.cs b/BWP.WinFormControl/UTextBoxWithPad.cs
new file mode 100644
index 0000000..b25e9c6
--- /dev/null
+++ b/BWP.WinFormControl/UTextBoxWithPad.cs
@@ -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();
+
+ }
+ }
+}
diff --git a/BWP.WinFormControl/VirtualKeyPad.xaml b/BWP.WinFormControl/VirtualKeyPad.xaml
new file mode 100644
index 0000000..101802b
--- /dev/null
+++ b/BWP.WinFormControl/VirtualKeyPad.xaml
@@ -0,0 +1,355 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BWP.WinFormControl/VirtualKeyPad.xaml.cs b/BWP.WinFormControl/VirtualKeyPad.xaml.cs
new file mode 100644
index 0000000..effb32d
--- /dev/null
+++ b/BWP.WinFormControl/VirtualKeyPad.xaml.cs
@@ -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
+{
+ ///
+ /// VirtualKeyPad.xaml 的交互逻辑
+ ///
+ 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));
+ }
+ }
+}
diff --git a/BWP.WinFormControl/WeightControl.Designer.cs b/BWP.WinFormControl/WeightControl.Designer.cs
new file mode 100644
index 0000000..325b07a
--- /dev/null
+++ b/BWP.WinFormControl/WeightControl.Designer.cs
@@ -0,0 +1,90 @@
+namespace BWP.WinFormControl
+{
+ partial class WeightControl
+ {
+ ///
+ /// 必需的设计器变量。
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// 清理所有正在使用的资源。
+ ///
+ /// 如果应释放托管资源,为 true;否则为 false。
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region 组件设计器生成的代码
+
+ ///
+ /// 设计器支持所需的方法 - 不要
+ /// 使用代码编辑器修改此方法的内容。
+ ///
+ 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;
+ }
+}
diff --git a/BWP.WinFormControl/WeightControl.cs b/BWP.WinFormControl/WeightControl.cs
new file mode 100644
index 0000000..8f8e5b8
--- /dev/null
+++ b/BWP.WinFormControl/WeightControl.cs
@@ -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();
+ }
+ }
+}
diff --git a/BWP.WinFormControl/WeightControl.resx b/BWP.WinFormControl/WeightControl.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/BWP.WinFormControl/WeightControl.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ButcherManageClient/AfterLoginUtil.cs b/ButcherManageClient/AfterLoginUtil.cs
new file mode 100644
index 0000000..aa0f3aa
--- /dev/null
+++ b/ButcherManageClient/AfterLoginUtil.cs
@@ -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> roleToAssemblies = new List> {
+ new Tuple("1测试",@"C:\B3Service\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"),
+ new Tuple("_1",@"C:\B3Service\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"),
+ new Tuple("小新",""),
+ };
+
+ 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;
+ }
+ }
+}
diff --git a/ButcherManageClient/App.config b/ButcherManageClient/App.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/ButcherManageClient/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ButcherManageClient/AppContext.cs b/ButcherManageClient/AppContext.cs
new file mode 100644
index 0000000..ee2d7cb
--- /dev/null
+++ b/ButcherManageClient/AppContext.cs
@@ -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(loginConfigPath);
+ return config;
+ }
+
+ public void Save()
+ {
+ XmlUtil.SerializerObjToFile(_appContext, loginConfigPath);
+ }
+ }
+}
diff --git a/ButcherManageClient/ButcherManageClient.csproj b/ButcherManageClient/ButcherManageClient.csproj
new file mode 100644
index 0000000..9a4126b
--- /dev/null
+++ b/ButcherManageClient/ButcherManageClient.csproj
@@ -0,0 +1,125 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {59B13436-4884-4533-9C7E-80E8580CBF55}
+ WinExe
+ Properties
+ ButcherManageClient
+ ButcherManageClient
+ v4.5
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\..\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll
+
+
+ False
+ ..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll
+
+
+ False
+ ..\..\..\..\BwpB3Project\tsref\Debug\Forks.Utils.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Login.cs
+
+
+
+
+ Form
+
+
+ SettingForm.cs
+
+
+ Login.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+
+
+ SettingForm.cs
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
+ {8968f14a-c7c7-4751-96ce-b114fbfd65ef}
+ BO
+
+
+ {a782b23e-be6d-4f51-b5cb-5cd259ba97cc}
+ BWP.WinFormControl
+
+
+
+
+
\ No newline at end of file
diff --git a/ButcherManageClient/Login.Designer.cs b/ButcherManageClient/Login.Designer.cs
new file mode 100644
index 0000000..429888d
--- /dev/null
+++ b/ButcherManageClient/Login.Designer.cs
@@ -0,0 +1,144 @@
+namespace ButcherManageClient
+{
+ partial class Login
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ 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;
+ }
+}
\ No newline at end of file
diff --git a/ButcherManageClient/Login.cs b/ButcherManageClient/Login.cs
new file mode 100644
index 0000000..c8c41da
--- /dev/null
+++ b/ButcherManageClient/Login.cs
@@ -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;
+ }
+ }
+}
diff --git a/ButcherManageClient/Login.resx b/ButcherManageClient/Login.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/ButcherManageClient/Login.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ButcherManageClient/Program.cs b/ButcherManageClient/Program.cs
new file mode 100644
index 0000000..6595e4f
--- /dev/null
+++ b/ButcherManageClient/Program.cs
@@ -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
+ {
+ ///
+ /// 应用程序的主入口点。
+ ///
+ [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);
+ }
+ }
+
+ ///
+ /// 在发生未处理异常时处理的方法
+ ///
+ ///
+ ///
+ 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);
+ }
+ }
+}
diff --git a/ButcherManageClient/Properties/AssemblyInfo.cs b/ButcherManageClient/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..ebd8e60
--- /dev/null
+++ b/ButcherManageClient/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/ButcherManageClient/Properties/Resources.Designer.cs b/ButcherManageClient/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..88f6277
--- /dev/null
+++ b/ButcherManageClient/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本: 4.0.30319.42000
+//
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将丢失。
+//
+//------------------------------------------------------------------------------
+
+namespace ButcherManageClient.Properties
+{
+
+
+ ///
+ /// 一个强类型的资源类,用于查找本地化的字符串等。
+ ///
+ // 此类是由 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()
+ {
+ }
+
+ ///
+ /// 返回此类使用的、缓存的 ResourceManager 实例。
+ ///
+ [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;
+ }
+ }
+
+ ///
+ /// 为所有资源查找重写当前线程的 CurrentUICulture 属性,
+ /// 方法是使用此强类型资源类。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/ButcherManageClient/Properties/Resources.resx b/ButcherManageClient/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/ButcherManageClient/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ButcherManageClient/Properties/Settings.Designer.cs b/ButcherManageClient/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..4896079
--- /dev/null
+++ b/ButcherManageClient/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+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;
+ }
+ }
+ }
+}
diff --git a/ButcherManageClient/Properties/Settings.settings b/ButcherManageClient/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/ButcherManageClient/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/ButcherManageClient/SettingForm.Designer.cs b/ButcherManageClient/SettingForm.Designer.cs
new file mode 100644
index 0000000..5a97bb4
--- /dev/null
+++ b/ButcherManageClient/SettingForm.Designer.cs
@@ -0,0 +1,103 @@
+namespace ButcherManageClient
+{
+ partial class SettingForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ 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;
+ }
+}
\ No newline at end of file
diff --git a/ButcherManageClient/SettingForm.cs b/ButcherManageClient/SettingForm.cs
new file mode 100644
index 0000000..2e4e5cc
--- /dev/null
+++ b/ButcherManageClient/SettingForm.cs
@@ -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("设置保存成功!");
+ }
+ }
+}
diff --git a/ButcherManageClient/SettingForm.resx b/ButcherManageClient/SettingForm.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/ButcherManageClient/SettingForm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ButcherOrder - 副本/App.config b/ButcherOrder - 副本/App.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/ButcherOrder - 副本/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ButcherOrder - 副本/AppContext.cs b/ButcherOrder - 副本/AppContext.cs
new file mode 100644
index 0000000..cf88185
--- /dev/null
+++ b/ButcherOrder - 副本/AppContext.cs
@@ -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(loginConfigPath);
+// return config;
+// }
+
+// public void Save()
+// {
+// XmlUtil.SerializerObjToFile(_appContext, loginConfigPath);
+// }
+// }
+//}
diff --git a/ButcherOrder - 副本/ButcherOrder.csproj b/ButcherOrder - 副本/ButcherOrder.csproj
new file mode 100644
index 0000000..4009e6f
--- /dev/null
+++ b/ButcherOrder - 副本/ButcherOrder.csproj
@@ -0,0 +1,114 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {2D425E5E-A44F-4781-8F7A-9CDDB8431684}
+ WinExe
+ Properties
+ ButcherOrder
+ ButcherOrder
+ v4.5
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ D:\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll
+
+
+ False
+ ..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll
+
+
+ False
+ D:\BwpB3Project\tsref\Debug\Forks.Utils.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ ButcherOrderForm.cs
+
+
+
+ ButcherOrderForm.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
+ {8968f14a-c7c7-4751-96ce-b114fbfd65ef}
+ BO
+
+
+ {A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}
+ BWP.WinFormControl
+
+
+
+
+
\ No newline at end of file
diff --git a/ButcherOrder - 副本/ButcherOrderForm.Designer.cs b/ButcherOrder - 副本/ButcherOrderForm.Designer.cs
new file mode 100644
index 0000000..71385bb
--- /dev/null
+++ b/ButcherOrder - 副本/ButcherOrderForm.Designer.cs
@@ -0,0 +1,63 @@
+namespace ButcherOrder
+{
+ partial class ButcherOrderForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ 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;
+ }
+}
\ No newline at end of file
diff --git a/ButcherOrder - 副本/ButcherOrderForm.cs b/ButcherOrder - 副本/ButcherOrderForm.cs
new file mode 100644
index 0000000..0582b6c
--- /dev/null
+++ b/ButcherOrder - 副本/ButcherOrderForm.cs
@@ -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();
+ }
+ }
+}
diff --git a/ButcherOrder - 副本/ButcherOrderForm.resx b/ButcherOrder - 副本/ButcherOrderForm.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/ButcherOrder - 副本/ButcherOrderForm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ButcherOrder - 副本/Properties/AssemblyInfo.cs b/ButcherOrder - 副本/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..6b76d40
--- /dev/null
+++ b/ButcherOrder - 副本/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/ButcherOrder - 副本/Properties/Resources.Designer.cs b/ButcherOrder - 副本/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..2f724d1
--- /dev/null
+++ b/ButcherOrder - 副本/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本: 4.0.30319.42000
+//
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将丢失。
+//
+//------------------------------------------------------------------------------
+
+namespace ButcherOrder.Properties
+{
+
+
+ ///
+ /// 一个强类型的资源类,用于查找本地化的字符串等。
+ ///
+ // 此类是由 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()
+ {
+ }
+
+ ///
+ /// 返回此类使用的、缓存的 ResourceManager 实例。
+ ///
+ [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;
+ }
+ }
+
+ ///
+ /// 为所有资源查找重写当前线程的 CurrentUICulture 属性,
+ /// 方法是使用此强类型资源类。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/ButcherOrder - 副本/Properties/Resources.resx b/ButcherOrder - 副本/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/ButcherOrder - 副本/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ButcherOrder - 副本/Properties/Settings.Designer.cs b/ButcherOrder - 副本/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..2d01d37
--- /dev/null
+++ b/ButcherOrder - 副本/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+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;
+ }
+ }
+ }
+}
diff --git a/ButcherOrder - 副本/Properties/Settings.settings b/ButcherOrder - 副本/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/ButcherOrder - 副本/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/ButcherOrder/ButcherOrder.csproj b/ButcherOrder/ButcherOrder.csproj
new file mode 100644
index 0000000..ea4bd70
--- /dev/null
+++ b/ButcherOrder/ButcherOrder.csproj
@@ -0,0 +1,92 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {B9E62966-DA6C-4075-91A3-CB66C4FBBC6A}
+ Library
+ Properties
+ ButcherOrder
+ ButcherOrder
+ v4.5
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ ButcherOrderForm.cs
+
+
+
+ Form
+
+
+ ViewDetail.cs
+
+
+
+
+ {8968f14a-c7c7-4751-96ce-b114fbfd65ef}
+ BO
+
+
+ {59b13436-4884-4533-9c7e-80e8580cbf55}
+ ButcherManageClient
+
+
+ {A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}
+ BWP.WinFormControl
+
+
+
+
+ ButcherOrderForm.cs
+
+
+ ViewDetail.cs
+
+
+
+
+
\ No newline at end of file
diff --git a/ButcherOrder/ButcherOrderForm.Designer.cs b/ButcherOrder/ButcherOrderForm.Designer.cs
new file mode 100644
index 0000000..4613300
--- /dev/null
+++ b/ButcherOrder/ButcherOrderForm.Designer.cs
@@ -0,0 +1,206 @@
+namespace ButcherOrder
+{
+ partial class ButcherOrderForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ 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;
+ }
+}
\ No newline at end of file
diff --git a/ButcherOrder/ButcherOrderForm.cs b/ButcherOrder/ButcherOrderForm.cs
new file mode 100644
index 0000000..aee2c21
--- /dev/null
+++ b/ButcherOrder/ButcherOrderForm.cs
@@ -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)
+ {
+
+ }
+ }
+}
diff --git a/ButcherOrder/ButcherOrderForm.resx b/ButcherOrder/ButcherOrderForm.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/ButcherOrder/ButcherOrderForm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ButcherOrder/Properties/AssemblyInfo.cs b/ButcherOrder/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..6a4661e
--- /dev/null
+++ b/ButcherOrder/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/ButcherOrder/ViewDetail.Designer.cs b/ButcherOrder/ViewDetail.Designer.cs
new file mode 100644
index 0000000..5fed91e
--- /dev/null
+++ b/ButcherOrder/ViewDetail.Designer.cs
@@ -0,0 +1,171 @@
+namespace ButcherOrder
+{
+ partial class ViewDetail
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ 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;
+ }
+}
\ No newline at end of file
diff --git a/ButcherOrder/ViewDetail.cs b/ButcherOrder/ViewDetail.cs
new file mode 100644
index 0000000..19f2ea8
--- /dev/null
+++ b/ButcherOrder/ViewDetail.cs
@@ -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();
+ }
+ }
+}
diff --git a/ButcherOrder/ViewDetail.resx b/ButcherOrder/ViewDetail.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/ButcherOrder/ViewDetail.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ButcherWeight/ButcherWeight.csproj b/ButcherWeight/ButcherWeight.csproj
new file mode 100644
index 0000000..bc56dcd
--- /dev/null
+++ b/ButcherWeight/ButcherWeight.csproj
@@ -0,0 +1,95 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {17F58766-89EB-44C0-8EEF-4787849979EC}
+ Library
+ Properties
+ ButcherWeight
+ ButcherWeight
+ v4.5
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\..\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll
+
+
+ False
+ ..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll
+
+
+ False
+ ..\..\..\..\BwpB3Project\tsref\Debug\Forks.Utils.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ WeightForm.cs
+
+
+
+
+ {8968f14a-c7c7-4751-96ce-b114fbfd65ef}
+ BO
+
+
+ {59b13436-4884-4533-9c7e-80e8580cbf55}
+ ButcherManageClient
+
+
+ {A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}
+ BWP.WinFormControl
+
+
+
+
+ WeightForm.cs
+
+
+
+
+
\ No newline at end of file
diff --git a/ButcherWeight/Properties/AssemblyInfo.cs b/ButcherWeight/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..fa82fcb
--- /dev/null
+++ b/ButcherWeight/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/ButcherWeight/WeightForm.Designer.cs b/ButcherWeight/WeightForm.Designer.cs
new file mode 100644
index 0000000..59a7f37
--- /dev/null
+++ b/ButcherWeight/WeightForm.Designer.cs
@@ -0,0 +1,1088 @@
+namespace ButcherWeight
+{
+ partial class WeightForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.commitBtn = new System.Windows.Forms.Button();
+ this.readPiBtn = new System.Windows.Forms.Button();
+ this.readMaoBtn = new System.Windows.Forms.Button();
+ this.panel2 = new System.Windows.Forms.Panel();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label1 = new System.Windows.Forms.Label();
+ this.testManInput = new System.Windows.Forms.TextBox();
+ this.label19 = new System.Windows.Forms.Label();
+ this.label20 = new System.Windows.Forms.Label();
+ this.label21 = new System.Windows.Forms.Label();
+ this.label23 = new System.Windows.Forms.Label();
+ this.label24 = new System.Windows.Forms.Label();
+ this.label25 = new System.Windows.Forms.Label();
+ this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
+ this.penMoneyInput = new System.Windows.Forms.TextBox();
+ this.remarkInput = new System.Windows.Forms.TextBox();
+ this.penPriceInput = new System.Windows.Forms.TextBox();
+ this.testCardNumberInput = new System.Windows.Forms.TextBox();
+ this.penWeightInput = new System.Windows.Forms.TextBox();
+ this.label14 = new System.Windows.Forms.Label();
+ this.label13 = new System.Windows.Forms.Label();
+ this.label12 = new System.Windows.Forms.Label();
+ this.label11 = new System.Windows.Forms.Label();
+ this.label10 = new System.Windows.Forms.Label();
+ this.label8 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
+ this.panel3 = new System.Windows.Forms.Panel();
+ this.label3 = new System.Windows.Forms.Label();
+ this.farmerGrid = new System.Windows.Forms.DataGridView();
+ this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.label18 = new System.Windows.Forms.Label();
+ this.weightGrid = new System.Windows.Forms.DataGridView();
+ this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.panel4 = new System.Windows.Forms.Panel();
+ this.houseGird = new System.Windows.Forms.DataGridView();
+ this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.panel5 = new System.Windows.Forms.Panel();
+ this.panel8 = new System.Windows.Forms.Panel();
+ this.abnormalGrid = new System.Windows.Forms.DataGridView();
+ this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.panel6 = new System.Windows.Forms.Panel();
+ this.billGrid = new System.Windows.Forms.DataGridView();
+ this.Column13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column15 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column16 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column17 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column19 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column20 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column21 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Column22 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.panel7 = new System.Windows.Forms.Panel();
+ this.exitBtn = new System.Windows.Forms.Button();
+ this.deleteBtn = new System.Windows.Forms.Button();
+ this.updateBtn = new System.Windows.Forms.Button();
+ this.refreshBtn = new System.Windows.Forms.Button();
+ this.printBtn = new System.Windows.Forms.Button();
+ this.label15 = new System.Windows.Forms.Label();
+ this.label16 = new System.Windows.Forms.Label();
+ this.label17 = new System.Windows.Forms.Label();
+ this.farmerSelect = new BWP.WinFormControl.UComboBox();
+ this.zoneSelect = new BWP.WinFormControl.UComboBox();
+ this.hogGradeSelect = new BWP.WinFormControl.UComboBox();
+ this.employeeSelect = new BWP.WinFormControl.UComboBox();
+ this.carSelect = new BWP.WinFormControl.UComboBox();
+ this.liveVarietiesSelect = new BWP.WinFormControl.UComboBox();
+ this.purchaseTypeSelect = new BWP.WinFormControl.UComboBox();
+ this.supplierSelect = new BWP.WinFormControl.UComboBox();
+ this.testTimeInput = new BWP.WinFormControl.UDatePicker();
+ this.weightTimeSelect = new BWP.WinFormControl.UDatePicker();
+ this.weightControl = new BWP.WinFormControl.WeightControl();
+ this.panel1.SuspendLayout();
+ this.panel2.SuspendLayout();
+ this.panel3.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.farmerGrid)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.weightGrid)).BeginInit();
+ this.panel4.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.houseGird)).BeginInit();
+ this.panel5.SuspendLayout();
+ this.panel8.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.abnormalGrid)).BeginInit();
+ this.panel6.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.billGrid)).BeginInit();
+ this.panel7.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // panel1
+ //
+ this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.panel1.Controls.Add(this.commitBtn);
+ this.panel1.Controls.Add(this.readPiBtn);
+ this.panel1.Controls.Add(this.readMaoBtn);
+ this.panel1.Controls.Add(this.weightControl);
+ this.panel1.Location = new System.Drawing.Point(12, 12);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(1252, 95);
+ this.panel1.TabIndex = 1;
+ //
+ // commitBtn
+ //
+ this.commitBtn.Font = new System.Drawing.Font("宋体", 15F);
+ this.commitBtn.Location = new System.Drawing.Point(395, 0);
+ this.commitBtn.Name = "commitBtn";
+ this.commitBtn.Size = new System.Drawing.Size(101, 59);
+ this.commitBtn.TabIndex = 3;
+ this.commitBtn.Text = "提交磅单";
+ this.commitBtn.UseVisualStyleBackColor = true;
+ this.commitBtn.Click += new System.EventHandler(this.commitBtn_Click);
+ //
+ // readPiBtn
+ //
+ this.readPiBtn.Font = new System.Drawing.Font("宋体", 15F);
+ this.readPiBtn.Location = new System.Drawing.Point(278, 0);
+ this.readPiBtn.Name = "readPiBtn";
+ this.readPiBtn.Size = new System.Drawing.Size(101, 59);
+ this.readPiBtn.TabIndex = 2;
+ this.readPiBtn.Text = "读取皮重";
+ this.readPiBtn.UseVisualStyleBackColor = true;
+ this.readPiBtn.Click += new System.EventHandler(this.readPiBtn_Click);
+ //
+ // readMaoBtn
+ //
+ this.readMaoBtn.Font = new System.Drawing.Font("宋体", 15F);
+ this.readMaoBtn.Location = new System.Drawing.Point(163, 0);
+ this.readMaoBtn.Name = "readMaoBtn";
+ this.readMaoBtn.Size = new System.Drawing.Size(101, 59);
+ this.readMaoBtn.TabIndex = 1;
+ this.readMaoBtn.Text = "读取毛重";
+ this.readMaoBtn.UseVisualStyleBackColor = true;
+ this.readMaoBtn.Click += new System.EventHandler(this.readMaoBtn_Click);
+ //
+ // panel2
+ //
+ this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.panel2.Controls.Add(this.zoneSelect);
+ this.panel2.Controls.Add(this.hogGradeSelect);
+ this.panel2.Controls.Add(this.label2);
+ this.panel2.Controls.Add(this.label1);
+ this.panel2.Controls.Add(this.employeeSelect);
+ this.panel2.Controls.Add(this.carSelect);
+ this.panel2.Controls.Add(this.liveVarietiesSelect);
+ this.panel2.Controls.Add(this.purchaseTypeSelect);
+ this.panel2.Controls.Add(this.supplierSelect);
+ this.panel2.Controls.Add(this.testManInput);
+ this.panel2.Controls.Add(this.testTimeInput);
+ this.panel2.Controls.Add(this.weightTimeSelect);
+ this.panel2.Controls.Add(this.label19);
+ this.panel2.Controls.Add(this.label20);
+ this.panel2.Controls.Add(this.label21);
+ this.panel2.Controls.Add(this.label23);
+ this.panel2.Controls.Add(this.label24);
+ this.panel2.Controls.Add(this.label25);
+ this.panel2.Controls.Add(this.tableLayoutPanel3);
+ this.panel2.Controls.Add(this.penMoneyInput);
+ this.panel2.Controls.Add(this.remarkInput);
+ this.panel2.Controls.Add(this.penPriceInput);
+ this.panel2.Controls.Add(this.testCardNumberInput);
+ this.panel2.Controls.Add(this.penWeightInput);
+ this.panel2.Controls.Add(this.label14);
+ this.panel2.Controls.Add(this.label13);
+ this.panel2.Controls.Add(this.label12);
+ this.panel2.Controls.Add(this.label11);
+ this.panel2.Controls.Add(this.label10);
+ this.panel2.Controls.Add(this.label8);
+ this.panel2.Controls.Add(this.label7);
+ this.panel2.Controls.Add(this.tableLayoutPanel2);
+ this.panel2.Location = new System.Drawing.Point(13, 115);
+ this.panel2.Name = "panel2";
+ this.panel2.Size = new System.Drawing.Size(1251, 170);
+ this.panel2.TabIndex = 2;
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Font = new System.Drawing.Font("宋体", 14F);
+ this.label2.Location = new System.Drawing.Point(251, 135);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(47, 19);
+ this.label2.TabIndex = 35;
+ this.label2.Text = "地区";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Font = new System.Drawing.Font("宋体", 14F);
+ this.label1.Location = new System.Drawing.Point(6, 135);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(85, 19);
+ this.label1.TabIndex = 34;
+ this.label1.Text = "毛猪等级";
+ //
+ // testManInput
+ //
+ this.testManInput.Font = new System.Drawing.Font("宋体", 14F);
+ this.testManInput.Location = new System.Drawing.Point(1100, 90);
+ this.testManInput.Name = "testManInput";
+ this.testManInput.Size = new System.Drawing.Size(135, 29);
+ this.testManInput.TabIndex = 28;
+ //
+ // label19
+ //
+ this.label19.AutoSize = true;
+ this.label19.Font = new System.Drawing.Font("宋体", 14F);
+ this.label19.Location = new System.Drawing.Point(251, 94);
+ this.label19.Name = "label19";
+ this.label19.Size = new System.Drawing.Size(66, 19);
+ this.label19.TabIndex = 24;
+ this.label19.Text = "经办人";
+ //
+ // label20
+ //
+ this.label20.AutoSize = true;
+ this.label20.Font = new System.Drawing.Font("宋体", 14F);
+ this.label20.Location = new System.Drawing.Point(251, 55);
+ this.label20.Name = "label20";
+ this.label20.Size = new System.Drawing.Size(47, 19);
+ this.label20.TabIndex = 23;
+ this.label20.Text = "车辆";
+ //
+ // label21
+ //
+ this.label21.AutoSize = true;
+ this.label21.Font = new System.Drawing.Font("宋体", 14F);
+ this.label21.Location = new System.Drawing.Point(251, 15);
+ this.label21.Name = "label21";
+ this.label21.Size = new System.Drawing.Size(85, 19);
+ this.label21.TabIndex = 22;
+ this.label21.Text = "收购类型";
+ //
+ // label23
+ //
+ this.label23.AutoSize = true;
+ this.label23.Font = new System.Drawing.Font("宋体", 14F);
+ this.label23.Location = new System.Drawing.Point(6, 94);
+ this.label23.Name = "label23";
+ this.label23.Size = new System.Drawing.Size(85, 19);
+ this.label23.TabIndex = 20;
+ this.label23.Text = "生猪品种";
+ //
+ // label24
+ //
+ this.label24.AutoSize = true;
+ this.label24.Font = new System.Drawing.Font("宋体", 14F);
+ this.label24.Location = new System.Drawing.Point(6, 15);
+ this.label24.Name = "label24";
+ this.label24.Size = new System.Drawing.Size(66, 19);
+ this.label24.TabIndex = 19;
+ this.label24.Text = "供应商";
+ //
+ // label25
+ //
+ this.label25.AutoSize = true;
+ this.label25.Font = new System.Drawing.Font("宋体", 14F);
+ this.label25.Location = new System.Drawing.Point(6, 55);
+ this.label25.Name = "label25";
+ this.label25.Size = new System.Drawing.Size(85, 19);
+ this.label25.TabIndex = 17;
+ this.label25.Text = "过磅时间";
+ //
+ // tableLayoutPanel3
+ //
+ this.tableLayoutPanel3.ColumnCount = 4;
+ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
+ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
+ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
+ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
+ this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 3);
+ this.tableLayoutPanel3.Name = "tableLayoutPanel3";
+ this.tableLayoutPanel3.RowCount = 4;
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel3.Size = new System.Drawing.Size(492, 162);
+ this.tableLayoutPanel3.TabIndex = 18;
+ //
+ // penMoneyInput
+ //
+ this.penMoneyInput.Font = new System.Drawing.Font("宋体", 14F);
+ this.penMoneyInput.Location = new System.Drawing.Point(854, 89);
+ this.penMoneyInput.Name = "penMoneyInput";
+ this.penMoneyInput.Size = new System.Drawing.Size(135, 29);
+ this.penMoneyInput.TabIndex = 15;
+ //
+ // remarkInput
+ //
+ this.remarkInput.Font = new System.Drawing.Font("宋体", 14F);
+ this.remarkInput.Location = new System.Drawing.Point(854, 130);
+ this.remarkInput.Name = "remarkInput";
+ this.remarkInput.Size = new System.Drawing.Size(381, 29);
+ this.remarkInput.TabIndex = 14;
+ //
+ // penPriceInput
+ //
+ this.penPriceInput.Font = new System.Drawing.Font("宋体", 14F);
+ this.penPriceInput.Location = new System.Drawing.Point(854, 50);
+ this.penPriceInput.Name = "penPriceInput";
+ this.penPriceInput.Size = new System.Drawing.Size(135, 29);
+ this.penPriceInput.TabIndex = 12;
+ //
+ // testCardNumberInput
+ //
+ this.testCardNumberInput.Font = new System.Drawing.Font("宋体", 14F);
+ this.testCardNumberInput.Location = new System.Drawing.Point(1100, 9);
+ this.testCardNumberInput.Name = "testCardNumberInput";
+ this.testCardNumberInput.Size = new System.Drawing.Size(135, 29);
+ this.testCardNumberInput.TabIndex = 11;
+ //
+ // penWeightInput
+ //
+ this.penWeightInput.Font = new System.Drawing.Font("宋体", 14F);
+ this.penWeightInput.Location = new System.Drawing.Point(854, 9);
+ this.penWeightInput.Name = "penWeightInput";
+ this.penWeightInput.Size = new System.Drawing.Size(135, 29);
+ this.penWeightInput.TabIndex = 0;
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Font = new System.Drawing.Font("宋体", 14F);
+ this.label14.Location = new System.Drawing.Point(1002, 94);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(66, 19);
+ this.label14.TabIndex = 7;
+ this.label14.Text = "动检人";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Font = new System.Drawing.Font("宋体", 14F);
+ this.label13.Location = new System.Drawing.Point(1002, 55);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(85, 19);
+ this.label13.TabIndex = 6;
+ this.label13.Text = "动检日期";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Font = new System.Drawing.Font("宋体", 14F);
+ this.label12.Location = new System.Drawing.Point(1002, 15);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(85, 19);
+ this.label12.TabIndex = 5;
+ this.label12.Text = "动检证号";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Font = new System.Drawing.Font("宋体", 14F);
+ this.label11.Location = new System.Drawing.Point(757, 136);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(85, 19);
+ this.label11.TabIndex = 4;
+ this.label11.Text = "备注说明";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Font = new System.Drawing.Font("宋体", 14F);
+ this.label10.Location = new System.Drawing.Point(757, 94);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(85, 19);
+ this.label10.TabIndex = 3;
+ this.label10.Text = "棚前金额";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Font = new System.Drawing.Font("宋体", 14F);
+ this.label8.Location = new System.Drawing.Point(757, 15);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(85, 19);
+ this.label8.TabIndex = 2;
+ this.label8.Text = "棚前重量";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Font = new System.Drawing.Font("宋体", 14F);
+ this.label7.Location = new System.Drawing.Point(757, 55);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(85, 19);
+ this.label7.TabIndex = 1;
+ this.label7.Text = "棚前单价";
+ //
+ // tableLayoutPanel2
+ //
+ this.tableLayoutPanel2.ColumnCount = 4;
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
+ this.tableLayoutPanel2.Location = new System.Drawing.Point(754, 3);
+ this.tableLayoutPanel2.Name = "tableLayoutPanel2";
+ this.tableLayoutPanel2.RowCount = 4;
+ this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel2.Size = new System.Drawing.Size(492, 162);
+ this.tableLayoutPanel2.TabIndex = 1;
+ //
+ // panel3
+ //
+ this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.panel3.Controls.Add(this.farmerSelect);
+ this.panel3.Controls.Add(this.label3);
+ this.panel3.Controls.Add(this.farmerGrid);
+ this.panel3.Controls.Add(this.label18);
+ this.panel3.Controls.Add(this.weightGrid);
+ this.panel3.Location = new System.Drawing.Point(12, 318);
+ this.panel3.Name = "panel3";
+ this.panel3.Size = new System.Drawing.Size(402, 219);
+ this.panel3.TabIndex = 3;
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Font = new System.Drawing.Font("宋体", 15F);
+ this.label3.Location = new System.Drawing.Point(115, 95);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(89, 20);
+ this.label3.TabIndex = 9;
+ this.label3.Text = "养殖户:";
+ //
+ // farmerGrid
+ //
+ this.farmerGrid.AllowUserToAddRows = false;
+ this.farmerGrid.AllowUserToDeleteRows = false;
+ this.farmerGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.farmerGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.Column4,
+ this.Column5,
+ this.Column6});
+ this.farmerGrid.Location = new System.Drawing.Point(0, 119);
+ this.farmerGrid.Name = "farmerGrid";
+ this.farmerGrid.RowTemplate.Height = 23;
+ this.farmerGrid.Size = new System.Drawing.Size(400, 98);
+ this.farmerGrid.TabIndex = 8;
+ //
+ // Column4
+ //
+ this.Column4.HeaderText = "序号";
+ this.Column4.Name = "Column4";
+ this.Column4.ReadOnly = true;
+ //
+ // Column5
+ //
+ this.Column5.HeaderText = "养殖户";
+ this.Column5.Name = "Column5";
+ this.Column5.ReadOnly = true;
+ //
+ // Column6
+ //
+ this.Column6.HeaderText = "头数";
+ this.Column6.Name = "Column6";
+ //
+ // label18
+ //
+ this.label18.AutoSize = true;
+ this.label18.Font = new System.Drawing.Font("宋体", 15F);
+ this.label18.ForeColor = System.Drawing.Color.Red;
+ this.label18.Location = new System.Drawing.Point(-4, 95);
+ this.label18.Name = "label18";
+ this.label18.Size = new System.Drawing.Size(109, 20);
+ this.label18.TabIndex = 7;
+ this.label18.Text = "养殖户信息";
+ //
+ // weightGrid
+ //
+ this.weightGrid.AllowUserToAddRows = false;
+ this.weightGrid.AllowUserToDeleteRows = false;
+ this.weightGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.weightGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.Column1,
+ this.Column2,
+ this.Column3});
+ this.weightGrid.Location = new System.Drawing.Point(0, 0);
+ this.weightGrid.Name = "weightGrid";
+ this.weightGrid.RowTemplate.Height = 23;
+ this.weightGrid.Size = new System.Drawing.Size(400, 90);
+ this.weightGrid.TabIndex = 0;
+ //
+ // Column1
+ //
+ this.Column1.HeaderText = "序号";
+ this.Column1.Name = "Column1";
+ this.Column1.ReadOnly = true;
+ //
+ // Column2
+ //
+ this.Column2.HeaderText = "头数";
+ this.Column2.Name = "Column2";
+ //
+ // Column3
+ //
+ this.Column3.HeaderText = "重量";
+ this.Column3.Name = "Column3";
+ this.Column3.ReadOnly = true;
+ //
+ // panel4
+ //
+ this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.panel4.Controls.Add(this.houseGird);
+ this.panel4.Location = new System.Drawing.Point(438, 318);
+ this.panel4.Name = "panel4";
+ this.panel4.Size = new System.Drawing.Size(402, 219);
+ this.panel4.TabIndex = 3;
+ //
+ // houseGird
+ //
+ this.houseGird.AllowUserToAddRows = false;
+ this.houseGird.AllowUserToDeleteRows = false;
+ this.houseGird.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.houseGird.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.Column7,
+ this.Column8,
+ this.Column9});
+ this.houseGird.Location = new System.Drawing.Point(0, 0);
+ this.houseGird.Name = "houseGird";
+ this.houseGird.RowTemplate.Height = 23;
+ this.houseGird.Size = new System.Drawing.Size(400, 90);
+ this.houseGird.TabIndex = 1;
+ //
+ // Column7
+ //
+ this.Column7.HeaderText = "序号";
+ this.Column7.Name = "Column7";
+ this.Column7.ReadOnly = true;
+ //
+ // Column8
+ //
+ this.Column8.HeaderText = "圈舍";
+ this.Column8.Name = "Column8";
+ this.Column8.ReadOnly = true;
+ //
+ // Column9
+ //
+ this.Column9.HeaderText = "入圈头数";
+ this.Column9.Name = "Column9";
+ //
+ // panel5
+ //
+ this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.panel5.Controls.Add(this.panel8);
+ this.panel5.Location = new System.Drawing.Point(862, 318);
+ this.panel5.Name = "panel5";
+ this.panel5.Size = new System.Drawing.Size(402, 219);
+ this.panel5.TabIndex = 3;
+ //
+ // panel8
+ //
+ this.panel8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.panel8.Controls.Add(this.abnormalGrid);
+ this.panel8.Location = new System.Drawing.Point(-1, -1);
+ this.panel8.Name = "panel8";
+ this.panel8.Size = new System.Drawing.Size(402, 219);
+ this.panel8.TabIndex = 4;
+ //
+ // abnormalGrid
+ //
+ this.abnormalGrid.AllowUserToAddRows = false;
+ this.abnormalGrid.AllowUserToDeleteRows = false;
+ this.abnormalGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.abnormalGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.Column10,
+ this.Column11,
+ this.Column12});
+ this.abnormalGrid.Location = new System.Drawing.Point(0, 0);
+ this.abnormalGrid.Name = "abnormalGrid";
+ this.abnormalGrid.RowTemplate.Height = 23;
+ this.abnormalGrid.Size = new System.Drawing.Size(400, 90);
+ this.abnormalGrid.TabIndex = 1;
+ //
+ // Column10
+ //
+ this.Column10.HeaderText = "序号";
+ this.Column10.Name = "Column10";
+ this.Column10.ReadOnly = true;
+ //
+ // Column11
+ //
+ this.Column11.HeaderText = "异常项目";
+ this.Column11.Name = "Column11";
+ this.Column11.ReadOnly = true;
+ //
+ // Column12
+ //
+ this.Column12.HeaderText = "头数";
+ this.Column12.Name = "Column12";
+ //
+ // panel6
+ //
+ this.panel6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.panel6.Controls.Add(this.billGrid);
+ this.panel6.Location = new System.Drawing.Point(12, 625);
+ this.panel6.Name = "panel6";
+ this.panel6.Size = new System.Drawing.Size(1252, 236);
+ this.panel6.TabIndex = 4;
+ //
+ // billGrid
+ //
+ this.billGrid.AllowUserToAddRows = false;
+ this.billGrid.AllowUserToDeleteRows = false;
+ this.billGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.billGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.Column13,
+ this.Column14,
+ this.Column15,
+ this.Column16,
+ this.Column17,
+ this.Column18,
+ this.Column19,
+ this.Column20,
+ this.Column21,
+ this.Column22});
+ this.billGrid.Location = new System.Drawing.Point(0, 0);
+ this.billGrid.Name = "billGrid";
+ this.billGrid.ReadOnly = true;
+ this.billGrid.RowTemplate.Height = 23;
+ this.billGrid.Size = new System.Drawing.Size(1250, 234);
+ this.billGrid.TabIndex = 0;
+ //
+ // Column13
+ //
+ this.Column13.HeaderText = "过磅单号";
+ this.Column13.Name = "Column13";
+ this.Column13.ReadOnly = true;
+ //
+ // Column14
+ //
+ this.Column14.HeaderText = "供应商";
+ this.Column14.Name = "Column14";
+ this.Column14.ReadOnly = true;
+ //
+ // Column15
+ //
+ this.Column15.HeaderText = "来源地";
+ this.Column15.Name = "Column15";
+ this.Column15.ReadOnly = true;
+ //
+ // Column16
+ //
+ this.Column16.HeaderText = "收购类型";
+ this.Column16.Name = "Column16";
+ this.Column16.ReadOnly = true;
+ //
+ // Column17
+ //
+ this.Column17.HeaderText = "收购头数";
+ this.Column17.Name = "Column17";
+ this.Column17.ReadOnly = true;
+ //
+ // Column18
+ //
+ this.Column18.HeaderText = "收购重量";
+ this.Column18.Name = "Column18";
+ this.Column18.ReadOnly = true;
+ //
+ // Column19
+ //
+ this.Column19.HeaderText = "圈舍";
+ this.Column19.Name = "Column19";
+ this.Column19.ReadOnly = true;
+ //
+ // Column20
+ //
+ this.Column20.HeaderText = "建议工艺";
+ this.Column20.Name = "Column20";
+ this.Column20.ReadOnly = true;
+ //
+ // Column21
+ //
+ this.Column21.HeaderText = "异常明细";
+ this.Column21.Name = "Column21";
+ this.Column21.ReadOnly = true;
+ //
+ // Column22
+ //
+ this.Column22.HeaderText = "养殖户";
+ this.Column22.Name = "Column22";
+ this.Column22.ReadOnly = true;
+ //
+ // panel7
+ //
+ this.panel7.Controls.Add(this.exitBtn);
+ this.panel7.Controls.Add(this.deleteBtn);
+ this.panel7.Controls.Add(this.updateBtn);
+ this.panel7.Controls.Add(this.refreshBtn);
+ this.panel7.Controls.Add(this.printBtn);
+ this.panel7.Location = new System.Drawing.Point(13, 557);
+ this.panel7.Name = "panel7";
+ this.panel7.Size = new System.Drawing.Size(794, 62);
+ this.panel7.TabIndex = 5;
+ //
+ // exitBtn
+ //
+ this.exitBtn.Font = new System.Drawing.Font("宋体", 15F);
+ this.exitBtn.Location = new System.Drawing.Point(486, 1);
+ this.exitBtn.Name = "exitBtn";
+ this.exitBtn.Size = new System.Drawing.Size(101, 59);
+ this.exitBtn.TabIndex = 0;
+ this.exitBtn.Text = "退出";
+ this.exitBtn.UseVisualStyleBackColor = true;
+ this.exitBtn.Click += new System.EventHandler(this.exitBtn_Click);
+ //
+ // deleteBtn
+ //
+ this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F);
+ this.deleteBtn.Location = new System.Drawing.Point(363, 1);
+ this.deleteBtn.Name = "deleteBtn";
+ this.deleteBtn.Size = new System.Drawing.Size(101, 59);
+ this.deleteBtn.TabIndex = 0;
+ this.deleteBtn.Text = "删除";
+ this.deleteBtn.UseVisualStyleBackColor = true;
+ //
+ // updateBtn
+ //
+ this.updateBtn.Font = new System.Drawing.Font("宋体", 15F);
+ this.updateBtn.Location = new System.Drawing.Point(239, 1);
+ this.updateBtn.Name = "updateBtn";
+ this.updateBtn.Size = new System.Drawing.Size(101, 59);
+ this.updateBtn.TabIndex = 0;
+ this.updateBtn.Text = "修改";
+ this.updateBtn.UseVisualStyleBackColor = true;
+ //
+ // refreshBtn
+ //
+ this.refreshBtn.Font = new System.Drawing.Font("宋体", 15F);
+ this.refreshBtn.Location = new System.Drawing.Point(117, 1);
+ this.refreshBtn.Name = "refreshBtn";
+ this.refreshBtn.Size = new System.Drawing.Size(101, 59);
+ this.refreshBtn.TabIndex = 0;
+ this.refreshBtn.Text = "刷新";
+ this.refreshBtn.UseVisualStyleBackColor = true;
+ //
+ // printBtn
+ //
+ this.printBtn.Font = new System.Drawing.Font("宋体", 15F);
+ this.printBtn.Location = new System.Drawing.Point(-1, 1);
+ this.printBtn.Name = "printBtn";
+ this.printBtn.Size = new System.Drawing.Size(101, 59);
+ this.printBtn.TabIndex = 0;
+ this.printBtn.Text = "打印";
+ this.printBtn.UseVisualStyleBackColor = true;
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Font = new System.Drawing.Font("宋体", 15F);
+ this.label15.ForeColor = System.Drawing.Color.Red;
+ this.label15.Location = new System.Drawing.Point(9, 297);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(89, 20);
+ this.label15.TabIndex = 6;
+ this.label15.Text = "过磅记录";
+ //
+ // label16
+ //
+ this.label16.AutoSize = true;
+ this.label16.Font = new System.Drawing.Font("宋体", 15F);
+ this.label16.ForeColor = System.Drawing.Color.Red;
+ this.label16.Location = new System.Drawing.Point(434, 297);
+ this.label16.Name = "label16";
+ this.label16.Size = new System.Drawing.Size(89, 20);
+ this.label16.TabIndex = 7;
+ this.label16.Text = "入圈信息";
+ //
+ // label17
+ //
+ this.label17.AutoSize = true;
+ this.label17.Font = new System.Drawing.Font("宋体", 15F);
+ this.label17.ForeColor = System.Drawing.Color.Red;
+ this.label17.Location = new System.Drawing.Point(858, 297);
+ this.label17.Name = "label17";
+ this.label17.Size = new System.Drawing.Size(89, 20);
+ this.label17.TabIndex = 8;
+ this.label17.Text = "异常明细";
+ //
+ // farmerSelect
+ //
+ this.farmerSelect.CodeArgs = null;
+ this.farmerSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.farmerSelect.EnableTopItem = true;
+ this.farmerSelect.Font = new System.Drawing.Font("宋体", 13F);
+ this.farmerSelect.FormattingEnabled = true;
+ this.farmerSelect.Location = new System.Drawing.Point(190, 91);
+ this.farmerSelect.Name = "farmerSelect";
+ this.farmerSelect.Range = 10;
+ this.farmerSelect.Size = new System.Drawing.Size(135, 28);
+ this.farmerSelect.TabIndex = 38;
+ this.farmerSelect.SelectedIndexChanged += new System.EventHandler(this.farmerSelect_SelectedIndexChanged);
+ //
+ // zoneSelect
+ //
+ this.zoneSelect.CodeArgs = null;
+ this.zoneSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.zoneSelect.EnableTopItem = true;
+ this.zoneSelect.Font = new System.Drawing.Font("宋体", 14F);
+ this.zoneSelect.FormattingEnabled = true;
+ this.zoneSelect.Location = new System.Drawing.Point(348, 129);
+ this.zoneSelect.Name = "zoneSelect";
+ this.zoneSelect.Range = 10;
+ this.zoneSelect.Size = new System.Drawing.Size(135, 30);
+ this.zoneSelect.TabIndex = 37;
+ //
+ // hogGradeSelect
+ //
+ this.hogGradeSelect.CodeArgs = null;
+ this.hogGradeSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.hogGradeSelect.EnableTopItem = true;
+ this.hogGradeSelect.Font = new System.Drawing.Font("宋体", 14F);
+ this.hogGradeSelect.FormattingEnabled = true;
+ this.hogGradeSelect.Location = new System.Drawing.Point(103, 129);
+ this.hogGradeSelect.Name = "hogGradeSelect";
+ this.hogGradeSelect.Range = 10;
+ this.hogGradeSelect.Size = new System.Drawing.Size(135, 30);
+ this.hogGradeSelect.TabIndex = 36;
+ //
+ // employeeSelect
+ //
+ this.employeeSelect.CodeArgs = null;
+ this.employeeSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.employeeSelect.EnableTopItem = true;
+ this.employeeSelect.Font = new System.Drawing.Font("宋体", 14F);
+ this.employeeSelect.FormattingEnabled = true;
+ this.employeeSelect.Location = new System.Drawing.Point(348, 88);
+ this.employeeSelect.Name = "employeeSelect";
+ this.employeeSelect.Range = 10;
+ this.employeeSelect.Size = new System.Drawing.Size(135, 30);
+ this.employeeSelect.TabIndex = 33;
+ //
+ // carSelect
+ //
+ this.carSelect.CodeArgs = null;
+ this.carSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.carSelect.EnableTopItem = true;
+ this.carSelect.Font = new System.Drawing.Font("宋体", 14F);
+ this.carSelect.FormattingEnabled = true;
+ this.carSelect.Location = new System.Drawing.Point(348, 49);
+ this.carSelect.Name = "carSelect";
+ this.carSelect.Range = 10;
+ this.carSelect.Size = new System.Drawing.Size(135, 30);
+ this.carSelect.TabIndex = 32;
+ //
+ // liveVarietiesSelect
+ //
+ this.liveVarietiesSelect.CodeArgs = null;
+ this.liveVarietiesSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.liveVarietiesSelect.EnableTopItem = true;
+ this.liveVarietiesSelect.Font = new System.Drawing.Font("宋体", 14F);
+ this.liveVarietiesSelect.FormattingEnabled = true;
+ this.liveVarietiesSelect.Location = new System.Drawing.Point(103, 88);
+ this.liveVarietiesSelect.Name = "liveVarietiesSelect";
+ this.liveVarietiesSelect.Range = 10;
+ this.liveVarietiesSelect.Size = new System.Drawing.Size(135, 30);
+ this.liveVarietiesSelect.TabIndex = 31;
+ //
+ // purchaseTypeSelect
+ //
+ this.purchaseTypeSelect.CodeArgs = null;
+ this.purchaseTypeSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.purchaseTypeSelect.EnableTopItem = true;
+ this.purchaseTypeSelect.Font = new System.Drawing.Font("宋体", 14F);
+ this.purchaseTypeSelect.FormattingEnabled = true;
+ this.purchaseTypeSelect.Location = new System.Drawing.Point(348, 8);
+ this.purchaseTypeSelect.Name = "purchaseTypeSelect";
+ this.purchaseTypeSelect.Range = 10;
+ this.purchaseTypeSelect.Size = new System.Drawing.Size(135, 30);
+ this.purchaseTypeSelect.TabIndex = 30;
+ //
+ // supplierSelect
+ //
+ this.supplierSelect.CodeArgs = null;
+ this.supplierSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
+ this.supplierSelect.EnableTopItem = true;
+ this.supplierSelect.Font = new System.Drawing.Font("宋体", 14F);
+ this.supplierSelect.FormattingEnabled = true;
+ this.supplierSelect.Location = new System.Drawing.Point(103, 8);
+ this.supplierSelect.Name = "supplierSelect";
+ this.supplierSelect.Range = 10;
+ this.supplierSelect.Size = new System.Drawing.Size(135, 30);
+ this.supplierSelect.TabIndex = 29;
+ //
+ // testTimeInput
+ //
+ this.testTimeInput.BackColor = System.Drawing.Color.White;
+ this.testTimeInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.testTimeInput.Date = new System.DateTime(2017, 9, 6, 0, 0, 0, 0);
+ this.testTimeInput.Font = new System.Drawing.Font("宋体", 15F);
+ this.testTimeInput.Location = new System.Drawing.Point(1100, 51);
+ this.testTimeInput.Name = "testTimeInput";
+ this.testTimeInput.Size = new System.Drawing.Size(135, 30);
+ this.testTimeInput.TabIndex = 27;
+ this.testTimeInput.Text = "2017/09/06";
+ this.testTimeInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.testTimeInput.Type = BWP.WinFormControl.DateTimeType.Date;
+ //
+ // weightTimeSelect
+ //
+ this.weightTimeSelect.BackColor = System.Drawing.Color.White;
+ this.weightTimeSelect.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.weightTimeSelect.Date = new System.DateTime(2017, 9, 6, 20, 46, 44, 0);
+ this.weightTimeSelect.Font = new System.Drawing.Font("宋体", 9F);
+ this.weightTimeSelect.Location = new System.Drawing.Point(103, 49);
+ this.weightTimeSelect.Name = "weightTimeSelect";
+ this.weightTimeSelect.Size = new System.Drawing.Size(135, 30);
+ this.weightTimeSelect.TabIndex = 26;
+ this.weightTimeSelect.Text = "2017/09/06 20:46:44";
+ this.weightTimeSelect.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.weightTimeSelect.Type = BWP.WinFormControl.DateTimeType.DateTime;
+ //
+ // weightControl
+ //
+ this.weightControl.Location = new System.Drawing.Point(0, 0);
+ this.weightControl.Margin = new System.Windows.Forms.Padding(5);
+ this.weightControl.Name = "weightControl";
+ this.weightControl.Size = new System.Drawing.Size(155, 94);
+ this.weightControl.TabIndex = 0;
+ //
+ // WeightForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(1276, 873);
+ this.Controls.Add(this.label17);
+ this.Controls.Add(this.label16);
+ this.Controls.Add(this.label15);
+ this.Controls.Add(this.panel7);
+ this.Controls.Add(this.panel6);
+ this.Controls.Add(this.panel5);
+ this.Controls.Add(this.panel4);
+ this.Controls.Add(this.panel3);
+ this.Controls.Add(this.panel2);
+ this.Controls.Add(this.panel1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.Name = "WeightForm";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "毛猪过磅";
+ this.panel1.ResumeLayout(false);
+ this.panel2.ResumeLayout(false);
+ this.panel2.PerformLayout();
+ this.panel3.ResumeLayout(false);
+ this.panel3.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.farmerGrid)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.weightGrid)).EndInit();
+ this.panel4.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.houseGird)).EndInit();
+ this.panel5.ResumeLayout(false);
+ this.panel8.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.abnormalGrid)).EndInit();
+ this.panel6.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.billGrid)).EndInit();
+ this.panel7.ResumeLayout(false);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private BWP.WinFormControl.WeightControl weightControl;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.Button commitBtn;
+ private System.Windows.Forms.Button readPiBtn;
+ private System.Windows.Forms.Button readMaoBtn;
+ private System.Windows.Forms.Panel panel2;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
+ private System.Windows.Forms.Label label7;
+ private System.Windows.Forms.TextBox penMoneyInput;
+ private System.Windows.Forms.TextBox remarkInput;
+ private System.Windows.Forms.TextBox penPriceInput;
+ private System.Windows.Forms.TextBox testCardNumberInput;
+ private System.Windows.Forms.TextBox penWeightInput;
+ private System.Windows.Forms.Label label14;
+ private System.Windows.Forms.Label label13;
+ private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.Label label11;
+ private System.Windows.Forms.Label label10;
+ private System.Windows.Forms.Label label8;
+ private System.Windows.Forms.Panel panel3;
+ private System.Windows.Forms.Panel panel4;
+ private System.Windows.Forms.Panel panel5;
+ private System.Windows.Forms.Panel panel6;
+ private System.Windows.Forms.Panel panel7;
+ private System.Windows.Forms.Button exitBtn;
+ private System.Windows.Forms.Button deleteBtn;
+ private System.Windows.Forms.Button updateBtn;
+ private System.Windows.Forms.Button refreshBtn;
+ private System.Windows.Forms.Button printBtn;
+ private System.Windows.Forms.DataGridView farmerGrid;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
+ private System.Windows.Forms.Label label18;
+ private System.Windows.Forms.DataGridView weightGrid;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
+ private System.Windows.Forms.DataGridView houseGird;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column8;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column9;
+ private System.Windows.Forms.Panel panel8;
+ private System.Windows.Forms.DataGridView abnormalGrid;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column10;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column11;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column12;
+ private System.Windows.Forms.DataGridView billGrid;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column13;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column14;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column15;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column16;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column17;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column18;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column19;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column20;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column21;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Column22;
+ private System.Windows.Forms.Label label15;
+ private System.Windows.Forms.Label label16;
+ private System.Windows.Forms.Label label17;
+ private System.Windows.Forms.Label label19;
+ private System.Windows.Forms.Label label20;
+ private System.Windows.Forms.Label label21;
+ private System.Windows.Forms.Label label23;
+ private System.Windows.Forms.Label label24;
+ private System.Windows.Forms.Label label25;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
+ private BWP.WinFormControl.UDatePicker weightTimeSelect;
+ private BWP.WinFormControl.UDatePicker testTimeInput;
+ private System.Windows.Forms.TextBox testManInput;
+ private BWP.WinFormControl.UComboBox supplierSelect;
+ private BWP.WinFormControl.UComboBox employeeSelect;
+ private BWP.WinFormControl.UComboBox carSelect;
+ private BWP.WinFormControl.UComboBox liveVarietiesSelect;
+ private BWP.WinFormControl.UComboBox purchaseTypeSelect;
+ private BWP.WinFormControl.UComboBox zoneSelect;
+ private BWP.WinFormControl.UComboBox hogGradeSelect;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label1;
+ private BWP.WinFormControl.UComboBox farmerSelect;
+ private System.Windows.Forms.Label label3;
+ }
+}
\ No newline at end of file
diff --git a/ButcherWeight/WeightForm.cs b/ButcherWeight/WeightForm.cs
new file mode 100644
index 0000000..b5f4c03
--- /dev/null
+++ b/ButcherWeight/WeightForm.cs
@@ -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;
+ }
+ }
+}
\ No newline at end of file
diff --git a/ButcherWeight/WeightForm.resx b/ButcherWeight/WeightForm.resx
new file mode 100644
index 0000000..c29d096
--- /dev/null
+++ b/ButcherWeight/WeightForm.resx
@@ -0,0 +1,252 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
\ No newline at end of file
diff --git a/WeighAndGrading/App.config b/WeighAndGrading/App.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/WeighAndGrading/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WeighAndGrading/Form1.Designer.cs b/WeighAndGrading/Form1.Designer.cs
new file mode 100644
index 0000000..1c9dbbf
--- /dev/null
+++ b/WeighAndGrading/Form1.Designer.cs
@@ -0,0 +1,39 @@
+namespace WeighAndGrading
+{
+ partial class Form1
+ {
+ ///
+ /// 必需的设计器变量。
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// 清理所有正在使用的资源。
+ ///
+ /// 如果应释放托管资源,为 true;否则为 false。
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows 窗体设计器生成的代码
+
+ ///
+ /// 设计器支持所需的方法 - 不要
+ /// 使用代码编辑器修改此方法的内容。
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Text = "Form1";
+ }
+
+ #endregion
+ }
+}
+
diff --git a/WeighAndGrading/Form1.cs b/WeighAndGrading/Form1.cs
new file mode 100644
index 0000000..ea33226
--- /dev/null
+++ b/WeighAndGrading/Form1.cs
@@ -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();
+ }
+ }
+}
diff --git a/WeighAndGrading/Program.cs b/WeighAndGrading/Program.cs
new file mode 100644
index 0000000..8ff4dcf
--- /dev/null
+++ b/WeighAndGrading/Program.cs
@@ -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
+ {
+ ///
+ /// 应用程序的主入口点。
+ ///
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new Form1());
+ }
+ }
+}
diff --git a/WeighAndGrading/Properties/AssemblyInfo.cs b/WeighAndGrading/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..7c8ba70
--- /dev/null
+++ b/WeighAndGrading/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/WeighAndGrading/Properties/Resources.Designer.cs b/WeighAndGrading/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..5a818e2
--- /dev/null
+++ b/WeighAndGrading/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本: 4.0.30319.42000
+//
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将丢失。
+//
+//------------------------------------------------------------------------------
+
+namespace WeighAndGrading.Properties
+{
+
+
+ ///
+ /// 一个强类型的资源类,用于查找本地化的字符串等。
+ ///
+ // 此类是由 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()
+ {
+ }
+
+ ///
+ /// 返回此类使用的、缓存的 ResourceManager 实例。
+ ///
+ [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;
+ }
+ }
+
+ ///
+ /// 为所有资源查找重写当前线程的 CurrentUICulture 属性,
+ /// 方法是使用此强类型资源类。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/WeighAndGrading/Properties/Resources.resx b/WeighAndGrading/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/WeighAndGrading/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WeighAndGrading/Properties/Settings.Designer.cs b/WeighAndGrading/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..5005d29
--- /dev/null
+++ b/WeighAndGrading/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+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;
+ }
+ }
+ }
+}
diff --git a/WeighAndGrading/Properties/Settings.settings b/WeighAndGrading/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/WeighAndGrading/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/WeighAndGrading/WeighAndGrading.csproj b/WeighAndGrading/WeighAndGrading.csproj
new file mode 100644
index 0000000..d1f0d23
--- /dev/null
+++ b/WeighAndGrading/WeighAndGrading.csproj
@@ -0,0 +1,93 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {71598ACD-6C4A-4D61-937B-51147A5EA36E}
+ WinExe
+ Properties
+ WeighAndGrading
+ WeighAndGrading
+ v4.5
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ D:\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll
+
+
+ False
+ D:\BwpB3Project\tsref\Debug\Forks.Utils.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WeightClient/App.config b/WeightClient/App.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/WeightClient/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WeightClient/AppContext.cs b/WeightClient/AppContext.cs
new file mode 100644
index 0000000..bad64a3
--- /dev/null
+++ b/WeightClient/AppContext.cs
@@ -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(loginConfigPath);
+ return config;
+ }
+
+ public void Save()
+ {
+ XmlUtil.SerializerObjToFile(_appContext, loginConfigPath);
+ }
+ }
+}
diff --git a/WeightClient/Login.Designer.cs b/WeightClient/Login.Designer.cs
new file mode 100644
index 0000000..ba42589
--- /dev/null
+++ b/WeightClient/Login.Designer.cs
@@ -0,0 +1,143 @@
+namespace WeightClient
+{
+ partial class Login
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ 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;
+ }
+}
\ No newline at end of file
diff --git a/WeightClient/Login.cs b/WeightClient/Login.cs
new file mode 100644
index 0000000..95a81dc
--- /dev/null
+++ b/WeightClient/Login.cs
@@ -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;
+ }
+ }
+}
diff --git a/WeightClient/Login.resx b/WeightClient/Login.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/WeightClient/Login.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WeightClient/Program.cs b/WeightClient/Program.cs
new file mode 100644
index 0000000..4c49540
--- /dev/null
+++ b/WeightClient/Program.cs
@@ -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
+ {
+ ///
+ /// 应用程序的主入口点。
+ ///
+ [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);
+ }
+ }
+
+ ///
+ /// 在发生未处理异常时处理的方法
+ ///
+ ///
+ ///
+ 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);
+ }
+ }
+}
diff --git a/WeightClient/Properties/AssemblyInfo.cs b/WeightClient/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..dcbe2b7
--- /dev/null
+++ b/WeightClient/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/WeightClient/Properties/Resources.Designer.cs b/WeightClient/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..db29fbc
--- /dev/null
+++ b/WeightClient/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本: 4.0.30319.42000
+//
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将丢失。
+//
+//------------------------------------------------------------------------------
+
+namespace WeightClient.Properties
+{
+
+
+ ///
+ /// 一个强类型的资源类,用于查找本地化的字符串等。
+ ///
+ // 此类是由 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()
+ {
+ }
+
+ ///
+ /// 返回此类使用的、缓存的 ResourceManager 实例。
+ ///
+ [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;
+ }
+ }
+
+ ///
+ /// 为所有资源查找重写当前线程的 CurrentUICulture 属性,
+ /// 方法是使用此强类型资源类。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/WeightClient/Properties/Resources.resx b/WeightClient/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/WeightClient/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WeightClient/Properties/Settings.Designer.cs b/WeightClient/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..95e7be2
--- /dev/null
+++ b/WeightClient/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+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;
+ }
+ }
+ }
+}
diff --git a/WeightClient/Properties/Settings.settings b/WeightClient/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/WeightClient/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/WeightClient/SettingForm.Designer.cs b/WeightClient/SettingForm.Designer.cs
new file mode 100644
index 0000000..8d057c2
--- /dev/null
+++ b/WeightClient/SettingForm.Designer.cs
@@ -0,0 +1,103 @@
+namespace WeightClient
+{
+ partial class SettingForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ 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;
+ }
+}
\ No newline at end of file
diff --git a/WeightClient/SettingForm.cs b/WeightClient/SettingForm.cs
new file mode 100644
index 0000000..690d786
--- /dev/null
+++ b/WeightClient/SettingForm.cs
@@ -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("设置保存成功!");
+ }
+ }
+}
diff --git a/WeightClient/SettingForm.resx b/WeightClient/SettingForm.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/WeightClient/SettingForm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WeightClient/WeightClient.csproj b/WeightClient/WeightClient.csproj
new file mode 100644
index 0000000..ccc3134
--- /dev/null
+++ b/WeightClient/WeightClient.csproj
@@ -0,0 +1,124 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {CB51A020-8823-4D64-898D-CC1632A298DB}
+ WinExe
+ Properties
+ WeightClient
+ WeightClient
+ v4.5
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\..\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll
+
+
+ False
+ ..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll
+
+
+ False
+ ..\..\..\..\BwpB3Project\tsref\Debug\Forks.Utils.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Login.cs
+
+
+
+
+ Form
+
+
+ SettingForm.cs
+
+
+ Login.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+
+
+ SettingForm.cs
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
+ {8968f14a-c7c7-4751-96ce-b114fbfd65ef}
+ BO
+
+
+ {a782b23e-be6d-4f51-b5cb-5cd259ba97cc}
+ BWP.WinFormControl
+
+
+
+
+
\ No newline at end of file