Browse Source

界面美化以及分割品备货。

master
yibo 7 years ago
parent
commit
e8d054f998
73 changed files with 6960 additions and 1028 deletions
  1. +13
    -0
      ButcherFactory.BO/Bill/SegmentProduction.cs
  2. +70
    -0
      ButcherFactory.BO/Bill/StockUpEntity.cs
  3. +2
    -0
      ButcherFactory.BO/ButcherFactory.BO.csproj
  4. +7
    -2
      ButcherFactory.BO/Enums/DriveType.cs
  5. +1
    -1
      ButcherFactory.BO/LocalBL/SegmentInStoreBL.cs
  6. +1
    -0
      ButcherFactory.BO/LocalBL/SegmentProductionBL.cs
  7. +73
    -0
      ButcherFactory.BO/LocalBL/SegmentStockUpBL.cs
  8. +2
    -1
      ButcherFactory.BO/Utils/LoginUtil.cs
  9. +70
    -0
      ButcherFactory.Form/ButcherFactory.Form.csproj
  10. +1182
    -0
      ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.Designer.cs
  11. +454
    -0
      ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.cs
  12. +198
    -0
      ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.resx
  13. +2
    -2
      ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.Designer.cs
  14. +6
    -11
      ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs
  15. +185
    -0
      ButcherFactory.Form/Controls/ColorButton.cs
  16. +223
    -0
      ButcherFactory.Form/Controls/FormTemplate.Designer.cs
  17. +83
    -0
      ButcherFactory.Form/Controls/FormTemplate.cs
  18. +159
    -0
      ButcherFactory.Form/Controls/FormTemplate.resx
  19. +81
    -0
      ButcherFactory.Form/Controls/RoundPanel.cs
  20. +52
    -0
      ButcherFactory.Form/Controls/Utils/AoHaoSi3000DataFormat.cs
  21. +70
    -0
      ButcherFactory.Form/Controls/Utils/DataFormatBase.cs
  22. +58
    -0
      ButcherFactory.Form/Controls/Utils/IND560DataFormat.cs
  23. +121
    -0
      ButcherFactory.Form/Controls/Utils/Xk3124DataFormat.cs
  24. +136
    -0
      ButcherFactory.Form/Controls/Utils/Xk3190A9DataFormat.cs
  25. +130
    -0
      ButcherFactory.Form/Controls/Utils/Xk3190D10DataFormat.cs
  26. +43
    -0
      ButcherFactory.Form/Controls/WeightConfig.cs
  27. +131
    -0
      ButcherFactory.Form/Controls/WeightControl.Designer.cs
  28. +306
    -0
      ButcherFactory.Form/Controls/WeightControl.cs
  29. +120
    -0
      ButcherFactory.Form/Controls/WeightControl.resx
  30. +305
    -0
      ButcherFactory.Form/Controls/WeightSettingFrom.Designer.cs
  31. +104
    -0
      ButcherFactory.Form/Controls/WeightSettingFrom.cs
  32. +120
    -0
      ButcherFactory.Form/Controls/WeightSettingFrom.resx
  33. +16
    -25
      ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.Designer.cs
  34. +7
    -6
      ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.cs
  35. +0
    -9
      ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.resx
  36. +68
    -97
      ButcherFactory.Form/Dialogs/SelectBillStateDialog.Designer.cs
  37. +3
    -3
      ButcherFactory.Form/Dialogs/SelectBillStateDialog.cs
  38. +0
    -33
      ButcherFactory.Form/Dialogs/SelectBillStateDialog.resx
  39. +34
    -51
      ButcherFactory.Form/Dialogs/SelectCustomerDialog.Designer.cs
  40. +10
    -5
      ButcherFactory.Form/Dialogs/SelectCustomerDialog.cs
  41. +0
    -17
      ButcherFactory.Form/Dialogs/SelectCustomerDialog.resx
  42. +5
    -4
      ButcherFactory.Form/Dialogs/SelectDeliverGoodsLineDialog.cs
  43. +5
    -4
      ButcherFactory.Form/Dialogs/SelectStoreDialog.cs
  44. +73
    -0
      ButcherFactory.Form/Properties/Resources.Designer.cs
  45. +124
    -0
      ButcherFactory.Form/Properties/Resources.resx
  46. BIN
      ButcherFactory.Form/Resources/closeImg.png
  47. +1
    -1
      ButcherFactory.Form/SegmentInStore_/InStoreSummaryView.Designer.cs
  48. +90
    -90
      ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.Designer.cs
  49. +2
    -2
      ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.cs
  50. +1
    -1
      ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.resx
  51. +179
    -255
      ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs
  52. +7
    -40
      ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs
  53. +3
    -44
      ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.resx
  54. +633
    -0
      ButcherFactory.Form/SegmentStockUp_/SegmentStockUpForm.Designer.cs
  55. +191
    -0
      ButcherFactory.Form/SegmentStockUp_/SegmentStockUpForm.cs
  56. +171
    -0
      ButcherFactory.Form/SegmentStockUp_/SegmentStockUpForm.resx
  57. +16
    -0
      ButcherFactory.Form/Utils/ControlsUtil.cs
  58. +1
    -1
      ButcherFactory.Login/Login.xaml.cs
  59. +3
    -0
      SelfHelpClient/BO/WeightBill.cs
  60. +27
    -14
      SelfHelpClient/DialogForm.Designer.cs
  61. +6
    -0
      SelfHelpClient/DialogForm.cs
  62. +40
    -39
      SelfHelpClient/ItemSelect.Designer.cs
  63. +138
    -47
      SelfHelpClient/MainForm.Designer.cs
  64. +3
    -3
      SelfHelpClient/MainForm.cs
  65. +100
    -0
      SelfHelpClient/Properties/Resources.Designer.cs
  66. +39
    -5
      SelfHelpClient/Properties/Resources.resx
  67. +85
    -23
      SelfHelpClient/ReadCardForm.Designer.cs
  68. +10
    -0
      SelfHelpClient/SelfHelpClient.csproj
  69. +83
    -52
      SelfHelpClient/SelfHelpForm.Designer.cs
  70. +6
    -0
      SelfHelpClient/SelfHelpForm.cs
  71. +217
    -125
      SelfHelpClient/WeightForm.Designer.cs
  72. +21
    -15
      SelfHelpClient/WeightForm.cs
  73. +34
    -0
      SelfHelpClient/WeightForm.resx

+ 13
- 0
ButcherFactory.BO/Bill/SegmentProduction.cs View File

@ -15,6 +15,19 @@ namespace ButcherFactory.BO
{
public string BarCode { get; set; }
[NonDmoProperty]
public string ShortCode
{
get
{
if (string.IsNullOrEmpty(BarCode))
return null;
if (BarCode.Contains("260912011"))
return BarCode.Replace("260912011", "");
return BarCode;
}
}
public long? WorkUnit_ID { get; set; }
public long ProductBatch_ID { get; set; }


+ 70
- 0
ButcherFactory.BO/Bill/StockUpEntity.cs View File

@ -0,0 +1,70 @@
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.BO
{
public class StockUpEntity
{
public DateTime Date { get; set; }
public long DeliverGoodsLine_ID { get; set; }
public string DeliverGoodsLine_Name { get; set; }
public long? SequenceNumber { get; set; }
public long Goods_ID { get; set; }
public string Goods_Name { get; set; }
public string Goods_Spec { get; set; }
public string Goods_Code { get; set; }
public decimal? SecondNumber { get; set; }
public decimal? UnitNum { get; set; }
public decimal? SSecondNumber { get; set; }
public decimal? SUnitNum { get; set; }
public decimal? Rate { get; set; }
public bool Finishd
{
get { return (UnitNum ?? 0) <= (SUnitNum ?? 0); }
}
}
public class StockUpDetail
{
public long ID { get; set; }
public DateTime Date { get; set; }
public long DeliverGoodsLine_ID { get; set; }
public string DeliverGoodsLine_Name { get; set; }
public string BarCode { get; set; }
[NonDmoProperty]
public string ShortCode
{
get
{
if (string.IsNullOrEmpty(BarCode))
return null;
if (BarCode.Contains("260912011"))
return BarCode.Replace("260912011", "");
return BarCode;
}
}
public long Goods_ID { get; set; }
public string Goods_Code { get; set; }
public string Goods_Spec { get; set; }
public string Goods_Name { get; set; }
public long SaleOutStoreID { get; set; }
public decimal? SecondNumber { get; set; }
public decimal? UnitNumber { get; set; }
}
}

+ 2
- 0
ButcherFactory.BO/ButcherFactory.BO.csproj View File

@ -67,6 +67,7 @@
<Compile Include="Bill\CarcassTakeOutWeightTemp.cs" />
<Compile Include="Bill\SegmentInStore.cs" />
<Compile Include="Bill\SegmentProduction.cs" />
<Compile Include="Bill\StockUpEntity.cs" />
<Compile Include="Enums\ApplyClient.cs" />
<Compile Include="Enums\DriveType.cs" />
<Compile Include="Base\SyncBill.cs" />
@ -82,6 +83,7 @@
<Compile Include="LocalBL\FormClientGoodsSetBL.cs" />
<Compile Include="LocalBL\SegmentInStoreBL.cs" />
<Compile Include="LocalBL\SegmentProductionBL.cs" />
<Compile Include="LocalBL\SegmentStockUpBL.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Rpcs\BaseInfoSyncRpc.cs" />
<Compile Include="Utils\AppContext.cs" />


+ 7
- 2
ButcherFactory.BO/Enums/DriveType.cs View File

@ -8,13 +8,18 @@ namespace ButcherFactory.BO
{
public enum
{
= -1,
= 0,
= 1,
= 2,
= 3,
//B3从51开始
= 51,
= 52,
//101-200是留给屠宰车间使用
//一下为自动转向用,无需再服务器设置到NamedValue上
= 200,
= 201,
}
}

+ 1
- 1
ButcherFactory.BO/LocalBL/SegmentInStoreBL.cs View File

@ -296,7 +296,7 @@ namespace ButcherFactory.BO.LocalBL
query.GroupBy.Expressions.Add(DQExpression.Field("Goods_Spec"));
query.Where.Conditions.Add(DQCondition.EQ(DQExpression.Snippet("CAST([_main].[InStoreTime] AS DATE)"), DQExpression.Value(DateTime.Today)));
query.Where.Conditions.Add(DQCondition.EQ("Delete", false));
query.Where.Conditions.Add(DQCondition.And(DQCondition.InEQ("State", 2), DQCondition.EQ("Delete", false)));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("Goods_Code"));
var list = new BindingList<SegmentInStore>();


+ 1
- 0
ButcherFactory.BO/LocalBL/SegmentProductionBL.cs View File

@ -87,6 +87,7 @@ namespace ButcherFactory.BO.LocalBL
entity.ProductBatch_ID = productBatchID;
entity.RowIndex = GenerateRowIndex(productBatchID, session);
entity.BarCode = string.Format("260912011{0:yyyyMMdd}{1:00000}", batchDate, entity.RowIndex);
entity.Submited = true;
session.Insert(entity);
FillGroupIDAsID(session, entity.ID);
session.Commit();


+ 73
- 0
ButcherFactory.BO/LocalBL/SegmentStockUpBL.cs View File

@ -0,0 +1,73 @@
using ButcherFactory.BO.Utils;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.JsonRpc.Client;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.BO.LocalBL
{
public static class SegmentStockUpBL
{
const string RpcPath = @"/MainSystem/B3Sale/Rpcs/";
const string MESPath = @"/MainSystem/B3ClientService/Rpcs/";
/// <summary>
/// </summary>
/// <param name="code"></param>
/// <returns>GoodsCode:StringExt1,Weight:DecimalExt1</returns>
public static ExtensionObj StockUpScan(string code)
{
var json = ButcherFactoryUtil.SimpleMESCall<string>(MESPath + "SegmentInStoreRpc/StockUpScan", code);
return JsonConvert.DeserializeObject<ExtensionObj>(json);
}
public static List<StockUpEntity> GetStockUpEntity(DateTime date, string code)
{
var json = RpcFacade.Call<string>(RpcPath + "SaleOutStoreRpc/GetSaleOutStoreByGoodsCode", date, code);
return JsonConvert.DeserializeObject<List<StockUpEntity>>(json);
}
public static List<StockUpEntity> RefreshList(DateTime date, IEnumerable<long> goodsIDs)
{
var json = RpcFacade.Call<string>(RpcPath + "SaleOutStoreRpc/GetSaleOutStoreByGoodsIDs", date, JsonConvert.SerializeObject(goodsIDs));
return JsonConvert.DeserializeObject<List<StockUpEntity>>(json);
}
public static bool CheckBarCodeUsed(string barCode)
{
return RpcFacade.Call<bool>(RpcPath + "SaleOutStoreRpc/CheckBarCodeUsed",barCode);
}
public static List<StockUpDetail> GetDetails(DateTime date, long driverLineID, long goodsID)
{
var json = RpcFacade.Call<string>(RpcPath + "SaleOutStoreRpc/GetStockUpDetails", date, driverLineID, goodsID);
return JsonConvert.DeserializeObject<List<StockUpDetail>>(json);
}
public static void InsertStockUpDetail(StockUpDetail detail)
{
var min = new MinStockUpDetail() { BarCode = detail.BarCode, SecondNumber = detail.SecondNumber, UnitNumber = detail.UnitNumber };
var json = JsonConvert.SerializeObject(min);
var bkJson = RpcFacade.Call<string>(RpcPath + "SaleOutStoreRpc/InsertStockUpDetail", detail.Date, detail.Goods_ID, detail.DeliverGoodsLine_ID, json);
if (string.IsNullOrEmpty(bkJson))
throw new Exception("无等待备货信息");
var backInfo = JsonConvert.DeserializeObject<ExtensionObj>(bkJson);
detail.SaleOutStoreID = backInfo.LongExt1.Value;
detail.ID = backInfo.LongExt2.Value;
}
class MinStockUpDetail
{
public string BarCode { get; set; }
public decimal? SecondNumber { get; set; }
public decimal? UnitNumber { get; set; }
}
}
}

+ 2
- 1
ButcherFactory.BO/Utils/LoginUtil.cs View File

@ -87,7 +87,8 @@ namespace ButcherFactory.BO.Utils
static void FacedLogin(string userName, string pwd)
{
RpcFacade.Login(userName, pwd);
AppContext.Worker.Role = ((short).).ToString();
const string roleMethod = "/MainSystem/B3ButcherManage/Rpcs/ClientRpc/GetUserRole";
AppContext.Worker.Role = RpcFacade.Call<string>(roleMethod);
}
static void RpcLogin(string name, string pwd)


+ 70
- 0
ButcherFactory.Form/ButcherFactory.Form.csproj View File

@ -62,6 +62,37 @@
<DependentUpon>CarcassInStoreForm.cs</DependentUpon>
</Compile>
<Compile Include="CarcassInStore_\CarcassInStoreFormConfig.cs" />
<Compile Include="CarcassSaleOut2_\CarcassSaleOutForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="CarcassSaleOut2_\CarcassSaleOutForm.Designer.cs">
<DependentUpon>CarcassSaleOutForm.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ColorButton.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\FormTemplate.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Controls\FormTemplate.Designer.cs">
<DependentUpon>FormTemplate.cs</DependentUpon>
</Compile>
<Compile Include="Controls\RoundPanel.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\Utils\AoHaoSi3000DataFormat.cs" />
<Compile Include="Controls\Utils\DataFormatBase.cs" />
<Compile Include="Controls\Utils\IND560DataFormat.cs" />
<Compile Include="Controls\Utils\Xk3124DataFormat.cs" />
<Compile Include="Controls\Utils\Xk3190A9DataFormat.cs" />
<Compile Include="Controls\Utils\Xk3190D10DataFormat.cs" />
<Compile Include="Controls\WeightConfig.cs" />
<Compile Include="Controls\WeightControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\WeightControl.Designer.cs">
<DependentUpon>WeightControl.cs</DependentUpon>
</Compile>
<Compile Include="CarcassSaleOut_\CarcassSaleOutForm.cs">
<SubType>Form</SubType>
</Compile>
@ -70,6 +101,12 @@
</Compile>
<Compile Include="CarcassSaleOut_\CarcassSaleOutFormConfig.cs" />
<Compile Include="CarcassTakeOut_\CarcassTakeOutFormConfig.cs" />
<Compile Include="Controls\WeightSettingFrom.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Controls\WeightSettingFrom.Designer.cs">
<DependentUpon>WeightSettingFrom.cs</DependentUpon>
</Compile>
<Compile Include="Dialogs\AddWeightRecord.cs">
<SubType>Form</SubType>
</Compile>
@ -128,6 +165,11 @@
<Compile Include="CarcassTakeOut_\CarcassTakeOutForm.Designer.cs">
<DependentUpon>CarcassTakeOutForm.cs</DependentUpon>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="SegmentInStore_\InStoreSummaryView.cs">
<SubType>Form</SubType>
</Compile>
@ -161,6 +203,12 @@
<Compile Include="SegmentProduction_\TrunOutDialog.Designer.cs">
<DependentUpon>TrunOutDialog.cs</DependentUpon>
</Compile>
<Compile Include="SegmentStockUp_\SegmentStockUpForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SegmentStockUp_\SegmentStockUpForm.Designer.cs">
<DependentUpon>SegmentStockUpForm.cs</DependentUpon>
</Compile>
<Compile Include="Utils\ControlsUtil.cs" />
</ItemGroup>
<ItemGroup>
@ -173,12 +221,24 @@
<EmbeddedResource Include="CarcassInStore_\CarcassInStoreForm.resx">
<DependentUpon>CarcassInStoreForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="CarcassSaleOut2_\CarcassSaleOutForm.resx">
<DependentUpon>CarcassSaleOutForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\FormTemplate.resx">
<DependentUpon>FormTemplate.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\WeightControl.resx">
<DependentUpon>WeightControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="CarcassSaleOut_\CarcassSaleOutForm.resx">
<DependentUpon>CarcassSaleOutForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="CarcassTakeOut_\CarcassTakeOutForm.resx">
<DependentUpon>CarcassTakeOutForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\WeightSettingFrom.resx">
<DependentUpon>WeightSettingFrom.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Dialogs\AddWeightRecord.resx">
<DependentUpon>AddWeightRecord.cs</DependentUpon>
</EmbeddedResource>
@ -203,6 +263,10 @@
<EmbeddedResource Include="Dialogs\WeightRecordDialog.resx">
<DependentUpon>WeightRecordDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="SegmentInStore_\InStoreSummaryView.resx">
<DependentUpon>InStoreSummaryView.cs</DependentUpon>
</EmbeddedResource>
@ -218,6 +282,9 @@
<EmbeddedResource Include="SegmentProduction_\TrunOutDialog.resx">
<DependentUpon>TrunOutDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SegmentStockUp_\SegmentStockUpForm.resx">
<DependentUpon>SegmentStockUpForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Page Include="Dialogs\CalendarSelecter.xaml">
@ -225,6 +292,9 @@
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="Resources\closeImg.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>if $(Configuration)==Debug (


+ 1182
- 0
ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.Designer.cs
File diff suppressed because it is too large
View File


+ 454
- 0
ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.cs View File

@ -0,0 +1,454 @@
using ButcherFactory.BO;
using ButcherFactory.BO.LocalBL;
using ButcherFactory.BO.Utils;
using ButcherFactory.CarcassSaleOut_;
using ButcherFactory.Controls;
using ButcherFactory.Dialogs;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ButcherFactory.CarcassSaleOut2_
{
public partial class CarcassSaleOutForm : FormTemplate, IWithRoleForm
{
#region IWithRoleForm
public List<short> RoleName
{
get { return new List<short> { (short). }; }
}
public Form Generate()
{
return this;
}
#endregion
BindingList<SaleOutStore> saleOutStoreList;
BindingList<SaleOutStore_Detail> details;
BindingList<CarcassSaleOut_Detail> weightRecord;
Thread checkWeight;
string strErrorWeight = "";
List<int> errorWeight = new List<int>();
internal DateTime sendTime = DateTime.Today;
internal long? deliverGoodsLineID;
internal long? customerID;
internal int billState;
internal long? storeID;
long? batchID;
bool already = false;
bool scanCode = false;
public CarcassSaleOutForm()
{
InitializeComponent();
this.FormClosing += delegate
{
if (checkWeight != null && checkWeight.IsAlive)
checkWeight.Abort();
};
weightControl1.ReceivedValue += weightControl1_ReceivedValue;
uScanPanel1.AfterScan += uScanPanel1_AfterScan;
productBatchSelect.SelectedIndexChanged += delegate
{
if (productBatchSelect.SelectedValue == null)
batchID = null;
else
batchID = (long)productBatchSelect.SelectedValue;
};
sendGridView.CellFormatting += sendGridView_CellFormatting;
}
static Image CheckImg = System.Drawing.Image.FromFile("Images\\check.png");
static Image UnCheckImg = System.Drawing.Image.FromFile("Images\\uCheck.png");
void sendGridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex != 2)
return;
var v = (bool)sendGridView.Rows[e.RowIndex].Cells[1].Value;
e.Value = v ? CheckImg : UnCheckImg;
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
billState = 0;
billStateBox.Text = "未审核";
sendDateBox.Text = sendTime.ToString("yyyy-MM-dd");
var config = XmlUtil.DeserializeFromFile<CarcassSaleOutFormConfig>();
if (config.Store_ID.HasValue)
{
storeBox.Text = config.Store_Name;
storeID = config.Store_ID;
}
if (!string.IsNullOrEmpty(config.Weight))
{
strErrorWeight = config.Weight;
var arr = strErrorWeight.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(x => int.Parse(x)).OrderBy(x => x);
errorWeight.AddRange(arr);
}
BindWeightRecord();
BindProductBatch();
}
void BindWeightRecord()
{
weightRecord = CarcassSaleOutBL.GetUnSubmitWeightRecord();
sendGridView.DataSource = weightRecord;
sendGridView.Refresh();
}
private void BindProductBatch()
{
var batchs = CarcassSaleOutBL.GetBatchFromEMS();
productBatchSelect.DisplayMember = "Name";
productBatchSelect.ValueMember = "ID";
productBatchSelect.DataSource = batchs;
var idx = batchs.FindIndex(x => x.Date == DateTime.Today);
if (idx > 0)
productBatchSelect.SelectedIndex = idx;
productBatchSelect.Refresh();
}
static object _lock = new object();
void weightControl1_ReceivedValue(decimal weight)
{
lock (_lock)
{
this.Invoke(new Action(() =>
{
var detail = CarcassSaleOutBL.Insert(weight);
if (weightRecord.Any())
detail.Idx = weightRecord.Max(x => x.Idx) + 1;
else
detail.Idx = 1;
weightRecord.Insert(0, detail);
sendGridView.FirstDisplayedScrollingRowIndex = 0;
if (!scanCode)
AfterScan("G8536");
else
sendGridView.Refresh();
checkWeight = new Thread(new ParameterizedThreadStart(CheckWeight));
checkWeight.Start(weight);
}));
}
}
void CheckWeight(object objWeight)
{
decimal weight = (decimal)objWeight;
var first = errorWeight.FirstOrDefault(x => x > weight);
if (first != 0)
WinFormControl.SoundPalyUtil.PlaySound(string.Format("Sounds\\l{0}.wav", first));
}
void uScanPanel1_AfterScan()
{
var barCode = uScanPanel1.TextBox.Text.Trim();
if (!barCode.StartsWith("G") && weightRecord.Any(x => x.BarCode == barCode))
return;
AfterScan(barCode);
}
void AfterScan(string barCode)
{
if (string.IsNullOrEmpty(barCode))
throw new Exception("条码错误");
var first = weightRecord.LastOrDefault(x => !x.Filled);
if (first == null)
return;
//throw new Exception("请先过磅");
CarcassSaleOutBL.FillDetail(first, barCode, batchID);
WinFormControl.SoundPalyUtil.PlaySound(WinFormControl.SoundType.Click);
sendGridView.Refresh();
}
private void refreshBtn_Click(object sender, EventArgs e)
{
already = false;
Refersh();
}
private void weightRecordBtn_Click(object sender, EventArgs e)
{
if (orderGridView.CurrentRow == null)
throw new Exception("请选择配货明细");
var detail = orderGridView.CurrentRow.DataBoundItem as SaleOutStore_Detail;
var dg = new WeightRecordDialog(details.First(x => x.ID == detail.ID), already, batchID);
dg.ShowDialog();
if (dg.Changed)
BindOrderGrid(detail.SaleOutStore_ID);
if (dg.rolBack)
BindWeightRecord();
}
private void goodsFinishBtn_Click(object sender, EventArgs e)
{
if (mainGridView.CurrentRow == null)
throw new Exception("请选择要配货完成的发货单");
var id = (long)mainGridView.CurrentRow.Cells[0].Value;
var ds = CarcassSaleOutBL.GetSaleOutStoreDetailList(id);
if (ds.Any(x => x.SSecondNumber == null || x.SSecondNumber == 0))
{
if (MessageBox.Show("有未配货的明细,确认配货完成?", "配货完成确认", MessageBoxButtons.OKCancel) != DialogResult.OK)
return;
}
CarcassSaleOutBL.SetGoodsFinish(id);
AfterChangeFinishGoods(id);
MessageBox.Show("配货完成!");
}
private void unFinishBtn_Click(object sender, EventArgs e)
{
if (mainGridView.CurrentRow == null)
throw new Exception("请选择要配货完成的发货单");
var id = (long)mainGridView.CurrentRow.Cells[0].Value;
CarcassSaleOutBL.SetGoodsUnFinish(id);
AfterChangeFinishGoods(id);
MessageBox.Show("撤销成功!");
}
private void AfterChangeFinishGoods(long id)
{
saleOutStoreList.Remove(saleOutStoreList.First(x => x.ID == id));
mainGridView.Refresh();
if (details != null)
details.Clear();
orderGridView.Refresh();
billIDLabel.Text = string.Empty;
customerLabel.Text = string.Empty;
addressLabel.Text = string.Empty;
carNumberLabel.Text = string.Empty;
}
private void commitBtn_Click(object sender, EventArgs e)
{
if (orderGridView.CurrentRow == null)
throw new Exception("请选择配货明细");
var subList = weightRecord.Where(x => x.Selected).ToList();
if (subList.Count() == 0)
throw new Exception("没有发货明细");
if (subList.Any(x => !x.Filled))
throw new Exception("有未扫码的明细");
var detailID = (long)orderGridView.CurrentRow.Cells[0].Value;
var detail = details.First(x => x.ID == detailID);
CarcassSaleOutBL.SubmitDetails(subList, detail);
foreach (var item in subList)
weightRecord.Remove(item);
var idx = weightRecord.Count;
foreach (var item in weightRecord)
{
item.Idx = idx;
idx--;
}
sendGridView.Refresh();
orderGridView.Refresh();
MessageBox.Show("提交成功!");
}
private void queryControl_MouseDown(object sender, MouseEventArgs e)
{
var simpleLbl = sender as Label;
switch (simpleLbl.Name)
{
case "sendDateBox":
var cs = new CalendarSelecter();
if (cs.ShowDialog() == true)
{
sendTime = cs.Result;
sendDateBox.Text = sendTime.ToString("yyyy-MM-dd");
}
break;
case "deliverGoodsLineBox":
var dgl = new SelectDeliverGoodsLineDialog();
if (dgl.ShowDialog() == DialogResult.OK)
{
simpleLbl.Text = dgl.Result.Item1;
deliverGoodsLineID = dgl.Result.Item2;
}
break;
case "customerBox":
var cb = new SelectCustomerDialog();
if (cb.ShowDialog() == DialogResult.OK)
{
simpleLbl.Text = cb.Result.Item1;
customerID = cb.Result.Item2;
}
break;
case "billStateBox":
var bs = new SelectBillStateDialog();
if (bs.ShowDialog() == DialogResult.OK)
{
simpleLbl.Text = bs.Result.Item1;
billState = bs.Result.Item2;
}
break;
case "storeBox":
var sb = new SelectStoreDialog();
if (sb.ShowDialog() == DialogResult.OK)
{
simpleLbl.Text = sb.Result.Item1;
storeID = sb.Result.Item2;
XmlUtil.SerializerObjToFile(new CarcassSaleOutFormConfig { Weight = strErrorWeight, Store_ID = storeID, Store_Name = simpleLbl.Text });
}
break;
}
}
private void clearBtn_Click(object sender, EventArgs e)
{
billState = 0;
billStateBox.Text = "未审核";
sendTime = DateTime.Today;
sendDateBox.Text = sendTime.ToString("yyyy-MM-dd");
deliverGoodsLineBox.Text = string.Empty;
deliverGoodsLineID = null;
customerBox.Text = string.Empty;
customerID = null;
storeBox.Text = string.Empty;
storeID = null;
}
private void mainGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
var id = (long)mainGridView.CurrentRow.Cells[0].Value;
var first = saleOutStoreList.First(x => x.ID == id);
billIDLabel.Text = id.ToString();
customerLabel.Text = first.Customer_Name;
addressLabel.Text = first.Address;
carNumberLabel.Text = first.CarNumber;
BindOrderGrid(null);
}
void BindOrderGrid(long? detailID)
{
var id = long.Parse(billIDLabel.Text);
details = CarcassSaleOutBL.GetSaleOutStoreDetailList(id);
foreach (var item in details)
{
item.SaleOutStore_ID = id;
item.Customer_Name = customerLabel.Text;
}
orderGridView.DataSource = details;
if (detailID.HasValue)
{
foreach (DataGridViewRow row in orderGridView.Rows)
{
if ((long)row.Cells[0].Value == detailID)
{
row.Selected = true;
break;
}
}
}
else
{
if (details.Any())
orderGridView.FirstDisplayedScrollingRowIndex = 0;
}
orderGridView.Refresh();
}
private void alreadyViewBtn_Click(object sender, EventArgs e)
{
already = true;
Refersh();
}
void Refersh()
{
commitBtn.Enabled = !already;
goodsFinishBtn.Enabled = !already;
unFinishBtn.Enabled = already;
if (details != null)
{
details.Clear();
orderGridView.Refresh();
}
saleOutStoreList = CarcassSaleOutBL.GetSaleOutStoreList(sendTime, deliverGoodsLineID, customerID, billState, storeID, already);
mainGridView.DataSource = saleOutStoreList;
mainGridView.Refresh();
}
private void deleteBtn_Click(object sender, EventArgs e)
{
if (sendGridView.CurrentRow == null)
return;
var id = (long)sendGridView.CurrentRow.Cells[0].Value;
CarcassSaleOutBL.Delete(id);
var tag = weightRecord.First(x => x.ID == id);
weightRecord.Remove(tag);
foreach (var item in weightRecord.Where(x => x.Idx > tag.Idx))
item.Idx -= 1;
sendGridView.Refresh();
}
private void orderGridView_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e)
{
DataGridViewRow dgrSingle = orderGridView.Rows[e.RowIndex];
var v = (decimal?)dgrSingle.Cells["D_SNumber"].Value;
if (v.HasValue && v > 0)
{
dgrSingle.DefaultCellStyle.BackColor = Color.YellowGreen;
}
}
private void sendGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0)
return;
var id = (long)sendGridView.CurrentRow.Cells[0].Value;
var first = weightRecord.First(x => x.ID == id);
first.Selected = !first.Selected;
sendGridView.Refresh();
}
private void halfBtn_Click(object sender, EventArgs e)
{
SetWeightNumber(0.5m);
}
private void fullBtn_Click(object sender, EventArgs e)
{
SetWeightNumber(1);
}
private void SetWeightNumber(decimal number)
{
if (sendGridView.CurrentRow == null)
return;
var id = (long)sendGridView.CurrentRow.Cells[0].Value;
CarcassSaleOutBL.UpdateWeightNumber(id, number);
var first = weightRecord.First(x => x.ID == id);
first.Selected = true;
first.Number = number;
sendGridView.Refresh();
}
private void scanCodeBtn_Click(object sender, EventArgs e)
{
scanCode = !scanCode;
scanCodeBtn.Text = scanCode ? "扫码发货" : "自动发货";
}
}
}

