yibo 3 years ago
parent
commit
247589da94
7 changed files with 230 additions and 3 deletions
  1. +9
    -0
      ButcherFactory.Form/ButcherFactory.Form.csproj
  2. +2
    -2
      ButcherFactory.Form/Controls/Utils/JST2018SDataFormat.cs
  3. +1
    -1
      ButcherFactory.Form/Controls/WeightControl.cs
  4. +77
    -0
      ButcherFactory.Form/Form1.Designer.cs
  5. +20
    -0
      ButcherFactory.Form/Form1.cs
  6. +120
    -0
      ButcherFactory.Form/Form1.resx
  7. +1
    -0
      ButcherFactory.Login/Login.xaml.cs

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

@ -190,6 +190,12 @@
<Compile Include="Dialogs\WeightRecordDialog.Designer.cs">
<DependentUpon>WeightRecordDialog.cs</DependentUpon>
</Compile>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
@ -339,6 +345,9 @@
<EmbeddedResource Include="Dialogs\WeightRecordDialog.resx">
<DependentUpon>WeightRecordDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>


+ 2
- 2
ButcherFactory.Form/Controls/Utils/JST2018SDataFormat.cs View File

@ -10,7 +10,7 @@ namespace ButcherFactory.Controls
{
public override int DataLength
{
get { return 10; }
get { return 8; }
}
public override char Beginchar
@ -25,7 +25,7 @@ namespace ButcherFactory.Controls
public override short Bufsize
{
get { return 9; }
get { return 8; }
}
public override string ParseData(string buf, out bool isStatic)


+ 1
- 1
ButcherFactory.Form/Controls/WeightControl.cs View File

@ -193,7 +193,7 @@ namespace ButcherFactory.Controls
_dataStrBuilder.Clear();
_dataStrBuilder.Append(c);
}
else if (c == _dataFormat.Endchar || _dataStrBuilder.Length >= _dataFormat.Bufsize)
else if (c == _dataFormat.Endchar && _dataStrBuilder.Length >= _dataFormat.Bufsize)
{
_dataStrBuilder.Append(c);
bool isStatic;


+ 77
- 0
ButcherFactory.Form/Form1.Designer.cs View File

@ -0,0 +1,77 @@

namespace ButcherFactory
{
partial class Form1
{
/// <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.uWeightControl1 = new ButcherFactory.Controls.WeightControl();
this.roundPanel1 = new ButcherFactory.Controls.RoundPanel(this.components);
this.uWeightControl1.SuspendLayout();
this.SuspendLayout();
//
// uWeightControl1
//
this.uWeightControl1.BackColor = System.Drawing.Color.Transparent;
this.uWeightControl1.Controls.Add(this.roundPanel1);
this.uWeightControl1.Location = new System.Drawing.Point(269, 188);
this.uWeightControl1.Name = "uWeightControl1";
this.uWeightControl1.Size = new System.Drawing.Size(262, 74);
this.uWeightControl1.TabIndex = 18;
this.uWeightControl1.WeightFalg = null;
//
// roundPanel1
//
this.roundPanel1._setRoundRadius = 15;
this.roundPanel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
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;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.uWeightControl1);
this.Name = "Form1";
this.Text = "Form1";
this.uWeightControl1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private Controls.WeightControl uWeightControl1;
private Controls.RoundPanel roundPanel1;
}
}

+ 20
- 0
ButcherFactory.Form/Form1.cs View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ButcherFactory
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}

+ 120
- 0
ButcherFactory.Form/Form1.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>

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

@ -38,6 +38,7 @@ namespace ButcherFactory.Login
private async void LoginBtn_Click(object sender, RoutedEventArgs e)
{
//new ButcherFactory.Form1().Show();
try
{
loginBtn.IsEnabled = false;


Loading…
Cancel
Save