using DataBlockHelper.DBHelpers; using Mesnac.Action.ChemicalWeighing.AutoControl.Entity; 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 Mesnac.Action.ChemicalWeighing.AutoControl { public partial class ManualAdd : Form { public ManualAdd() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { SetValue value = new SetValue() { Value = Convert.ToSingle(ManualTolerance.Text), Toterance = Convert.ToSingle(ManualWeight.Text) }; switch (GelerWeterControl.choose) { case 1: DB2105WriteHelper.WriteManScrewH1(); DB2105WriteHelper.WriteSetValueH1(value); break; case 2: DB2105WriteHelper.WriteManScrewH2(); DB2105WriteHelper.WriteSetValueH1(value); break; case 3: DB2105WriteHelper.WriteManScrewH3(); DB2105WriteHelper.WriteSetValueH2(value); break; case 4: DB2105WriteHelper.WriteManScrewH4(); DB2105WriteHelper.WriteSetValueH2(value); break; case 5: DB2105WriteHelper.WriteManScrewH5(); DB2105WriteHelper.WriteSetValueH3(value); break; case 6: DB2105WriteHelper.WriteManScrewH6(); DB2105WriteHelper.WriteSetValueH3(value); break; case 7: DB2105WriteHelper.WriteManScrewH7(); DB2105WriteHelper.WriteSetValueH4(value); break; case 8: DB2105WriteHelper.WriteManScrewH8(); DB2105WriteHelper.WriteSetValueH4(value); break; default: MessageBox.Show("当前未选择产线!"); return; } } } }