+ 198
- 0
ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.resx View File

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

+ 2
- 2
ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.Designer.cs View File

@ -302,9 +302,9 @@
this.uTimerLabel1.Format = "M月d日 H:mm:ss";
this.uTimerLabel1.Location = new System.Drawing.Point(1167, 49);
this.uTimerLabel1.Name = "uTimerLabel1";
this.uTimerLabel1.Size = new System.Drawing.Size(136, 16);
this.uTimerLabel1.Size = new System.Drawing.Size(128, 16);
this.uTimerLabel1.TabIndex = 11;
this.uTimerLabel1.Text = "6月22日 12:31:50";
this.uTimerLabel1.Text = "7月10日 8:50:27";
//
// uScanPanel1
//


+ 6
- 11
ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs View File

@ -16,7 +16,7 @@ using WinFormControl;
namespace ButcherFactory.CarcassSaleOut_
{
public partial class CarcassSaleOutForm : Form, IWithRoleForm
public partial class CarcassSaleOutForm : Form//, IWithRoleForm
{
#region IWithRoleForm
public List<short> RoleName
@ -426,16 +426,6 @@ namespace ButcherFactory.CarcassSaleOut_
}
}
private void sendGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0)
return;
var id = (long)sendGridView.CurrentRow.Cells[0].Value;
var first = weightRecord.First(x => x.ID == id);
first.Selected = !first.Selected;
sendGridView.Refresh();
}
private void halfBtn_Click(object sender, EventArgs e)
{
SetWeightNumber(0.5m);
@ -457,5 +447,10 @@ namespace ButcherFactory.CarcassSaleOut_
first.Number = number;
sendGridView.Refresh();
}
private void sendGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
}
}
}

+ 185
- 0
ButcherFactory.Form/Controls/ColorButton.cs View File

@ -0,0 +1,185 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WinFormControl;
namespace ButcherFactory.Controls
{
class ColorButton : System.Windows.Forms.Button
{
public ColorButton()
{
mouseAction = MouseActionType.None;
this.SetStyle(ControlStyles.AllPaintingInWmPaint |
ControlStyles.DoubleBuffer |
ControlStyles.UserPaint, true);
this.ForeColor = Color.White;
this.BackColor = Color.FromArgb(77, 135, 245);
}
Color selectedColor = Color.FromArgb(158, 234, 106);
[Browsable(true)]
public Color SelectedColor
{
get { return selectedColor; }
set { selectedColor = value; }
}
[DefaultValue(false)]
public bool Selected { get; set; }
[DefaultValue(false)]
public bool EnableGroup { get; set; }
[DefaultValue(false)]
public bool StateHold { get; set; }
[DefaultValue(false)]
public bool PlaySound { get; set; }
[DefaultValue(false)]
public bool SelfControlEnable { get; set; }
private int radius=8;
[DefaultValue(8)]
public int Radius { get { return radius; } set { radius = value; } }
private enum MouseActionType
{
None,
Hover,
Click
}
private MouseActionType mouseAction;
protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;
var cC = Parent.BackColor;
if (cC == Color.Transparent)
cC = Color.White;
g.Clear(cC);
Color clr = Color.FromArgb(180, this.BackColor);
if (Selected)
clr = SelectedColor;
Color from = Color.FromArgb(200, clr);
int btnOffset = 0;
if (Enabled)
{
switch (mouseAction)
{
case MouseActionType.Click:
clr = Color.FromArgb(225, clr);
btnOffset = 2;
break;
case MouseActionType.Hover:
clr = Color.FromArgb(225, clr); ;
break;
}
}
else
from = clr = Color.FromArgb(186, 186, 186);
g.SmoothingMode = SmoothingMode.AntiAlias;
Rectangle rc = new Rectangle(btnOffset, btnOffset, this.ClientSize.Width - btnOffset, this.ClientSize.Height - btnOffset);
GraphicsPath path1 = this.GetPath(rc, Radius);
LinearGradientBrush br1 = new LinearGradientBrush(rc, from, clr, LinearGradientMode.Vertical);
g.FillPath(br1, path1);
var textBrush = new SolidBrush(this.ForeColor);
StringFormat drawFormat = new StringFormat();
drawFormat.FormatFlags = StringFormatFlags.DisplayFormatControl;
drawFormat.LineAlignment = StringAlignment.Center;
drawFormat.Alignment = System.Drawing.StringAlignment.Center;
g.DrawString(this.Text, this.Font, textBrush, rc, drawFormat);
}
private GraphicsPath GetPath(Rectangle rc, int r)
{
int x = rc.X, y = rc.Y, w = rc.Width, h = rc.Height;
GraphicsPath path = new GraphicsPath();
path.AddArc(x, y, r, r, 180, 90); //Upper left corner
path.AddArc(x + w - r, y, r, r, 270, 90); //Upper right corner
path.AddArc(x + w - r, y + h - r, r, r, 0, 90); //Lower right corner
path.AddArc(x, y + h - r, r, r, 90, 90); //Lower left corner
path.CloseFigure();
return path;
}
protected override void OnMouseDown(MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.mouseAction = MouseActionType.Click;
this.Invalidate();
}
base.OnMouseDown(e);
}
protected override void OnMouseUp(MouseEventArgs mevent)
{
this.mouseAction = MouseActionType.None;
this.Invalidate();
base.OnMouseUp(mevent);
}
protected override void OnMouseEnter(EventArgs e)
{
this.mouseAction = MouseActionType.Hover;
this.Invalidate();
base.OnMouseEnter(e);
}
protected override void OnMouseLeave(EventArgs e)
{
this.mouseAction = MouseActionType.None;
this.Invalidate();
base.OnMouseLeave(e);
}
protected override void OnClick(EventArgs e)
{
this.Enabled = false;
if (PlaySound)
SoundPalyUtil.PlaySound(SoundType.Click);
try
{
base.OnClick(e);
if (!SelfControlEnable)
this.Enabled = true;
}
catch
{
Application.DoEvents();
this.Enabled = true;
this.Focus();
throw;
}
if (EnableGroup)
{
foreach (var ctl in Parent.Controls)
{
var btn = ctl as ColorButton;
if (btn == null)
continue;
btn.Selected = btn.Text == this.Text;
}
}
else if (StateHold)
Selected = !Selected;
Application.DoEvents();
this.Focus();
}
}
}

+ 223
- 0
ButcherFactory.Form/Controls/FormTemplate.Designer.cs View File

@ -0,0 +1,223 @@
namespace ButcherFactory.Controls
{
partial class FormTemplate
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.panel1 = new System.Windows.Forms.Panel();
this.dateLbl = new System.Windows.Forms.Label();
this.closeBtn = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.timeLbl = new System.Windows.Forms.Label();
this.roundPanel2 = new ButcherFactory.Controls.RoundPanel(this.components);
this.TitleLbl = new System.Windows.Forms.Label();
this.titlePanel = new System.Windows.Forms.Panel();
this.logoPanel = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.roundPanel1 = new ButcherFactory.Controls.RoundPanel(this.components);
this.panel1.SuspendLayout();
this.roundPanel2.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.Transparent;
this.panel1.Controls.Add(this.dateLbl);
this.panel1.Controls.Add(this.closeBtn);
this.panel1.Controls.Add(this.panel3);
this.panel1.Controls.Add(this.timeLbl);
this.panel1.Controls.Add(this.roundPanel2);
this.panel1.Controls.Add(this.titlePanel);
this.panel1.Controls.Add(this.logoPanel);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1212, 53);
this.panel1.TabIndex = 0;
//
// dateLbl
//
this.dateLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.dateLbl.AutoSize = true;
this.dateLbl.BackColor = System.Drawing.Color.Transparent;
this.dateLbl.Font = new System.Drawing.Font("黑体", 10F);
this.dateLbl.ForeColor = System.Drawing.Color.White;
this.dateLbl.Location = new System.Drawing.Point(991, 30);
this.dateLbl.Name = "dateLbl";
this.dateLbl.Size = new System.Drawing.Size(154, 14);
this.dateLbl.TabIndex = 13;
this.dateLbl.Text = "2018年10月29日/星期五";
//
// closeBtn
//
this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.closeBtn.BackgroundImage = global::ButcherFactory.Properties.Resources.closeImg;
this.closeBtn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.closeBtn.Location = new System.Drawing.Point(1174, 14);
this.closeBtn.Name = "closeBtn";
this.closeBtn.Size = new System.Drawing.Size(30, 26);
this.closeBtn.TabIndex = 12;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// panel3
//
this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.panel3.BackColor = System.Drawing.Color.White;
this.panel3.Location = new System.Drawing.Point(1157, 5);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(1, 42);
this.panel3.TabIndex = 11;
//
// timeLbl
//
this.timeLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.timeLbl.AutoSize = true;
this.timeLbl.BackColor = System.Drawing.Color.Transparent;
this.timeLbl.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Bold);
this.timeLbl.ForeColor = System.Drawing.Color.White;
this.timeLbl.Location = new System.Drawing.Point(1013, 9);
this.timeLbl.Name = "timeLbl";
this.timeLbl.Size = new System.Drawing.Size(112, 16);
this.timeLbl.TabIndex = 10;
this.timeLbl.Text = "下午:17:20";
//
// roundPanel2
//
this.roundPanel2._setRoundRadius = 40;
this.roundPanel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(70)))), ((int)(((byte)(173)))));
this.roundPanel2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.roundPanel2.Controls.Add(this.TitleLbl);
this.roundPanel2.Location = new System.Drawing.Point(308, 10);
this.roundPanel2.Margin = new System.Windows.Forms.Padding(0);
this.roundPanel2.Name = "roundPanel2";
this.roundPanel2.Size = new System.Drawing.Size(97, 37);
this.roundPanel2.TabIndex = 9;
//
// TitleLbl
//
this.TitleLbl.AutoSize = true;
this.TitleLbl.Font = new System.Drawing.Font("黑体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.TitleLbl.ForeColor = System.Drawing.Color.White;
this.TitleLbl.Location = new System.Drawing.Point(14, 10);
this.TitleLbl.Name = "TitleLbl";
this.TitleLbl.Size = new System.Drawing.Size(56, 16);
this.TitleLbl.TabIndex = 0;
this.TitleLbl.Text = "label1";
//
// titlePanel
//
this.titlePanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.titlePanel.Location = new System.Drawing.Point(57, 12);
this.titlePanel.Name = "titlePanel";
this.titlePanel.Size = new System.Drawing.Size(122, 28);
this.titlePanel.TabIndex = 8;
//
// logoPanel
//
this.logoPanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.logoPanel.Location = new System.Drawing.Point(12, 12);
this.logoPanel.Name = "logoPanel";
this.logoPanel.Size = new System.Drawing.Size(36, 30);
this.logoPanel.TabIndex = 7;
//
// panel2
//
this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Location = new System.Drawing.Point(0, 53);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1212, 1);
this.panel2.TabIndex = 1;
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Font = new System.Drawing.Font("黑体", 10F);
this.label3.ForeColor = System.Drawing.Color.White;
this.label3.Location = new System.Drawing.Point(495, 579);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(231, 14);
this.label3.TabIndex = 4;
this.label3.Text = "版权归青花瓷(北京)有限公司所有";
//
// roundPanel1
//
this.roundPanel1._setRoundRadius = 15;
this.roundPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.roundPanel1.BackColor = System.Drawing.Color.White;
this.roundPanel1.Location = new System.Drawing.Point(12, 61);
this.roundPanel1.Margin = new System.Windows.Forms.Padding(0);
this.roundPanel1.Name = "roundPanel1";
this.roundPanel1.Size = new System.Drawing.Size(1187, 510);
this.roundPanel1.TabIndex = 2;
//
// FormTemplate
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(88)))), ((int)(((byte)(217)))));
this.ClientSize = new System.Drawing.Size(1212, 600);
this.Controls.Add(this.label3);
this.Controls.Add(this.roundPanel1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "FormTemplate";
this.Text = "FormTemplate";
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.roundPanel2.ResumeLayout(false);
this.roundPanel2.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Panel panel1;
private RoundPanel roundPanel2;
private System.Windows.Forms.Panel titlePanel;
private System.Windows.Forms.Panel logoPanel;
private System.Windows.Forms.Label dateLbl;
private System.Windows.Forms.Panel closeBtn;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Label timeLbl;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label TitleLbl;
protected RoundPanel roundPanel1;
protected System.Windows.Forms.Label label3;
}
}

+ 83
- 0
ButcherFactory.Form/Controls/FormTemplate.cs View File

@ -0,0 +1,83 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Timers;
using System.Windows.Forms;
namespace ButcherFactory.Controls
{
public partial class FormTemplate : Form
{
System.Timers.Timer timer;
public FormTemplate()
{
InitializeComponent();
if (!DesignMode)
{
this.FormClosing += delegate
{
if (timer != null)
timer.Dispose();
};
}
if (CheckDesingModel.IsDesingMode)
return;//如果处于设计模式,返回
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (!DesignMode)
{
TitleLbl.Text = Text;
logoPanel.BackgroundImage = Image.FromFile("Images\\logo.png");
titlePanel.BackgroundImage = Image.FromFile("Images\\formTitle.png");
timerTick(null, null);
timer = new System.Timers.Timer(1000);
timer.Elapsed += timerTick;
timer.AutoReset = true;
timer.Enabled = true;
}
}
private void timerTick(object sender, ElapsedEventArgs e)
{
var arr = "日一二三四五六";
this.Invoke(new Action(delegate
{
timeLbl.Text = string.Format("{0} {1:HH:mm}", DateTime.Now.Hour > 12 ? "下午" : "上午", DateTime.Now);
dateLbl.Text = string.Format(string.Format("{0:yyyy年MM月dd日}/星期{1}", DateTime.Today, arr[(int)DateTime.Now.DayOfWeek]));
}));
}
private void closeBtn_Click(object sender, EventArgs e)
{
this.Close();
}
}
internal class CheckDesingModel
{
public static bool IsDesingMode
{
get
{
bool ReturnFlag = false;
if (LicenseManager.UsageMode == LicenseUsageMode.Designtime)
ReturnFlag = true;
else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv")
ReturnFlag = true;
//if (ReturnFlag)
// Msg.Warning("设计模式");
//else Msg.Warning("非设计模式!");
return ReturnFlag;
}
}
}
}

+ 159
- 0
ButcherFactory.Form/Controls/FormTemplate.resx View File

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

+ 81
- 0
ButcherFactory.Form/Controls/RoundPanel.cs View File

@ -0,0 +1,81 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ButcherFactory.Controls
{
public class RoundPanel : Panel
{
public RoundPanel()
{
this.Padding = new System.Windows.Forms.Padding(0, 0, 0, 0);
this.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
}
// 圆角
// ===============================================================================================
private int _Radius = 18; // 圆角弧度
/// <summary>圆角弧度(0为不要圆角)</summary>
[DefaultValue(18)]
[Browsable(true)]
[Description("圆角弧度(0为不要圆角)")]
public int _setRoundRadius
{
get
{
return _Radius;
}
set
{
if (value < 0) { _Radius = 0; }
else { _Radius = value; }
base.Refresh();
}
}
// 圆角代码
public void Round(System.Drawing.Region region)
{
System.Drawing.Drawing2D.GraphicsPath oPath = new System.Drawing.Drawing2D.GraphicsPath();
int x = 0;
int y = 0;
int thisWidth = this.Width;
int thisHeight = this.Height;
int angle = _Radius;
oPath.AddArc(x, y, angle, angle, 180, 90); // 左上角
oPath.AddArc(thisWidth - angle, y, angle, angle, 270, 90); // 右上角
oPath.AddArc(thisWidth - angle, thisHeight - angle, angle, angle, 0, 90); // 右下角
oPath.AddArc(x, thisHeight - angle, angle, angle, 90, 90); // 左下角
oPath.CloseAllFigures();
Region = new System.Drawing.Region(oPath);
}
public RoundPanel(IContainer container)
{
container.Add(this);
}
protected override void OnPaint(System.Windows.Forms.PaintEventArgs pe)
{
base.OnPaint(pe);
pe.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
Round(this.Region); // 圆角
}
protected override void OnResize(EventArgs eventargs)
{
base.OnResize(eventargs);
base.Refresh();
}
}
}

+ 52
- 0
ButcherFactory.Form/Controls/Utils/AoHaoSi3000DataFormat.cs View File

@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.Controls
{
internal class AoHaoSi3000DataFormat : DataFormatBase
{
public override int DataLength
{
get { return 10; }
}
public override char Beginchar
{
get { return (char)0x80; }//这种数据没有固定的开始标志
}
public override char Endchar
{
get { return (char)0x67; }
}
public override short Bufsize
{
get { return 36; }
}
public override string ParseData(string buf, out bool isStatic)
{
isStatic = false;
return string.Empty;
}
public override bool ParseAscii(string buf, out string weight, out bool isStatic)
{
isStatic = true;
weight = buf.Replace("kg", "").Replace((char)0x0D, (char)0x20).Replace((char)0x0A, (char)0x20).Replace((char)0x3F, (char)0x20);
weight = weight.Trim();
return true;
}
public override bool ParseAscii(string buf, out string weight, out bool isStatic, out string subStr)
{
weight = "";
isStatic = false;
subStr = "";
return false;
}
}
}

+ 70
- 0
ButcherFactory.Form/Controls/Utils/DataFormatBase.cs View File

@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.Controls
{
interface IDataFormat
{
char Beginchar { get; }
char Endchar { get; }
short Bufsize { get; }
bool ParseAscii(string buf, out string weight, out bool isStatic);
bool ParseAscii(string buf, out string weight, out bool isStatic, out string subStr);
}
internal abstract class DataFormatBase : IDataFormat
{
public abstract int DataLength
{
get;
}
public abstract char Beginchar
{
get;
}
public abstract char Endchar
{
get;
}
public abstract short Bufsize { get; }
public const short BUFSIZE = 36;
// 根据开始字符找出 一个完整的数据帧
public string FindDataFrame(string buf, int fSize)
{
var bufSize = buf.Length;
if (fSize > bufSize)
{
return string.Empty;
}
int index = buf.IndexOf(Beginchar); // 查找开始字符的索引
if (index < 0 || (index + fSize) > bufSize)
{
return string.Empty;
}
string data = buf.Substring(index, fSize);
// 检查结束字符
if (data[fSize - 1] != Endchar)
{
return string.Empty;
}
return data;
}
public abstract string ParseData(string buf, out bool isStatic);
public abstract bool ParseAscii(string buf, out string weight, out bool isStatic);
public abstract bool ParseAscii(string buf, out string weight, out bool isStatic, out string subStr);
}
}

+ 58
- 0
ButcherFactory.Form/Controls/Utils/IND560DataFormat.cs View File

@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.Controls
{
internal class IND560DataFormat : DataFormatBase
{
public override int DataLength
{
get { return 10; }
}
public override char Beginchar
{
get { return (char)0x80; }//这种数据没有固定的开始标志
}
public override char Endchar
{
get { return (char)0x67; }
}
public override short Bufsize
{
get { return 36; }
}
public override string ParseData(string buf, out bool isStatic)
{
isStatic = false;
return string.Empty;
}
public override bool ParseAscii(string buf, out string weight, out bool isStatic)
{
isStatic = true;
weight = buf.Replace("kg", "").Replace((char)0x0D, (char)0x20).Replace((char)0x0A, (char)0x20).Replace((char)0x3F, (char)0x20);
weight = weight.Trim();
if (weight.Any(x => x == ' '))
{
var arr = weight.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
if (arr.Length > 1)
weight = arr[1];
}
return true;
}
public override bool ParseAscii(string buf, out string weight, out bool isStatic, out string subStr)
{
weight = "";
isStatic = false;
subStr = "";
return false;
}
}
}

+ 121
- 0
ButcherFactory.Form/Controls/Utils/Xk3124DataFormat.cs View File

@ -0,0 +1,121 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.Controls
{
internal class Xk3124DataFormat : DataFormatBase
{
public override int DataLength
{
get { return 17; }
}
public override char Beginchar
{
get { return (char)0x02; }
}
public override char Endchar
{
get { return (char)0x0D; ; }
}
public override short Bufsize
{
get { return 36; }
}
public override string ParseData(string buf, out bool isStatic)
{
StringBuilder str = new StringBuilder();
char swa = buf[1]; // 状态字A
char swb = buf[2]; // 状态字B
int dotIndex = (swa & 0x07) - 2; // 小数点位置
bool isPositive = (((swb >> 1) & 0x01) == 0); // 符号:是否为正数
isStatic = (((swb >> 3) & 0x01) == 0);
char[] num = new char[6];
for (int i = 0; i < 6; i++)
{
num[i] = buf[i + 4];
}
if (dotIndex < 0)
{ // 不考虑精确到十,百位
return str.ToString();
}
for (int i = 0; i < 6 - dotIndex; i++)
{
str.Append(num[i]);
}
str.Append('.');
for (int i = 0; i < dotIndex; i++)
{
str.Append(num[6 - dotIndex + i]);
}
// 去掉空格
string result = str.ToString().Trim();
// 取消前面多余的0
for (int i = 0; i < result.Length; i++)
{
if (result[i] != '0')
{
result = result.Substring(i, result.Length - i);
break;
}
}
if (result.IndexOf('.') == 0)
{
result = result.Insert(0, "0");
}
if (result.IndexOf('.') == result.Length - 1)
{
result = result.Remove(result.IndexOf('.'), 1);
}
if (!isPositive)
{ // 负数
result = result.Insert(0, "-");
}
return result;
}
public override bool ParseAscii(string buf, out string weight, out bool isStatic)
{
isStatic = false;
weight = FindDataFrame(buf, DataLength);
if (string.IsNullOrEmpty(weight))
{
return false;
}
weight = ParseData(weight, out isStatic);
return true;
}
public override bool ParseAscii(string buf, out string weight, out bool isStatic, out string subStr)
{
weight = "";
isStatic = false;
subStr = "";
return false;
}
}
}

+ 136
- 0
ButcherFactory.Form/Controls/Utils/Xk3190A9DataFormat.cs View File

@ -0,0 +1,136 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.Controls
{
internal class Xk3190A9DataFormat : DataFormatBase
{
public override int DataLength
{
get { return 12; }
}
public override char Beginchar
{
get { return (char)0x02; }
}
public override char Endchar
{
get { return (char)0x03; }
}
public override short Bufsize
{
get { return 36; }
}
public override string ParseData(string buf, out bool isStatic)
{
string weight;
// 小数位数0-4
int dot = (short)(0x0F & buf[8]);
weight = buf.Substring(2, 6).Trim();
// insert dot
weight = InsertDot(weight, dot);
isStatic = true; // 默认 为 稳定
// buffer[1] 符号位
if (buf[1] == '-')
{
weight = weight.Insert(0, "-");
}
return weight;
}
public override bool ParseAscii(string buf, out string weight, out bool isStatic)
{
isStatic = false;
weight = FindDataFrame(buf, DataLength);
if (string.IsNullOrEmpty(weight))
{
return false;
}
weight = ParseData(weight, out isStatic);
return true;
}
private static string InsertDot(string weight, int dotBits)
{
string str = weight.TrimStart(new[] {
'0'
});
str = str.Trim();
if (dotBits > 0)
{
//str = str.Insert(str.Length - dotBits, ".");
if (string.IsNullOrEmpty(str))
{
str = "0";
str = str.Insert(str.Length, ".");
for (int i = 0; i < dotBits; i++)
{
str = str.Insert(str.Length, "0");
}
}
else
str = str.Insert(str.Length - dotBits, ".");
}
if (str.IndexOf(".") == 0)
{
str = str.Insert(0, "0");
}
return str;
}
public override bool ParseAscii(string buf, out string weight, out bool isStatic, out string subStr)
{
isStatic = false;
weight = FindDataFrame(buf, DataLength, out subStr);
if (string.IsNullOrEmpty(weight))
{
return false;
}
weight = ParseData(weight, out isStatic);
return true;
}
// 根据开始字符找出 一个完整的数据帧
public string FindDataFrame(string buf, int fSize, out string subStr)
{
var bufSize = buf.Length;
subStr = "";
int index = buf.IndexOf(Beginchar); // 查找开始字符的索引
if (index < 0 || (index + fSize) > bufSize)
{
return string.Empty;
}
string data = buf.Substring(index, fSize);
subStr = buf.Substring(index + fSize);
// 检查结束字符
if (data[fSize - 1] != Endchar)
{
return string.Empty;
}
return data;
}
}
}

+ 130
- 0
ButcherFactory.Form/Controls/Utils/Xk3190D10DataFormat.cs View File

@ -0,0 +1,130 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.Controls
{
internal class Xk3190D10DataFormat : DataFormatBase
{
public override int DataLength
{
get { return 12; }
}
public override char Beginchar
{
get { return (char)0x02; }
}
public override char Endchar
{
get { return (char)0x0D; ; }
}
public override short Bufsize
{
get { return 24; }
}
public override string ParseData(string buf, out bool isStatic)
{
string weight;
// 小数位数0-4
int dot = (short)(0x0F & buf[8]);
weight = buf.Substring(2, 6).Trim();
// insert dot
weight = InsertDot(weight, dot);
isStatic = true; // 默认 为 稳定
// buffer[1] 符号位
if (buf[1] == '-')
{
weight = weight.Insert(0, "-");
}
else
{
}
return weight;
}
public override bool ParseAscii(string buf, out string weight, out bool isStatic)
{
isStatic = false;
weight = FindDataFrame(buf, DataLength);
if (string.IsNullOrEmpty(weight))
{
return false;
}
weight = ParseData(weight, out isStatic);
return true;
}
private static string InsertDot(string weight, int dotBits)
{
string str = weight.TrimStart(new[] {
'0'
});
str = str.Trim();
if (dotBits > 0)
{
//str = str.Insert(str.Length - dotBits, ".");
if (string.IsNullOrEmpty(str))
{
str = "0";
str = str.Insert(str.Length, ".");
for (int i = 0; i < dotBits; i++)
{
str = str.Insert(str.Length, "0");
}
}
else
str = str.Insert(str.Length - dotBits, ".");
}
if (str.IndexOf(".") == 0)
{
str = str.Insert(0, "0");
}
return str;
}
public override bool ParseAscii(string buf, out string weight, out bool isStatic, out string subStr)
{
isStatic = false;
weight = FindDataFrame(buf, DataLength);
subStr = "";
if (string.IsNullOrEmpty(weight))
{
return false;
}
weight = ParseData(weight, out isStatic);
return true;
}
#region 1.3 验证int奇数偶数
/// <summary>
/// 1.3 验证int奇数偶数
/// </summary>
/// <param name="num"></param>
/// <returns></returns>
public bool isJO(int num)
{
int a = num % 2;
if (a == 0)
return true;
else
return false;
}
#endregion
}
}

