Commit 5cd4b84a authored by wangwanxh@sina.com's avatar wangwanxh@sina.com

Merge branch 'wang_master' of https://gitee.com/wangwanxh/Vocs into wang_master

parents 2999cbb3 bda0276b
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;
using GcDevicePc.Module;
namespace GcDevicePc
{
public partial class _424XTest : Form
{
private WTD424XOutput my424 = new WTD424XOutput();
private WTD624X my624 = new WTD624X("192.168.1.57",502);
public _424XTest()
{
InitializeComponent();
}
private void _424XTest_Load(object sender, EventArgs e)
{
my424.WTD424X_Open();
my624.WTD624X_Open();
}
private void button1_Click(object sender, EventArgs e)
{
float[] data = new float[] { 10.0f,8.8f, 13.3f,14.4f};
my624.UpdateData(data);
}
private void button2_Click(object sender, EventArgs e)
{
float[] data = new float[] { 10.0f, 8.8f, 13.3f, 14.4f };
my424.UpdateData2(data);
}
private void button3_Click(object sender, EventArgs e)
{
my624.UpdateIP("192.168.1.54","255.255.255.0","192.168.1.1");
}
}
}
...@@ -199,9 +199,16 @@ namespace GcDevicePc.ConfigDlg ...@@ -199,9 +199,16 @@ namespace GcDevicePc.ConfigDlg
private void savebtn_Click(object sender, EventArgs e) private void savebtn_Click(object sender, EventArgs e)
{ {
SaveAsWin methodfile = new SaveAsWin(); SaveDialog saveDialog = new SaveDialog(globaldata.m_pcbuffer.gcpcinfo.pcfolderinfo.MethodFolder, 1);
methodfile.SaveInI += new SaveAsMethodFile(saveasmethod); DialogResult dr = saveDialog.ShowDialog();
methodfile.Show(); if (dr == DialogResult.OK)
{
saveasmethod(saveDialog.filename);
}
//SaveAsWin methodfile = new SaveAsWin();
//methodfile.SaveInI += new SaveAsMethodFile(saveasmethod);
//methodfile.Show();
} }
int maxtemp; int maxtemp;
......
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GcDevicePc.GCBuffer;
namespace GcDevicePc.ConfigMethod
{
public partial class AuxTab : Form
{
HWConfig hwconfig;
GCMethodConfig methodconfig;
public AuxTab(HWConfig hwconfig, ref GCMethodConfig methodconfig)
{
InitializeComponent();
this.hwconfig = hwconfig;
this.methodconfig = methodconfig;
}
/// <summary>
/// 刷新数据
/// </summary>
public void reflashContent()
{
this.methodconfig.GetDevAux();
if (this.hwconfig.hwconfiginfo.u16AuxHeaterNum >= 1)
{
this.aidheatgroup.Enabled = true;
if (this.hwconfig.hwconfiginfo.u16AuxHeater1 == 1)
{
aidheatcheck1.Enabled = true;
aidheatset1.Enabled = true;
aidheatcheck1.Text = this.hwconfig.hwconfiginfo.u16AuxHeaterName1;
aidheatcheck1.CheckState = this.methodconfig.aux.fTemp_Enable1 ? CheckState.Checked : CheckState.Unchecked;
aidheatset1.Text = this.methodconfig.aux.fSetTemp_HeatArea1.ToString();
}
else
{
aidheatcheck1.Enabled = false;
aidheatset1.Enabled = false;
aidheatcheck1.Text = "未定义";
}
if (this.hwconfig.hwconfiginfo.u16AuxHeater2 == 1)
{
aidheatcheck2.Enabled = true;
aidheatset2.Enabled = true;
aidheatcheck2.Text = this.hwconfig.hwconfiginfo.u16AuxHeaterName2;
aidheatcheck2.CheckState = this.methodconfig.aux.fTemp_Enable2 ? CheckState.Checked : CheckState.Unchecked;
aidheatset2.Text = this.methodconfig.aux.fSetTemp_HeatArea2.ToString();
}
else
{
aidheatcheck2.Enabled = false;
aidheatset2.Enabled = false;
aidheatcheck2.Text = "未定义";
}
}
else
{
this.aidheatgroup.Enabled = false;
}
//实际温度设定
this.aidheatvalue1.Text = "N/A";
this.aidheatvalue2.Text = "N/A";
}
private void TextBoxDec_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar) && e.KeyChar != '.')
{
e.Handled = true;
}
}
/// <summary>
/// 记录更新当前数据
/// </summary>
public void recordCurData()
{
if (!String.IsNullOrEmpty(aidheatset1.Text))
{
this.methodconfig.aux.fSetTemp_HeatArea1 = float.Parse(aidheatset1.Text);
if(this.methodconfig.aux.fSetTemp_HeatArea1 > 400.0f)
{
this.methodconfig.aux.fSetTemp_HeatArea1 = 0;
}
}
else
{
this.methodconfig.aux.fSetTemp_HeatArea1 = 0.0f;
}
if (!String.IsNullOrEmpty(aidheatset2.Text))
{
this.methodconfig.aux.fSetTemp_HeatArea2 = float.Parse(aidheatset2.Text);
if (this.methodconfig.aux.fSetTemp_HeatArea2 > 400.0f)
{
this.methodconfig.aux.fSetTemp_HeatArea2 = 0;
}
}
else
{
this.methodconfig.aux.fSetTemp_HeatArea2 = 0.0f;
}
this.methodconfig.aux.fTemp_Enable1 = (aidheatcheck1.CheckState == CheckState.Checked) ? true : false;
this.methodconfig.aux.fTemp_Enable2 = (aidheatcheck2.CheckState == CheckState.Checked) ? true : false;
}
/// <summary>
/// 输入框数值检测
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void aidheatset1_TextChanged(object sender, EventArgs e)
{
float tmpval=0.0f;
if (aidheatset1.Text != null && aidheatset1.Text != "")
{
tmpval = float.Parse(aidheatset1.Text);
}
if (tmpval > 400.0f)
{
MessageBox.Show("请输入小于400的数");
aidheatset1.Text = "0";
}
}
/// <summary>
/// 输入框数值检测
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void aidheatset2_TextChanged(object sender, EventArgs e)
{
float tmpval = 0.0f;
if (aidheatset2.Text != null && aidheatset2.Text != "")
{
tmpval = float.Parse(aidheatset2.Text);
}
if (tmpval > 400.0f)
{
MessageBox.Show("请输入小于400的数");
aidheatset2.Text = "0";
}
}
}
}
namespace GcDevicePc.ConfigMethod
{
partial class AuxTab
{
/// <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.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.aidheatcheck1 = new System.Windows.Forms.CheckBox();
this.aidheatcheck2 = new System.Windows.Forms.CheckBox();
this.aidheatset1 = new System.Windows.Forms.TextBox();
this.aidheatset2 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.aidheatvalue1 = new System.Windows.Forms.Label();
this.aidheatvalue2 = new System.Windows.Forms.Label();
this.aidheatgroup = new System.Windows.Forms.GroupBox();
this.label8 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.aidheatgroup.SuspendLayout();
this.SuspendLayout();
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(175, 17);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(41, 12);
this.label2.TabIndex = 0;
this.label2.Text = "设定值";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(348, 17);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 0;
this.label3.Text = "实际值";
//
// aidheatcheck1
//
this.aidheatcheck1.AutoSize = true;
this.aidheatcheck1.Location = new System.Drawing.Point(24, 40);
this.aidheatcheck1.Name = "aidheatcheck1";
this.aidheatcheck1.Size = new System.Drawing.Size(90, 16);
this.aidheatcheck1.TabIndex = 1;
this.aidheatcheck1.Text = "辅助加热区1";
this.aidheatcheck1.UseVisualStyleBackColor = true;
//
// aidheatcheck2
//
this.aidheatcheck2.AutoSize = true;
this.aidheatcheck2.Location = new System.Drawing.Point(24, 106);
this.aidheatcheck2.Name = "aidheatcheck2";
this.aidheatcheck2.Size = new System.Drawing.Size(90, 16);
this.aidheatcheck2.TabIndex = 1;
this.aidheatcheck2.Text = "辅助加热区2";
this.aidheatcheck2.UseVisualStyleBackColor = true;
//
// aidheatset1
//
this.aidheatset1.Location = new System.Drawing.Point(154, 38);
this.aidheatset1.Name = "aidheatset1";
this.aidheatset1.Size = new System.Drawing.Size(84, 21);
this.aidheatset1.TabIndex = 2;
this.aidheatset1.TextChanged += new System.EventHandler(this.aidheatset1_TextChanged);
this.aidheatset1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextBoxDec_KeyPress);
//
// aidheatset2
//
this.aidheatset2.Location = new System.Drawing.Point(154, 101);
this.aidheatset2.Name = "aidheatset2";
this.aidheatset2.Size = new System.Drawing.Size(84, 21);
this.aidheatset2.TabIndex = 2;
this.aidheatset2.TextChanged += new System.EventHandler(this.aidheatset2_TextChanged);
this.aidheatset2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextBoxDec_KeyPress);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(261, 41);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(17, 12);
this.label4.TabIndex = 3;
this.label4.Text = "℃";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(261, 106);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(17, 12);
this.label5.TabIndex = 3;
this.label5.Text = "℃";
//
// aidheatvalue1
//
this.aidheatvalue1.AutoSize = true;
this.aidheatvalue1.Location = new System.Drawing.Point(359, 41);
this.aidheatvalue1.Name = "aidheatvalue1";
this.aidheatvalue1.Size = new System.Drawing.Size(23, 12);
this.aidheatvalue1.TabIndex = 4;
this.aidheatvalue1.Text = "N/A";
//
// aidheatvalue2
//
this.aidheatvalue2.AutoSize = true;
this.aidheatvalue2.Location = new System.Drawing.Point(359, 104);
this.aidheatvalue2.Name = "aidheatvalue2";
this.aidheatvalue2.Size = new System.Drawing.Size(23, 12);
this.aidheatvalue2.TabIndex = 4;
this.aidheatvalue2.Text = "N/A";
//
// aidheatgroup
//
this.aidheatgroup.Controls.Add(this.label8);
this.aidheatgroup.Controls.Add(this.label1);
this.aidheatgroup.Controls.Add(this.aidheatcheck1);
this.aidheatgroup.Controls.Add(this.aidheatvalue2);
this.aidheatgroup.Controls.Add(this.aidheatcheck2);
this.aidheatgroup.Controls.Add(this.aidheatvalue1);
this.aidheatgroup.Controls.Add(this.label2);
this.aidheatgroup.Controls.Add(this.label3);
this.aidheatgroup.Controls.Add(this.label5);
this.aidheatgroup.Controls.Add(this.aidheatset1);
this.aidheatgroup.Controls.Add(this.label4);
this.aidheatgroup.Controls.Add(this.aidheatset2);
this.aidheatgroup.Location = new System.Drawing.Point(60, 89);
this.aidheatgroup.Name = "aidheatgroup";
this.aidheatgroup.Size = new System.Drawing.Size(465, 144);
this.aidheatgroup.TabIndex = 5;
this.aidheatgroup.TabStop = false;
this.aidheatgroup.Text = "辅助加热设置";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(388, 104);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(17, 12);
this.label8.TabIndex = 6;
this.label8.Text = "℃";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(388, 41);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(17, 12);
this.label1.TabIndex = 5;
this.label1.Text = "℃";
//
// AuxTab
//
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(592, 332);
this.Controls.Add(this.aidheatgroup);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "AuxTab";
this.Text = "Form1";
this.aidheatgroup.ResumeLayout(false);
this.aidheatgroup.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.CheckBox aidheatcheck1;
private System.Windows.Forms.CheckBox aidheatcheck2;
private System.Windows.Forms.TextBox aidheatset1;
private System.Windows.Forms.TextBox aidheatset2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label aidheatvalue1;
private System.Windows.Forms.Label aidheatvalue2;
private System.Windows.Forms.GroupBox aidheatgroup;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label1;
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<?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>
\ No newline at end of file
namespace GcDevicePc namespace GcDevicePc.ConfigMethod
{ {
partial class _424XTest partial class DetTab
{ {
/// <summary> /// <summary>
/// Required designer variable. /// Required designer variable.
...@@ -28,60 +28,36 @@ ...@@ -28,60 +28,36 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.button1 = new System.Windows.Forms.Button(); this.tabControlDet = new System.Windows.Forms.TabControl();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.SuspendLayout(); this.SuspendLayout();
// //
// button1 // tabControlDet
// //
this.button1.Location = new System.Drawing.Point(24, 46); this.tabControlDet.Location = new System.Drawing.Point(7, 6);
this.button1.Name = "button1"; this.tabControlDet.Multiline = true;
this.button1.Size = new System.Drawing.Size(75, 23); this.tabControlDet.Name = "tabControlDet";
this.button1.TabIndex = 0; this.tabControlDet.SelectedIndex = 0;
this.button1.Text = "测试1"; this.tabControlDet.Size = new System.Drawing.Size(561, 314);
this.button1.UseVisualStyleBackColor = true; this.tabControlDet.TabIndex = 10;
this.button1.Click += new System.EventHandler(this.button1_Click);
// //
// button2 // Det
//
this.button2.Location = new System.Drawing.Point(141, 46);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 1;
this.button2.Text = "测试2";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.Location = new System.Drawing.Point(83, 86);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 23);
this.button3.TabIndex = 2;
this.button3.Text = "button3";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// _424XTest
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(269, 121); this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.button3); this.ClientSize = new System.Drawing.Size(592, 332);
this.Controls.Add(this.button2); this.Controls.Add(this.tabControlDet);
this.Controls.Add(this.button1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "_424XTest"; this.Name = "Det";
this.Text = "WTD424XTest"; this.Text = "Det";
this.Load += new System.EventHandler(this._424XTest_Load); this.Load += new System.EventHandler(this.Det_Load);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
#endregion #endregion
private System.Windows.Forms.Button button1; private System.Windows.Forms.TabControl tabControlDet;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
} }
} }
\ No newline at end of file
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;
using GcDevicePc.GCBuffer;
namespace GcDevicePc.ConfigMethod
{
public partial class DetTab : Form
{
public TCD[] m_TcdDlg = new TCD[3];
public FID[] m_FidDlg = new FID[3];
const int TCD = 0;
const int FID = 1;
TabPage Page;
HWConfig hwconfig;
GCMethodConfig methodconfig;
public DetTab(HWConfig hwconfig, ref GCMethodConfig methodconfig)
{
InitializeComponent();
this.hwconfig = hwconfig;
this.methodconfig = methodconfig;
m_TcdDlg[0] = new TCD(this.hwconfig, ref this.methodconfig);
m_TcdDlg[1] = new TCD(this.hwconfig, ref this.methodconfig);
m_TcdDlg[2] = new TCD(this.hwconfig, ref this.methodconfig);
m_FidDlg[0] = new FID(this.hwconfig, ref this.methodconfig);
m_FidDlg[1] = new FID(this.hwconfig, ref this.methodconfig);
m_FidDlg[2] = new FID(this.hwconfig, ref this.methodconfig);
}
private void DetRec_Dlg(int position)
{
switch (position)
{
case 0:
if (this.hwconfig.hwconfiginfo.u16DetFrontType == 0)
{
m_TcdDlg[0].recordCurData(0);
}
else if (this.hwconfig.hwconfiginfo.u16DetFrontType == 1)
{
m_FidDlg[0].recordCurData(0);
}
else
{
}
break;
case 1:
if (this.hwconfig.hwconfiginfo.u16DetInterType == 0)
{
m_TcdDlg[1].recordCurData(1);
}
else if (this.hwconfig.hwconfiginfo.u16DetInterType == 1)
{
m_FidDlg[1].recordCurData(1);
}
else
{
}
break;
case 2:
if (this.hwconfig.hwconfiginfo.u16DetBehindType == 0)
{
m_TcdDlg[2].recordCurData(2);
}
else if (this.hwconfig.hwconfiginfo.u16DetBehindType == 1)
{
m_FidDlg[2].recordCurData(2);
}
else
{
}
break;
}
}
public void recordCurData()
{
ushort pagenum = (ushort)this.hwconfig.hwconfiginfo.u16DetNum;
if (pagenum > 0)
{
if (this.hwconfig.hwconfiginfo.u16DetFront == 1)
{
DetRec_Dlg(0);
if (this.hwconfig.hwconfiginfo.u16DetInter == 1)
{
DetRec_Dlg(1);
if (this.hwconfig.hwconfiginfo.u16DetBehind == 1)
{
DetRec_Dlg(2);
}
}
else if (this.hwconfig.hwconfiginfo.u16DetBehind == 1)
{
DetRec_Dlg(2);
}
}
else if (this.hwconfig.hwconfiginfo.u16DetInter == 1)
{
DetRec_Dlg(1);
if (this.hwconfig.hwconfiginfo.u16DetBehind == 1)
{
DetRec_Dlg(2);
}
}
else if (this.hwconfig.hwconfiginfo.u16DetBehind == 1)
{
DetRec_Dlg(2);
}
}
}
private void Detadd_Dlg(int position, int index)
{
switch (position)
{
case 0:
if (hwconfig.hwconfiginfo.u16DetFrontType == 0)
{
m_TcdDlg[position].TopLevel = false;
m_TcdDlg[position].Show();
tabControlDet.TabPages[index].Controls.Add(m_TcdDlg[position]);
m_TcdDlg[position].reflashContent(position);
}
else if (hwconfig.hwconfiginfo.u16DetFrontType == 1)
{
m_FidDlg[position].TopLevel = false;
m_FidDlg[position].Show();
tabControlDet.TabPages[index].Controls.Add(m_FidDlg[position]);
m_FidDlg[position].reflashContent(position);
}
else
{
}
break;
case 1:
if (hwconfig.hwconfiginfo.u16DetInterType == 0)
{
m_TcdDlg[position].TopLevel = false;
m_TcdDlg[position].Show();
tabControlDet.TabPages[index].Controls.Add(m_TcdDlg[position]);
m_TcdDlg[position].reflashContent(position);
}
else if (hwconfig.hwconfiginfo.u16DetInterType == 1)
{
m_FidDlg[position].TopLevel = false;
m_FidDlg[position].Show();
tabControlDet.TabPages[index].Controls.Add(m_FidDlg[position]);
m_FidDlg[position].reflashContent(position);
}
else
{
}
break;
case 2:
if (hwconfig.hwconfiginfo.u16DetBehindType == 0)
{
m_TcdDlg[position].TopLevel = false;
m_TcdDlg[position].Show();
tabControlDet.TabPages[index].Controls.Add(m_TcdDlg[position]);
m_TcdDlg[position].reflashContent(position);
}
else if (hwconfig.hwconfiginfo.u16DetBehindType == 1)
{
m_FidDlg[position].TopLevel = false;
m_FidDlg[position].Show();
tabControlDet.TabPages[index].Controls.Add(m_FidDlg[position]);
m_FidDlg[position].reflashContent(position);
}
else
{
}
break;
}
}
public void reflashContent()
{
ushort pagenum = (ushort)hwconfig.hwconfiginfo.u16DetNum;
int i;
if (pagenum > 0)
{
foreach (TabPage tabPage in tabControlDet.TabPages)
{
this.tabControlDet.TabPages.Remove(tabPage);
}
for (i = 0; i < pagenum; i++)
{
Page = new TabPage();
Page.Location = new System.Drawing.Point(4, 22);
Page.Padding = new System.Windows.Forms.Padding(3);
Page.Size = new System.Drawing.Size(553, 288);
Page.TabIndex = i;
Page.Text = "";
Page.Name = "tabPage" + i.ToString();
Page.UseVisualStyleBackColor = true;
tabControlDet.Controls.Add(Page);
}
if ( hwconfig.hwconfiginfo.u16DetFront == 1)
{
tabControlDet.TabPages[0].Text = "前检测器";
Detadd_Dlg(0, 0);
if (hwconfig.hwconfiginfo.u16DetInter == 1)
{
tabControlDet.TabPages[1].Text = "中检测器";
Detadd_Dlg(1, 1);
if (hwconfig.hwconfiginfo.u16DetBehind == 1)
{
tabControlDet.TabPages[2].Text = "后检测器";
Detadd_Dlg(2, 2);
}
}
else if (hwconfig.hwconfiginfo.u16DetBehind == 1)
{
tabControlDet.TabPages[1].Text = "后检测器";
Detadd_Dlg(2, 1);
}
}
else if (hwconfig.hwconfiginfo.u16DetInter == 1)
{
tabControlDet.TabPages[0].Text = "中检测器";
Detadd_Dlg(1, 0);
if (hwconfig.hwconfiginfo.u16DetBehind == 1)
{
tabControlDet.TabPages[1].Text = "后检测器";
Detadd_Dlg(2, 1);
}
}
else if (hwconfig.hwconfiginfo.u16DetBehind == 1)
{
tabControlDet.TabPages[0].Text = "后检测器";
Detadd_Dlg(2, 0);
}
tabControlDet.SelectedIndex = 0;
}
}
private void Det_Load(object sender, EventArgs e)
{
}
}
}
<?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>
\ No newline at end of file
This diff is collapsed.
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;
using GcDevicePc.GCBuffer;
namespace GcDevicePc.ConfigMethod
{
public partial class FID : Form
{
HWConfig hwconfig;
GCMethodConfig methodconfig;
public FID(HWConfig hwconfig, ref GCMethodConfig methodconfig)
{
InitializeComponent();
this.hwconfig = hwconfig;
this.methodconfig = methodconfig;
}
public void reflashContent(int index)
{
this.methodconfig.GetFidByID(index);
fidsettemp.Text = this.methodconfig.fid[index].fHeaterTempSet.ToString();
tb氢气压力设定.Text = this.methodconfig.fid[index].fSetH2Flow.ToString();
tb空气压力设定.Text = this.methodconfig.fid[index].fAirFlowSet.ToString();
tb尾吹气压力设定.Text = this.methodconfig.fid[index].fSetTailGas.ToString();
cb灵敏度.SelectedIndex = this.methodconfig.fid[index].u16Sensitive;
cb极性.SelectedIndex = this.methodconfig.fid[index].u16Polarity;
if (this.methodconfig.fid[index].u16KeyFire == 1)
cBox自动点火.CheckState = CheckState.Checked;
else
cBox自动点火.CheckState = CheckState.Unchecked;
if (this.methodconfig.fid[index].u16Zero == 1)
cBox自动调零.CheckState = CheckState.Checked;
else
cBox自动调零.CheckState = CheckState.Unchecked;
if (this.methodconfig.fid[index].u16KeyHeater == 1)
cBox加热器.CheckState = CheckState.Checked;
else
cBox加热器.CheckState = CheckState.Unchecked;
if (this.methodconfig.fid[index].u16KeyH2Flow == 1)
cBox氢气.CheckState = CheckState.Checked;
else
cBox氢气.CheckState = CheckState.Unchecked;
if (this.methodconfig.fid[index].u16KeyAirFlow == 1)
cBox空气.CheckState = CheckState.Checked;
else
cBox空气.CheckState = CheckState.Unchecked;
if (this.methodconfig.fid[index].u16KeyTailGas == 1)
cBox尾吹气.CheckState = CheckState.Checked;
else
cBox尾吹气.CheckState = CheckState.Unchecked;
if (this.methodconfig.fid[index].u16SigDeduct < 3 && this.methodconfig.fid[index].u16SigDeduct >= 0)
cListBoxSign.SetItemChecked(this.methodconfig.fid[index].u16SigDeduct, true);
}
private void TextBoxDec_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar) && e.KeyChar != '.')
{
e.Handled = true;
}
}
float string2float(string s)
{
float ret;
if(s == "" || s == null)
{
ret = 0;
}
else
{
ret = float.Parse(s);
}
return ret;
}
public void recordCurData(int index)
{
this.methodconfig.fid[index].fHeaterTempSet = string2float(fidsettemp.Text);
this.methodconfig.fid[index].fSetH2Flow = string2float(tb氢气压力设定.Text);
this.methodconfig.fid[index].fAirFlowSet = string2float(tb空气压力设定.Text);
this.methodconfig.fid[index].fSetTailGas = string2float(tb尾吹气压力设定.Text);
this.methodconfig.fid[index].u16Sensitive = (ushort)cb灵敏度.SelectedIndex;
this.methodconfig.fid[index].u16Polarity = (ushort)cb极性.SelectedIndex;
if (cBox自动点火.CheckState == CheckState.Checked)
this.methodconfig.fid[index].u16KeyFire = 1;
else
this.methodconfig.fid[index].u16KeyFire = 0;
if (cBox自动调零.CheckState == CheckState.Checked)
this.methodconfig.fid[index].u16Zero = 1;
else
this.methodconfig.fid[index].u16Zero = 0;
if (cBox加热器.CheckState == CheckState.Checked)
this.methodconfig.fid[index].u16KeyHeater = 1;
else
this.methodconfig.fid[index].u16KeyHeater = 0;
if (cBox氢气.CheckState == CheckState.Checked)
this.methodconfig.fid[index].u16KeyH2Flow = 1;
else
this.methodconfig.fid[index].u16KeyH2Flow = 0;
if (cBox空气.CheckState == CheckState.Checked)
this.methodconfig.fid[index].u16KeyAirFlow = 1;
else
this.methodconfig.fid[index].u16KeyAirFlow = 0;
if (cBox尾吹气.CheckState == CheckState.Checked)
this.methodconfig.fid[index].u16KeyTailGas = 1;
else
this.methodconfig.fid[index].u16KeyTailGas = 0;
if (cListBoxSign.GetItemChecked(0) == true)
this.methodconfig.fid[index].u16SigDeduct = 1;
else if (cListBoxSign.GetItemChecked(1) == true)
this.methodconfig.fid[index].u16SigDeduct = 2;
else if (cListBoxSign.GetItemChecked(2) == true)
this.methodconfig.fid[index].u16SigDeduct = 3;
}
private void fidsettemp_TextChanged(object sender, EventArgs e)
{
float tmpval = string2float(fidsettemp.Text);
if(tmpval > 400.0f)
{
MessageBox.Show("设置温度需要小于400");
fidsettemp.Text = "0";
}
}
}
}
<?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>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GcDevicePc.GCBuffer;
namespace GcDevicePc.ConfigMethod
{
public partial class PortTab : Form
{
HWConfig hwconfig;
GCMethodConfig methodconfig;
private int indexOld = 0;
public PortTab(HWConfig hwconfig, ref GCMethodConfig methodconfig)
{
InitializeComponent();
this.hwconfig = hwconfig;
this.methodconfig = methodconfig;
}
public void reflashContent()
{
this.methodconfig.GetDevInjPortAllPara();
int index;
if (this.hwconfig.hwconfiginfo.u16InjPortNum > 0)
{
if (this.hwconfig.hwconfiginfo.u16StartType != 2 || this.hwconfig.hwconfiginfo.u16StartType != 1)
{
this.cargasgroup.Enabled = false;
}
else
{
this.cargasgroup.Enabled = true;
}
InjPortBox.Items.Clear();
Shuntmode.Items.Clear();
this.InjPortBox.Items.Add("前进样口");
this.InjPortBox.Items.Add("后进样口");
this.Shuntmode.Items.Add("分流");
this.Shuntmode.Items.Add("不分流");
Shuntmode.SelectedIndex = 0;
InjPortBox.SelectedIndex = 0;
if (this.hwconfig.hwconfiginfo.u16InjPortNum < 2)
InjPortBox.Enabled = false;
if (this.hwconfig.hwconfiginfo.u16InjPortFront == 1)
{
indexOld = 0;
}
else if (this.hwconfig.hwconfiginfo.u16InjPortBehind == 1)
{
indexOld = 1;
}
else
{
indexOld = 0;
}
index = indexOld;
tb加热.Text = this.methodconfig.port[index].fHeaterSetTemp.ToString();
tb压力设定.Text = this.methodconfig.port[index].fSetPre.ToString();
tb总流量设定.Text = this.methodconfig.port[index].fSetSumFlow.ToString();
tb柱流量.Text = this.methodconfig.port[index].fSetColumnFlow.ToString();
tb吹扫流量.Text = this.methodconfig.port[index].fSetPurgeFlow.ToString();
if (this.methodconfig.port[index].bHeater == true)
cBox加热器.CheckState = CheckState.Checked;
else
cBox加热器.CheckState = CheckState.Unchecked;
ShuntPer.Text = this.methodconfig.port[index].u16SplitRatio.ToString();
ShuntFlow.Text = this.methodconfig.port[index].fSplitFlow.ToString();
if (this.methodconfig.port[index].bCarrierGasSave == true)
cBoxEPC.CheckState = CheckState.Checked;
else
cBoxEPC.CheckState = CheckState.Unchecked;
cargasthrift.Text = this.methodconfig.port[index].u16CarrierGasSave.ToString();
tb等待时间.Text = this.methodconfig.port[index].fSaveGasTime.ToString();
this.InjPortBox.SelectedIndex = indexOld;
this.groupBox1.Enabled = true;
this.InjPortBox.Enabled = true;
this.Shuntmode.Enabled = true;
this.Shuntmode.Enabled = true;
this.ShuntPer.Enabled = true;
this.ShuntFlow.Enabled = true;
}
else
{
this.groupBox1.Enabled = false;
this.InjPortBox.Enabled = false;
this.Shuntmode.Enabled = false;
this.Shuntmode.Enabled = false;
this.ShuntPer.Enabled = false;
this.ShuntFlow.Enabled = false;
this.cargasgroup.Enabled = false;
}
}
private void TextBoxDec_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar) && e.KeyChar != '.')
{
e.Handled = true;
}
}
private void InjPortBox_SelectedIndexChanged(object sender, EventArgs e)
{
recordCurData();
int index;
indexOld = this.InjPortBox.SelectedIndex;
index = indexOld;
if (index < 0)
return;
tb加热.Text = this.methodconfig.port[index].fHeaterSetTemp.ToString();
tb压力设定.Text = this.methodconfig.port[index].fSetPre.ToString();
tb总流量设定.Text = this.methodconfig.port[index].fSetSumFlow.ToString();
tb柱流量.Text = this.methodconfig.port[index].fSetColumnFlow.ToString();
tb吹扫流量.Text = this.methodconfig.port[index].fSetPurgeFlow.ToString();
if (this.methodconfig.port[index].bHeater == true)
cBox加热器.CheckState = CheckState.Checked;
else
cBox加热器.CheckState = CheckState.Unchecked;
ShuntPer.Text = this.methodconfig.port[index].u16SplitRatio.ToString();
ShuntFlow.Text = this.methodconfig.port[index].fSplitFlow.ToString();
if (this.methodconfig.port[index].bCarrierGasSave == true)
cBoxEPC.CheckState = CheckState.Checked;
else
cBoxEPC.CheckState = CheckState.Unchecked;
cargasthrift.Text = this.methodconfig.port[index].u16CarrierGasSave.ToString();
tb等待时间.Text = this.methodconfig.port[index].fSaveGasTime.ToString();
}
public void recordCurData()
{
int index;
index = indexOld;
if (index < 0)
return;
if (this.hwconfig.hwconfiginfo.u16InjPortFront == 1 && index == 0)
{
}
else if (this.hwconfig.hwconfiginfo.u16InjPortBehind == 1 && index == 1)
{
}
else
{
return;
}
if (tb加热.Text != "")
{
this.methodconfig.port[index].fHeaterSetTemp = float.Parse(tb加热.Text);
this.methodconfig.port[index].fHeaterSetTempm = float.Parse(tb加热.Text);
this.methodconfig.port[index].fSetPre = float.Parse(tb压力设定.Text);
this.methodconfig.port[index].fSetSumFlow = float.Parse(tb总流量设定.Text);
this.methodconfig.port[index].fSetColumnFlow = float.Parse(tb柱流量.Text);
this.methodconfig.port[index].fSetPurgeFlow = float.Parse(tb吹扫流量.Text);
if (cBox加热器.CheckState == CheckState.Checked)
this.methodconfig.port[index].bHeater = true;
else
this.methodconfig.port[index].bHeater = false;
this.methodconfig.port[index].u16SplitRatio = System.UInt16.Parse(ShuntPer.Text);
this.methodconfig.port[index].fSplitFlow = float.Parse(ShuntFlow.Text);
if (cBoxEPC.CheckState == CheckState.Checked)
{
this.methodconfig.port[index].bCarrierGasSave = true;
this.methodconfig.port[index].u16CarrierGasSave = System.UInt16.Parse(cargasthrift.Text);
this.methodconfig.port[index].fSaveGasTime = float.Parse(tb等待时间.Text);
}
else
{
this.methodconfig.port[index].bCarrierGasSave = false;
this.methodconfig.port[index].u16CarrierGasSave = System.UInt16.Parse(cargasthrift.Text);
this.methodconfig.port[index].fSaveGasTime = float.Parse(tb等待时间.Text);
}
}
}
private void tb加热_TextChanged(object sender, EventArgs e)
{
if (tb加热.Text != "")
{
float tmpval = float.Parse(tb加热.Text);
if(tmpval > 400.0f)
{
MessageBox.Show("设置温度需要小于400");
tb加热.Text = "0";
}
}
}
}
}
<?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>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<?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="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="delMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GcDevicePc.GCBuffer;
namespace GcDevicePc.ConfigMethod
{
public partial class SampleTab : Form
{
const int cFront = 0;
const int cBehind = 1;
private int indexOld = 0;
HWConfig hwconfig;
GCMethodConfig methodconfig;
public SampleTab(HWConfig hwconfig, ref GCMethodConfig methodconfig)
{
InitializeComponent();
this.hwconfig = hwconfig;
this.methodconfig = methodconfig;
}
public void reflashContent()
{
if (this.hwconfig.hwconfiginfo.u16SampleNum < 1)
{
this.groupBox1.Enabled = false;
this.InjSampleBox.Enabled = false;
}
else
{
this.groupBox1.Enabled = true;
this.InjSampleBox.Enabled = true;
}
int index;
this.methodconfig.GetSampleAllPara();
InjSampleBox.Items.Clear();
InjSampleBox.Items.Add("前进样器");
InjSampleBox.Items.Add("后进样器");
//for (int i = 0; i < this.InjSampleBox.Items.Count; i++)
//{
// this.InjSampleBox.Items.Remove(this.InjSampleBox.Items[i]);
//}
if (this.hwconfig.hwconfiginfo.u16SampleFront == 1)
{
indexOld = 0;
}
else if (this.hwconfig.hwconfiginfo.u16SampleBehind == 1)
{
indexOld = 1;
}
else
{
indexOld = -1;
}
index = indexOld;
if (index >= 0)
{
tb进样后溶剂A.Text = this.methodconfig.sample[index].sASSolventA;
tb进样后溶剂B.Text = this.methodconfig.sample[index].sASSolventB;
tb进样前溶剂A.Text = this.methodconfig.sample[index].sBSSolventA;
tb进样前溶剂B.Text = this.methodconfig.sample[index].sBSSolventB;
tb进样前样品.Text = this.methodconfig.sample[index].sFrontSample;
tb进样器尺寸.Text = this.methodconfig.sample[index].fInjectorSize.ToString();
tb进样量.Text = this.methodconfig.sample[index].fSampleQuantity.ToString();
tb进样前针芯次数.Text = this.methodconfig.sample[index].u16PushPullTimes.ToString();
}
this.InjSampleBox.SelectedIndex = indexOld;
}
private void TextBoxDec_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar) && e.KeyChar != '.')
{
e.Handled = true;
}
}
private void cb进样器_SelectedIndexChanged(object sender, EventArgs e)
{
recordCurData();
int index;
indexOld = this.InjSampleBox.SelectedIndex;
index = indexOld;
if (index < 0)
return;
tb进样后溶剂A.Text = this.methodconfig.sample[index].sASSolventA;
tb进样后溶剂B.Text = this.methodconfig.sample[index].sASSolventB;
tb进样前溶剂A.Text = this.methodconfig.sample[index].sBSSolventA;
tb进样前溶剂B.Text = this.methodconfig.sample[index].sBSSolventB;
tb进样前样品.Text = this.methodconfig.sample[index].sFrontSample;
tb进样器尺寸.Text = this.methodconfig.sample[index].fInjectorSize.ToString();
tb进样量.Text = this.methodconfig.sample[index].fSampleQuantity.ToString();
tb进样前针芯次数.Text = this.methodconfig.sample[index].u16PushPullTimes.ToString();
}
public void recordCurData()
{
int index;
index = indexOld;
if (index < 0)
return;
if (this.hwconfig.hwconfiginfo.u16SampleFront == 1 && index == 0)
{
}
else if (this.hwconfig.hwconfiginfo.u16SampleBehind == 1 && index == 1)
{
}
else
{
return;
}
this.methodconfig.sample[index].sASSolventA = tb进样后溶剂A.Text;
this.methodconfig.sample[index].sASSolventB = tb进样后溶剂B.Text;
this.methodconfig.sample[index].sBSSolventA = tb进样前溶剂A.Text;
this.methodconfig.sample[index].sBSSolventB = tb进样前溶剂B.Text;
this.methodconfig.sample[index].sFrontSample = tb进样前样品.Text;
if ( !(tb进样器尺寸.Text == null || tb进样器尺寸.Text ==""))
this.methodconfig.sample[index].fInjectorSize = float.Parse(tb进样器尺寸.Text);
if (!(tb进样量.Text == null || tb进样量.Text == ""))
this.methodconfig.sample[index].fSampleQuantity = float.Parse(tb进样量.Text);
if (!(tb进样前针芯次数.Text == null || tb进样前针芯次数.Text == ""))
this.methodconfig.sample[index].u16PushPullTimes = System.UInt16.Parse(tb进样前针芯次数.Text);
}
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Drawing2D;
namespace GcDevicePc.ConfigMethod
{
public partial class TabContorlEx : System.Windows.Forms.TabControl
{
//Image backImage;
public TabContorlEx()
{
InitializeComponent();
base.SetStyle(
ControlStyles.UserPaint | // 控件将自行绘制,而不是通过操作系统来绘制
ControlStyles.OptimizedDoubleBuffer | // 该控件首先在缓冲区中绘制,而不是直接绘制到屏幕上,这样可以减少闪烁
ControlStyles.AllPaintingInWmPaint | // 控件将忽略 WM_ERASEBKGND 窗口消息以减少闪烁
ControlStyles.ResizeRedraw | // 在调整控件大小时重绘控件
ControlStyles.SupportsTransparentBackColor, // 控件接受 alpha 组件小于 255 的 BackColor 以模拟透明
true); // 设置以上值为 true
base.UpdateStyles();
SizeMode = TabSizeMode.Fixed; // 大小模式为固定
ItemSize = new Size(55, 60); // 设定每个标签的尺寸
}
public TabContorlEx(IContainer container)
{
container.Add(this);
InitializeComponent();
}
protected override void OnPaint(PaintEventArgs e)
{
Rectangle rec = this.ClientRectangle;
SolidBrush bru = new SolidBrush(Color.FromArgb(228, 238, 250));
e.Graphics.FillRectangle(bru, rec);
e.Graphics.DrawRectangle(Pens.Black, rec);
for (int i = 0; i < this.TabCount; i++)
{
Rectangle bounds = this.GetTabRect(i);
if (this.ImageList != null)
{
int index = this.TabPages[i].ImageIndex;
string key = this.TabPages[i].ImageKey;
Image icon = new Bitmap(55, 60);
if (index > -1)
{
icon = this.ImageList.Images[index];
}
if (!string.IsNullOrEmpty(key))
{
icon = this.ImageList.Images[key];
}
e.Graphics.DrawImage(
icon, this.GetTabRect(i));
}
if (this.SelectedIndex == i)
{
if (this.ImageList != null)
{
int index = this.TabPages[i].ImageIndex;
string key = this.TabPages[i].ImageKey;
Image icon = new Bitmap(55, 60);
if (index > -1)
{
icon = this.ImageList.Images[index + 16];
}
if (!string.IsNullOrEmpty(key))
{
icon = this.ImageList.Images[key +16];
}
e.Graphics.DrawImage(
icon, this.GetTabRect(i));
}
}
}
base.OnPaint(e);
}
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -8,7 +8,7 @@ using Ini.Net; ...@@ -8,7 +8,7 @@ using Ini.Net;
namespace GcDevicePc.GCBuffer namespace GcDevicePc.GCBuffer
{ {
class HWConfig public class HWConfig
{ {
public struct HWConfigInfo public struct HWConfigInfo
{ {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
B[仪器编号] B[仪器编号]
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment