diff --git a/ButcherFactory.Form/ButcherFactory.Form.csproj b/ButcherFactory.Form/ButcherFactory.Form.csproj index c5609aa..fa4c52a 100644 --- a/ButcherFactory.Form/ButcherFactory.Form.csproj +++ b/ButcherFactory.Form/ButcherFactory.Form.csproj @@ -190,6 +190,12 @@ WeightRecordDialog.cs + + Form + + + Form1.cs + True @@ -339,6 +345,9 @@ WeightRecordDialog.cs + + Form1.cs + ResXFileCodeGenerator Resources.Designer.cs diff --git a/ButcherFactory.Form/Controls/Utils/JST2018SDataFormat.cs b/ButcherFactory.Form/Controls/Utils/JST2018SDataFormat.cs index ad88ba9..470bea5 100644 --- a/ButcherFactory.Form/Controls/Utils/JST2018SDataFormat.cs +++ b/ButcherFactory.Form/Controls/Utils/JST2018SDataFormat.cs @@ -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) diff --git a/ButcherFactory.Form/Controls/WeightControl.cs b/ButcherFactory.Form/Controls/WeightControl.cs index 48d796f..87fee54 100644 --- a/ButcherFactory.Form/Controls/WeightControl.cs +++ b/ButcherFactory.Form/Controls/WeightControl.cs @@ -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; diff --git a/ButcherFactory.Form/Form1.Designer.cs b/ButcherFactory.Form/Form1.Designer.cs new file mode 100644 index 0000000..ca24b1c --- /dev/null +++ b/ButcherFactory.Form/Form1.Designer.cs @@ -0,0 +1,77 @@ + +namespace ButcherFactory +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.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; + } +} \ No newline at end of file diff --git a/ButcherFactory.Form/Form1.cs b/ButcherFactory.Form/Form1.cs new file mode 100644 index 0000000..93f0d4e --- /dev/null +++ b/ButcherFactory.Form/Form1.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ButcherFactory +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + } +} diff --git a/ButcherFactory.Form/Form1.resx b/ButcherFactory.Form/Form1.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/ButcherFactory.Form/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ButcherFactory.Login/Login.xaml.cs b/ButcherFactory.Login/Login.xaml.cs index b9e0e7e..104c2be 100644 --- a/ButcherFactory.Login/Login.xaml.cs +++ b/ButcherFactory.Login/Login.xaml.cs @@ -38,6 +38,7 @@ namespace ButcherFactory.Login private async void LoginBtn_Click(object sender, RoutedEventArgs e) { + //new ButcherFactory.Form1().Show(); try { loginBtn.IsEnabled = false;