+ 43
- 0
ButcherFactory.Form/Controls/WeightConfig.cs View File

@ -0,0 +1,43 @@
using ButcherFactory.BO.Utils;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.Controls
{
public class WeightConfig
{
public string WeightSet { get; set; }
public string ComSet { get; set; }
public int? RateSet { get; set; }
public int? BitSet { get; set; }
public string Format { get; set; }
public decimal? Discont { get; set; }
public int WeightType { get; set; }
public decimal MinWeight { get; set; }
public decimal MaxWeight { get; set; }
public static WeightConfig Init(string flag)
{
var path = Path.Combine("Config", flag + "WeightConfig.xml");
return XmlUtil.DeserializeFromFile<WeightConfig>(path);
}
public void Save(string flag)
{
var path = Path.Combine("Config", flag + "WeightConfig.xml");
XmlUtil.SerializerObjToFile(this, path);
}
}
}

+ 131
- 0
ButcherFactory.Form/Controls/WeightControl.Designer.cs View File

@ -0,0 +1,131 @@
namespace ButcherFactory.Controls
{
partial class WeightControl
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.roundPanel1 = new ButcherFactory.Controls.RoundPanel(this.components);
this.weightSwitch = new ButcherFactory.Controls.ColorButton();
this.settingBtn = new ButcherFactory.Controls.ColorButton();
this.roundPanel2 = new ButcherFactory.Controls.RoundPanel(this.components);
this.lblChengZhong = new System.Windows.Forms.Label();
this.roundPanel1.SuspendLayout();
this.roundPanel2.SuspendLayout();
this.SuspendLayout();
//
// roundPanel1
//
this.roundPanel1._setRoundRadius = 15;
this.roundPanel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.roundPanel1.Controls.Add(this.weightSwitch);
this.roundPanel1.Controls.Add(this.settingBtn);
this.roundPanel1.Controls.Add(this.roundPanel2);
this.roundPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.roundPanel1.Location = new System.Drawing.Point(0, 0);
this.roundPanel1.Margin = new System.Windows.Forms.Padding(0);
this.roundPanel1.Name = "roundPanel1";
this.roundPanel1.Size = new System.Drawing.Size(262, 74);
this.roundPanel1.TabIndex = 0;
//
// weightSwitch
//
this.weightSwitch.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
this.weightSwitch.Font = new System.Drawing.Font("宋体", 10F);
this.weightSwitch.ForeColor = System.Drawing.Color.White;
this.weightSwitch.Location = new System.Drawing.Point(167, 40);
this.weightSwitch.Name = "weightSwitch";
this.weightSwitch.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.weightSwitch.Size = new System.Drawing.Size(92, 32);
this.weightSwitch.StateHold = true;
this.weightSwitch.TabIndex = 2;
this.weightSwitch.Text = "启用称重";
this.weightSwitch.UseVisualStyleBackColor = false;
this.weightSwitch.Click += new System.EventHandler(this.weightSwitch_Click);
//
// settingBtn
//
this.settingBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(144)))), ((int)(((byte)(98)))), ((int)(((byte)(222)))));
this.settingBtn.Font = new System.Drawing.Font("宋体", 10F);
this.settingBtn.ForeColor = System.Drawing.Color.White;
this.settingBtn.Location = new System.Drawing.Point(167, 1);
this.settingBtn.Name = "settingBtn";
this.settingBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.settingBtn.Size = new System.Drawing.Size(92, 32);
this.settingBtn.TabIndex = 1;
this.settingBtn.Text = "称设置";
this.settingBtn.UseVisualStyleBackColor = false;
this.settingBtn.Click += new System.EventHandler(this.settingBtn_Click);
//
// roundPanel2
//
this.roundPanel2._setRoundRadius = 15;
this.roundPanel2.BackColor = System.Drawing.Color.Black;
this.roundPanel2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.roundPanel2.Controls.Add(this.lblChengZhong);
this.roundPanel2.Location = new System.Drawing.Point(0, 0);
this.roundPanel2.Margin = new System.Windows.Forms.Padding(0);
this.roundPanel2.Name = "roundPanel2";
this.roundPanel2.Size = new System.Drawing.Size(164, 74);
this.roundPanel2.TabIndex = 0;
//
// lblChengZhong
//
this.lblChengZhong.AutoSize = true;
this.lblChengZhong.Font = new System.Drawing.Font("宋体", 25F);
this.lblChengZhong.ForeColor = System.Drawing.Color.Red;
this.lblChengZhong.Location = new System.Drawing.Point(5, 19);
this.lblChengZhong.Margin = new System.Windows.Forms.Padding(0);
this.lblChengZhong.Name = "lblChengZhong";
this.lblChengZhong.Size = new System.Drawing.Size(83, 34);
this.lblChengZhong.TabIndex = 0;
this.lblChengZhong.Text = "0.00";
//
// WeightControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.roundPanel1);
this.Name = "WeightControl";
this.Size = new System.Drawing.Size(262, 74);
this.roundPanel1.ResumeLayout(false);
this.roundPanel2.ResumeLayout(false);
this.roundPanel2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private RoundPanel roundPanel1;
private RoundPanel roundPanel2;
private System.Windows.Forms.Label lblChengZhong;
private ColorButton weightSwitch;
private ColorButton settingBtn;
}
}

+ 306
- 0
ButcherFactory.Form/Controls/WeightControl.cs View File

@ -0,0 +1,306 @@
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;
using System.IO.Ports;
using System.Threading;
using System.Collections.Concurrent;
using ButcherFactory.Utils;
namespace ButcherFactory.Controls
{
public partial class WeightControl : UserControl
{
WeightConfig config;
SerialPort weightPort;
IDataFormat _dataFormat;
Thread _inQueryThread;
private bool _mainProcessIsRun;
readonly StringBuilder _dataStrBuilder = new StringBuilder();
private bool switchOn;
[Browsable(true), Description("称设置标识")]
public string WeightFalg { get; set; }
[Browsable(true), Description("读取到值的事件")]
public event Action<decimal> ReceivedValue;
[Browsable(false)]
public decimal Weight
{
get
{
var v = decimal.Parse(lblChengZhong.Text);
if (config != null)
v -= (config.Discont ?? 0);
return v;
}
}
public WeightControl()
{
InitializeComponent();
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
var parentForm = ControlsUtil.GetParentFormm(this);
if (parentForm != null)
{
parentForm.FormClosing += delegate
{
if (_inQueryThread != null && _inQueryThread.IsAlive)
{
DisableWeight();
}
};
}
}
private void settingBtn_Click(object sender, EventArgs e)
{
if (new WeightSettingFrom(WeightFalg).ShowDialog() == DialogResult.OK)
config = WeightConfig.Init(WeightFalg);
}
private void weightSwitch_Click(object sender, EventArgs e)
{
try
{
if (config == null)
{
config = WeightConfig.Init(WeightFalg);
WeighAvgControl.config = config;
}
settingBtn.Enabled = switchOn;
switchOn = !switchOn;
ChangeWeightBtnState();
if (switchOn)
{
OpenSerialPort();
_mainProcessIsRun = true;
ReadData();
}
else
{
DisableWeight();
}
}
catch
{
switchOn = !switchOn;
settingBtn.Enabled = !switchOn;
ChangeWeightBtnState();
throw;
}
finally
{
this.Focus();
}
}
void ChangeWeightBtnState()
{
if (switchOn)
weightSwitch.Text = "停止称重";
else
weightSwitch.Text = "启用称重";
}
void OpenSerialPort()
{
if (!switchOn)
return;
if (config.RateSet == null)
throw new Exception("请先配置称相关信息");
weightPort = new SerialPort();
weightPort.PortName = config.ComSet;
weightPort.BaudRate = config.RateSet.Value;
weightPort.DataBits = config.BitSet.Value;
weightPort.ReadBufferSize = 4096 * 100;
if (!string.IsNullOrEmpty(config.Format))
format = "{0:{format}}".Replace("{format}", config.Format);
switch (config.WeightSet)
{
case "IND560":
_dataFormat = new IND560DataFormat();
break;
case "AHS3000":
_dataFormat = new AoHaoSi3000DataFormat();
break;
case "Xk3124":
case "IND231":
_dataFormat = new Xk3124DataFormat();
break;
case "Xk3190A9":
_dataFormat = new Xk3190A9DataFormat();
break;
default:
_dataFormat = new Xk3190D10DataFormat();
break;
}
if (!weightPort.IsOpen)
{
try
{
weightPort.Open();
}
catch (InvalidOperationException)
{
throw new Exception("指定的端口已打开");
}
catch (UnauthorizedAccessException)
{
throw new Exception("对端口的访问被拒绝");
}
}
}
void ReadData()
{
_inQueryThread = new Thread(InQuery);
_inQueryThread.Start();
}
string format = "{0:0.00}";
private void InQuery()
{
while (_mainProcessIsRun)
{
int availableCount = weightPort.BytesToRead;
if (availableCount == 0)
{
Thread.Sleep(10);
}
char[] buffer = new char[availableCount];
weightPort.Read(buffer, 0, availableCount);
foreach (var c in buffer)
{
if (c == _dataFormat.Beginchar)
{
_dataStrBuilder.Clear();
_dataStrBuilder.Append(c);
}
else if (c == _dataFormat.Endchar || _dataStrBuilder.Length > _dataFormat.Bufsize)
{
_dataStrBuilder.Append(c);
bool isStatic;
string str;
if (_dataFormat.ParseAscii(_dataStrBuilder.ToString(), out str, out isStatic))
{
if (config.WeightType == 0)
{
if (string.IsNullOrEmpty(str))
str = "0";
this.Invoke(new Action(delegate()
{
decimal v = 0;
decimal.TryParse(str, out v);
lblChengZhong.Text = string.Format(format, v);
if (str != "0")
{
if (ReceivedValue != null)
ReceivedValue(v - (config.Discont ?? 0));
}
}));
}
else
{
decimal num = 0;
if (decimal.TryParse(str, out num))
{
this.Invoke(new Action(delegate()
{
lblChengZhong.Text = string.Format(format, num);
}));
WeighAvgControl.Add(num, isStatic);
}
if (WeighAvgControl.TryGetValue(out num))
{
this.Invoke(new Action(delegate()
{
if (str != "0")
{
if (ReceivedValue != null)
ReceivedValue(num - (config.Discont ?? 0));
}
}));
}
}
}
_dataStrBuilder.Clear();
}
else
{
_dataStrBuilder.Append(c);
}
}
}
}
private class WeighAvgControl
{
public static WeightConfig config;
public static bool TryGetValue(out decimal result)
{
List<Tuple<decimal, bool>> list;
if (mWeighList.TryDequeue(out list))
{
var r = list.Where(x => x.Item2).Select(x => x.Item1).GroupBy(x => x);
var firstOrDefault = r.OrderByDescending(x => x.Count()).FirstOrDefault();
if (firstOrDefault != null)
{
result = firstOrDefault.Key;
return true;
}
result = 0;
return false;
}
result = 0;
return false;
}
static ConcurrentQueue<List<Tuple<decimal, bool>>> mWeighList = new ConcurrentQueue<List<Tuple<decimal, bool>>>();
static List<Tuple<decimal, bool>> _list = new List<Tuple<decimal, bool>>();
public static void Add(decimal value, bool isStatic)
{
if (value >= config.MinWeight && value <= config.MaxWeight)
{
_list.Add(new Tuple<decimal, bool>(value, isStatic));
}
else
{
if (_list.Count > 0)
{
mWeighList.Enqueue(_list);
_list = new List<Tuple<decimal, bool>>();
}
}
}
}
void DisableWeight()
{
_mainProcessIsRun = false;
lblChengZhong.Text = string.Format(format, 0);
format = "{0:0.00}";
Thread.Sleep(10);
if (_inQueryThread.IsAlive)
{
_inQueryThread.Abort();
}
if (weightPort.IsOpen)
weightPort.Close();
}
}
}

+ 120
- 0
ButcherFactory.Form/Controls/WeightControl.resx View File

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

+ 305
- 0
ButcherFactory.Form/Controls/WeightSettingFrom.Designer.cs View File

@ -0,0 +1,305 @@
namespace ButcherFactory.Controls
{
partial class WeightSettingFrom
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.maxInput = new WinFormControl.UTextBoxWithPad();
this.minInput = new WinFormControl.UTextBoxWithPad();
this.label8 = new WinFormControl.ULabel();
this.weightReadType = new System.Windows.Forms.ComboBox();
this.label7 = new WinFormControl.ULabel();
this.discont = new WinFormControl.UTextBoxWithPad();
this.format = new WinFormControl.UTextBoxWithPad();
this.label6 = new WinFormControl.ULabel();
this.label5 = new WinFormControl.ULabel();
this.bitSet = new System.Windows.Forms.ComboBox();
this.rateSet = new System.Windows.Forms.ComboBox();
this.comSet = new System.Windows.Forms.ComboBox();
this.weightSet = new System.Windows.Forms.ComboBox();
this.label4 = new WinFormControl.ULabel();
this.label3 = new WinFormControl.ULabel();
this.label2 = new WinFormControl.ULabel();
this.label1 = new WinFormControl.ULabel();
this.saveBtn = new ButcherFactory.Controls.ColorButton();
this.closeBtn = new ButcherFactory.Controls.ColorButton();
this.SuspendLayout();
//
// maxInput
//
this.maxInput.Font = new System.Drawing.Font("宋体", 12F);
this.maxInput.Location = new System.Drawing.Point(259, 366);
this.maxInput.Name = "maxInput";
this.maxInput.Size = new System.Drawing.Size(55, 26);
this.maxInput.TabIndex = 84;
this.maxInput.Type = WinFormControl.UTextBoxWithPad.TextBoxType.Number;
//
// minInput
//
this.minInput.Font = new System.Drawing.Font("宋体", 12F);
this.minInput.Location = new System.Drawing.Point(193, 366);
this.minInput.Name = "minInput";
this.minInput.Size = new System.Drawing.Size(55, 26);
this.minInput.TabIndex = 83;
this.minInput.Type = WinFormControl.UTextBoxWithPad.TextBoxType.Number;
//
// label8
//
this.label8.AutoSize = true;
this.label8.BackColor = System.Drawing.Color.Transparent;
this.label8.Font = new System.Drawing.Font("宋体", 15F);
this.label8.Location = new System.Drawing.Point(71, 366);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(109, 20);
this.label8.TabIndex = 82;
this.label8.Text = "有效区间:";
//
// weightReadType
//
this.weightReadType.Font = new System.Drawing.Font("宋体", 15F);
this.weightReadType.FormattingEnabled = true;
this.weightReadType.Location = new System.Drawing.Point(193, 319);
this.weightReadType.Name = "weightReadType";
this.weightReadType.Size = new System.Drawing.Size(121, 28);
this.weightReadType.TabIndex = 81;
//
// label7
//
this.label7.AutoSize = true;
this.label7.BackColor = System.Drawing.Color.Transparent;
this.label7.Font = new System.Drawing.Font("宋体", 15F);
this.label7.Location = new System.Drawing.Point(71, 322);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(109, 20);
this.label7.TabIndex = 80;
this.label7.Text = "读取方式:";
//
// discont
//
this.discont.Font = new System.Drawing.Font("宋体", 14F);
this.discont.Location = new System.Drawing.Point(193, 270);
this.discont.Name = "discont";
this.discont.Size = new System.Drawing.Size(121, 29);
this.discont.TabIndex = 79;
this.discont.Type = WinFormControl.UTextBoxWithPad.TextBoxType.Number;
//
// format
//
this.format.Font = new System.Drawing.Font("宋体", 14F);
this.format.Location = new System.Drawing.Point(193, 222);
this.format.Name = "format";
this.format.Size = new System.Drawing.Size(121, 29);
this.format.TabIndex = 78;
this.format.Type = WinFormControl.UTextBoxWithPad.TextBoxType.Number;
//
// label6
//
this.label6.AutoSize = true;
this.label6.BackColor = System.Drawing.Color.Transparent;
this.label6.Font = new System.Drawing.Font("宋体", 15F);
this.label6.Location = new System.Drawing.Point(71, 279);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(69, 20);
this.label6.TabIndex = 77;
this.label6.Text = "扣重:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.BackColor = System.Drawing.Color.Transparent;
this.label5.Font = new System.Drawing.Font("宋体", 15F);
this.label5.Location = new System.Drawing.Point(71, 228);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(109, 20);
this.label5.TabIndex = 76;
this.label5.Text = "显示格式:";
//
// bitSet
//
this.bitSet.Font = new System.Drawing.Font("宋体", 15F);
this.bitSet.FormattingEnabled = true;
this.bitSet.Location = new System.Drawing.Point(193, 175);
this.bitSet.Name = "bitSet";
this.bitSet.Size = new System.Drawing.Size(121, 28);
this.bitSet.TabIndex = 73;
//
// rateSet
//
this.rateSet.Font = new System.Drawing.Font("宋体", 15F);
this.rateSet.FormattingEnabled = true;
this.rateSet.Location = new System.Drawing.Point(193, 123);
this.rateSet.Name = "rateSet";
this.rateSet.Size = new System.Drawing.Size(121, 28);
this.rateSet.TabIndex = 74;
//
// comSet
//
this.comSet.Font = new System.Drawing.Font("宋体", 15F);
this.comSet.FormattingEnabled = true;
this.comSet.Location = new System.Drawing.Point(193, 73);
this.comSet.Name = "comSet";
this.comSet.Size = new System.Drawing.Size(121, 28);
this.comSet.TabIndex = 75;
//
// weightSet
//
this.weightSet.Font = new System.Drawing.Font("宋体", 15F);
this.weightSet.FormattingEnabled = true;
this.weightSet.Location = new System.Drawing.Point(193, 25);
this.weightSet.Name = "weightSet";
this.weightSet.Size = new System.Drawing.Size(121, 28);
this.weightSet.TabIndex = 72;
//
// label4
//
this.label4.AutoSize = true;
this.label4.BackColor = System.Drawing.Color.Transparent;
this.label4.Font = new System.Drawing.Font("宋体", 15F);
this.label4.Location = new System.Drawing.Point(71, 178);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(89, 20);
this.label4.TabIndex = 71;
this.label4.Text = "数据位:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Font = new System.Drawing.Font("宋体", 15F);
this.label3.Location = new System.Drawing.Point(71, 126);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(89, 20);
this.label3.TabIndex = 70;
this.label3.Text = "波特率:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Font = new System.Drawing.Font("宋体", 15F);
this.label2.Location = new System.Drawing.Point(71, 76);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(89, 20);
this.label2.TabIndex = 69;
this.label2.Text = "端口号:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Font = new System.Drawing.Font("宋体", 15F);
this.label1.Location = new System.Drawing.Point(71, 28);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(89, 20);
this.label1.TabIndex = 68;
this.label1.Text = "称型号:";
//
// saveBtn
//
this.saveBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(198)))), ((int)(((byte)(58)))));
this.saveBtn.Font = new System.Drawing.Font("宋体", 12F);
this.saveBtn.ForeColor = System.Drawing.Color.White;
this.saveBtn.Location = new System.Drawing.Point(95, 426);
this.saveBtn.Name = "saveBtn";
this.saveBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.saveBtn.Size = new System.Drawing.Size(84, 35);
this.saveBtn.TabIndex = 85;
this.saveBtn.Text = "保存";
this.saveBtn.UseVisualStyleBackColor = false;
this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click);
//
// closeBtn
//
this.closeBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25)))));
this.closeBtn.Font = new System.Drawing.Font("宋体", 12F);
this.closeBtn.ForeColor = System.Drawing.Color.White;
this.closeBtn.Location = new System.Drawing.Point(224, 426);
this.closeBtn.Name = "closeBtn";
this.closeBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.closeBtn.Size = new System.Drawing.Size(84, 35);
this.closeBtn.TabIndex = 85;
this.closeBtn.Text = "关闭";
this.closeBtn.UseVisualStyleBackColor = false;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// WeightSettingFrom
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(391, 481);
this.ControlBox = false;
this.Controls.Add(this.closeBtn);
this.Controls.Add(this.saveBtn);
this.Controls.Add(this.maxInput);
this.Controls.Add(this.minInput);
this.Controls.Add(this.label8);
this.Controls.Add(this.weightReadType);
this.Controls.Add(this.label7);
this.Controls.Add(this.discont);
this.Controls.Add(this.format);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.bitSet);
this.Controls.Add(this.rateSet);
this.Controls.Add(this.comSet);
this.Controls.Add(this.weightSet);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "WeightSettingFrom";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "称设置";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private WinFormControl.UTextBoxWithPad maxInput;
private WinFormControl.UTextBoxWithPad minInput;
private WinFormControl.ULabel label8;
private System.Windows.Forms.ComboBox weightReadType;
private WinFormControl.ULabel label7;
private WinFormControl.UTextBoxWithPad discont;
private WinFormControl.UTextBoxWithPad format;
private WinFormControl.ULabel label6;
private WinFormControl.ULabel label5;
private System.Windows.Forms.ComboBox bitSet;
private System.Windows.Forms.ComboBox rateSet;
private System.Windows.Forms.ComboBox comSet;
private System.Windows.Forms.ComboBox weightSet;
private WinFormControl.ULabel label4;
private WinFormControl.ULabel label3;
private WinFormControl.ULabel label2;
private WinFormControl.ULabel label1;
private ColorButton saveBtn;
private ColorButton closeBtn;
}
}

+ 104
- 0
ButcherFactory.Form/Controls/WeightSettingFrom.cs View File

@ -0,0 +1,104 @@
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 ButcherFactory.Controls
{
public partial class WeightSettingFrom : Form
{
List<string> weight = new List<string> { "IND560", "Xk3124", "Xk3190A9", "Xk3190D10", "IND231", "AHS3000" };
List<string> com = new List<string> { "COM1", "COM2", "COM3", "COM4", "COM5" };
List<string> rate = new List<string> { "1200", "2400", "4800", "7200", "9600" };
List<string> bit = new List<string> { "5", "6", "7", "8" };
List<string> weightRead = new List<string> { "稳定读取", "连续发送" };
string _flag;
WeightConfig config;
public WeightSettingFrom(string flag)
{
this._flag = flag;
InitializeComponent();
weightSet.DataSource = weight;
comSet.DataSource = com;
rateSet.DataSource = rate;
bitSet.DataSource = bit;
weightReadType.DataSource = weightRead;
config = WeightConfig.Init(flag);
if (!string.IsNullOrEmpty(config.WeightSet))
weightSet.SelectedIndex = weight.IndexOf(config.WeightSet);
else
weightSet.SelectedIndex = 0;
if (!string.IsNullOrEmpty(config.ComSet))
comSet.SelectedIndex = com.IndexOf(config.ComSet);
else
comSet.SelectedIndex = 0;
if (config.RateSet.HasValue)
rateSet.SelectedIndex = rate.IndexOf(config.RateSet.ToString());
else
rateSet.SelectedIndex = 2;
if (config.BitSet.HasValue)
bitSet.SelectedIndex = bit.IndexOf(config.BitSet.ToString());
else
bitSet.SelectedIndex = 3;
if (string.IsNullOrEmpty(config.Format))
format.Text = "0.00";
else
format.Text = config.Format;
if (config.Discont == null)
discont.Text = "0.00";
else
discont.Text = config.Discont.ToString();
weightReadType.SelectedIndex = config.WeightType;
minInput.Text = config.MinWeight.ToString();
maxInput.Text = config.MaxWeight.ToString();
}
bool changed;
private void saveBtn_Click(object sender, EventArgs e)
{
config.WeightSet = weight[this.weightSet.SelectedIndex];
config.ComSet = com[this.comSet.SelectedIndex];
config.RateSet = int.Parse(rate[this.rateSet.SelectedIndex]);
config.BitSet = int.Parse(bit[this.bitSet.SelectedIndex]);
config.Format = format.Text;
config.WeightType = weightReadType.SelectedIndex;
if (config.WeightType == 1)
{
decimal min = 0;
decimal max = 0;
if (!decimal.TryParse(minInput.Text.Trim(), out min))
throw new Exception("连续发送时 必须输入有效区间");
if (!decimal.TryParse(maxInput.Text.Trim(), out max))
throw new Exception("连续发送时 必须输入有效区间");
config.MinWeight = min;
config.MaxWeight = max;
}
if (!string.IsNullOrEmpty(discont.Text))
{
decimal v;
if (decimal.TryParse(discont.Text, out v))
config.Discont = v;
else
throw new Exception("扣重格式输入不正确");
}
else
config.Discont = 0;
config.Save(_flag);
changed = true;
MessageBox.Show("保存成功!");
}
private void closeBtn_Click(object sender, EventArgs e)
{
if (changed)
DialogResult = DialogResult.OK;
Close();
}
}
}

+ 120
- 0
ButcherFactory.Form/Controls/WeightSettingFrom.resx View File

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

+ 16
- 25
ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.Designer.cs View File

@ -28,10 +28,9 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ClientGoodsSetDialog));
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.closeBtn = new WinFormControl.UButton();
this.colseBtn = new ButcherFactory.Controls.ColorButton();
this.SuspendLayout();
//
// flowLayoutPanel2
@ -55,28 +54,20 @@
this.flowLayoutPanel1.Size = new System.Drawing.Size(797, 70);
this.flowLayoutPanel1.TabIndex = 22;
//
// closeBtn
// colseBtn
//
this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.closeBtn.AsClicked = false;
this.closeBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("closeBtn.BackgroundImage")));
this.closeBtn.EnableGroup = false;
this.closeBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.closeBtn.FlatAppearance.BorderSize = 0;
this.closeBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.ForeColor = System.Drawing.Color.Black;
this.closeBtn.Location = new System.Drawing.Point(696, 2);
this.closeBtn.Name = "closeBtn";
this.closeBtn.PlaySound = false;
this.closeBtn.SelfControlEnable = false;
this.closeBtn.Size = new System.Drawing.Size(111, 34);
this.closeBtn.SoundType = WinFormControl.SoundType.Click;
this.closeBtn.TabIndex = 26;
this.closeBtn.Text = "关闭";
this.closeBtn.UseVisualStyleBackColor = true;
this.closeBtn.WithStataHode = false;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
this.colseBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.colseBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
this.colseBtn.Font = new System.Drawing.Font("宋体", 15F);
this.colseBtn.ForeColor = System.Drawing.Color.White;
this.colseBtn.Location = new System.Drawing.Point(696, 2);
this.colseBtn.Name = "colseBtn";
this.colseBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.colseBtn.Size = new System.Drawing.Size(111, 44);
this.colseBtn.TabIndex = 27;
this.colseBtn.Text = "关闭";
this.colseBtn.UseVisualStyleBackColor = false;
this.colseBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// ClientGoodsSetDialog
//
@ -84,7 +75,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(819, 533);
this.Controls.Add(this.closeBtn);
this.Controls.Add(this.colseBtn);
this.Controls.Add(this.flowLayoutPanel2);
this.Controls.Add(this.flowLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
@ -100,6 +91,6 @@
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private WinFormControl.UButton closeBtn;
private Controls.ColorButton colseBtn;
}
}

+ 7
- 6
ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.cs View File

@ -1,5 +1,6 @@
using ButcherFactory.BO;
using ButcherFactory.BO.LocalBL;
using ButcherFactory.Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@ -9,7 +10,6 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WinFormControl;
namespace ButcherFactory.Dialogs
{
@ -28,22 +28,23 @@ namespace ButcherFactory.Dialogs
foreach (var item in goodsSetDic)
{
var btn = new UButton() { Width = 100, Height = 62, Text = item.Key, Font = new Font("宋体", 15), Margin = new Padding(15, 3, 15, 0), WithStataHode = true, EnableGroup = true };
var btn = new ColorButton() { Width = 100, Height = 62, Text = item.Key, Font = new Font("宋体", 15), Margin = new Padding(15, 3, 15, 0), EnableGroup = true };
btn.Click += GroupBtnClick;
flowLayoutPanel1.Controls.Add(btn);
}
}
Color goodsColor = Color.FromArgb(250, 120, 24);
void GroupBtnClick(object sender, EventArgs e)
{
flowLayoutPanel2.Controls.Clear();
var groupBtn = sender as UButton;
var groupBtn = sender as ColorButton;
var arr = goodsSetDic[groupBtn.Text];
foreach (var item in arr)
{
var btn = new UButton() { Width = 127, Height = 75, Text = item.Goods_Name, Tag = item, Font = new Font("宋体", 15), Margin = new Padding(20, 10, 20, 35), PlaySound = true, WithStataHode = true };
var btn = new ColorButton() { Width = 127, Height = 75, Text = item.Goods_Name, Tag = item, Font = new Font("宋体", 15), BackColor = goodsColor, Margin = new Padding(20, 10, 20, 35), PlaySound = true, StateHold = true };
if (item.Selected)
btn.AsClicked = true;
btn.Selected = true;
btn.Click += GoodsBtnClick;
flowLayoutPanel2.Controls.Add(btn);
}
@ -51,7 +52,7 @@ namespace ButcherFactory.Dialogs
void GoodsBtnClick(object sender, EventArgs e)
{
var btn = sender as UButton;
var btn = sender as ColorButton;
var detail = btn.Tag as ClientGoodsSet_Detail;
if (detail.Selected)
FormClientGoodsSetBL.DeleteWorkGoodsSet(detail.ID);


+ 0
- 9
ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.resx View File

@ -117,13 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="closeBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
</root>

+ 68
- 97
ButcherFactory.Form/Dialogs/SelectBillStateDialog.Designer.cs View File

@ -28,104 +28,75 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SelectBillStateDialog));
this.uButton1 = new WinFormControl.UButton();
this.uButton2 = new WinFormControl.UButton();
this.uButton3 = new WinFormControl.UButton();
this.uButton4 = new WinFormControl.UButton();
this.colorButton4 = new ButcherFactory.Controls.ColorButton();
this.colorButton3 = new ButcherFactory.Controls.ColorButton();
this.colorButton2 = new ButcherFactory.Controls.ColorButton();
this.colorButton1 = new ButcherFactory.Controls.ColorButton();
this.SuspendLayout();
//
// uButton1
// colorButton4
//
this.uButton1.AsClicked = false;
this.uButton1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("uButton1.BackgroundImage")));
this.uButton1.EnableGroup = false;
this.uButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.uButton1.FlatAppearance.BorderSize = 0;
this.uButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.uButton1.Font = new System.Drawing.Font("宋体", 12F);
this.uButton1.ForeColor = System.Drawing.Color.Black;
this.uButton1.Location = new System.Drawing.Point(63, 36);
this.uButton1.Name = "uButton1";
this.uButton1.PlaySound = false;
this.uButton1.SelfControlEnable = false;
this.uButton1.Size = new System.Drawing.Size(120, 75);
this.uButton1.SoundType = WinFormControl.SoundType.Click;
this.uButton1.TabIndex = 0;
this.uButton1.Tag = "0";
this.uButton1.Text = "未审核";
this.uButton1.UseVisualStyleBackColor = true;
this.uButton1.WithStataHode = false;
this.uButton1.Click += new System.EventHandler(this.BtnClick);
this.colorButton4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
this.colorButton4.Font = new System.Drawing.Font("宋体", 15F);
this.colorButton4.ForeColor = System.Drawing.Color.White;
this.colorButton4.Location = new System.Drawing.Point(255, 151);
this.colorButton4.Name = "colorButton4";
this.colorButton4.Radius = 12;
this.colorButton4.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.colorButton4.Size = new System.Drawing.Size(120, 75);
this.colorButton4.TabIndex = 7;
this.colorButton4.Tag = "1";
this.colorButton4.Text = "已作废";
this.colorButton4.UseVisualStyleBackColor = false;
this.colorButton4.Click += new System.EventHandler(this.BtnClick);
//
// uButton2
// colorButton3
//
this.uButton2.AsClicked = false;
this.uButton2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("uButton2.BackgroundImage")));
this.uButton2.EnableGroup = false;
this.uButton2.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.uButton2.FlatAppearance.BorderSize = 0;
this.uButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.uButton2.Font = new System.Drawing.Font("宋体", 12F);
this.uButton2.ForeColor = System.Drawing.Color.Black;
this.uButton2.Location = new System.Drawing.Point(255, 36);
this.uButton2.Name = "uButton2";
this.uButton2.PlaySound = false;
this.uButton2.SelfControlEnable = false;
this.uButton2.Size = new System.Drawing.Size(120, 75);
this.uButton2.SoundType = WinFormControl.SoundType.Click;
this.uButton2.TabIndex = 1;
this.uButton2.Tag = "20";
this.uButton2.Text = "已审核";
this.uButton2.UseVisualStyleBackColor = true;
this.uButton2.WithStataHode = false;
this.uButton2.Click += new System.EventHandler(this.BtnClick);
this.colorButton3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
this.colorButton3.Font = new System.Drawing.Font("宋体", 15F);
this.colorButton3.ForeColor = System.Drawing.Color.White;
this.colorButton3.Location = new System.Drawing.Point(63, 151);
this.colorButton3.Name = "colorButton3";
this.colorButton3.Radius = 12;
this.colorButton3.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.colorButton3.Size = new System.Drawing.Size(120, 75);
this.colorButton3.TabIndex = 6;
this.colorButton3.Tag = "30";
this.colorButton3.Text = "已完毕";
this.colorButton3.UseVisualStyleBackColor = false;
this.colorButton3.Click += new System.EventHandler(this.BtnClick);
//
// uButton3
// colorButton2
//
this.uButton3.AsClicked = false;
this.uButton3.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("uButton3.BackgroundImage")));
this.uButton3.EnableGroup = false;
this.uButton3.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.uButton3.FlatAppearance.BorderSize = 0;
this.uButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.uButton3.Font = new System.Drawing.Font("宋体", 12F);
this.uButton3.ForeColor = System.Drawing.Color.Black;
this.uButton3.Location = new System.Drawing.Point(63, 151);
this.uButton3.Name = "uButton3";
this.uButton3.PlaySound = false;
this.uButton3.SelfControlEnable = false;
this.uButton3.Size = new System.Drawing.Size(120, 75);
this.uButton3.SoundType = WinFormControl.SoundType.Click;
this.uButton3.TabIndex = 2;
this.uButton3.Tag = "30";
this.uButton3.Text = "已完毕";
this.uButton3.UseVisualStyleBackColor = true;
this.uButton3.WithStataHode = false;
this.uButton3.Click += new System.EventHandler(this.BtnClick);
this.colorButton2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
this.colorButton2.Font = new System.Drawing.Font("宋体", 15F);
this.colorButton2.ForeColor = System.Drawing.Color.White;
this.colorButton2.Location = new System.Drawing.Point(255, 36);
this.colorButton2.Name = "colorButton2";
this.colorButton2.Radius = 12;
this.colorButton2.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.colorButton2.Size = new System.Drawing.Size(120, 75);
this.colorButton2.TabIndex = 5;
this.colorButton2.Tag = "20";
this.colorButton2.Text = "已审核";
this.colorButton2.UseVisualStyleBackColor = false;
this.colorButton2.Click += new System.EventHandler(this.BtnClick);
//
// uButton4
// colorButton1
//
this.uButton4.AsClicked = false;
this.uButton4.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("uButton4.BackgroundImage")));
this.uButton4.EnableGroup = false;
this.uButton4.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.uButton4.FlatAppearance.BorderSize = 0;
this.uButton4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.uButton4.Font = new System.Drawing.Font("宋体", 12F);
this.uButton4.ForeColor = System.Drawing.Color.Black;
this.uButton4.Location = new System.Drawing.Point(255, 151);
this.uButton4.Name = "uButton4";
this.uButton4.PlaySound = false;
this.uButton4.SelfControlEnable = false;
this.uButton4.Size = new System.Drawing.Size(120, 75);
this.uButton4.SoundType = WinFormControl.SoundType.Click;
this.uButton4.TabIndex = 3;
this.uButton4.Tag = "1";
this.uButton4.Text = "已作废";
this.uButton4.UseVisualStyleBackColor = true;
this.uButton4.WithStataHode = false;
this.uButton4.Click += new System.EventHandler(this.BtnClick);
this.colorButton1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
this.colorButton1.Font = new System.Drawing.Font("宋体", 15F);
this.colorButton1.ForeColor = System.Drawing.Color.White;
this.colorButton1.Location = new System.Drawing.Point(63, 36);
this.colorButton1.Name = "colorButton1";
this.colorButton1.Radius = 12;
this.colorButton1.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.colorButton1.Size = new System.Drawing.Size(120, 75);
this.colorButton1.TabIndex = 4;
this.colorButton1.Tag = "0";
this.colorButton1.Text = "未审核";
this.colorButton1.UseVisualStyleBackColor = false;
this.colorButton1.Click += new System.EventHandler(this.BtnClick);
//
// SelectBillStateDialog
//
@ -134,10 +105,10 @@
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(445, 263);
this.ControlBox = false;
this.Controls.Add(this.uButton4);
this.Controls.Add(this.uButton3);
this.Controls.Add(this.uButton2);
this.Controls.Add(this.uButton1);
this.Controls.Add(this.colorButton4);
this.Controls.Add(this.colorButton3);
this.Controls.Add(this.colorButton2);
this.Controls.Add(this.colorButton1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "SelectBillStateDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
@ -148,9 +119,9 @@
#endregion
private WinFormControl.UButton uButton1;
private WinFormControl.UButton uButton2;
private WinFormControl.UButton uButton3;
private WinFormControl.UButton uButton4;
private Controls.ColorButton colorButton1;
private Controls.ColorButton colorButton2;
private Controls.ColorButton colorButton3;
private Controls.ColorButton colorButton4;
}
}

+ 3
- 3
ButcherFactory.Form/Dialogs/SelectBillStateDialog.cs View File

@ -1,4 +1,5 @@
using System;
using ButcherFactory.Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@ -7,7 +8,6 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WinFormControl;
namespace ButcherFactory.Dialogs
{
@ -21,7 +21,7 @@ namespace ButcherFactory.Dialogs
void BtnClick(object sender, EventArgs e)
{
var btn = sender as UButton;
var btn = sender as ColorButton;
Result = new Tuple<string, int>(btn.Text, Convert.ToInt32(btn.Tag));
DialogResult = DialogResult.OK;
this.Close();


+ 0
- 33
ButcherFactory.Form/Dialogs/SelectBillStateDialog.resx View File

@ -117,37 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="uButton1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="uButton2.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="uButton3.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="uButton4.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
</root>

+ 34
- 51
ButcherFactory.Form/Dialogs/SelectCustomerDialog.Designer.cs View File

@ -28,16 +28,15 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SelectCustomerDialog));
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel();
this.textBox1 = new System.Windows.Forms.TextBox();
this.uButton1 = new WinFormControl.UButton();
this.searchBtn = new WinFormControl.UButton();
this.panel1 = new System.Windows.Forms.Panel();
this.flowLayoutPanel5 = new System.Windows.Forms.FlowLayoutPanel();
this.searchBtn = new ButcherFactory.Controls.ColorButton();
this.backBtn = new ButcherFactory.Controls.ColorButton();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
@ -81,58 +80,14 @@
this.textBox1.Size = new System.Drawing.Size(194, 29);
this.textBox1.TabIndex = 4;
//
// uButton1
//
this.uButton1.AsClicked = false;
this.uButton1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("uButton1.BackgroundImage")));
this.uButton1.EnableGroup = false;
this.uButton1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.uButton1.FlatAppearance.BorderSize = 0;
this.uButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.uButton1.Font = new System.Drawing.Font("宋体", 12F);
this.uButton1.ForeColor = System.Drawing.Color.Black;
this.uButton1.Location = new System.Drawing.Point(358, 10);
this.uButton1.Name = "uButton1";
this.uButton1.PlaySound = false;
this.uButton1.SelfControlEnable = false;
this.uButton1.Size = new System.Drawing.Size(80, 30);
this.uButton1.SoundType = WinFormControl.SoundType.Click;
this.uButton1.TabIndex = 5;
this.uButton1.Text = "退格";
this.uButton1.UseVisualStyleBackColor = true;
this.uButton1.WithStataHode = false;
this.uButton1.Click += new System.EventHandler(this.uButton1_Click);
//
// searchBtn
//
this.searchBtn.AsClicked = false;
this.searchBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("searchBtn.BackgroundImage")));
this.searchBtn.EnableGroup = false;
this.searchBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.searchBtn.FlatAppearance.BorderSize = 0;
this.searchBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.searchBtn.Font = new System.Drawing.Font("宋体", 12F);
this.searchBtn.ForeColor = System.Drawing.Color.Black;
this.searchBtn.Location = new System.Drawing.Point(235, 10);
this.searchBtn.Name = "searchBtn";
this.searchBtn.PlaySound = false;
this.searchBtn.SelfControlEnable = false;
this.searchBtn.Size = new System.Drawing.Size(80, 30);
this.searchBtn.SoundType = WinFormControl.SoundType.Click;
this.searchBtn.TabIndex = 6;
this.searchBtn.Text = "检索";
this.searchBtn.UseVisualStyleBackColor = true;
this.searchBtn.WithStataHode = false;
this.searchBtn.Click += new System.EventHandler(this.searchBtn_Click);
//
// panel1
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.panel1.Controls.Add(this.backBtn);
this.panel1.Controls.Add(this.searchBtn);
this.panel1.Controls.Add(this.flowLayoutPanel5);
this.panel1.Controls.Add(this.textBox1);
this.panel1.Controls.Add(this.searchBtn);
this.panel1.Controls.Add(this.flowLayoutPanel2);
this.panel1.Controls.Add(this.uButton1);
this.panel1.Controls.Add(this.flowLayoutPanel3);
this.panel1.Controls.Add(this.flowLayoutPanel4);
this.panel1.Location = new System.Drawing.Point(2, 260);
@ -147,6 +102,34 @@
this.flowLayoutPanel5.Size = new System.Drawing.Size(1034, 54);
this.flowLayoutPanel5.TabIndex = 7;
//
// searchBtn
//
this.searchBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(198)))), ((int)(((byte)(58)))));
this.searchBtn.Font = new System.Drawing.Font("宋体", 12F);
this.searchBtn.ForeColor = System.Drawing.Color.White;
this.searchBtn.Location = new System.Drawing.Point(241, 11);
this.searchBtn.Name = "searchBtn";
this.searchBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.searchBtn.Size = new System.Drawing.Size(80, 30);
this.searchBtn.TabIndex = 8;
this.searchBtn.Text = "查询";
this.searchBtn.UseVisualStyleBackColor = false;
this.searchBtn.Click += new System.EventHandler(this.searchBtn_Click);
//
// backBtn
//
this.backBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25)))));
this.backBtn.Font = new System.Drawing.Font("宋体", 12F);
this.backBtn.ForeColor = System.Drawing.Color.White;
this.backBtn.Location = new System.Drawing.Point(360, 11);
this.backBtn.Name = "backBtn";
this.backBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.backBtn.Size = new System.Drawing.Size(80, 30);
this.backBtn.TabIndex = 9;
this.backBtn.Text = "退格";
this.backBtn.UseVisualStyleBackColor = false;
this.backBtn.Click += new System.EventHandler(this.uButton1_Click);
//
// SelectCustomerDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -173,9 +156,9 @@
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel4;
private System.Windows.Forms.TextBox textBox1;
private WinFormControl.UButton uButton1;
private WinFormControl.UButton searchBtn;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel5;
private Controls.ColorButton searchBtn;
private Controls.ColorButton backBtn;
}
}

+ 10
- 5
ButcherFactory.Form/Dialogs/SelectCustomerDialog.cs View File

@ -1,4 +1,5 @@
using ButcherFactory.BO.LocalBL;
using ButcherFactory.Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@ -8,7 +9,6 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WinFormControl;
namespace ButcherFactory.Dialogs
{
@ -21,6 +21,9 @@ namespace ButcherFactory.Dialogs
InitKeyBoard();
}
Color numberColor = Color.FromArgb(250, 120, 24);
Color simpleColor = Color.FromArgb(77, 135, 245);
void InitKeyBoard()
{
var chars = new char[][] {
@ -34,7 +37,8 @@ namespace ButcherFactory.Dialogs
{
foreach (var c in v)
{
var btn = new UButton() { Width = 80, Height = 50, Text = c.ToString(), Font = new Font("宋体", 15), Margin = new Padding(10) };
var btn = new ColorButton() { Width = 80, Height = 50, Text = c.ToString(), Font = new Font("宋体", 15), Margin = new Padding(10, 0, 10, 0) };
btn.BackColor = idx == 0 ? numberColor : simpleColor;
btn.Click += CharClick;
panel[idx].Controls.Add(btn);
}
@ -44,7 +48,7 @@ namespace ButcherFactory.Dialogs
void CharClick(object sender, EventArgs e)
{
textBox1.Text += ((UButton)sender).Text;
textBox1.Text += ((ColorButton)sender).Text;
}
private void uButton1_Click(object sender, EventArgs e)
@ -53,6 +57,7 @@ namespace ButcherFactory.Dialogs
textBox1.Text = textBox1.Text.Substring(0, textBox1.Text.Length - 1);
}
Color customerColor = Color.FromArgb(144, 98, 222);
void InitCustomerBtn()
{
flowLayoutPanel1.Controls.Clear();
@ -61,7 +66,7 @@ namespace ButcherFactory.Dialogs
var customers = DialogBL.GetCustomerList(textBox1.Text.ToLower());
foreach (var item in customers)
{
var btn = new UButton() { Width = 100, Height = 60, Text = item.StringExt1.ToString(), Tag = item.LongExt1, Font = new Font("宋体", 10), Margin = new Padding(12) };
var btn = new ColorButton() { Width = 100, Height = 60, Text = item.StringExt1.ToString(), Tag = item.LongExt1, BackColor = customerColor, Font = new Font("宋体", 10), Margin = new Padding(12) };
btn.Click += CustomerClick;
flowLayoutPanel1.Controls.Add(btn);
}
@ -69,7 +74,7 @@ namespace ButcherFactory.Dialogs
void CustomerClick(object sender, EventArgs e)
{
var btn = sender as UButton;
var btn = sender as ColorButton;
Result = new Tuple<string, long>(btn.Text, Convert.ToInt64(btn.Tag));
DialogResult = DialogResult.OK;
this.Close();


+ 0
- 17
ButcherFactory.Form/Dialogs/SelectCustomerDialog.resx View File

@ -117,21 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="uButton1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="searchBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
</root>

+ 5
- 4
ButcherFactory.Form/Dialogs/SelectDeliverGoodsLineDialog.cs View File

@ -1,5 +1,6 @@
using ButcherFactory.BO;
using ButcherFactory.BO.LocalBL;
using ButcherFactory.Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@ -9,7 +10,6 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WinFormControl;
namespace ButcherFactory.Dialogs
{
@ -20,7 +20,7 @@ namespace ButcherFactory.Dialogs
IEnumerable<ExtensionObj> list;
public SelectDeliverGoodsLineDialog()
{
InitializeComponent();
InitializeComponent();
list = DialogBL.GetDeliverGoodsLineList();
tabControl1.Selected += tabControl_Selected;
foreach (var c in list.GroupBy(x => x.StringExt2))
@ -37,6 +37,7 @@ namespace ButcherFactory.Dialogs
AddButtons(tabControl1.SelectedTab);
}
Color color = Color.FromArgb(250, 120, 24);
private void AddButtons(TabPage tabPage)
{
tabPage.BackColor = Color.White;
@ -44,7 +45,7 @@ namespace ButcherFactory.Dialogs
var arr = list.Where(x => x.StringExt2 == tabPage.Text);
foreach (var item in arr)
{
var btn = new UButton() { Width = 100, Height = 60, Text = item.StringExt1.ToString(), Tag = item.LongExt1, Font = new Font("宋体", 10), Margin = new Padding(12) };
var btn = new ColorButton() { Width = 100, Height = 60, Text = item.StringExt1.ToString(), Tag = item.LongExt1, BackColor = color, Font = new Font("宋体", 10), Margin = new Padding(12) };
btn.Click += btnClick;
flw.Controls.Add(btn);
}
@ -53,7 +54,7 @@ namespace ButcherFactory.Dialogs
private void btnClick(object sender, EventArgs e)
{
var btn = sender as UButton;
var btn = sender as ColorButton;
Result = new Tuple<string, long>(btn.Text, Convert.ToInt64(btn.Tag));
DialogResult = DialogResult.OK;
this.Close();


+ 5
- 4
ButcherFactory.Form/Dialogs/SelectStoreDialog.cs View File

@ -1,4 +1,5 @@
using ButcherFactory.BO.LocalBL;
using ButcherFactory.Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@ -8,7 +9,6 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WinFormControl;
namespace ButcherFactory.Dialogs
{
@ -20,18 +20,19 @@ namespace ButcherFactory.Dialogs
InitializeComponent();
var stores = DialogBL.GetStoreList();
var flw = new FlowLayoutPanel() { Dock = DockStyle.Fill };
Color color = Color.FromArgb(77, 135, 245);
foreach (var item in stores)
{
var btn = new UButton() { Width = 100, Height = 60, Text = item.StringExt1.ToString(), Tag = item.LongExt1, Font = new Font("宋体", 10), Margin = new Padding(12) };
var btn = new ColorButton() { Width = 100, Height = 60, Text = item.StringExt1.ToString(), Tag = item.LongExt1, BackColor = color, Font = new Font("宋体", 10), Margin = new Padding(12) };
btn.Click += BtnClick;
flw.Controls.Add(btn);
}
this.Controls.Add(flw);
this.Controls.Add(flw);
}
private void BtnClick(object sender, EventArgs e)
{
var btn = sender as UButton;
var btn = sender as ColorButton;
Result = new Tuple<string, long>(btn.Text, Convert.ToInt64(btn.Tag));
DialogResult = DialogResult.OK;
this.Close();


+ 73
- 0
ButcherFactory.Form/Properties/Resources.Designer.cs View File

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

+ 124
- 0
ButcherFactory.Form/Properties/Resources.resx View File

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

BIN
ButcherFactory.Form/Resources/closeImg.png View File

Before After
Width: 30  |  Height: 30  |  Size: 3.2 KiB

+ 1
- 1
ButcherFactory.Form/SegmentInStore_/InStoreSummaryView.Designer.cs View File

@ -129,7 +129,7 @@
// I_Goods_Spec
//
this.I_Goods_Spec.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.I_Goods_Spec.DataPropertyName = "Spec";
this.I_Goods_Spec.DataPropertyName = "Goods_Spec";
this.I_Goods_Spec.FillWeight = 90F;
this.I_Goods_Spec.HeaderText = "规格";
this.I_Goods_Spec.Name = "I_Goods_Spec";


+ 90
- 90
ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.Designer.cs View File

@ -31,8 +31,6 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
@ -46,6 +44,8 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.inStoreViewBtn = new WinFormControl.NButton();
this.netStateWatch1 = new WinFormControl.NetStateWatch();
@ -54,14 +54,6 @@
this.uScanPanel1 = new WinFormControl.UScanPanel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.inStoreGrid = new WinFormControl.UDataGridView();
this.I_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.I_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.I_ShortCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.I_Goods_Code = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.I_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.I_Goods_Spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.I_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.I_ProductTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.goodsNameLbl = new WinFormControl.ULabel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.submitBtn = new WinFormControl.NButton();
@ -96,6 +88,14 @@
this.E_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.E_ExceptionInfo = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.uLabel4 = new WinFormControl.ULabel();
this.I_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.I_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.I_ShortCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.I_Goods_Code = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.I_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.I_Goods_Spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.I_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.I_InStoreTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.inStoreGrid)).BeginInit();
@ -212,7 +212,7 @@
this.I_Goods_Name,
this.I_Goods_Spec,
this.I_Weight,
this.I_ProductTime});
this.I_InStoreTime});
this.inStoreGrid.Location = new System.Drawing.Point(3, 60);
this.inStoreGrid.MultiSelect = false;
this.inStoreGrid.Name = "inStoreGrid";
@ -226,77 +226,6 @@
this.inStoreGrid.Size = new System.Drawing.Size(595, 371);
this.inStoreGrid.TabIndex = 9;
//
// I_ID
//
this.I_ID.DataPropertyName = "ID";
this.I_ID.HeaderText = "ID";
this.I_ID.Name = "I_ID";
this.I_ID.ReadOnly = true;
this.I_ID.Visible = false;
//
// I_RowIndex
//
this.I_RowIndex.DataPropertyName = "RowIndex";
this.I_RowIndex.HeaderText = "序号";
this.I_RowIndex.Name = "I_RowIndex";
this.I_RowIndex.ReadOnly = true;
this.I_RowIndex.Width = 65;
//
// I_ShortCode
//
this.I_ShortCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.I_ShortCode.DataPropertyName = "ShortCode";
this.I_ShortCode.HeaderText = "条码";
this.I_ShortCode.Name = "I_ShortCode";
this.I_ShortCode.ReadOnly = true;
this.I_ShortCode.Width = 60;
//
// I_Goods_Code
//
this.I_Goods_Code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.I_Goods_Code.DataPropertyName = "Goods_Code";
this.I_Goods_Code.HeaderText = "产品编号";
this.I_Goods_Code.Name = "I_Goods_Code";
this.I_Goods_Code.ReadOnly = true;
//
// I_Goods_Name
//
this.I_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.I_Goods_Name.DataPropertyName = "Goods_Name";
this.I_Goods_Name.HeaderText = "产品名称";
this.I_Goods_Name.Name = "I_Goods_Name";
this.I_Goods_Name.ReadOnly = true;
//
// I_Goods_Spec
//
this.I_Goods_Spec.DataPropertyName = "Spec";
this.I_Goods_Spec.HeaderText = "规格";
this.I_Goods_Spec.Name = "I_Goods_Spec";
this.I_Goods_Spec.ReadOnly = true;
this.I_Goods_Spec.Width = 70;
//
// I_Weight
//
this.I_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle3.Format = "#0.######";
this.I_Weight.DefaultCellStyle = dataGridViewCellStyle3;
this.I_Weight.HeaderText = "重量";
this.I_Weight.Name = "I_Weight";
this.I_Weight.ReadOnly = true;
this.I_Weight.Width = 70;
//
// I_ProductTime
//
this.I_ProductTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.I_ProductTime.DataPropertyName = "ProductTime";
dataGridViewCellStyle4.Format = "T";
dataGridViewCellStyle4.NullValue = null;
this.I_ProductTime.DefaultCellStyle = dataGridViewCellStyle4;
this.I_ProductTime.HeaderText = "生产时间";
this.I_ProductTime.Name = "I_ProductTime";
this.I_ProductTime.ReadOnly = true;
this.I_ProductTime.Width = 60;
//
// goodsNameLbl
//
this.goodsNameLbl.AutoSize = true;
@ -740,6 +669,77 @@
this.uLabel4.TabIndex = 5;
this.uLabel4.Text = "异常记录";
//
// I_ID
//
this.I_ID.DataPropertyName = "ID";
this.I_ID.HeaderText = "ID";
this.I_ID.Name = "I_ID";
this.I_ID.ReadOnly = true;
this.I_ID.Visible = false;
//
// I_RowIndex
//
this.I_RowIndex.DataPropertyName = "RowIndex";
this.I_RowIndex.HeaderText = "序号";
this.I_RowIndex.Name = "I_RowIndex";
this.I_RowIndex.ReadOnly = true;
this.I_RowIndex.Width = 65;
//
// I_ShortCode
//
this.I_ShortCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.I_ShortCode.DataPropertyName = "ShortCode";
this.I_ShortCode.HeaderText = "条码";
this.I_ShortCode.Name = "I_ShortCode";
this.I_ShortCode.ReadOnly = true;
this.I_ShortCode.Width = 65;
//
// I_Goods_Code
//
this.I_Goods_Code.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.I_Goods_Code.DataPropertyName = "Goods_Code";
this.I_Goods_Code.HeaderText = "产品编号";
this.I_Goods_Code.Name = "I_Goods_Code";
this.I_Goods_Code.ReadOnly = true;
//
// I_Goods_Name
//
this.I_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.I_Goods_Name.DataPropertyName = "Goods_Name";
this.I_Goods_Name.HeaderText = "产品名称";
this.I_Goods_Name.Name = "I_Goods_Name";
this.I_Goods_Name.ReadOnly = true;
//
// I_Goods_Spec
//
this.I_Goods_Spec.DataPropertyName = "Goods_Spec";
this.I_Goods_Spec.HeaderText = "规格";
this.I_Goods_Spec.Name = "I_Goods_Spec";
this.I_Goods_Spec.ReadOnly = true;
this.I_Goods_Spec.Width = 70;
//
// I_Weight
//
this.I_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle3.Format = "#0.######";
this.I_Weight.DefaultCellStyle = dataGridViewCellStyle3;
this.I_Weight.HeaderText = "重量";
this.I_Weight.Name = "I_Weight";
this.I_Weight.ReadOnly = true;
this.I_Weight.Width = 70;
//
// I_InStoreTime
//
this.I_InStoreTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.I_InStoreTime.DataPropertyName = "InStoreTime";
dataGridViewCellStyle4.Format = "T";
dataGridViewCellStyle4.NullValue = null;
this.I_InStoreTime.DefaultCellStyle = dataGridViewCellStyle4;
this.I_InStoreTime.HeaderText = "入库时间";
this.I_InStoreTime.Name = "I_InStoreTime";
this.I_InStoreTime.ReadOnly = true;
this.I_InStoreTime.Width = 97;
//
// SegmentInStoreForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -801,14 +801,6 @@
private WinFormControl.NButton submitBtn;
private WinFormControl.NButton deleteBtn;
private WinFormControl.NButton refreshBtn;
private System.Windows.Forms.DataGridViewTextBoxColumn I_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn I_RowIndex;
private System.Windows.Forms.DataGridViewTextBoxColumn I_ShortCode;
private System.Windows.Forms.DataGridViewTextBoxColumn I_Goods_Code;
private System.Windows.Forms.DataGridViewTextBoxColumn I_Goods_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn I_Goods_Spec;
private System.Windows.Forms.DataGridViewTextBoxColumn I_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn I_ProductTime;
private System.Windows.Forms.DataGridViewTextBoxColumn B_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn B_RowIndex;
private System.Windows.Forms.DataGridViewTextBoxColumn B_ShortCode;
@ -826,5 +818,13 @@
private System.Windows.Forms.DataGridViewTextBoxColumn U_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn U_ProductTime;
private WinFormControl.NButton inStoreViewBtn;
private System.Windows.Forms.DataGridViewTextBoxColumn I_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn I_RowIndex;
private System.Windows.Forms.DataGridViewTextBoxColumn I_ShortCode;
private System.Windows.Forms.DataGridViewTextBoxColumn I_Goods_Code;
private System.Windows.Forms.DataGridViewTextBoxColumn I_Goods_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn I_Goods_Spec;
private System.Windows.Forms.DataGridViewTextBoxColumn I_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn I_InStoreTime;
}
}

+ 2
- 2
ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.cs View File

@ -137,7 +137,7 @@ namespace ButcherFactory.SegmentInStore_
{
if (isBack)
{
var idx = backStoreList.Any() ? backStoreList.Last().RowIndex.Value : 0;
var idx = backStoreList.Any() ? backStoreList.First().RowIndex.Value : 0;
SegmentInStoreBL.SetAsBacking(uScanPanel1.TextBox.Text, idx + 1);
BindBackGrid();
var fir = inStoreList.FirstOrDefault(x => x.BarCode == uScanPanel1.TextBox.Text);
@ -149,7 +149,7 @@ namespace ButcherFactory.SegmentInStore_
}
else
{
var idx = inStoreList.Any() ? inStoreList.Last().RowIndex.Value : 0;
var idx = inStoreList.Any() ? inStoreList.First().RowIndex.Value : 0;
var entity = SegmentInStoreBL.InsertInStore(uScanPanel1.TextBox.Text, storeID, idx + 1);
inStoreList.Insert(0, entity);
if (inStoreList.Count >= 30)


+ 1
- 1
ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.resx View File

@ -123,7 +123,7 @@
<metadata name="I_Goods_Code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="I_ProductTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="I_InStoreTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_RowIndex.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">


+ 179
- 255
ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs View File

@ -28,19 +28,16 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SegmentProductionAutoForm));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
this.uLabel3 = new WinFormControl.ULabel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.taskDataGrid = new WinFormControl.UDataGridView();
@ -49,28 +46,28 @@
this.T_Done = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.T_Last = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GoodsLabel = new WinFormControl.ULabel();
this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.goodsSetBtn = new WinFormControl.UButton();
this.H_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.barPrintCheck = new System.Windows.Forms.CheckBox();
this.closeBtn = new WinFormControl.UButton();
this.uTimerLabel1 = new WinFormControl.UTimerLabel();
this.productBatchSelect = new System.Windows.Forms.ComboBox();
this.workUnitSelect = new System.Windows.Forms.ComboBox();
this.uLabel1 = new WinFormControl.ULabel();
this.uLabel2 = new WinFormControl.ULabel();
this.netStateWatch1 = new WinFormControl.NetStateWatch();
this.uWeightControl1 = new WinFormControl.UWeightControl();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.submitBtn = new WinFormControl.UButton();
this.deleteBtn = new WinFormControl.UButton();
this.rePrintBtn = new WinFormControl.UButton();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.historyDataGrid = new WinFormControl.UDataGridView();
this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.H_RowIndex = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.closeBtn = new ButcherFactory.Controls.ColorButton();
this.uWeightControl1 = new ButcherFactory.Controls.WeightControl();
this.goodsSetBtn = new ButcherFactory.Controls.ColorButton();
this.rePrintBtn = new ButcherFactory.Controls.ColorButton();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@ -85,23 +82,6 @@
((System.ComponentModel.ISupportInitialize)(this.historyDataGrid)).BeginInit();
this.SuspendLayout();
//
// H_BarCode
//
this.H_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.H_BarCode.DataPropertyName = "BarCode";
this.H_BarCode.HeaderText = "条码";
this.H_BarCode.Name = "H_BarCode";
this.H_BarCode.ReadOnly = true;
//
// H_Weight
//
this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle21.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle21;
this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
//
// uLabel3
//
this.uLabel3.AutoSize = true;
@ -115,14 +95,12 @@
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.taskDataGrid);
this.groupBox2.Controls.Add(this.GoodsLabel);
this.groupBox2.Location = new System.Drawing.Point(9, 8);
this.groupBox2.Location = new System.Drawing.Point(3, 3);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(5);
this.groupBox2.Size = new System.Drawing.Size(531, 120);
this.groupBox2.Size = new System.Drawing.Size(452, 120);
this.groupBox2.TabIndex = 4;
this.groupBox2.TabStop = false;
//
@ -132,15 +110,15 @@
this.taskDataGrid.AllowUserToDeleteRows = false;
this.taskDataGrid.AllowUserToResizeColumns = false;
this.taskDataGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle22.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle22;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.taskDataGrid.BackgroundColor = System.Drawing.Color.White;
this.taskDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle23.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle23.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle23;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.taskDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.taskDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.T_Item,
@ -153,12 +131,12 @@
this.taskDataGrid.Name = "taskDataGrid";
this.taskDataGrid.ReadOnly = true;
this.taskDataGrid.RowHeadersVisible = false;
dataGridViewCellStyle27.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle27.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle27;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle6;
this.taskDataGrid.RowTemplate.Height = 23;
this.taskDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.taskDataGrid.Size = new System.Drawing.Size(521, 96);
this.taskDataGrid.Size = new System.Drawing.Size(442, 96);
this.taskDataGrid.TabIndex = 2;
//
// T_Item
@ -172,8 +150,8 @@
//
this.T_Need.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.T_Need.DataPropertyName = "Need";
dataGridViewCellStyle24.Format = "#0.######";
this.T_Need.DefaultCellStyle = dataGridViewCellStyle24;
dataGridViewCellStyle3.Format = "#0.######";
this.T_Need.DefaultCellStyle = dataGridViewCellStyle3;
this.T_Need.HeaderText = "订货";
this.T_Need.Name = "T_Need";
this.T_Need.ReadOnly = true;
@ -182,8 +160,8 @@
//
this.T_Done.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.T_Done.DataPropertyName = "Done";
dataGridViewCellStyle25.Format = "#0.######";
this.T_Done.DefaultCellStyle = dataGridViewCellStyle25;
dataGridViewCellStyle4.Format = "#0.######";
this.T_Done.DefaultCellStyle = dataGridViewCellStyle4;
this.T_Done.HeaderText = "完工";
this.T_Done.Name = "T_Done";
this.T_Done.ReadOnly = true;
@ -192,8 +170,8 @@
//
this.T_Last.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.T_Last.DataPropertyName = "Last";
dataGridViewCellStyle26.Format = "#0.######";
this.T_Last.DefaultCellStyle = dataGridViewCellStyle26;
dataGridViewCellStyle5.Format = "#0.######";
this.T_Last.DefaultCellStyle = dataGridViewCellStyle5;
this.T_Last.HeaderText = "剩余";
this.T_Last.Name = "T_Last";
this.T_Last.ReadOnly = true;
@ -210,57 +188,6 @@
this.GoodsLabel.TabIndex = 1;
this.GoodsLabel.Text = "存货名称";
//
// H_Goods_Name
//
this.H_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.H_Goods_Name.DataPropertyName = "Goods_Name";
this.H_Goods_Name.HeaderText = "产品";
this.H_Goods_Name.Name = "H_Goods_Name";
this.H_Goods_Name.ReadOnly = true;
//
// flowLayoutPanel2
//
this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flowLayoutPanel2.AutoScroll = true;
this.flowLayoutPanel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanel2.Location = new System.Drawing.Point(-3, 75);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(670, 432);
this.flowLayoutPanel2.TabIndex = 21;
//
// goodsSetBtn
//
this.goodsSetBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.goodsSetBtn.AsClicked = false;
this.goodsSetBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("goodsSetBtn.BackgroundImage")));
this.goodsSetBtn.EnableGroup = false;
this.goodsSetBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.goodsSetBtn.FlatAppearance.BorderSize = 0;
this.goodsSetBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.goodsSetBtn.Font = new System.Drawing.Font("宋体", 15F);
this.goodsSetBtn.ForeColor = System.Drawing.Color.Black;
this.goodsSetBtn.Location = new System.Drawing.Point(551, 2);
this.goodsSetBtn.Name = "goodsSetBtn";
this.goodsSetBtn.PlaySound = false;
this.goodsSetBtn.SelfControlEnable = false;
this.goodsSetBtn.Size = new System.Drawing.Size(111, 62);
this.goodsSetBtn.SoundType = WinFormControl.SoundType.Click;
this.goodsSetBtn.TabIndex = 18;
this.goodsSetBtn.Text = "产品设置";
this.goodsSetBtn.UseVisualStyleBackColor = true;
this.goodsSetBtn.WithStataHode = false;
this.goodsSetBtn.Click += new System.EventHandler(this.goodsSetBtn_Click);
//
// H_RowIndex
//
this.H_RowIndex.DataPropertyName = "RowIndex";
this.H_RowIndex.HeaderText = "序号";
this.H_RowIndex.Name = "H_RowIndex";
this.H_RowIndex.ReadOnly = true;
this.H_RowIndex.Width = 80;
//
// splitContainer1
//
this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
@ -273,15 +200,15 @@
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.barPrintCheck);
this.splitContainer1.Panel1.Controls.Add(this.closeBtn);
this.splitContainer1.Panel1.Controls.Add(this.uWeightControl1);
this.splitContainer1.Panel1.Controls.Add(this.barPrintCheck);
this.splitContainer1.Panel1.Controls.Add(this.uTimerLabel1);
this.splitContainer1.Panel1.Controls.Add(this.productBatchSelect);
this.splitContainer1.Panel1.Controls.Add(this.workUnitSelect);
this.splitContainer1.Panel1.Controls.Add(this.uLabel1);
this.splitContainer1.Panel1.Controls.Add(this.uLabel2);
this.splitContainer1.Panel1.Controls.Add(this.netStateWatch1);
this.splitContainer1.Panel1.Controls.Add(this.uWeightControl1);
//
// splitContainer1.Panel2
//
@ -294,36 +221,13 @@
//
this.barPrintCheck.AutoSize = true;
this.barPrintCheck.Font = new System.Drawing.Font("宋体", 15F);
this.barPrintCheck.Location = new System.Drawing.Point(359, 50);
this.barPrintCheck.Location = new System.Drawing.Point(292, 50);
this.barPrintCheck.Name = "barPrintCheck";
this.barPrintCheck.Size = new System.Drawing.Size(108, 24);
this.barPrintCheck.TabIndex = 16;
this.barPrintCheck.Text = "启用打码";
this.barPrintCheck.UseVisualStyleBackColor = true;
//
// closeBtn
//
this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.closeBtn.AsClicked = false;
this.closeBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("closeBtn.BackgroundImage")));
this.closeBtn.EnableGroup = false;
this.closeBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.closeBtn.FlatAppearance.BorderSize = 0;
this.closeBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.ForeColor = System.Drawing.Color.Black;
this.closeBtn.Location = new System.Drawing.Point(1106, 7);
this.closeBtn.Name = "closeBtn";
this.closeBtn.PlaySound = false;
this.closeBtn.SelfControlEnable = false;
this.closeBtn.Size = new System.Drawing.Size(111, 34);
this.closeBtn.SoundType = WinFormControl.SoundType.Click;
this.closeBtn.TabIndex = 15;
this.closeBtn.Text = "关 闭";
this.closeBtn.UseVisualStyleBackColor = true;
this.closeBtn.WithStataHode = false;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// uTimerLabel1
//
this.uTimerLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -384,20 +288,11 @@
// netStateWatch1
//
this.netStateWatch1.BackColor = System.Drawing.Color.Transparent;
this.netStateWatch1.Location = new System.Drawing.Point(359, 2);
this.netStateWatch1.Location = new System.Drawing.Point(292, 2);
this.netStateWatch1.Name = "netStateWatch1";
this.netStateWatch1.Size = new System.Drawing.Size(90, 39);
this.netStateWatch1.TabIndex = 1;
//
// uWeightControl1
//
this.uWeightControl1.BackColor = System.Drawing.Color.Transparent;
this.uWeightControl1.Location = new System.Drawing.Point(3, 3);
this.uWeightControl1.Name = "uWeightControl1";
this.uWeightControl1.Size = new System.Drawing.Size(349, 78);
this.uWeightControl1.TabIndex = 0;
this.uWeightControl1.WeightFalg = null;
//
// splitContainer2
//
this.splitContainer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
@ -408,98 +303,51 @@
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.submitBtn);
this.splitContainer2.Panel1.Controls.Add(this.deleteBtn);
this.splitContainer2.Panel1.Controls.Add(this.rePrintBtn);
this.splitContainer2.Panel1.Controls.Add(this.groupBox1);
this.splitContainer2.Panel1.Controls.Add(this.groupBox2);
this.splitContainer2.Panel1.Controls.Add(this.goodsSetBtn);
this.splitContainer2.Panel1.Controls.Add(this.flowLayoutPanel2);
this.splitContainer2.Panel1.Controls.Add(this.flowLayoutPanel1);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.flowLayoutPanel2);
this.splitContainer2.Panel2.Controls.Add(this.goodsSetBtn);
this.splitContainer2.Panel2.Controls.Add(this.flowLayoutPanel1);
this.splitContainer2.Size = new System.Drawing.Size(1224, 509);
this.splitContainer2.SplitterDistance = 552;
this.splitContainer2.Panel2.Controls.Add(this.rePrintBtn);
this.splitContainer2.Panel2.Controls.Add(this.groupBox1);
this.splitContainer2.Panel2.Controls.Add(this.groupBox2);
this.splitContainer2.Size = new System.Drawing.Size(1226, 511);
this.splitContainer2.SplitterDistance = 761;
this.splitContainer2.TabIndex = 0;
//
// submitBtn
//
this.submitBtn.AsClicked = false;
this.submitBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("submitBtn.BackgroundImage")));
this.submitBtn.EnableGroup = false;
this.submitBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.submitBtn.FlatAppearance.BorderSize = 0;
this.submitBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.submitBtn.Font = new System.Drawing.Font("宋体", 15F);
this.submitBtn.ForeColor = System.Drawing.Color.Black;
this.submitBtn.Location = new System.Drawing.Point(249, 134);
this.submitBtn.Name = "submitBtn";
this.submitBtn.PlaySound = false;
this.submitBtn.SelfControlEnable = false;
this.submitBtn.Size = new System.Drawing.Size(111, 34);
this.submitBtn.SoundType = WinFormControl.SoundType.Click;
this.submitBtn.TabIndex = 23;
this.submitBtn.Text = "提交";
this.submitBtn.UseVisualStyleBackColor = true;
this.submitBtn.WithStataHode = false;
this.submitBtn.Click += new System.EventHandler(this.submitBtn_Click);
//
// deleteBtn
//
this.deleteBtn.AsClicked = false;
this.deleteBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("deleteBtn.BackgroundImage")));
this.deleteBtn.EnableGroup = false;
this.deleteBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.deleteBtn.FlatAppearance.BorderSize = 0;
this.deleteBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.deleteBtn.Font = new System.Drawing.Font("宋体", 15F);
this.deleteBtn.ForeColor = System.Drawing.Color.Black;
this.deleteBtn.Location = new System.Drawing.Point(129, 134);
this.deleteBtn.Name = "deleteBtn";
this.deleteBtn.PlaySound = false;
this.deleteBtn.SelfControlEnable = false;
this.deleteBtn.Size = new System.Drawing.Size(111, 34);
this.deleteBtn.SoundType = WinFormControl.SoundType.Click;
this.deleteBtn.TabIndex = 22;
this.deleteBtn.Text = "删除";
this.deleteBtn.UseVisualStyleBackColor = true;
this.deleteBtn.WithStataHode = false;
this.deleteBtn.Click += new System.EventHandler(this.deleteBtn_Click);
// flowLayoutPanel2
//
// rePrintBtn
this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flowLayoutPanel2.AutoScroll = true;
this.flowLayoutPanel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanel2.Location = new System.Drawing.Point(-1, 75);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(757, 434);
this.flowLayoutPanel2.TabIndex = 24;
//
this.rePrintBtn.AsClicked = false;
this.rePrintBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("rePrintBtn.BackgroundImage")));
this.rePrintBtn.EnableGroup = false;
this.rePrintBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214)))));
this.rePrintBtn.FlatAppearance.BorderSize = 0;
this.rePrintBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.rePrintBtn.Font = new System.Drawing.Font("宋体", 15F);
this.rePrintBtn.ForeColor = System.Drawing.Color.Black;
this.rePrintBtn.Location = new System.Drawing.Point(9, 134);
this.rePrintBtn.Name = "rePrintBtn";
this.rePrintBtn.PlaySound = false;
this.rePrintBtn.SelfControlEnable = false;
this.rePrintBtn.Size = new System.Drawing.Size(111, 34);
this.rePrintBtn.SoundType = WinFormControl.SoundType.Click;
this.rePrintBtn.TabIndex = 21;
this.rePrintBtn.Text = "补打";
this.rePrintBtn.UseVisualStyleBackColor = true;
this.rePrintBtn.WithStataHode = false;
this.rePrintBtn.Click += new System.EventHandler(this.rePrintBtn_Click);
// flowLayoutPanel1
//
this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanel1.Location = new System.Drawing.Point(-1, -1);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(640, 70);
this.flowLayoutPanel1.TabIndex = 22;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox1.Controls.Add(this.historyDataGrid);
this.groupBox1.Controls.Add(this.uLabel3);
this.groupBox1.Location = new System.Drawing.Point(10, 174);
this.groupBox1.Location = new System.Drawing.Point(8, 169);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(5);
this.groupBox1.Size = new System.Drawing.Size(531, 330);
this.groupBox1.Size = new System.Drawing.Size(447, 332);
this.groupBox1.TabIndex = 5;
this.groupBox1.TabStop = false;
//
@ -509,15 +357,15 @@
this.historyDataGrid.AllowUserToDeleteRows = false;
this.historyDataGrid.AllowUserToResizeColumns = false;
this.historyDataGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle28.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle28;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
this.historyDataGrid.BackgroundColor = System.Drawing.Color.White;
this.historyDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle29.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle29.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle29.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle29;
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle8.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
this.historyDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.historyDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.H_ID,
@ -531,12 +379,12 @@
this.historyDataGrid.Name = "historyDataGrid";
this.historyDataGrid.ReadOnly = true;
this.historyDataGrid.RowHeadersVisible = false;
dataGridViewCellStyle30.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle30.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle30;
dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle10;
this.historyDataGrid.RowTemplate.Height = 23;
this.historyDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.historyDataGrid.Size = new System.Drawing.Size(521, 306);
this.historyDataGrid.Size = new System.Drawing.Size(437, 308);
this.historyDataGrid.TabIndex = 2;
//
// H_ID
@ -547,13 +395,91 @@
this.H_ID.ReadOnly = true;
this.H_ID.Visible = false;
//
// flowLayoutPanel1
// H_RowIndex
//
this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanel1.Location = new System.Drawing.Point(-3, -1);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(547, 70);
this.flowLayoutPanel1.TabIndex = 0;
this.H_RowIndex.DataPropertyName = "RowIndex";
this.H_RowIndex.HeaderText = "序号";
this.H_RowIndex.Name = "H_RowIndex";
this.H_RowIndex.ReadOnly = true;
this.H_RowIndex.Width = 80;
//
// H_BarCode
//
this.H_BarCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.H_BarCode.DataPropertyName = "ShortCode";
this.H_BarCode.HeaderText = "条码";
this.H_BarCode.Name = "H_BarCode";
this.H_BarCode.ReadOnly = true;
//
// H_Goods_Name
//
this.H_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.H_Goods_Name.DataPropertyName = "Goods_Name";
this.H_Goods_Name.HeaderText = "产品";
this.H_Goods_Name.Name = "H_Goods_Name";
this.H_Goods_Name.ReadOnly = true;
//
// H_Weight
//
this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle9.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle9;
this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
//
// closeBtn
//
this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.closeBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25)))));
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.ForeColor = System.Drawing.Color.White;
this.closeBtn.Location = new System.Drawing.Point(1109, 7);
this.closeBtn.Name = "closeBtn";
this.closeBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.closeBtn.Size = new System.Drawing.Size(111, 41);
this.closeBtn.TabIndex = 18;
this.closeBtn.Text = "关闭";
this.closeBtn.UseVisualStyleBackColor = false;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// uWeightControl1
//
this.uWeightControl1.BackColor = System.Drawing.Color.Transparent;
this.uWeightControl1.Location = new System.Drawing.Point(12, 7);
this.uWeightControl1.Name = "uWeightControl1";
this.uWeightControl1.Size = new System.Drawing.Size(262, 74);
this.uWeightControl1.TabIndex = 17;
this.uWeightControl1.WeightFalg = null;
//
// goodsSetBtn
//
this.goodsSetBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.goodsSetBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
this.goodsSetBtn.Font = new System.Drawing.Font("宋体", 15F);
this.goodsSetBtn.ForeColor = System.Drawing.Color.White;
this.goodsSetBtn.Location = new System.Drawing.Point(645, 3);
this.goodsSetBtn.Name = "goodsSetBtn";
this.goodsSetBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.goodsSetBtn.Size = new System.Drawing.Size(111, 62);
this.goodsSetBtn.TabIndex = 19;
this.goodsSetBtn.Text = "产品设置";
this.goodsSetBtn.UseVisualStyleBackColor = false;
this.goodsSetBtn.Click += new System.EventHandler(this.goodsSetBtn_Click);
//
// rePrintBtn
//
this.rePrintBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(144)))), ((int)(((byte)(98)))), ((int)(((byte)(222)))));
this.rePrintBtn.Font = new System.Drawing.Font("宋体", 15F);
this.rePrintBtn.ForeColor = System.Drawing.Color.White;
this.rePrintBtn.Location = new System.Drawing.Point(338, 129);
this.rePrintBtn.Name = "rePrintBtn";
this.rePrintBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.rePrintBtn.Size = new System.Drawing.Size(111, 41);
this.rePrintBtn.TabIndex = 22;
this.rePrintBtn.Text = "补打";
this.rePrintBtn.UseVisualStyleBackColor = false;
this.rePrintBtn.Click += new System.EventHandler(this.rePrintBtn_Click);
//
// SegmentProductionAutoForm
//
@ -586,8 +512,6 @@
#endregion
private System.Windows.Forms.DataGridViewTextBoxColumn H_BarCode;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight;
private WinFormControl.ULabel uLabel3;
private System.Windows.Forms.GroupBox groupBox2;
private WinFormControl.UDataGridView taskDataGrid;
@ -596,27 +520,27 @@
private System.Windows.Forms.DataGridViewTextBoxColumn T_Done;
private System.Windows.Forms.DataGridViewTextBoxColumn T_Last;
private WinFormControl.ULabel GoodsLabel;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Goods_Name;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private WinFormControl.UButton goodsSetBtn;
private System.Windows.Forms.DataGridViewTextBoxColumn H_RowIndex;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.CheckBox barPrintCheck;
private WinFormControl.UButton closeBtn;
private WinFormControl.UTimerLabel uTimerLabel1;
private System.Windows.Forms.ComboBox productBatchSelect;
private System.Windows.Forms.ComboBox workUnitSelect;
private WinFormControl.ULabel uLabel1;
private WinFormControl.ULabel uLabel2;
private WinFormControl.NetStateWatch netStateWatch1;
private WinFormControl.UWeightControl uWeightControl1;
private System.Windows.Forms.SplitContainer splitContainer2;
private WinFormControl.UButton submitBtn;
private WinFormControl.UButton deleteBtn;
private WinFormControl.UButton rePrintBtn;
private System.Windows.Forms.GroupBox groupBox1;
private WinFormControl.UDataGridView historyDataGrid;
private System.Windows.Forms.DataGridViewTextBoxColumn H_ID;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.DataGridViewTextBoxColumn H_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn H_RowIndex;
private System.Windows.Forms.DataGridViewTextBoxColumn H_BarCode;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Goods_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight;
private Controls.WeightControl uWeightControl1;
private Controls.ColorButton rePrintBtn;
private Controls.ColorButton closeBtn;
private Controls.ColorButton goodsSetBtn;
}
}

+ 7
- 40
ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs View File

@ -16,6 +16,7 @@ using System.Windows.Forms;
using WinFormControl;
using ButcherFactory.Utils;
using NotAuto = ButcherFactory.SegmentProduction_;
using ButcherFactory.Controls;
namespace ButcherFactory.SegmentProductionAuto_
{
@ -33,7 +34,6 @@ namespace ButcherFactory.SegmentProductionAuto_
Thread uploadData;
BindingList<SegmentProduction> historyList;
BindingList<SegmentProduction> unSubmitList;
Dictionary<string, List<ClientGoodsSet_Detail>> goodsSetDic;
long? workUnitID;
long? batchID;
@ -108,20 +108,21 @@ namespace ButcherFactory.SegmentProductionAuto_
flowLayoutPanel2.Controls.Clear();
foreach (var item in goodsSetDic)
{
var btn = new UButton() { Width = 100, Height = 62, Text = item.Key, Font = new Font("宋体", 15), Margin = new Padding(15, 3, 15, 0), WithStataHode = true, EnableGroup = true };
var btn = new ColorButton() { Width = 100, Height = 62, Text = item.Key, Font = new Font("宋体", 15), Margin = new Padding(15, 3, 15, 0), EnableGroup = true };
btn.Click += GroupGoodsSetClick;
flowLayoutPanel1.Controls.Add(btn);
}
}
Color goodsColor = Color.FromArgb(250, 120, 24);
void GroupGoodsSetClick(object sender, EventArgs e)
{
flowLayoutPanel2.Controls.Clear();
var groupBtn = sender as UButton;
var groupBtn = sender as ColorButton;
var arr = goodsSetDic[groupBtn.Text];
foreach (var item in arr)
{
var btn = new UButton() { Width = 127, Height = 75, Text = item.Goods_Name, Tag = item, Font = new Font("宋体", 15), Margin = new Padding(20, 10, 20, 35), PlaySound = true };
var btn = new ColorButton() { Width = 127, Height = 75, Text = item.Goods_Name, Tag = item, Font = new Font("宋体", 15), BackColor = goodsColor, Margin = new Padding(20, 10, 20, 35), PlaySound = true };
btn.Click += GoodsBtnClick;
flowLayoutPanel2.Controls.Add(btn);
}
@ -131,7 +132,7 @@ namespace ButcherFactory.SegmentProductionAuto_
{
if (batchID == null)
throw new Exception("请先选择批次");
var btn = sender as UButton;
var btn = sender as ColorButton;
var detail = btn.Tag as ClientGoodsSet_Detail;
var weight = uWeightControl1.Weight;
if (weight == 0)
@ -146,7 +147,6 @@ namespace ButcherFactory.SegmentProductionAuto_
entity.Goods_Name = detail.Goods_Name;
entity.Goods_Spec = detail.Goods_Spec;
GoodsLabel.Text = entity.Goods_Name;
unSubmitList.Insert(0, entity);
historyList.Insert(0, entity);
if (historyList.Count > 100)
historyList.RemoveAt(100);
@ -158,15 +158,11 @@ namespace ButcherFactory.SegmentProductionAuto_
void BindGrid()
{
unSubmitList = SegmentProductionBL.GetListByState(false);
historyList = SegmentProductionBL.GetListByState(true);
foreach (var item in unSubmitList)
historyList.Insert(0, item);
historyDataGrid.DataSource = historyList;
historyDataGrid.Refresh();
var first = unSubmitList.FirstOrDefault(x => x.GroupID == null && x.TrunOutID == null);
var first = historyList.FirstOrDefault();
if (first != null)
GoodsLabel.Text = first.Goods_Name;
}
@ -207,34 +203,5 @@ namespace ButcherFactory.SegmentProductionAuto_
NotAuto.SegmentProductionPrint.Print(item, batchDate);
}
}
private void deleteBtn_Click(object sender, EventArgs e)
{
if (historyDataGrid.CurrentRow == null)
throw new Exception("请先选中要删除的记录");
var id = (long)historyDataGrid.CurrentRow.Cells[0].Value;
var first = unSubmitList.FirstOrDefault(x => x.ID == id && !x.Submited);
if (first == null)
throw new Exception("已提交,无法删除");
if (MessageBox.Show(string.Format("确认删除{0} {1}的记录?", first.RowIndex, first.Goods_Name), "删除确认", MessageBoxButtons.OKCancel) == DialogResult.OK)
{
SegmentProductionBL.Delete(id);
unSubmitList.Remove(first);
historyList.Remove(first);
historyDataGrid.Refresh();
}
}
private void submitBtn_Click(object sender, EventArgs e)
{
var arrs = unSubmitList.Where(x => x.GroupID.HasValue).ToList();
if (arrs.Any())
{
SegmentProductionBL.BatchUpdate(arrs.Select(x => x.ID), new Tuple<string, object>("Submited", true));
foreach (var item in arrs)
unSubmitList.Remove(item);
}
UMessageBox.Show("已提交");
}
}
}

+ 3
- 44
ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.resx View File

@ -117,54 +117,13 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="H_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="T_Last.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="goodsSetBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="closeBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="submitBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="deleteBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<data name="rePrintBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK
goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg
KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII=
</value>
</data>
<metadata name="H_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

+ 633
- 0
ButcherFactory.Form/SegmentStockUp_/SegmentStockUpForm.Designer.cs View File

@ -0,0 +1,633 @@
namespace ButcherFactory.SegmentStockUp_
{
partial class SegmentStockUpForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
this.uScanPanel1 = new WinFormControl.UScanPanel();
this.label1 = new System.Windows.Forms.Label();
this.dataPicker = new System.Windows.Forms.Label();
this.panel4 = new System.Windows.Forms.Panel();
this.goodsLbl = new System.Windows.Forms.Label();
this.driveLineLbl = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.dhNumberLbl = new System.Windows.Forms.Label();
this.panel5 = new System.Windows.Forms.Panel();
this.mainGridView = new WinFormControl.UDataGridView();
this.D_DeliverGoodsLine_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Goods_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Date = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Finishd = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_DeliverGoodsLine_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Goods_Spec = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_SecondNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_UnitNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_SSecondNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_SUnitNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label12 = new System.Windows.Forms.Label();
this.panel6 = new System.Windows.Forms.Panel();
this.label13 = new System.Windows.Forms.Label();
this.detailGridView = new WinFormControl.UDataGridView();
this.B_DeliverGoodsLine_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.B_ShortCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.B_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.B_SaleOutStoreID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.B_SecondNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.B_UnitNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dhUnitNumLbl = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.bhUnitNumLbl = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.bhNumberLbl = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.panel7 = new System.Windows.Forms.Panel();
this.refresh = new ButcherFactory.Controls.ColorButton();
this.roundPanel1.SuspendLayout();
this.panel5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.mainGridView)).BeginInit();
this.panel6.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.detailGridView)).BeginInit();
this.panel7.SuspendLayout();
this.SuspendLayout();
//
// roundPanel1
//
this.roundPanel1.Controls.Add(this.panel7);
this.roundPanel1.Controls.Add(this.bhUnitNumLbl);
this.roundPanel1.Controls.Add(this.label9);
this.roundPanel1.Controls.Add(this.bhNumberLbl);
this.roundPanel1.Controls.Add(this.label11);
this.roundPanel1.Controls.Add(this.dhUnitNumLbl);
this.roundPanel1.Controls.Add(this.label7);
this.roundPanel1.Controls.Add(this.panel6);
this.roundPanel1.Controls.Add(this.panel5);
this.roundPanel1.Controls.Add(this.dhNumberLbl);
this.roundPanel1.Controls.Add(this.label4);
this.roundPanel1.Controls.Add(this.driveLineLbl);
this.roundPanel1.Controls.Add(this.goodsLbl);
this.roundPanel1.Controls.Add(this.panel4);
this.roundPanel1.Controls.Add(this.dataPicker);
this.roundPanel1.Controls.Add(this.uScanPanel1);
this.roundPanel1.Controls.Add(this.label1);
//
// uScanPanel1
//
this.uScanPanel1.BackColor = System.Drawing.Color.Transparent;
this.uScanPanel1.Location = new System.Drawing.Point(271, 14);
this.uScanPanel1.Name = "uScanPanel1";
this.uScanPanel1.Size = new System.Drawing.Size(303, 32);
this.uScanPanel1.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 14F);
this.label1.Location = new System.Drawing.Point(16, 19);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(85, 19);
this.label1.TabIndex = 1;
this.label1.Text = "发货日期";
//
// dataPicker
//
this.dataPicker.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.dataPicker.Font = new System.Drawing.Font("宋体", 14F);
this.dataPicker.Location = new System.Drawing.Point(107, 14);
this.dataPicker.Name = "dataPicker";
this.dataPicker.Size = new System.Drawing.Size(120, 30);
this.dataPicker.TabIndex = 2;
this.dataPicker.Text = "2018-08-08";
this.dataPicker.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.dataPicker.Click += new System.EventHandler(this.dataPicker_Click);
//
// panel4
//
this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(243)))), ((int)(((byte)(243)))));
this.panel4.Location = new System.Drawing.Point(7, 53);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(1174, 1);
this.panel4.TabIndex = 3;
//
// goodsLbl
//
this.goodsLbl.AutoSize = true;
this.goodsLbl.Font = new System.Drawing.Font("宋体", 14F);
this.goodsLbl.ForeColor = System.Drawing.Color.Red;
this.goodsLbl.Location = new System.Drawing.Point(273, 63);
this.goodsLbl.Name = "goodsLbl";
this.goodsLbl.Size = new System.Drawing.Size(85, 19);
this.goodsLbl.TabIndex = 4;
this.goodsLbl.Text = "存货名称";
//
// driveLineLbl
//
this.driveLineLbl.AutoSize = true;
this.driveLineLbl.Font = new System.Drawing.Font("宋体", 14F);
this.driveLineLbl.ForeColor = System.Drawing.Color.Red;
this.driveLineLbl.Location = new System.Drawing.Point(16, 63);
this.driveLineLbl.Name = "driveLineLbl";
this.driveLineLbl.Size = new System.Drawing.Size(85, 19);
this.driveLineLbl.TabIndex = 4;
this.driveLineLbl.Text = "送货线路";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("宋体", 14F);
this.label4.Location = new System.Drawing.Point(16, 100);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(85, 19);
this.label4.TabIndex = 5;
this.label4.Text = "订货数量";
//
// dhNumberLbl
//
this.dhNumberLbl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.dhNumberLbl.Font = new System.Drawing.Font("宋体", 14F);
this.dhNumberLbl.ForeColor = System.Drawing.Color.Red;
this.dhNumberLbl.Location = new System.Drawing.Point(107, 94);
this.dhNumberLbl.Name = "dhNumberLbl";
this.dhNumberLbl.Size = new System.Drawing.Size(120, 30);
this.dhNumberLbl.TabIndex = 5;
this.dhNumberLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// panel5
//
this.panel5.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(247)))), ((int)(((byte)(247)))));
this.panel5.Controls.Add(this.mainGridView);
this.panel5.Controls.Add(this.label12);
this.panel5.Location = new System.Drawing.Point(7, 142);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(567, 362);
this.panel5.TabIndex = 12;
//
// mainGridView
//
this.mainGridView.AllowUserToAddRows = false;
this.mainGridView.AllowUserToDeleteRows = false;
this.mainGridView.AllowUserToResizeColumns = false;
this.mainGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(238)))), ((int)(((byte)(255)))));
this.mainGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
this.mainGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.mainGridView.BackgroundColor = System.Drawing.Color.White;
this.mainGridView.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.mainGridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.mainGridView.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 10F);
dataGridViewCellStyle7.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.mainGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
this.mainGridView.ColumnHeadersHeight = 30;
this.mainGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.mainGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.D_DeliverGoodsLine_ID,
this.D_Goods_ID,
this.D_Date,
this.D_Finishd,
this.D_DeliverGoodsLine_Name,
this.D_Goods_Name,
this.D_Goods_Spec,
this.D_SecondNumber,
this.D_UnitNum,
this.D_SSecondNumber,
this.D_SUnitNum});
this.mainGridView.EnableHeadersVisualStyles = false;
this.mainGridView.Location = new System.Drawing.Point(11, 31);
this.mainGridView.MultiSelect = false;
this.mainGridView.Name = "mainGridView";
this.mainGridView.ReadOnly = true;
this.mainGridView.RowHeadersVisible = false;
dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(243)))), ((int)(((byte)(250)))));
dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
this.mainGridView.RowsDefaultCellStyle = dataGridViewCellStyle12;
this.mainGridView.RowTemplate.Height = 40;
this.mainGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.mainGridView.Size = new System.Drawing.Size(545, 320);
this.mainGridView.TabIndex = 7;
this.mainGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.mainGridView_CellClick);
this.mainGridView.RowPrePaint += new System.Windows.Forms.DataGridViewRowPrePaintEventHandler(this.mainGridView_RowPrePaint);
//
// D_DeliverGoodsLine_ID
//
this.D_DeliverGoodsLine_ID.DataPropertyName = "DeliverGoodsLine_ID";
this.D_DeliverGoodsLine_ID.HeaderText = "DeliverGoodsLine_ID";
this.D_DeliverGoodsLine_ID.Name = "D_DeliverGoodsLine_ID";
this.D_DeliverGoodsLine_ID.ReadOnly = true;
this.D_DeliverGoodsLine_ID.Visible = false;
//
// D_Goods_ID
//
this.D_Goods_ID.HeaderText = "Goods_ID";
this.D_Goods_ID.Name = "D_Goods_ID";
this.D_Goods_ID.ReadOnly = true;
this.D_Goods_ID.Visible = false;
//
// D_Date
//
this.D_Date.HeaderText = "Date";
this.D_Date.Name = "D_Date";
this.D_Date.ReadOnly = true;
this.D_Date.Visible = false;
//
// D_Finishd
//
this.D_Finishd.DataPropertyName = "Finishd";
this.D_Finishd.HeaderText = "Finishd";
this.D_Finishd.Name = "D_Finishd";
this.D_Finishd.ReadOnly = true;
this.D_Finishd.Visible = false;
//
// D_DeliverGoodsLine_Name
//
this.D_DeliverGoodsLine_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.D_DeliverGoodsLine_Name.DataPropertyName = "DeliverGoodsLine_Name";
this.D_DeliverGoodsLine_Name.HeaderText = "线路名称";
this.D_DeliverGoodsLine_Name.Name = "D_DeliverGoodsLine_Name";
this.D_DeliverGoodsLine_Name.ReadOnly = true;
//
// D_Goods_Name
//
this.D_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.D_Goods_Name.DataPropertyName = "Goods_Name";
this.D_Goods_Name.HeaderText = "产品名称";
this.D_Goods_Name.MinimumWidth = 100;
this.D_Goods_Name.Name = "D_Goods_Name";
this.D_Goods_Name.ReadOnly = true;
//
// D_Goods_Spec
//
this.D_Goods_Spec.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.D_Goods_Spec.DataPropertyName = "Goods_Spec";
this.D_Goods_Spec.HeaderText = "规格";
this.D_Goods_Spec.MinimumWidth = 90;
this.D_Goods_Spec.Name = "D_Goods_Spec";
this.D_Goods_Spec.ReadOnly = true;
this.D_Goods_Spec.Width = 90;
//
// D_SecondNumber
//
this.D_SecondNumber.DataPropertyName = "SecondNumber";
dataGridViewCellStyle8.Format = "#0.######";
this.D_SecondNumber.DefaultCellStyle = dataGridViewCellStyle8;
this.D_SecondNumber.HeaderText = "订货数量";
this.D_SecondNumber.Name = "D_SecondNumber";
this.D_SecondNumber.ReadOnly = true;
//
// D_UnitNum
//
this.D_UnitNum.DataPropertyName = "UnitNum";
dataGridViewCellStyle9.Format = "#0.######";
this.D_UnitNum.DefaultCellStyle = dataGridViewCellStyle9;
this.D_UnitNum.HeaderText = "订货重量";
this.D_UnitNum.Name = "D_UnitNum";
this.D_UnitNum.ReadOnly = true;
//
// D_SSecondNumber
//
this.D_SSecondNumber.DataPropertyName = "SSecondNumber";
dataGridViewCellStyle10.Format = "#0.######";
this.D_SSecondNumber.DefaultCellStyle = dataGridViewCellStyle10;
this.D_SSecondNumber.HeaderText = "备货数量";
this.D_SSecondNumber.Name = "D_SSecondNumber";
this.D_SSecondNumber.ReadOnly = true;
//
// D_SUnitNum
//
this.D_SUnitNum.DataPropertyName = "SUnitNum";
dataGridViewCellStyle11.Format = "#0.######";
this.D_SUnitNum.DefaultCellStyle = dataGridViewCellStyle11;
this.D_SUnitNum.HeaderText = "备货重量";
this.D_SUnitNum.Name = "D_SUnitNum";
this.D_SUnitNum.ReadOnly = true;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Font = new System.Drawing.Font("宋体", 10F);
this.label12.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(99)))), ((int)(((byte)(219)))));
this.label12.Location = new System.Drawing.Point(14, 10);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(77, 14);
this.label12.TabIndex = 6;
this.label12.Text = "销售订货:";
//
// panel6
//
this.panel6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(247)))), ((int)(((byte)(247)))));
this.panel6.Controls.Add(this.label13);
this.panel6.Controls.Add(this.detailGridView);
this.panel6.Location = new System.Drawing.Point(580, 142);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(600, 362);
this.panel6.TabIndex = 13;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Font = new System.Drawing.Font("宋体", 10F);
this.label13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(126)))), ((int)(((byte)(51)))));
this.label13.Location = new System.Drawing.Point(13, 10);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(77, 14);
this.label13.TabIndex = 7;
this.label13.Text = "销售订货:";
//
// detailGridView
//
this.detailGridView.AllowUserToAddRows = false;
this.detailGridView.AllowUserToDeleteRows = false;
this.detailGridView.AllowUserToResizeColumns = false;
this.detailGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(228)))), ((int)(((byte)(203)))));
this.detailGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.detailGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.detailGridView.BackgroundColor = System.Drawing.Color.White;
this.detailGridView.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.detailGridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.detailGridView.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(148)))), ((int)(((byte)(74)))));
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 10F);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.detailGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.detailGridView.ColumnHeadersHeight = 30;
this.detailGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.detailGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.B_DeliverGoodsLine_Name,
this.B_ShortCode,
this.B_Goods_Name,
this.B_SaleOutStoreID,
this.B_SecondNumber,
this.B_UnitNumber});
this.detailGridView.EnableHeadersVisualStyles = false;
this.detailGridView.Location = new System.Drawing.Point(10, 31);
this.detailGridView.MultiSelect = false;
this.detailGridView.Name = "detailGridView";
this.detailGridView.ReadOnly = true;
this.detailGridView.RowHeadersVisible = false;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(247)))), ((int)(((byte)(240)))));
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 10F);
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(148)))), ((int)(((byte)(74)))));
this.detailGridView.RowsDefaultCellStyle = dataGridViewCellStyle5;
this.detailGridView.RowTemplate.Height = 40;
this.detailGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.detailGridView.Size = new System.Drawing.Size(580, 320);
this.detailGridView.TabIndex = 6;
//
// B_DeliverGoodsLine_Name
//
this.B_DeliverGoodsLine_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.B_DeliverGoodsLine_Name.DataPropertyName = "DeliverGoodsLine_Name";
this.B_DeliverGoodsLine_Name.HeaderText = "线路名称";
this.B_DeliverGoodsLine_Name.Name = "B_DeliverGoodsLine_Name";
this.B_DeliverGoodsLine_Name.ReadOnly = true;
//
// B_ShortCode
//
this.B_ShortCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.B_ShortCode.DataPropertyName = "ShortCode";
this.B_ShortCode.HeaderText = "条码";
this.B_ShortCode.MinimumWidth = 90;
this.B_ShortCode.Name = "B_ShortCode";
this.B_ShortCode.ReadOnly = true;
this.B_ShortCode.Width = 90;
//
// B_Goods_Name
//
this.B_Goods_Name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.B_Goods_Name.DataPropertyName = "Goods_Name";
this.B_Goods_Name.HeaderText = "产品名称";
this.B_Goods_Name.MinimumWidth = 100;
this.B_Goods_Name.Name = "B_Goods_Name";
this.B_Goods_Name.ReadOnly = true;
//
// B_SaleOutStoreID
//
this.B_SaleOutStoreID.DataPropertyName = "SaleOutStoreID";
this.B_SaleOutStoreID.HeaderText = "销售出库单";
this.B_SaleOutStoreID.Name = "B_SaleOutStoreID";
this.B_SaleOutStoreID.ReadOnly = true;
//
// B_SecondNumber
//
this.B_SecondNumber.DataPropertyName = "SecondNumber";
dataGridViewCellStyle3.Format = "#0.######";
this.B_SecondNumber.DefaultCellStyle = dataGridViewCellStyle3;
this.B_SecondNumber.HeaderText = "数量";
this.B_SecondNumber.Name = "B_SecondNumber";
this.B_SecondNumber.ReadOnly = true;
this.B_SecondNumber.Width = 80;
//
// B_UnitNumber
//
this.B_UnitNumber.DataPropertyName = "UnitNumber";
dataGridViewCellStyle4.Format = "#0.######";
this.B_UnitNumber.DefaultCellStyle = dataGridViewCellStyle4;
this.B_UnitNumber.HeaderText = "重量";
this.B_UnitNumber.Name = "B_UnitNumber";
this.B_UnitNumber.ReadOnly = true;
this.B_UnitNumber.Width = 80;
//
// dhUnitNumLbl
//
this.dhUnitNumLbl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.dhUnitNumLbl.Font = new System.Drawing.Font("宋体", 14F);
this.dhUnitNumLbl.ForeColor = System.Drawing.Color.Red;
this.dhUnitNumLbl.Location = new System.Drawing.Point(366, 94);
this.dhUnitNumLbl.Name = "dhUnitNumLbl";
this.dhUnitNumLbl.Size = new System.Drawing.Size(120, 30);
this.dhUnitNumLbl.TabIndex = 14;
this.dhUnitNumLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("宋体", 14F);
this.label7.Location = new System.Drawing.Point(273, 100);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(85, 19);
this.label7.TabIndex = 15;
this.label7.Text = "订货重量";
//
// bhUnitNumLbl
//
this.bhUnitNumLbl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bhUnitNumLbl.Font = new System.Drawing.Font("宋体", 14F);
this.bhUnitNumLbl.ForeColor = System.Drawing.Color.Red;
this.bhUnitNumLbl.Location = new System.Drawing.Point(879, 94);
this.bhUnitNumLbl.Name = "bhUnitNumLbl";
this.bhUnitNumLbl.Size = new System.Drawing.Size(120, 30);
this.bhUnitNumLbl.TabIndex = 18;
this.bhUnitNumLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("宋体", 14F);
this.label9.Location = new System.Drawing.Point(786, 100);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(85, 19);
this.label9.TabIndex = 19;
this.label9.Text = "备货重量";
//
// bhNumberLbl
//
this.bhNumberLbl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.bhNumberLbl.Font = new System.Drawing.Font("宋体", 14F);
this.bhNumberLbl.ForeColor = System.Drawing.Color.Red;
this.bhNumberLbl.Location = new System.Drawing.Point(620, 94);
this.bhNumberLbl.Name = "bhNumberLbl";
this.bhNumberLbl.Size = new System.Drawing.Size(120, 30);
this.bhNumberLbl.TabIndex = 16;
this.bhNumberLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("宋体", 14F);
this.label11.Location = new System.Drawing.Point(529, 100);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(85, 19);
this.label11.TabIndex = 17;
this.label11.Text = "备货数量";
//
// panel7
//
this.panel7.Controls.Add(this.refresh);
this.panel7.Location = new System.Drawing.Point(824, 5);
this.panel7.Name = "panel7";
this.panel7.Size = new System.Drawing.Size(346, 44);
this.panel7.TabIndex = 20;
//
// refresh
//
this.refresh.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
this.refresh.ForeColor = System.Drawing.Color.White;
this.refresh.Location = new System.Drawing.Point(55, 4);
this.refresh.Name = "refresh";
this.refresh.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106)))));
this.refresh.Size = new System.Drawing.Size(75, 35);
this.refresh.TabIndex = 0;
this.refresh.Text = "刷新";
this.refresh.UseVisualStyleBackColor = false;
this.refresh.Click += new System.EventHandler(this.refresh_Click);
//
// SegmentStockUpForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1212, 600);
this.ImeMode = System.Windows.Forms.ImeMode.Disable;
this.KeyPreview = true;
this.Name = "SegmentStockUpForm";
this.Text = "销售备货";
this.roundPanel1.ResumeLayout(false);
this.roundPanel1.PerformLayout();
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.mainGridView)).EndInit();
this.panel6.ResumeLayout(false);
this.panel6.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.detailGridView)).EndInit();
this.panel7.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private WinFormControl.UScanPanel uScanPanel1;
private System.Windows.Forms.Label dataPicker;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label dhNumberLbl;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label driveLineLbl;
private System.Windows.Forms.Label goodsLbl;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Panel panel5;
private System.Windows.Forms.Panel panel6;
private System.Windows.Forms.Label label12;
private WinFormControl.UDataGridView mainGridView;
private System.Windows.Forms.Label label13;
private WinFormControl.UDataGridView detailGridView;
private System.Windows.Forms.Label bhUnitNumLbl;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label bhNumberLbl;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label dhUnitNumLbl;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Panel panel7;
private Controls.ColorButton refresh;
private System.Windows.Forms.DataGridViewTextBoxColumn D_DeliverGoodsLine_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Goods_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Date;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Finishd;
private System.Windows.Forms.DataGridViewTextBoxColumn D_DeliverGoodsLine_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Goods_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Goods_Spec;
private System.Windows.Forms.DataGridViewTextBoxColumn D_SecondNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn D_UnitNum;
private System.Windows.Forms.DataGridViewTextBoxColumn D_SSecondNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn D_SUnitNum;
private System.Windows.Forms.DataGridViewTextBoxColumn B_DeliverGoodsLine_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn B_ShortCode;
private System.Windows.Forms.DataGridViewTextBoxColumn B_Goods_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn B_SaleOutStoreID;
private System.Windows.Forms.DataGridViewTextBoxColumn B_SecondNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn B_UnitNumber;
}
}

+ 191
- 0
ButcherFactory.Form/SegmentStockUp_/SegmentStockUpForm.cs View File

@ -0,0 +1,191 @@
using ButcherFactory.BO;
using ButcherFactory.BO.LocalBL;
using ButcherFactory.BO.Utils;
using ButcherFactory.Controls;
using ButcherFactory.Dialogs;
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 ButcherFactory.SegmentStockUp_
{
public partial class SegmentStockUpForm : FormTemplate, IWithRoleForm
{
#region IWithRoleForm
public List<short> RoleName
{
get { return new List<short> { (short). }; }
}
public Form Generate()
{
return this;
}
#endregion
DateTime sendTime = DateTime.Today;
List<StockUpEntity> allMain;
List<StockUpDetail> allDetail;
BindingList<StockUpEntity> mainList;
BindingList<StockUpDetail> detailList;
public SegmentStockUpForm()
{
InitializeComponent();
allMain = new List<StockUpEntity>();
allDetail = new List<StockUpDetail>();
dataPicker.Text = sendTime.ToString("yyyy-MM-dd");
uScanPanel1.AfterScan += uScanPanel1_AfterScan;
}
void uScanPanel1_AfterScan()
{
var code = uScanPanel1.TextBox.Text;
if (string.IsNullOrEmpty(code))
return;
if (allDetail.Any(x => x.BarCode == code))
throw new Exception("条码已使用过");
if (SegmentStockUpBL.CheckBarCodeUsed(code))
throw new Exception("条码已使用过");
var info = SegmentStockUpBL.StockUpScan(code);
if (info == null)
{
MessageBox.Show("未发现该条码信息");
return;
}
if (!allMain.Any(x => x.Goods_Code == info.StringExt1 && x.Date == sendTime))
{
var gt = SegmentStockUpBL.GetStockUpEntity(sendTime, info.StringExt1);
allMain.AddRange(gt);
var first = gt.Where(x => !x.Finishd).OrderBy(x => x.SequenceNumber).FirstOrDefault();
if (first != null)
FillAllDetail(sendTime, first.DeliverGoodsLine_ID, first.Goods_ID);
else
{
MessageBox.Show("无待备货出库单");
return;
}
}
InsertDetail(info);
}
void InsertDetail(ExtensionObj scan)
{
var first = allMain.Where(x => x.Date == sendTime && x.Goods_Code == scan.StringExt1 && !x.Finishd).OrderBy(x => x.SequenceNumber).FirstOrDefault();
if (first == null)
{
MessageBox.Show("无待备货出库单");
return;
}
var detail = new StockUpDetail();
detail.BarCode = uScanPanel1.TextBox.Text;
detail.Date = sendTime;
detail.DeliverGoodsLine_ID = first.DeliverGoodsLine_ID;
detail.DeliverGoodsLine_Name = first.DeliverGoodsLine_Name;
detail.Goods_Code = first.Goods_Code;
detail.Goods_ID = first.Goods_ID;
detail.Goods_Name = first.Goods_Name;
detail.Goods_Spec = first.Goods_Spec;
detail.UnitNumber = scan.DecimalExt1;
if (detail.UnitNumber.HasValue && first.Rate.HasValue)
detail.SecondNumber = detail.UnitNumber * first.Rate;
SegmentStockUpBL.InsertStockUpDetail(detail);
allDetail.Add(detail);
first.SSecondNumber = (first.SSecondNumber ?? 0) + (detail.SecondNumber ?? 0);
first.SUnitNum = (first.SUnitNum ?? 0) + (detail.UnitNumber ?? 0);
BindMainGrid(sendTime, first.Goods_ID);
}
void FillAllDetail(DateTime date, long driverLineID, long goodsID)
{
if (allDetail.Any(x => x.Date == date && x.DeliverGoodsLine_ID == driverLineID && x.Goods_ID == goodsID))
return;
var n = SegmentStockUpBL.GetDetails(date, driverLineID, goodsID);
allDetail.AddRange(n);
}
void BindMainGrid(DateTime date, long goodsID)
{
var main = allMain.Where(x => x.Date == date && x.Goods_ID == goodsID).OrderBy(x => x.Finishd).OrderBy(x => x.SequenceNumber);
mainList = new BindingList<StockUpEntity>(main.ToList());
mainGridView.DataSource = mainList;
mainGridView.Refresh();
BindDetail(main.FirstOrDefault());
}
void BindDetail(StockUpEntity first)
{
if (first != null)
{
driveLineLbl.Text = first.DeliverGoodsLine_Name;
goodsLbl.Text = first.Goods_Name;
dhNumberLbl.Text = string.Format("{0:#0.##}", first.SecondNumber);
dhUnitNumLbl.Text = string.Format("{0:#0.##}", first.UnitNum);
bhNumberLbl.Text = string.Format("{0:#0.##}", first.SSecondNumber);
bhUnitNumLbl.Text = string.Format("{0:#0.##}", first.SUnitNum);
if (!allDetail.Any(x => x.Date == first.Date && x.DeliverGoodsLine_ID == first.DeliverGoodsLine_ID && x.Goods_ID == first.Goods_ID))
allDetail.AddRange(SegmentStockUpBL.GetDetails(first.Date, first.DeliverGoodsLine_ID, first.Goods_ID));
var detail = allDetail.Where(x => x.Date == first.Date && x.DeliverGoodsLine_ID == first.DeliverGoodsLine_ID && x.Goods_ID == first.Goods_ID).OrderByDescending(x => x.ID);
detailList = new BindingList<StockUpDetail>(detail.ToList());
}
else
{
driveLineLbl.Text = string.Empty;
goodsLbl.Text = string.Empty;
dhNumberLbl.Text = string.Empty;
dhUnitNumLbl.Text = string.Empty;
bhNumberLbl.Text = string.Empty;
bhUnitNumLbl.Text = string.Empty;
detailList = new BindingList<StockUpDetail>();
}
detailGridView.DataSource = detailList;
detailGridView.Refresh();
}
private void refresh_Click(object sender, EventArgs e)
{
if (mainList == null || !mainList.Any())
return;
allMain = SegmentStockUpBL.RefreshList(sendTime, allMain.Select(x => x.Goods_ID).Distinct());
allDetail.Clear();
BindMainGrid(sendTime, mainList.First().Goods_ID);
}
private void dataPicker_Click(object sender, EventArgs e)
{
var cs = new CalendarSelecter();
if (cs.ShowDialog() == true)
{
sendTime = cs.Result;
dataPicker.Text = sendTime.ToString("yyyy-MM-dd");
}
}
private void mainGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0)
return;
var item = mainGridView.CurrentRow.DataBoundItem as StockUpEntity;
BindDetail(item);
}
private void mainGridView_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e)
{
DataGridViewRow dgrSingle = mainGridView.Rows[e.RowIndex];
var v = (bool)dgrSingle.Cells["D_Finishd"].Value;
if (v)
{
dgrSingle.DefaultCellStyle.BackColor = Color.YellowGreen;
}
}
}
}

+ 171
- 0
ButcherFactory.Form/SegmentStockUp_/SegmentStockUpForm.resx View File

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

+ 16
- 0
ButcherFactory.Form/Utils/ControlsUtil.cs View File

@ -36,5 +36,21 @@ namespace ButcherFactory.Utils
box.DataSource = source;
box.Refresh();
}
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;
}
}
}

+ 1
- 1
ButcherFactory.Login/Login.xaml.cs View File

@ -16,7 +16,7 @@ namespace ButcherFactory.Login
{
InitializeComponent();
#if DEBUG
pwdInput.Password = "123";
pwdInput.Password = AppContext.ConnectInfo.ServerMode == 0 ? "123" : "bwp2017";
#endif
try


+ 3
- 0
SelfHelpClient/BO/WeightBill.cs View File

@ -9,8 +9,11 @@ namespace SelfHelpClient.BO
public class WeightBill
{
public long ID { get; set; }
public string Supplier_Name { get; set; }
public string BankAccount { get; set; }
public string PurchaseType_Name { get; set; }
public DateTime WeighTime { get; set; }


+ 27
- 14
SelfHelpClient/DialogForm.Designer.cs View File

@ -29,7 +29,9 @@
private void InitializeComponent()
{
this.msgLbl = new WinFormControl.ULabel();
this.okBtn = new WinFormControl.NButton();
this.backPanel = new System.Windows.Forms.Panel();
this.okBtn = new System.Windows.Forms.Label();
this.backPanel.SuspendLayout();
this.SuspendLayout();
//
// msgLbl
@ -46,21 +48,29 @@
this.msgLbl.Text = "uLabel1";
this.msgLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// backPanel
//
this.backPanel.BackgroundImage = global::SelfHelpClient.Properties.Resources.fanhui;
this.backPanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.backPanel.Controls.Add(this.okBtn);
this.backPanel.Location = new System.Drawing.Point(129, 170);
this.backPanel.Name = "backPanel";
this.backPanel.Size = new System.Drawing.Size(158, 63);
this.backPanel.TabIndex = 2;
this.backPanel.Click += new System.EventHandler(this.okBtn_Click);
//
// okBtn
//
this.okBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.okBtn.ClickColor = System.Drawing.Color.YellowGreen;
this.okBtn.Font = new System.Drawing.Font("宋体", 18F);
this.okBtn.Anchor = System.Windows.Forms.AnchorStyles.None;
this.okBtn.AutoSize = true;
this.okBtn.BackColor = System.Drawing.Color.Transparent;
this.okBtn.Font = new System.Drawing.Font("宋体", 15F);
this.okBtn.ForeColor = System.Drawing.Color.White;
this.okBtn.Location = new System.Drawing.Point(124, 156);
this.okBtn.Location = new System.Drawing.Point(56, 23);
this.okBtn.Name = "okBtn";
this.okBtn.PlaySound = false;
this.okBtn.Size = new System.Drawing.Size(158, 63);
this.okBtn.SoundType = WinFormControl.SoundType.Click;
this.okBtn.TabIndex = 1;
this.okBtn.Text = "nButton1";
this.okBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.okBtn.UseVisualStyleBackColor = false;
this.okBtn.Size = new System.Drawing.Size(49, 20);
this.okBtn.TabIndex = 0;
this.okBtn.Text = "返货";
this.okBtn.Click += new System.EventHandler(this.okBtn_Click);
//
// DialogForm
@ -68,12 +78,14 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(417, 251);
this.Controls.Add(this.okBtn);
this.Controls.Add(this.backPanel);
this.Controls.Add(this.msgLbl);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "DialogForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "DialogForm";
this.backPanel.ResumeLayout(false);
this.backPanel.PerformLayout();
this.ResumeLayout(false);
}
@ -81,6 +93,7 @@
#endregion
private WinFormControl.ULabel msgLbl;
private WinFormControl.NButton okBtn;
private System.Windows.Forms.Panel backPanel;
private System.Windows.Forms.Label okBtn;
}
}

+ 6
- 0
SelfHelpClient/DialogForm.cs View File

@ -41,12 +41,18 @@ namespace SelfHelpClient
}
}
bool seted = false;
void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
this.Invoke(new Action(() =>
{
if (sec > 0)
{
if (!seted)
{
this.okBtn.Location = new Point(20, 23);
seted = true;
}
this.okBtn.Text = string.Format("确定({0}秒)", sec);
sec--;
}


+ 40
- 39
SelfHelpClient/ItemSelect.Designer.cs View File

@ -37,9 +37,10 @@
this.R_CarNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.R_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.R_Date = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.uLabel1 = new WinFormControl.ULabel();
this.backBtn = new WinFormControl.NButton();
this.backBtn = new System.Windows.Forms.Panel();
this.backBtnLbl = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).BeginInit();
this.backBtn.SuspendLayout();
this.SuspendLayout();
//
// uDataGridView1
@ -52,29 +53,35 @@
this.uDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.uDataGridView1.BackgroundColor = System.Drawing.Color.White;
this.uDataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.uDataGridView1.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.uDataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 23F);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(220)))), ((int)(((byte)(156)))));
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 20F);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.uDataGridView1.ColumnHeadersHeight = 60;
this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.uDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.R_ID,
this.R_CarNumber,
this.R_Number,
this.R_Date});
this.uDataGridView1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.uDataGridView1.Location = new System.Drawing.Point(0, 68);
this.uDataGridView1.Dock = System.Windows.Forms.DockStyle.Top;
this.uDataGridView1.EnableHeadersVisualStyles = false;
this.uDataGridView1.Location = new System.Drawing.Point(0, 0);
this.uDataGridView1.MultiSelect = false;
this.uDataGridView1.Name = "uDataGridView1";
this.uDataGridView1.ReadOnly = true;
this.uDataGridView1.RowHeadersVisible = false;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(239)))), ((int)(((byte)(254)))));
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 18F);
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(144)))), ((int)(((byte)(98)))), ((int)(((byte)(222)))));
this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.uDataGridView1.RowTemplate.Height = 80;
this.uDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.uDataGridView1.Size = new System.Drawing.Size(650, 332);
this.uDataGridView1.Size = new System.Drawing.Size(730, 465);
this.uDataGridView1.TabIndex = 0;
this.uDataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.uDataGridView1_CellClick);
//
@ -111,63 +118,57 @@
this.R_Date.Name = "R_Date";
this.R_Date.ReadOnly = true;
//
// uLabel1
//
this.uLabel1.AutoSize = true;
this.uLabel1.BackColor = System.Drawing.Color.Transparent;
this.uLabel1.Font = new System.Drawing.Font("宋体", 18F);
this.uLabel1.ForeColor = System.Drawing.Color.Red;
this.uLabel1.Location = new System.Drawing.Point(12, 19);
this.uLabel1.Name = "uLabel1";
this.uLabel1.Size = new System.Drawing.Size(298, 24);
this.uLabel1.TabIndex = 1;
this.uLabel1.Text = "请选择要办理的送猪信息单";
//
// backBtn
//
this.backBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.backBtn.ClickColor = System.Drawing.Color.YellowGreen;
this.backBtn.Font = new System.Drawing.Font("宋体", 18F);
this.backBtn.ForeColor = System.Drawing.Color.White;
this.backBtn.Location = new System.Drawing.Point(533, 3);
this.backBtn.BackgroundImage = global::SelfHelpClient.Properties.Resources.fanhui;
this.backBtn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.backBtn.Controls.Add(this.backBtnLbl);
this.backBtn.Location = new System.Drawing.Point(305, 497);
this.backBtn.Name = "backBtn";
this.backBtn.PlaySound = false;
this.backBtn.Size = new System.Drawing.Size(113, 63);
this.backBtn.SoundType = WinFormControl.SoundType.Click;
this.backBtn.Size = new System.Drawing.Size(121, 52);
this.backBtn.TabIndex = 2;
this.backBtn.TabStop = false;
this.backBtn.Text = "返回";
this.backBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.backBtn.UseVisualStyleBackColor = false;
this.backBtn.Click += new System.EventHandler(this.backBtn_Click);
//
// backBtnLbl
//
this.backBtnLbl.AutoSize = true;
this.backBtnLbl.BackColor = System.Drawing.Color.Transparent;
this.backBtnLbl.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold);
this.backBtnLbl.ForeColor = System.Drawing.Color.White;
this.backBtnLbl.Location = new System.Drawing.Point(37, 17);
this.backBtnLbl.Name = "backBtnLbl";
this.backBtnLbl.Size = new System.Drawing.Size(49, 19);
this.backBtnLbl.TabIndex = 0;
this.backBtnLbl.Text = "返回";
this.backBtnLbl.Click += new System.EventHandler(this.backBtn_Click);
//
// ItemSelect
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(650, 400);
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(247)))), ((int)(((byte)(247)))));
this.ClientSize = new System.Drawing.Size(730, 552);
this.Controls.Add(this.backBtn);
this.Controls.Add(this.uLabel1);
this.Controls.Add(this.uDataGridView1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "ItemSelect";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "ItemSelect";
((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).EndInit();
this.backBtn.ResumeLayout(false);
this.backBtn.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private WinFormControl.UDataGridView uDataGridView1;
private WinFormControl.ULabel uLabel1;
private WinFormControl.NButton backBtn;
private System.Windows.Forms.DataGridViewTextBoxColumn R_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn R_CarNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn R_Number;
private System.Windows.Forms.DataGridViewTextBoxColumn R_Date;
private System.Windows.Forms.Panel backBtn;
private System.Windows.Forms.Label backBtnLbl;
}
}

+ 138
- 47
SelfHelpClient/MainForm.Designer.cs View File

@ -29,10 +29,21 @@
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.weightBtn = new WinFormControl.NButton();
this.selfBtn = new WinFormControl.NButton();
this.testClose = new WinFormControl.NButton();
this.weightBtn = new System.Windows.Forms.Panel();
this.weightBtnLbl = new System.Windows.Forms.Label();
this.selfBtn = new System.Windows.Forms.Panel();
this.selfBtnLbl = new System.Windows.Forms.Label();
this.titlePanel = new System.Windows.Forms.Panel();
this.closeBtn = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.logoPanel = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.weightBtn.SuspendLayout();
this.selfBtn.SuspendLayout();
this.titlePanel.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// panel1
@ -47,69 +58,142 @@
//
// weightBtn
//
this.weightBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.weightBtn.ClickColor = System.Drawing.Color.YellowGreen;
this.weightBtn.Font = new System.Drawing.Font("宋体", 23F);
this.weightBtn.ForeColor = System.Drawing.Color.White;
this.weightBtn.Location = new System.Drawing.Point(392, 64);
this.weightBtn.BackgroundImage = global::SelfHelpClient.Properties.Resources.guobang;
this.weightBtn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.weightBtn.Controls.Add(this.weightBtnLbl);
this.weightBtn.Location = new System.Drawing.Point(388, 64);
this.weightBtn.Name = "weightBtn";
this.weightBtn.PlaySound = true;
this.weightBtn.Size = new System.Drawing.Size(235, 128);
this.weightBtn.SoundType = WinFormControl.SoundType.Click;
this.weightBtn.TabIndex = 1;
this.weightBtn.Text = "送猪过磅";
this.weightBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.weightBtn.UseVisualStyleBackColor = false;
this.weightBtn.TabIndex = 3;
this.weightBtn.Click += new System.EventHandler(this.weightBtn_Click);
//
// weightBtnLbl
//
this.weightBtnLbl.AutoSize = true;
this.weightBtnLbl.BackColor = System.Drawing.Color.Transparent;
this.weightBtnLbl.Font = new System.Drawing.Font("宋体", 23F);
this.weightBtnLbl.ForeColor = System.Drawing.Color.White;
this.weightBtnLbl.Location = new System.Drawing.Point(49, 47);
this.weightBtnLbl.Name = "weightBtnLbl";
this.weightBtnLbl.Size = new System.Drawing.Size(138, 31);
this.weightBtnLbl.TabIndex = 0;
this.weightBtnLbl.Text = "送猪过磅";
this.weightBtnLbl.Click += new System.EventHandler(this.weightBtn_Click);
//
// selfBtn
//
this.selfBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.selfBtn.ClickColor = System.Drawing.Color.YellowGreen;
this.selfBtn.Font = new System.Drawing.Font("宋体", 23F);
this.selfBtn.ForeColor = System.Drawing.Color.White;
this.selfBtn.Location = new System.Drawing.Point(23, 64);
this.selfBtn.BackgroundImage = global::SelfHelpClient.Properties.Resources.zizhufuwu;
this.selfBtn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.selfBtn.Controls.Add(this.selfBtnLbl);
this.selfBtn.Location = new System.Drawing.Point(20, 64);
this.selfBtn.Name = "selfBtn";
this.selfBtn.PlaySound = true;
this.selfBtn.Size = new System.Drawing.Size(235, 128);
this.selfBtn.SoundType = WinFormControl.SoundType.Click;
this.selfBtn.TabIndex = 0;
this.selfBtn.Text = "自助服务";
this.selfBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.selfBtn.UseVisualStyleBackColor = false;
this.selfBtn.TabIndex = 2;
this.selfBtn.Click += new System.EventHandler(this.selfBtn_Click);
//
// testClose
//
this.testClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.testClose.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.testClose.ClickColor = System.Drawing.Color.YellowGreen;
this.testClose.Font = new System.Drawing.Font("宋体", 12F);
this.testClose.ForeColor = System.Drawing.Color.White;
this.testClose.Location = new System.Drawing.Point(798, 12);
this.testClose.Name = "testClose";
this.testClose.PlaySound = false;
this.testClose.Size = new System.Drawing.Size(99, 59);
this.testClose.SoundType = WinFormControl.SoundType.Click;
this.testClose.TabIndex = 1;
this.testClose.Text = "关闭";
this.testClose.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.testClose.UseVisualStyleBackColor = false;
this.testClose.Click += new System.EventHandler(this.testClose_Click);
// selfBtnLbl
//
this.selfBtnLbl.AutoSize = true;
this.selfBtnLbl.BackColor = System.Drawing.Color.Transparent;
this.selfBtnLbl.Font = new System.Drawing.Font("宋体", 23F);
this.selfBtnLbl.ForeColor = System.Drawing.Color.White;
this.selfBtnLbl.Location = new System.Drawing.Point(49, 47);
this.selfBtnLbl.Name = "selfBtnLbl";
this.selfBtnLbl.Size = new System.Drawing.Size(138, 31);
this.selfBtnLbl.TabIndex = 0;
this.selfBtnLbl.Text = "自助服务";
this.selfBtnLbl.Click += new System.EventHandler(this.selfBtn_Click);
//
// titlePanel
//
this.titlePanel.BackgroundImage = global::SelfHelpClient.Properties.Resources.titleBg;
this.titlePanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.titlePanel.Controls.Add(this.closeBtn);
this.titlePanel.Controls.Add(this.label1);
this.titlePanel.Controls.Add(this.logoPanel);
this.titlePanel.Dock = System.Windows.Forms.DockStyle.Top;
this.titlePanel.Location = new System.Drawing.Point(0, 0);
this.titlePanel.Name = "titlePanel";
this.titlePanel.Size = new System.Drawing.Size(928, 80);
this.titlePanel.TabIndex = 1;
//
// closeBtn
//
this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.closeBtn.BackColor = System.Drawing.Color.Transparent;
this.closeBtn.Location = new System.Drawing.Point(880, 22);
this.closeBtn.Name = "closeBtn";
this.closeBtn.Size = new System.Drawing.Size(36, 33);
this.closeBtn.TabIndex = 2;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold);
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(70, 27);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(210, 24);
this.label1.TabIndex = 1;
this.label1.Text = "屠宰自助服务系统";
//
// logoPanel
//
this.logoPanel.BackColor = System.Drawing.Color.Transparent;
this.logoPanel.BackgroundImage = global::SelfHelpClient.Properties.Resources.logo;
this.logoPanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.logoPanel.Location = new System.Drawing.Point(25, 22);
this.logoPanel.Name = "logoPanel";
this.logoPanel.Size = new System.Drawing.Size(34, 34);
this.logoPanel.TabIndex = 0;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(55)))), ((int)(((byte)(60)))), ((int)(((byte)(203)))));
this.panel2.Controls.Add(this.label2);
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel2.Location = new System.Drawing.Point(0, 478);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(928, 43);
this.panel2.TabIndex = 2;
//
// label2
//
this.label2.Anchor = System.Windows.Forms.AnchorStyles.None;
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Font = new System.Drawing.Font("宋体", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(391, 14);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(151, 15);
this.label2.TabIndex = 0;
this.label2.Text = "欢迎使用自助服务机";
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.LightGray;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(247)))), ((int)(((byte)(247)))));
this.ClientSize = new System.Drawing.Size(928, 521);
this.Controls.Add(this.testClose);
this.Controls.Add(this.panel2);
this.Controls.Add(this.titlePanel);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "MainForm";
this.Text = "Form1";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.panel1.ResumeLayout(false);
this.weightBtn.ResumeLayout(false);
this.weightBtn.PerformLayout();
this.selfBtn.ResumeLayout(false);
this.selfBtn.PerformLayout();
this.titlePanel.ResumeLayout(false);
this.titlePanel.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.ResumeLayout(false);
}
@ -117,9 +201,16 @@
#endregion
private System.Windows.Forms.Panel panel1;
private WinFormControl.NButton selfBtn;
private WinFormControl.NButton weightBtn;
private WinFormControl.NButton testClose;
private System.Windows.Forms.Panel titlePanel;
private System.Windows.Forms.Panel logoPanel;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel closeBtn;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Panel selfBtn;
private System.Windows.Forms.Label selfBtnLbl;
private System.Windows.Forms.Panel weightBtn;
private System.Windows.Forms.Label weightBtnLbl;
}
}

+ 3
- 3
SelfHelpClient/MainForm.cs View File

@ -41,8 +41,8 @@ namespace SelfHelpClient
DialogForm.ShowDialog("没有待办理业务", 5);
return;
}
new SelfHelpForm(entity.ID).Show();
this.Hide();
new SelfHelpForm(entity.ID).ShowDialog();
//this.Hide();
}
private void weightBtn_Click(object sender, EventArgs e)
@ -62,7 +62,7 @@ namespace SelfHelpClient
return null; ;
}
private void testClose_Click(object sender, EventArgs e)
private void closeBtn_Click(object sender, EventArgs e)
{
this.Close();
}


+ 100
- 0
SelfHelpClient/Properties/Resources.Designer.cs View File

@ -59,5 +59,105 @@ namespace SelfHelpClient.Properties {
resourceCulture = value;
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap fanhui {
get {
object obj = ResourceManager.GetObject("fanhui", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap ganying {
get {
object obj = ResourceManager.GetObject("ganying", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap guobang {
get {
object obj = ResourceManager.GetObject("guobang", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap logo {
get {
object obj = ResourceManager.GetObject("logo", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap queren {
get {
object obj = ResourceManager.GetObject("queren", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap shuaka {
get {
object obj = ResourceManager.GetObject("shuaka", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap titleBg {
get {
object obj = ResourceManager.GetObject("titleBg", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap washCarBtn {
get {
object obj = ResourceManager.GetObject("washCarBtn", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap weightPrintBtn {
get {
object obj = ResourceManager.GetObject("weightPrintBtn", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap zizhufuwu {
get {
object obj = ResourceManager.GetObject("zizhufuwu", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

+ 39
- 5
SelfHelpClient/Properties/Resources.resx View File

@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
@ -109,9 +112,40 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="fanhui" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\bin\Debug\fanhui.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ganying" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\bin\Debug\ganying.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="guobang" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\bin\Debug\guobang.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\bin\Debug\logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="queren" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\bin\Debug\queren.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="shuaka" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\bin\Debug\shuaka.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="titleBg" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\bin\Debug\titleBg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="washCarBtn" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\bin\Debug\washCarBtn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="weightPrintBtn" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\bin\Debug\weightPrintBtn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="zizhufuwu" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\bin\Debug\zizhufuwu.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

+ 85
- 23
SelfHelpClient/ReadCardForm.Designer.cs View File

@ -28,61 +28,123 @@
/// </summary>
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.uLabel2 = new WinFormControl.ULabel();
this.uLabel1 = new WinFormControl.ULabel();
this.backBtn = new WinFormControl.NButton();
this.backBtn = new System.Windows.Forms.Panel();
this.backBtnLbl = new System.Windows.Forms.Label();
this.ganyingPanel = new System.Windows.Forms.Panel();
this.shuakaPanel = new System.Windows.Forms.Panel();
this.panel1.SuspendLayout();
this.backBtn.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(115)))), ((int)(((byte)(200)))), ((int)(((byte)(135)))));
this.panel1.Controls.Add(this.ganyingPanel);
this.panel1.Controls.Add(this.uLabel2);
this.panel1.Controls.Add(this.uLabel1);
this.panel1.Controls.Add(this.shuakaPanel);
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(730, 433);
this.panel1.TabIndex = 0;
//
// uLabel2
//
this.uLabel2.AutoSize = true;
this.uLabel2.BackColor = System.Drawing.Color.Transparent;
this.uLabel2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold);
this.uLabel2.ForeColor = System.Drawing.Color.White;
this.uLabel2.Location = new System.Drawing.Point(56, 87);
this.uLabel2.Name = "uLabel2";
this.uLabel2.Size = new System.Drawing.Size(76, 16);
this.uLabel2.TabIndex = 0;
this.uLabel2.Text = "进行操作";
//
// uLabel1
//
this.uLabel1.AutoSize = true;
this.uLabel1.BackColor = System.Drawing.Color.Transparent;
this.uLabel1.Font = new System.Drawing.Font("宋体", 23F);
this.uLabel1.ForeColor = System.Drawing.Color.Red;
this.uLabel1.Location = new System.Drawing.Point(222, 147);
this.uLabel1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uLabel1.ForeColor = System.Drawing.Color.White;
this.uLabel1.Location = new System.Drawing.Point(56, 59);
this.uLabel1.Name = "uLabel1";
this.uLabel1.Size = new System.Drawing.Size(200, 31);
this.uLabel1.Size = new System.Drawing.Size(178, 16);
this.uLabel1.TabIndex = 0;
this.uLabel1.Text = "请扫描身份证";
this.uLabel1.Text = "请把身份证放到感应区";
//
// backBtn
//
this.backBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.backBtn.ClickColor = System.Drawing.Color.YellowGreen;
this.backBtn.Font = new System.Drawing.Font("宋体", 18F);
this.backBtn.ForeColor = System.Drawing.Color.White;
this.backBtn.Location = new System.Drawing.Point(529, 12);
this.backBtn.BackgroundImage = global::SelfHelpClient.Properties.Resources.fanhui;
this.backBtn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.backBtn.Controls.Add(this.backBtnLbl);
this.backBtn.Location = new System.Drawing.Point(305, 497);
this.backBtn.Name = "backBtn";
this.backBtn.PlaySound = false;
this.backBtn.Size = new System.Drawing.Size(113, 63);
this.backBtn.SoundType = WinFormControl.SoundType.Click;
this.backBtn.Size = new System.Drawing.Size(121, 52);
this.backBtn.TabIndex = 1;
this.backBtn.TabStop = false;
this.backBtn.Text = "返回";
this.backBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.backBtn.UseVisualStyleBackColor = false;
this.backBtn.Click += new System.EventHandler(this.backBtn_Click);
//
// backBtnLbl
//
this.backBtnLbl.AutoSize = true;
this.backBtnLbl.BackColor = System.Drawing.Color.Transparent;
this.backBtnLbl.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold);
this.backBtnLbl.ForeColor = System.Drawing.Color.White;
this.backBtnLbl.Location = new System.Drawing.Point(37, 17);
this.backBtnLbl.Name = "backBtnLbl";
this.backBtnLbl.Size = new System.Drawing.Size(49, 19);
this.backBtnLbl.TabIndex = 0;
this.backBtnLbl.Text = "返回";
this.backBtnLbl.Click += new System.EventHandler(this.backBtn_Click);
//
// ganyingPanel
//
this.ganyingPanel.BackgroundImage = global::SelfHelpClient.Properties.Resources.ganying;
this.ganyingPanel.Location = new System.Drawing.Point(326, 31);
this.ganyingPanel.Name = "ganyingPanel";
this.ganyingPanel.Size = new System.Drawing.Size(221, 152);
this.ganyingPanel.TabIndex = 1;
//
// shuakaPanel
//
this.shuakaPanel.BackgroundImage = global::SelfHelpClient.Properties.Resources.shuaka;
this.shuakaPanel.Location = new System.Drawing.Point(450, 175);
this.shuakaPanel.Name = "shuakaPanel";
this.shuakaPanel.Size = new System.Drawing.Size(279, 258);
this.shuakaPanel.TabIndex = 2;
//
// ReadCardForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(650, 355);
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(247)))), ((int)(((byte)(247)))));
this.ClientSize = new System.Drawing.Size(730, 552);
this.Controls.Add(this.backBtn);
this.Controls.Add(this.uLabel1);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.ImeMode = System.Windows.Forms.ImeMode.Disable;
this.KeyPreview = true;
this.Name = "ReadCardForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.backBtn.ResumeLayout(false);
this.backBtn.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Panel panel1;
private WinFormControl.ULabel uLabel2;
private WinFormControl.ULabel uLabel1;
private WinFormControl.NButton backBtn;
private System.Windows.Forms.Panel backBtn;
private System.Windows.Forms.Panel ganyingPanel;
private System.Windows.Forms.Panel shuakaPanel;
private System.Windows.Forms.Label backBtnLbl;
}
}

+ 10
- 0
SelfHelpClient/SelfHelpClient.csproj View File

@ -146,6 +146,16 @@
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="bin\Debug\ganying.png" />
<None Include="bin\Debug\shuaka.png" />
<None Include="bin\Debug\fanhui.png" />
<None Include="bin\Debug\guobang.png" />
<None Include="bin\Debug\logo.png" />
<None Include="bin\Debug\queren.png" />
<None Include="bin\Debug\titleBg.png" />
<None Include="bin\Debug\zizhufuwu.png" />
<None Include="bin\Debug\washCarBtn.png" />
<None Include="bin\Debug\weightPrintBtn.png" />
<Content Include="CarPaperPrint.html" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />


+ 83
- 52
SelfHelpClient/SelfHelpForm.Designer.cs View File

@ -29,89 +29,117 @@
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.weightPrintBtn = new WinFormControl.NButton();
this.washCarBtn = new WinFormControl.NButton();
this.backBtn = new WinFormControl.NButton();
this.backBtn = new System.Windows.Forms.Panel();
this.backBtnLbl = new System.Windows.Forms.Label();
this.weightPrintBtn = new System.Windows.Forms.Panel();
this.weightBtnLbl = new System.Windows.Forms.Label();
this.washCarBtn = new System.Windows.Forms.Panel();
this.selfBtnLbl = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.backBtn.SuspendLayout();
this.weightPrintBtn.SuspendLayout();
this.washCarBtn.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Anchor = System.Windows.Forms.AnchorStyles.None;
this.panel1.Controls.Add(this.weightPrintBtn);
this.panel1.Controls.Add(this.washCarBtn);
this.panel1.Location = new System.Drawing.Point(136, 137);
this.panel1.Location = new System.Drawing.Point(104, 123);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(644, 271);
this.panel1.Size = new System.Drawing.Size(644, 257);
this.panel1.TabIndex = 1;
//
// backBtn
//
this.backBtn.BackgroundImage = global::SelfHelpClient.Properties.Resources.fanhui;
this.backBtn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.backBtn.Controls.Add(this.backBtnLbl);
this.backBtn.Location = new System.Drawing.Point(362, 418);
this.backBtn.Name = "backBtn";
this.backBtn.Size = new System.Drawing.Size(121, 52);
this.backBtn.TabIndex = 3;
this.backBtn.Click += new System.EventHandler(this.backBtn_Click);
//
// backBtnLbl
//
this.backBtnLbl.AutoSize = true;
this.backBtnLbl.BackColor = System.Drawing.Color.Transparent;
this.backBtnLbl.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold);
this.backBtnLbl.ForeColor = System.Drawing.Color.White;
this.backBtnLbl.Location = new System.Drawing.Point(37, 17);
this.backBtnLbl.Name = "backBtnLbl";
this.backBtnLbl.Size = new System.Drawing.Size(49, 19);
this.backBtnLbl.TabIndex = 0;
this.backBtnLbl.Text = "返回";
this.backBtnLbl.Click += new System.EventHandler(this.backBtn_Click);
//
// weightPrintBtn
//
this.weightPrintBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.weightPrintBtn.ClickColor = System.Drawing.Color.YellowGreen;
this.weightPrintBtn.Enabled = false;
this.weightPrintBtn.Font = new System.Drawing.Font("宋体", 23F);
this.weightPrintBtn.ForeColor = System.Drawing.Color.White;
this.weightPrintBtn.Location = new System.Drawing.Point(392, 64);
this.weightPrintBtn.BackgroundImage = global::SelfHelpClient.Properties.Resources.weightPrintBtn;
this.weightPrintBtn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.weightPrintBtn.Controls.Add(this.weightBtnLbl);
this.weightPrintBtn.Location = new System.Drawing.Point(388, 64);
this.weightPrintBtn.Name = "weightPrintBtn";
this.weightPrintBtn.PlaySound = true;
this.weightPrintBtn.Size = new System.Drawing.Size(235, 128);
this.weightPrintBtn.SoundType = WinFormControl.SoundType.Click;
this.weightPrintBtn.TabIndex = 1;
this.weightPrintBtn.Text = "打印过磅单";
this.weightPrintBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.weightPrintBtn.UseVisualStyleBackColor = false;
this.weightPrintBtn.TabIndex = 7;
//
// weightBtnLbl
//
this.weightBtnLbl.AutoSize = true;
this.weightBtnLbl.BackColor = System.Drawing.Color.Transparent;
this.weightBtnLbl.Font = new System.Drawing.Font("宋体", 23F);
this.weightBtnLbl.ForeColor = System.Drawing.Color.White;
this.weightBtnLbl.Location = new System.Drawing.Point(34, 47);
this.weightBtnLbl.Name = "weightBtnLbl";
this.weightBtnLbl.Size = new System.Drawing.Size(169, 31);
this.weightBtnLbl.TabIndex = 0;
this.weightBtnLbl.Text = "打印过磅单";
//
// washCarBtn
//
this.washCarBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.washCarBtn.ClickColor = System.Drawing.Color.YellowGreen;
this.washCarBtn.Font = new System.Drawing.Font("宋体", 23F);
this.washCarBtn.ForeColor = System.Drawing.Color.White;
this.washCarBtn.Location = new System.Drawing.Point(23, 64);
this.washCarBtn.BackgroundImage = global::SelfHelpClient.Properties.Resources.washCarBtn;
this.washCarBtn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.washCarBtn.Controls.Add(this.selfBtnLbl);
this.washCarBtn.Location = new System.Drawing.Point(20, 64);
this.washCarBtn.Name = "washCarBtn";
this.washCarBtn.PlaySound = true;
this.washCarBtn.Size = new System.Drawing.Size(235, 128);
this.washCarBtn.SoundType = WinFormControl.SoundType.Click;
this.washCarBtn.TabIndex = 0;
this.washCarBtn.Text = "打印洗车单";
this.washCarBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.washCarBtn.UseVisualStyleBackColor = false;
this.washCarBtn.TabIndex = 6;
this.washCarBtn.Click += new System.EventHandler(this.washCarBtn_Click);
//
// backBtn
// selfBtnLbl
//
this.backBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.backBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.backBtn.ClickColor = System.Drawing.Color.YellowGreen;
this.backBtn.Font = new System.Drawing.Font("宋体", 18F);
this.backBtn.ForeColor = System.Drawing.Color.White;
this.backBtn.Location = new System.Drawing.Point(798, 12);
this.backBtn.Name = "backBtn";
this.backBtn.PlaySound = false;
this.backBtn.Size = new System.Drawing.Size(113, 63);
this.backBtn.SoundType = WinFormControl.SoundType.Click;
this.backBtn.TabIndex = 3;
this.backBtn.TabStop = false;
this.backBtn.Text = "返回";
this.backBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.backBtn.UseVisualStyleBackColor = false;
this.backBtn.Click += new System.EventHandler(this.backBtn_Click);
this.selfBtnLbl.AutoSize = true;
this.selfBtnLbl.BackColor = System.Drawing.Color.Transparent;
this.selfBtnLbl.Font = new System.Drawing.Font("宋体", 23F);
this.selfBtnLbl.ForeColor = System.Drawing.Color.White;
this.selfBtnLbl.Location = new System.Drawing.Point(36, 47);
this.selfBtnLbl.Name = "selfBtnLbl";
this.selfBtnLbl.Size = new System.Drawing.Size(169, 31);
this.selfBtnLbl.TabIndex = 0;
this.selfBtnLbl.Text = "打印洗车单";
this.selfBtnLbl.Click += new System.EventHandler(this.washCarBtn_Click);
//
// SelfHelpForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.LightGray;
this.ClientSize = new System.Drawing.Size(923, 507);
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(247)))), ((int)(((byte)(247)))));
this.ClientSize = new System.Drawing.Size(864, 493);
this.Controls.Add(this.backBtn);
this.Controls.Add(this.panel1);
this.ForeColor = System.Drawing.SystemColors.ControlText;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "SelfHelpForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "SelfHelpForm";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.panel1.ResumeLayout(false);
this.backBtn.ResumeLayout(false);
this.backBtn.PerformLayout();
this.weightPrintBtn.ResumeLayout(false);
this.weightPrintBtn.PerformLayout();
this.washCarBtn.ResumeLayout(false);
this.washCarBtn.PerformLayout();
this.ResumeLayout(false);
}
@ -119,8 +147,11 @@
#endregion
private System.Windows.Forms.Panel panel1;
private WinFormControl.NButton weightPrintBtn;
private WinFormControl.NButton washCarBtn;
private WinFormControl.NButton backBtn;
private System.Windows.Forms.Panel backBtn;
private System.Windows.Forms.Label backBtnLbl;
private System.Windows.Forms.Panel weightPrintBtn;
private System.Windows.Forms.Label weightBtnLbl;
private System.Windows.Forms.Panel washCarBtn;
private System.Windows.Forms.Label selfBtnLbl;
}
}

+ 6
- 0
SelfHelpClient/SelfHelpForm.cs View File

@ -33,11 +33,17 @@ namespace SelfHelpClient
{
var standard = WeightBillBL.GetCarStandard(billID);
if (standard == null)
{
DialogForm.ShowDialog("未填写车辆标准", 5);
return;
}
var list = XmlUtil.DeserializeFromFile<List<CarStandardConfig>>("CarStandardConfig.xml");
var config = list.FirstOrDefault(x => x.Standard == standard.Value);
if (config == null)
{
DialogForm.ShowDialog("未配置车辆费用标准", 5);
return;
}
var printEntity = WeightBillBL.GetWashPrintEntity(billID, config.Fee);
var dic = new Dictionary<string, string>();


+ 217
- 125
SelfHelpClient/WeightForm.Designer.cs View File

@ -28,29 +28,26 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WeightForm));
this.panel1 = new System.Windows.Forms.Panel();
this.backBtn = new WinFormControl.NButton();
this.okBtn = new WinFormControl.NButton();
this.panel2 = new System.Windows.Forms.Panel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.weightGrid = new WinFormControl.UDataGridView();
this.D_Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_MaoWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_PiWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.D_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.farmerGrid = new WinFormControl.UDataGridView();
this.F_Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.F_Farmer_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -61,95 +58,65 @@
this.F_Farmer_BankAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.F_Farmer_Tel = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.F_Farmer_Address = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.titlePanel = new System.Windows.Forms.Panel();
this.closeBtn = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.logoPanel = new System.Windows.Forms.Panel();
this.backBtn = new System.Windows.Forms.Panel();
this.backBtnLbl = new System.Windows.Forms.Label();
this.panel5 = new System.Windows.Forms.Panel();
this.linePanel = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.weightGrid)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.farmerGrid)).BeginInit();
this.titlePanel.SuspendLayout();
this.backBtn.SuspendLayout();
this.panel5.SuspendLayout();
this.panel4.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.panel1.Controls.Add(this.panel4);
this.panel1.Controls.Add(this.backBtn);
this.panel1.Controls.Add(this.okBtn);
this.panel1.Location = new System.Drawing.Point(168, 394);
this.panel1.Location = new System.Drawing.Point(168, 555);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(614, 100);
this.panel1.Size = new System.Drawing.Size(614, 51);
this.panel1.TabIndex = 0;
//
// backBtn
//
this.backBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.backBtn.ClickColor = System.Drawing.Color.YellowGreen;
this.backBtn.Font = new System.Drawing.Font("宋体", 23F);
this.backBtn.ForeColor = System.Drawing.Color.White;
this.backBtn.Location = new System.Drawing.Point(352, 3);
this.backBtn.Name = "backBtn";
this.backBtn.PlaySound = false;
this.backBtn.Size = new System.Drawing.Size(162, 94);
this.backBtn.SoundType = WinFormControl.SoundType.Click;
this.backBtn.TabIndex = 1;
this.backBtn.Text = "返回";
this.backBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.backBtn.UseVisualStyleBackColor = false;
this.backBtn.Click += new System.EventHandler(this.backBtn_Click);
//
// okBtn
//
this.okBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.okBtn.ClickColor = System.Drawing.Color.YellowGreen;
this.okBtn.Font = new System.Drawing.Font("宋体", 23F);
this.okBtn.ForeColor = System.Drawing.Color.White;
this.okBtn.Location = new System.Drawing.Point(71, 3);
this.okBtn.Name = "okBtn";
this.okBtn.PlaySound = false;
this.okBtn.Size = new System.Drawing.Size(162, 94);
this.okBtn.SoundType = WinFormControl.SoundType.Click;
this.okBtn.TabIndex = 0;
this.okBtn.Text = "确定";
this.okBtn.ToColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(136)))), ((int)(((byte)(255)))));
this.okBtn.UseVisualStyleBackColor = false;
this.okBtn.Click += new System.EventHandler(this.okBtn_Click);
//
// panel2
//
this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel2.Controls.Add(this.groupBox2);
this.panel2.Controls.Add(this.groupBox1);
this.panel2.Location = new System.Drawing.Point(0, 12);
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(251)))), ((int)(((byte)(255)))));
this.panel2.Location = new System.Drawing.Point(6, 86);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(926, 362);
this.panel2.Size = new System.Drawing.Size(914, 97);
this.panel2.TabIndex = 1;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.weightGrid);
this.groupBox2.Location = new System.Drawing.Point(4, 230);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(919, 108);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "过磅信息";
//
// weightGrid
//
this.weightGrid.AllowUserToAddRows = false;
this.weightGrid.AllowUserToDeleteRows = false;
this.weightGrid.AllowUserToResizeColumns = false;
this.weightGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.weightGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
this.weightGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle12;
this.weightGrid.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.weightGrid.BackgroundColor = System.Drawing.Color.White;
this.weightGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.weightGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.weightGrid.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.weightGrid.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(238)))), ((int)(((byte)(250)))));
dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(61)))), ((int)(((byte)(120)))), ((int)(((byte)(255)))));
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.weightGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13;
this.weightGrid.ColumnHeadersHeight = 40;
this.weightGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.weightGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -158,18 +125,19 @@
this.D_MaoWeight,
this.D_PiWeight,
this.D_Weight});
this.weightGrid.Dock = System.Windows.Forms.DockStyle.Fill;
this.weightGrid.Location = new System.Drawing.Point(3, 17);
this.weightGrid.EnableHeadersVisualStyles = false;
this.weightGrid.Location = new System.Drawing.Point(9, 160);
this.weightGrid.MultiSelect = false;
this.weightGrid.Name = "weightGrid";
this.weightGrid.ReadOnly = true;
this.weightGrid.RowHeadersVisible = false;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.weightGrid.RowsDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle17.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.weightGrid.RowsDefaultCellStyle = dataGridViewCellStyle17;
this.weightGrid.RowTemplate.Height = 30;
this.weightGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.weightGrid.Size = new System.Drawing.Size(913, 88);
this.weightGrid.Size = new System.Drawing.Size(893, 88);
this.weightGrid.TabIndex = 0;
//
// D_Index
@ -191,8 +159,8 @@
//
this.D_MaoWeight.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.D_MaoWeight.DataPropertyName = "MaoWeight";
dataGridViewCellStyle3.Format = "#0.######";
this.D_MaoWeight.DefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle14.Format = "#0.######";
this.D_MaoWeight.DefaultCellStyle = dataGridViewCellStyle14;
this.D_MaoWeight.HeaderText = "毛重";
this.D_MaoWeight.Name = "D_MaoWeight";
this.D_MaoWeight.ReadOnly = true;
@ -201,8 +169,8 @@
//
this.D_PiWeight.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.D_PiWeight.DataPropertyName = "PiWeight";
dataGridViewCellStyle4.Format = "#0.######";
this.D_PiWeight.DefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle15.Format = "#0.######";
this.D_PiWeight.DefaultCellStyle = dataGridViewCellStyle15;
this.D_PiWeight.HeaderText = "皮重";
this.D_PiWeight.Name = "D_PiWeight";
this.D_PiWeight.ReadOnly = true;
@ -211,37 +179,32 @@
//
this.D_Weight.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.D_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle5.Format = "#0.######";
this.D_Weight.DefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle16.Format = "#0.######";
this.D_Weight.DefaultCellStyle = dataGridViewCellStyle16;
this.D_Weight.HeaderText = "重量";
this.D_Weight.Name = "D_Weight";
this.D_Weight.ReadOnly = true;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.farmerGrid);
this.groupBox1.Location = new System.Drawing.Point(4, 78);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(920, 109);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "养殖户信息";
//
// farmerGrid
//
this.farmerGrid.AllowUserToAddRows = false;
this.farmerGrid.AllowUserToDeleteRows = false;
this.farmerGrid.AllowUserToResizeColumns = false;
this.farmerGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.farmerGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle18.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
this.farmerGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle18;
this.farmerGrid.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.farmerGrid.BackgroundColor = System.Drawing.Color.White;
this.farmerGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle8.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.farmerGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
this.farmerGrid.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
this.farmerGrid.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(238)))), ((int)(((byte)(250)))));
dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle19.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(129)))), ((int)(((byte)(255)))));
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.farmerGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle19;
this.farmerGrid.ColumnHeadersHeight = 40;
this.farmerGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.farmerGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -254,18 +217,19 @@
this.F_Farmer_BankAccount,
this.F_Farmer_Tel,
this.F_Farmer_Address});
this.farmerGrid.Dock = System.Windows.Forms.DockStyle.Fill;
this.farmerGrid.Location = new System.Drawing.Point(3, 17);
this.farmerGrid.EnableHeadersVisualStyles = false;
this.farmerGrid.Location = new System.Drawing.Point(9, 14);
this.farmerGrid.MultiSelect = false;
this.farmerGrid.Name = "farmerGrid";
this.farmerGrid.ReadOnly = true;
this.farmerGrid.RowHeadersVisible = false;
dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle11.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle11;
dataGridViewCellStyle22.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle22.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle22;
this.farmerGrid.RowTemplate.Height = 30;
this.farmerGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.farmerGrid.Size = new System.Drawing.Size(914, 89);
this.farmerGrid.Size = new System.Drawing.Size(893, 107);
this.farmerGrid.TabIndex = 0;
//
// F_Index
@ -297,8 +261,8 @@
// F_Weight
//
this.F_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle9.Format = "#0.######";
this.F_Weight.DefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle20.Format = "#0.######";
this.F_Weight.DefaultCellStyle = dataGridViewCellStyle20;
this.F_Weight.HeaderText = "重量";
this.F_Weight.Name = "F_Weight";
this.F_Weight.ReadOnly = true;
@ -306,8 +270,8 @@
// F_Money
//
this.F_Money.DataPropertyName = "Money";
dataGridViewCellStyle10.Format = "#0.######";
this.F_Money.DefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle21.Format = "#0.######";
this.F_Money.DefaultCellStyle = dataGridViewCellStyle21;
this.F_Money.HeaderText = "棚前金额";
this.F_Money.Name = "F_Money";
this.F_Money.ReadOnly = true;
@ -352,11 +316,129 @@
this.F_Farmer_Address.Name = "F_Farmer_Address";
this.F_Farmer_Address.ReadOnly = true;
//
// titlePanel
//
this.titlePanel.BackgroundImage = global::SelfHelpClient.Properties.Resources.titleBg;
this.titlePanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.titlePanel.Controls.Add(this.closeBtn);
this.titlePanel.Controls.Add(this.label1);
this.titlePanel.Controls.Add(this.logoPanel);
this.titlePanel.Dock = System.Windows.Forms.DockStyle.Top;
this.titlePanel.Location = new System.Drawing.Point(0, 0);
this.titlePanel.Name = "titlePanel";
this.titlePanel.Size = new System.Drawing.Size(926, 80);
this.titlePanel.TabIndex = 2;
//
// closeBtn
//
this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.closeBtn.BackColor = System.Drawing.Color.Transparent;
this.closeBtn.Location = new System.Drawing.Point(878, 22);
this.closeBtn.Name = "closeBtn";
this.closeBtn.Size = new System.Drawing.Size(36, 33);
this.closeBtn.TabIndex = 2;
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold);
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(70, 27);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(210, 24);
this.label1.TabIndex = 1;
this.label1.Text = "屠宰自助服务系统";
//
// logoPanel
//
this.logoPanel.BackColor = System.Drawing.Color.Transparent;
this.logoPanel.BackgroundImage = global::SelfHelpClient.Properties.Resources.logo;
this.logoPanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.logoPanel.Location = new System.Drawing.Point(25, 22);
this.logoPanel.Name = "logoPanel";
this.logoPanel.Size = new System.Drawing.Size(34, 34);
this.logoPanel.TabIndex = 0;
//
// backBtn
//
this.backBtn.BackgroundImage = global::SelfHelpClient.Properties.Resources.fanhui;
this.backBtn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.backBtn.Controls.Add(this.backBtnLbl);
this.backBtn.Location = new System.Drawing.Point(352, -3);
this.backBtn.Name = "backBtn";
this.backBtn.Size = new System.Drawing.Size(121, 52);
this.backBtn.TabIndex = 2;
this.backBtn.Click += new System.EventHandler(this.backBtn_Click);
//
// backBtnLbl
//
this.backBtnLbl.AutoSize = true;
this.backBtnLbl.BackColor = System.Drawing.Color.Transparent;
this.backBtnLbl.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold);
this.backBtnLbl.ForeColor = System.Drawing.Color.White;
this.backBtnLbl.Location = new System.Drawing.Point(37, 17);
this.backBtnLbl.Name = "backBtnLbl";
this.backBtnLbl.Size = new System.Drawing.Size(49, 19);
this.backBtnLbl.TabIndex = 0;
this.backBtnLbl.Text = "返回";
this.backBtnLbl.Click += new System.EventHandler(this.backBtn_Click);
//
// panel5
//
this.panel5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel5.BackColor = System.Drawing.Color.White;
this.panel5.Controls.Add(this.linePanel);
this.panel5.Controls.Add(this.weightGrid);
this.panel5.Controls.Add(this.farmerGrid);
this.panel5.Location = new System.Drawing.Point(6, 194);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(914, 253);
this.panel5.TabIndex = 1;
//
// linePanel
//
this.linePanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.linePanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217)))));
this.linePanel.Location = new System.Drawing.Point(2, 138);
this.linePanel.Name = "linePanel";
this.linePanel.Size = new System.Drawing.Size(910, 1);
this.linePanel.TabIndex = 1;
//
// panel4
//
this.panel4.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel4.BackgroundImage")));
this.panel4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.panel4.Controls.Add(this.label3);
this.panel4.Location = new System.Drawing.Point(122, -1);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(121, 52);
this.panel4.TabIndex = 4;
this.panel4.Click += new System.EventHandler(this.okBtn_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Bold);
this.label3.ForeColor = System.Drawing.Color.White;
this.label3.Location = new System.Drawing.Point(37, 17);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(49, 19);
this.label3.TabIndex = 0;
this.label3.Text = "确认";
this.label3.Click += new System.EventHandler(this.okBtn_Click);
//
// WeightForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(926, 514);
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(247)))), ((int)(((byte)(247)))));
this.ClientSize = new System.Drawing.Size(926, 625);
this.Controls.Add(this.panel5);
this.Controls.Add(this.titlePanel);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
@ -364,11 +446,15 @@
this.Text = "WeightForm";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.weightGrid)).EndInit();
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.farmerGrid)).EndInit();
this.titlePanel.ResumeLayout(false);
this.titlePanel.PerformLayout();
this.backBtn.ResumeLayout(false);
this.backBtn.PerformLayout();
this.panel5.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
this.ResumeLayout(false);
}
@ -376,11 +462,7 @@
#endregion
private System.Windows.Forms.Panel panel1;
private WinFormControl.NButton backBtn;
private WinFormControl.NButton okBtn;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private WinFormControl.UDataGridView farmerGrid;
private WinFormControl.UDataGridView weightGrid;
private System.Windows.Forms.DataGridViewTextBoxColumn F_Index;
@ -397,5 +479,15 @@
private System.Windows.Forms.DataGridViewTextBoxColumn D_MaoWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn D_PiWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn D_Weight;
private System.Windows.Forms.Panel titlePanel;
private System.Windows.Forms.Panel closeBtn;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel logoPanel;
private System.Windows.Forms.Panel backBtn;
private System.Windows.Forms.Label backBtnLbl;
private System.Windows.Forms.Panel panel5;
private System.Windows.Forms.Panel linePanel;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Label label3;
}
}

+ 21
- 15
SelfHelpClient/WeightForm.cs View File

@ -25,7 +25,7 @@ namespace SelfHelpClient
else
entity = WeightBillBL.GetWeightBill(view.ID);
var tableHeight = InitTableLayoutPanel();
BuildGridPanel(tableHeight);
BuildGridPanel();
this.FormClosing += delegate
{
if (refersh != null && refersh.IsAlive)
@ -66,25 +66,30 @@ namespace SelfHelpClient
}
}
private void BuildGridPanel(int tableHeight)
private void BuildGridPanel()
{
groupBox1.Location = new Point(0, tableHeight + 10);
groupBox1.Width = Screen.PrimaryScreen.Bounds.Width;
groupBox1.Height = 200;
panel5.Location = new Point(6, panel2.Location.Y + panel2.Height + 6);
panel5.Height = 320;
groupBox2.Location = new Point(0, tableHeight + groupBox1.Height + 10);
groupBox2.Width = Screen.PrimaryScreen.Bounds.Width;
groupBox2.Height = 150;
farmerGrid.Height = 180;
linePanel.Location = new Point(0, 9 + 180 + 15);
weightGrid.Height = 110;
weightGrid.Location = new Point(9, linePanel.Location.Y + 15);
}
Color fontColor = Color.FromArgb(238, 104, 15);
private int InitTableLayoutPanel()
{
TableLayoutPanel tablePanel = new TableLayoutPanel();
tablePanel.Width = Screen.PrimaryScreen.Bounds.Width;
panel2.Controls.Add(tablePanel);
tablePanel.Location = new Point(9, 15);
tablePanel.Width = Screen.PrimaryScreen.Bounds.Width - 10;
var dic = BuildFields();
var table = ComputeColAndRow(dic.Count);
tablePanel.Height = 60 * table.Rows + 5;
tablePanel.Height = 40 * table.Rows + 20;
panel2.Height = tablePanel.Height + 10;
panel2.Controls.Add(tablePanel);
DynamicLayout(tablePanel, table);
var type = typeof(WeightBill);
var r = 0;
@ -119,6 +124,7 @@ namespace SelfHelpClient
break;
}
Label content = BuildLabel(lbl);
content.ForeColor = fontColor;
tablePanel.Controls.Add(content);
tablePanel.SetRow(content, r);
tablePanel.SetColumn(content, c);
@ -136,8 +142,8 @@ namespace SelfHelpClient
TableSturct ComputeColAndRow(int fileCount)
{
var screenWidth = Screen.PrimaryScreen.Bounds.Width;
var col = Math.Floor((decimal)screenWidth / (160 + 280));
var screenWidth = Screen.PrimaryScreen.Bounds.Width - 10;
var col = Math.Floor((decimal)screenWidth / (110 + 200));
var row = Math.Ceiling(fileCount / col);
return new TableSturct() { Rows = (int)row, Cols = (int)col * 2 };
}
@ -147,7 +153,7 @@ namespace SelfHelpClient
layoutPanel.RowCount = table.Rows; //设置分成几行
for (int i = 0; i < table.Rows; i++)
{
layoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 60));
layoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 40));
}
layoutPanel.ColumnCount = table.Cols; //设置分成几列
for (int i = 0; i < table.Cols; i++)
@ -169,7 +175,7 @@ namespace SelfHelpClient
{
Label label = new Label();
label.Text = content;
label.Font = new System.Drawing.Font("宋体", 18);
label.Font = new System.Drawing.Font("宋体", 14);
label.Dock = DockStyle.Fill;
label.TextAlign = ContentAlignment.MiddleLeft;
return label;


+ 34
- 0
SelfHelpClient/WeightForm.resx View File

@ -117,6 +117,40 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="panel4.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAKkAAABSCAYAAAAvgPT1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAGLUlEQVR4Xu3c2XJUVRTG8fMA
Dig4AYqIgIwJiIqIhaXlCAgBAiQiRBAQkEmkEEqGhIRJFBRREVAUEZDpWbhSy2cQNJGQhOxerq/30E0n
VFlFJ66L7+JXWTl7n3P1r0PonJys+rhktSekbtFJ+WPJKXHLz4isPCuy+pzI2vMi6y+IfHBRZIP68BJR
eaAndIW+0Bl6Q3foDx1qj79pl7UikmVzjklNzYmcvH3SyTs/O1l6xsl7v+Rk5fmcrL6QkzUXc7JWrbuU
k/VEZYKe0BX6QmfoDd2hP3SIHtGl9lmdVR2Vy9Xf64EfdOEnJ3WnnCw+7WTZ2ZwsVysQ7DlvlV6IqBxi
U+gLnaE3dIf+0CF6rP4uJ+gzm35EOquO4YCT+SecvPWjrxibUfQS3F1Pa+Fq2Rmi8ohNoS90lo9Tu0N/
6BA9okvtsz1742uRad84mfmtk9mI9bhu0jtrrW5cgLurnrRQT4ZFRGUSm0Jf6Ay9oTv0hw7RI7pEn9kr
h0VePYxvtNoQ66yjTn8W8CfM1aLn4S6rF4AaotsUW0JX6AudoTd0h/7QIXpEl+gze+mQyIsHnbz8hR78
Uhd1YdpXulE3zUC0R7wqPZmonGJb6Ay9oTv0hw7RI7pEn9mUgyLP73cy5TM9eEAPItjPdaNueu2Qk9cR
bpGpehGi21HcE/pCZ+gN3aE/dIge811qn9nkAyIT9zqZtM/J5E/CwqdOXgjRRjiZqJyK+0Jv6A79oUP0
iC7RZzZxv8j4RicTmpw8vcvJM7t1cY+TZ9Uk3fQcNiJgoh6AvtAZekN36A8dokd0iT6zCftExtY7qVCV
Dbqw03tSN8CEIk/piVHxcaL/4lb9xNZie+gQPaJL9JmN3ysyYmtORqpR2wpGb/fGEPWw2Fpxf+gRXaLP
fKTDN+du8sQWbwRRL4nNlbYYIs3JsE1O4SuRJfrPv/aZj3ToRhdgJrLAN5kiHbLBBZiJLPBNpkgfW+cC
zEQW+CZTpIPXuAAzkQW+yRTpoPddgJnIAt9kivSRFS7ATGSBbzJFOnC5CzATWeCbTJEOWOoCzEQW+CZT
pP2XuAAzkQW+yRTpg3UuwExkgW8yRfrAQhdgJrLAN5kivX+BCzATWeCbTJHeVxsJkRG+yRRpv/mREBnh
m0yR9p0bCZERvskU6b3VkRAZ4ZtMkd4zOxIiI3yTKdI+VZEQGeGbTJHePTMSIiN8kynSu2ZEQmSEb7IQ
6ZuRLhKZ4JtMkd45PRIiI3yThUinRbpIZIJvMkV6x9RIiIzwTTJSMoyRknmMlMxjpGReaaT6vyhPF4lM
8E2mSPkRFNlT8hEUP8wne3yTKVL+WpTsKfm1KB8wIXt8kylSPqpH9pQ8qseHnsmekoee+8yKdJHIBN9k
ivSeOZEQGeGbTJHyr0XJnpK/Fu07LxIiI3yTKdJ+NZEQGeGbTJHyXVBkT8m7oPhWPbKn5K16fD8p2VPy
ftKH6lyAmcgC32SKtP9iF2AmssA3mSId8K4LMBNZ4JtMkQ5c5gLMRBb4JlOkD69wAWYiC3yTKdJBq1yA
mcgC32SK9NHVLsBMZIFvMkU6eK0LMBNZ4JtMkQ5Z7wLMRBb4JlOkj29wAWYiC3yTKdKhG12AmcgC36SP
dE9Ohm1yRfA90f+p0CP6zEc6/CNXsLmYrhH1iqLuinoMkToZsaXzFrBG1Bu6669TI3U+0pEf3yAyKR/p
uN2dMnJrh2onMqZD0KdGekNGbW8v0uZtI+plsb2iHtGnRtoho3e0qeslWgu2E/WQ4s66NNimkXZopLs6
ZEz9ddUqY3RjwbUuRu/4p1vd7SWC7nqB7vbe1B961C7Rp0baLmMbWgPdWK8X6KKFqId07Q0dxibRZzau
qU0qduIgFqMWGVvfTNS70F1Rh+gSfWaVTddvVDTqgbwWXWgO/paKBvhLTyDqGegr3xl6i+2hw9Ck9tmO
SC9XNIVAG7EBm/UCUcPV4ApRmYW2QmvoLt9fvkPtsekaIr2cVTa21lTmi22WyvwGbMQJV9WVgoY/icqr
uC/0FtpDh75H7bKxtRqRqmuLKne2/F7R0NyZv/XWg55QryfuiPRCRGUV2kJn+d60u/yPmM2d2uOv2mWt
iGT/ArSen2rwTNYRAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="D_Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>


Loading…
Cancel
Save