초기 커밋.
This commit is contained in:
25
LFP_Manager_PRM.sln
Normal file
25
LFP_Manager_PRM.sln
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30413.136
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LFP_Manager_PRM", "LFP_Manager_PRM\LFP_Manager_PRM.csproj", "{BE0785A4-0CCB-44C5-A8C0-1AA2245E71F4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{BE0785A4-0CCB-44C5-A8C0-1AA2245E71F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BE0785A4-0CCB-44C5-A8C0-1AA2245E71F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BE0785A4-0CCB-44C5-A8C0-1AA2245E71F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BE0785A4-0CCB-44C5-A8C0-1AA2245E71F4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B45D6DA4-74D5-40BD-9D37-AE9E1305D7B9}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
1579
LFP_Manager_PRM/Controls/ucCalibration.Designer.cs
generated
Normal file
1579
LFP_Manager_PRM/Controls/ucCalibration.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
273
LFP_Manager_PRM/Controls/ucCalibration.cs
Normal file
273
LFP_Manager_PRM/Controls/ucCalibration.cs
Normal file
@@ -0,0 +1,273 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
using LFP_Manager.Forms;
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Utils;
|
||||
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
public delegate void setCalibUpdate(object sender);
|
||||
public delegate void setCalibCommand(int mode, int flag, ref DeviceCalibration aCalib, ref DeviceSystemTotalData aTotal);
|
||||
public delegate Int32 getBattData(int item, int cno);
|
||||
|
||||
public partial class ucCalibration : DevExpress.XtraEditors.XtraUserControl
|
||||
{
|
||||
#region DEFINE
|
||||
|
||||
const string FORCED_BALANCING_OFF = "OFF";
|
||||
const string FORCED_BALANCING_ON = "ON";
|
||||
const string FORCED_BALANCING_TEST = "TEST";
|
||||
|
||||
const string MANUAL_BAL_DISABLE = "DISABLE";
|
||||
const string MANUAL_BAL_ENABLE = "ENABLE";
|
||||
|
||||
const string MANUAL_BAL_MODE_BUCK = "BUCK_MODE";
|
||||
const string MANUAL_BAL_MODE_BOOST = "BOOST_MODE";
|
||||
|
||||
const string CURR_CALIB_CHARGE = "CHARGE";
|
||||
const string CURR_CALIB_DISCHAGE = "DISCHARGE";
|
||||
|
||||
#endregion
|
||||
|
||||
#region VARIABLES
|
||||
|
||||
DeviceCalibration rCalib;
|
||||
DeviceCalibration wCalib;
|
||||
DeviceSystemTotalData wTotal;
|
||||
|
||||
//UInt32 cValue = 0;
|
||||
|
||||
//bool wFlag = false;
|
||||
|
||||
public event setCalibCommand OnCommand = null;
|
||||
public event getBattData OnGetBattData = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
// Battery No:
|
||||
// 0: No 1,3,5,7,9,11,13,15 ODD
|
||||
// 1: No 2,4,6,8,10,12,14 Even
|
||||
public ucCalibration()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
ComponentInit();
|
||||
|
||||
wTotal = new DeviceSystemTotalData();
|
||||
}
|
||||
|
||||
private void ComponentInit()
|
||||
{
|
||||
cbFcControl.Properties.Items.Clear();
|
||||
cbFcControl.Properties.Items.Add(FORCED_BALANCING_OFF);
|
||||
cbFcControl.Properties.Items.Add(FORCED_BALANCING_ON);
|
||||
cbFcControl.Properties.Items.Add(FORCED_BALANCING_TEST);
|
||||
cbFcControl.SelectedIndex = 1;
|
||||
|
||||
cbFcCellNo.Properties.Items.Clear();
|
||||
for (int i = 0; i < csConstData.SystemInfo.MAX_MODULE_CELL_SIZE; i++)
|
||||
{
|
||||
cbFcCellNo.Properties.Items.Add(String.Format("{0}", i + 1));
|
||||
}
|
||||
cbFcCellNo.SelectedIndex = 0;
|
||||
|
||||
CbBalEnable.Properties.Items.Clear();
|
||||
CbBalEnable.Properties.Items.Add(MANUAL_BAL_DISABLE);
|
||||
CbBalEnable.Properties.Items.Add(MANUAL_BAL_ENABLE);
|
||||
CbBalEnable.SelectedIndex = 0;
|
||||
|
||||
CbBalMode.Properties.Items.Clear();
|
||||
CbBalMode.Properties.Items.Add(MANUAL_BAL_MODE_BOOST);
|
||||
CbBalMode.Properties.Items.Add(MANUAL_BAL_MODE_BUCK);
|
||||
CbBalMode.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EXT EVENT FUNCTION
|
||||
|
||||
private void OnCommnadEvent(int mode, int flag, ref DeviceCalibration aCalib, ref DeviceSystemTotalData aTotal)
|
||||
{
|
||||
OnCommand?.Invoke(mode, flag, ref aCalib, ref aTotal);
|
||||
}
|
||||
|
||||
private Int32 OnGetBattDataEvent(int item, int cno)
|
||||
{
|
||||
Int32 result = 0;
|
||||
|
||||
if (OnGetBattData != null)
|
||||
{
|
||||
result = OnGetBattData(item, cno);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PUBLIC FUCTIONS
|
||||
|
||||
public void UpdateData(DeviceCalibration aCalib)
|
||||
{
|
||||
rCalib = aCalib;
|
||||
DisplayCalib();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region DISPLAY DATA
|
||||
|
||||
private void DisplayCalib()
|
||||
{
|
||||
// Cell Voltage Offset
|
||||
edCvOffset1.Text = String.Format("{0}", rCalib.CellVoltge.CvOffsetLow);
|
||||
edCvOffset2.Text = String.Format("{0}", rCalib.CellVoltge.CvOffsetHigh);
|
||||
|
||||
// Device Address
|
||||
edSystemAddr.Text = String.Format("{0:0}", rCalib.SystemInfo.devAddr);
|
||||
|
||||
// Cell Balancing Parameter
|
||||
TeCbThresholdCurr.Text = string.Format("{0}", rCalib.CbParam.Threadhold);
|
||||
TeCbWindowCurr.Text = string.Format("{0}", rCalib.CbParam.Window);
|
||||
TeCbMinCurr.Text = string.Format("{0}", rCalib.CbParam.Min);
|
||||
TeCbIntervalCurr.Text = string.Format("{0}", rCalib.CbParam.Interval);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BUTTON EVENT
|
||||
|
||||
private void btnFcSet_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (CbBalEnable.Text != null)
|
||||
{
|
||||
wCalib = rCalib;
|
||||
int cControl = cbFcControl.SelectedIndex;
|
||||
int cNo = cbFcCellNo.SelectedIndex + 1;
|
||||
int bMode = CbBalMode.SelectedIndex;
|
||||
int bEnable = CbBalEnable.SelectedIndex;
|
||||
|
||||
wCalib.ForcedBalancing2.Control = cControl;
|
||||
wCalib.ForcedBalancing2.CellNo = cNo;
|
||||
wCalib.ForcedBalancing2.Mode = bMode;
|
||||
wCalib.ForcedBalancing2.Enable = bEnable;
|
||||
|
||||
OnCommnadEvent(12, 1, ref wCalib, ref wTotal);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnBpGet_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnCommnadEvent(15, 0, ref wCalib, ref wTotal);
|
||||
}
|
||||
|
||||
private void btnBpSet_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (edCvOffsetNew1.Text == "") return;
|
||||
if (edCvOffsetNew2.Text == "") return;
|
||||
|
||||
wCalib = rCalib;
|
||||
wCalib.CellVoltge.CvOffsetLow = (short)(Convert.ToInt32(edCvOffsetNew1.Text));
|
||||
wCalib.CellVoltge.CvOffsetHigh = (short)(Convert.ToInt32(edCvOffsetNew2.Text));
|
||||
OnCommnadEvent(15, 1, ref wCalib, ref wTotal);
|
||||
}
|
||||
|
||||
private void btnBmsAddrGet_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnCommnadEvent(9, 0, ref wCalib, ref wTotal);
|
||||
}
|
||||
|
||||
private void btnBmsAddrSet_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (edSystemAddrNew.Text == string.Empty) return;
|
||||
wCalib = rCalib;
|
||||
wCalib.SystemInfo.devAddr = (UInt16)(Convert.ToInt32(edSystemAddrNew.Text));
|
||||
|
||||
OnCommnadEvent(9, 1, ref wCalib, ref wTotal);
|
||||
}
|
||||
|
||||
private void btnCanSpeedGet_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnCommnadEvent(8, 0, ref wCalib, ref wTotal);
|
||||
}
|
||||
|
||||
private void btnCanSpeedSet_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void TextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
csUtils.TypingOnlyNumber(sender, e, true, true);
|
||||
}
|
||||
private void BtnCbParamGet_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnCommnadEvent(17, 0, ref wCalib, ref wTotal);
|
||||
}
|
||||
|
||||
private void BtnCbParamSet_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (TeCbThresholdNew.Text == "") return;
|
||||
if (TeCbWindowNew.Text == "") return;
|
||||
if (TeCbMinNew.Text == "") return;
|
||||
if (TeCbIntervalNew.Text == "") return;
|
||||
|
||||
wCalib = rCalib.DeepCopy();
|
||||
wCalib.CbParam.Threadhold = (short)Convert.ToInt32(TeCbThresholdNew.Text);
|
||||
wCalib.CbParam.Window = (short)Convert.ToInt32(TeCbWindowNew.Text);
|
||||
wCalib.CbParam.Min = (short)Convert.ToInt32(TeCbMinNew.Text);
|
||||
wCalib.CbParam.Interval = (short)Convert.ToInt32(TeCbIntervalNew.Text);
|
||||
OnCommnadEvent(17, 1, ref wCalib, ref wTotal);
|
||||
}
|
||||
private void BtnCbDefault_Click(object sender, EventArgs e)
|
||||
{
|
||||
TeCbThresholdNew.Text = "3450";
|
||||
TeCbWindowNew.Text = "60";
|
||||
TeCbMinNew.Text = "10";
|
||||
TeCbIntervalNew.Text = "5";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region COMPONENT EVENT
|
||||
private void edModuleNo_EditValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (edModuleNo.Text != "")
|
||||
{
|
||||
int mdID;
|
||||
int mdNo;
|
||||
string strMdNo = edModuleNo.Text;
|
||||
|
||||
try
|
||||
{
|
||||
mdNo = Convert.ToInt32(strMdNo);
|
||||
|
||||
mdID = (mdNo - 1) % 14 + 1;
|
||||
|
||||
edSystemAddrNew.Text = mdID.ToString();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
edModuleNo.Text = "";
|
||||
MessageBox.Show(ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
120
LFP_Manager_PRM/Controls/ucCalibration.resx
Normal file
120
LFP_Manager_PRM/Controls/ucCalibration.resx
Normal 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>
|
||||
818
LFP_Manager_PRM/Controls/ucCommConfig.Designer.cs
generated
Normal file
818
LFP_Manager_PRM/Controls/ucCommConfig.Designer.cs
generated
Normal file
@@ -0,0 +1,818 @@
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
partial class ucCommConfig
|
||||
{
|
||||
/// <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 Component 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.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.btnClose = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnSave = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.gbCommConfig = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl3 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.rbtnUARTCAN = new System.Windows.Forms.RadioButton();
|
||||
this.rbtnUSBCAN = new System.Windows.Forms.RadioButton();
|
||||
this.cbUartSpeed = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.cbUartPort = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.cbDbLogPeriod = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.cbTargetModel = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.cbCanBaudrate = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.cbCanDevice = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.cbCanNo = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.cbCanIndex = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.lcgbCommConfig = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.lcgbCanConfig = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.slbDeviceType = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.slbDeviceIndex = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.slbCanNo = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.slbCanSpeed = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lcgbDatabaseConfig = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.slbDatabaseLogPeriod = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lcgbUartConfig = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.simpleLabelItem1 = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.simpleLabelItem2 = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lcgbDeviceType = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lcgbDeviceModel = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.slbDeviceModel = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbCommConfig)).BeginInit();
|
||||
this.gbCommConfig.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).BeginInit();
|
||||
this.layoutControl3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbUartSpeed.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbUartPort.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbDbLogPeriod.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbTargetModel.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbCanBaudrate.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbCanDevice.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbCanNo.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbCanIndex.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbCommConfig)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbCanConfig)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbDeviceType)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbDeviceIndex)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbCanNo)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbCanSpeed)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbDatabaseConfig)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbDatabaseLogPeriod)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbUartConfig)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbDeviceType)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbDeviceModel)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbDeviceModel)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.btnClose);
|
||||
this.layoutControl1.Controls.Add(this.btnSave);
|
||||
this.layoutControl1.Controls.Add(this.gbCommConfig);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1111, 267, 250, 350);
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(407, 501);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Appearance.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnClose.Appearance.Options.UseFont = true;
|
||||
this.btnClose.Location = new System.Drawing.Point(206, 461);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(197, 36);
|
||||
this.btnClose.StyleController = this.layoutControl1;
|
||||
this.btnClose.TabIndex = 7;
|
||||
this.btnClose.Text = "CLOSE";
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Appearance.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnSave.Appearance.Options.UseFont = true;
|
||||
this.btnSave.Location = new System.Drawing.Point(4, 461);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(198, 36);
|
||||
this.btnSave.StyleController = this.layoutControl1;
|
||||
this.btnSave.TabIndex = 6;
|
||||
this.btnSave.Text = "SAVE";
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// gbCommConfig
|
||||
//
|
||||
this.gbCommConfig.Controls.Add(this.layoutControl3);
|
||||
this.gbCommConfig.Location = new System.Drawing.Point(4, 4);
|
||||
this.gbCommConfig.Name = "gbCommConfig";
|
||||
this.gbCommConfig.Size = new System.Drawing.Size(399, 442);
|
||||
this.gbCommConfig.TabIndex = 5;
|
||||
this.gbCommConfig.Text = "Comm. Config";
|
||||
//
|
||||
// layoutControl3
|
||||
//
|
||||
this.layoutControl3.Controls.Add(this.rbtnUARTCAN);
|
||||
this.layoutControl3.Controls.Add(this.rbtnUSBCAN);
|
||||
this.layoutControl3.Controls.Add(this.cbUartSpeed);
|
||||
this.layoutControl3.Controls.Add(this.cbUartPort);
|
||||
this.layoutControl3.Controls.Add(this.cbDbLogPeriod);
|
||||
this.layoutControl3.Controls.Add(this.cbTargetModel);
|
||||
this.layoutControl3.Controls.Add(this.cbCanBaudrate);
|
||||
this.layoutControl3.Controls.Add(this.cbCanDevice);
|
||||
this.layoutControl3.Controls.Add(this.cbCanNo);
|
||||
this.layoutControl3.Controls.Add(this.cbCanIndex);
|
||||
this.layoutControl3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl3.Location = new System.Drawing.Point(2, 23);
|
||||
this.layoutControl3.Name = "layoutControl3";
|
||||
this.layoutControl3.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(940, 234, 679, 350);
|
||||
this.layoutControl3.Root = this.lcgbCommConfig;
|
||||
this.layoutControl3.Size = new System.Drawing.Size(395, 417);
|
||||
this.layoutControl3.TabIndex = 0;
|
||||
this.layoutControl3.Text = "layoutControl3";
|
||||
//
|
||||
// rbtnUARTCAN
|
||||
//
|
||||
this.rbtnUARTCAN.Location = new System.Drawing.Point(199, 28);
|
||||
this.rbtnUARTCAN.Name = "rbtnUARTCAN";
|
||||
this.rbtnUARTCAN.Size = new System.Drawing.Size(189, 25);
|
||||
this.rbtnUARTCAN.TabIndex = 15;
|
||||
this.rbtnUARTCAN.TabStop = true;
|
||||
this.rbtnUARTCAN.Text = "UARTCAN";
|
||||
this.rbtnUARTCAN.UseVisualStyleBackColor = true;
|
||||
this.rbtnUARTCAN.CheckedChanged += new System.EventHandler(this.rbtnUARTCAN_CheckedChanged);
|
||||
//
|
||||
// rbtnUSBCAN
|
||||
//
|
||||
this.rbtnUSBCAN.Location = new System.Drawing.Point(7, 28);
|
||||
this.rbtnUSBCAN.Name = "rbtnUSBCAN";
|
||||
this.rbtnUSBCAN.Size = new System.Drawing.Size(188, 25);
|
||||
this.rbtnUSBCAN.TabIndex = 14;
|
||||
this.rbtnUSBCAN.TabStop = true;
|
||||
this.rbtnUSBCAN.Text = "USBCAN";
|
||||
this.rbtnUSBCAN.UseVisualStyleBackColor = true;
|
||||
this.rbtnUSBCAN.CheckedChanged += new System.EventHandler(this.rbtnUSBCAN_CheckedChanged);
|
||||
//
|
||||
// cbUartSpeed
|
||||
//
|
||||
this.cbUartSpeed.EditValue = "115200";
|
||||
this.cbUartSpeed.Location = new System.Drawing.Point(139, 312);
|
||||
this.cbUartSpeed.Name = "cbUartSpeed";
|
||||
this.cbUartSpeed.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
|
||||
this.cbUartSpeed.Properties.Appearance.Options.UseFont = true;
|
||||
this.cbUartSpeed.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.cbUartSpeed.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.cbUartSpeed.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.cbUartSpeed.Properties.Items.AddRange(new object[] {
|
||||
"USBCAN_E_U",
|
||||
"USBCAN_2E_U"});
|
||||
this.cbUartSpeed.Size = new System.Drawing.Size(249, 24);
|
||||
this.cbUartSpeed.StyleController = this.layoutControl3;
|
||||
this.cbUartSpeed.TabIndex = 13;
|
||||
//
|
||||
// cbUartPort
|
||||
//
|
||||
this.cbUartPort.EditValue = "";
|
||||
this.cbUartPort.Location = new System.Drawing.Point(139, 284);
|
||||
this.cbUartPort.Name = "cbUartPort";
|
||||
this.cbUartPort.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
|
||||
this.cbUartPort.Properties.Appearance.Options.UseFont = true;
|
||||
this.cbUartPort.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.cbUartPort.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.cbUartPort.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.cbUartPort.Properties.Items.AddRange(new object[] {
|
||||
"USBCAN_E_U",
|
||||
"USBCAN_2E_U"});
|
||||
this.cbUartPort.Size = new System.Drawing.Size(249, 24);
|
||||
this.cbUartPort.StyleController = this.layoutControl3;
|
||||
this.cbUartPort.TabIndex = 12;
|
||||
//
|
||||
// cbDbLogPeriod
|
||||
//
|
||||
this.cbDbLogPeriod.EditValue = "5";
|
||||
this.cbDbLogPeriod.Location = new System.Drawing.Point(140, 369);
|
||||
this.cbDbLogPeriod.Name = "cbDbLogPeriod";
|
||||
this.cbDbLogPeriod.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
|
||||
this.cbDbLogPeriod.Properties.Appearance.Options.UseFont = true;
|
||||
this.cbDbLogPeriod.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.cbDbLogPeriod.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.cbDbLogPeriod.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.cbDbLogPeriod.Properties.Items.AddRange(new object[] {
|
||||
"1",
|
||||
"5",
|
||||
"10",
|
||||
"15",
|
||||
"30",
|
||||
"60"});
|
||||
this.cbDbLogPeriod.Size = new System.Drawing.Size(248, 24);
|
||||
this.cbDbLogPeriod.StyleController = this.layoutControl3;
|
||||
this.cbDbLogPeriod.TabIndex = 11;
|
||||
//
|
||||
// cbTargetModel
|
||||
//
|
||||
this.cbTargetModel.Location = new System.Drawing.Point(139, 86);
|
||||
this.cbTargetModel.Name = "cbTargetModel";
|
||||
this.cbTargetModel.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
|
||||
this.cbTargetModel.Properties.Appearance.Options.UseFont = true;
|
||||
this.cbTargetModel.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.cbTargetModel.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.cbTargetModel.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.cbTargetModel.Size = new System.Drawing.Size(249, 24);
|
||||
this.cbTargetModel.StyleController = this.layoutControl3;
|
||||
this.cbTargetModel.TabIndex = 10;
|
||||
//
|
||||
// cbCanBaudrate
|
||||
//
|
||||
this.cbCanBaudrate.EditValue = "1000Kbps";
|
||||
this.cbCanBaudrate.Location = new System.Drawing.Point(139, 227);
|
||||
this.cbCanBaudrate.Name = "cbCanBaudrate";
|
||||
this.cbCanBaudrate.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
|
||||
this.cbCanBaudrate.Properties.Appearance.Options.UseFont = true;
|
||||
this.cbCanBaudrate.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.cbCanBaudrate.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.cbCanBaudrate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.cbCanBaudrate.Properties.Items.AddRange(new object[] {
|
||||
"1000Kbps",
|
||||
"800Kbps",
|
||||
"500Kbps",
|
||||
"250Kbps",
|
||||
"125Kbps",
|
||||
"100Kbps",
|
||||
"50Kbps",
|
||||
"20Kbps",
|
||||
"10Kbps",
|
||||
"5Kbps"});
|
||||
this.cbCanBaudrate.Size = new System.Drawing.Size(249, 24);
|
||||
this.cbCanBaudrate.StyleController = this.layoutControl3;
|
||||
this.cbCanBaudrate.TabIndex = 9;
|
||||
//
|
||||
// cbCanDevice
|
||||
//
|
||||
this.cbCanDevice.EditValue = "USBCAN_2E_U";
|
||||
this.cbCanDevice.Location = new System.Drawing.Point(139, 143);
|
||||
this.cbCanDevice.Name = "cbCanDevice";
|
||||
this.cbCanDevice.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
|
||||
this.cbCanDevice.Properties.Appearance.Options.UseFont = true;
|
||||
this.cbCanDevice.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.cbCanDevice.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.cbCanDevice.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.cbCanDevice.Properties.Items.AddRange(new object[] {
|
||||
"USBCAN_E_U",
|
||||
"USBCAN_2E_U"});
|
||||
this.cbCanDevice.Size = new System.Drawing.Size(249, 24);
|
||||
this.cbCanDevice.StyleController = this.layoutControl3;
|
||||
this.cbCanDevice.TabIndex = 5;
|
||||
this.cbCanDevice.SelectedIndexChanged += new System.EventHandler(this.cbCanDevice_SelectedIndexChanged);
|
||||
//
|
||||
// cbCanNo
|
||||
//
|
||||
this.cbCanNo.EditValue = "0";
|
||||
this.cbCanNo.Location = new System.Drawing.Point(139, 199);
|
||||
this.cbCanNo.Name = "cbCanNo";
|
||||
this.cbCanNo.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
|
||||
this.cbCanNo.Properties.Appearance.Options.UseFont = true;
|
||||
this.cbCanNo.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.cbCanNo.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.cbCanNo.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.cbCanNo.Properties.Items.AddRange(new object[] {
|
||||
"0",
|
||||
"1"});
|
||||
this.cbCanNo.Size = new System.Drawing.Size(249, 24);
|
||||
this.cbCanNo.StyleController = this.layoutControl3;
|
||||
this.cbCanNo.TabIndex = 8;
|
||||
//
|
||||
// cbCanIndex
|
||||
//
|
||||
this.cbCanIndex.EditValue = "0";
|
||||
this.cbCanIndex.Location = new System.Drawing.Point(139, 171);
|
||||
this.cbCanIndex.Name = "cbCanIndex";
|
||||
this.cbCanIndex.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
|
||||
this.cbCanIndex.Properties.Appearance.Options.UseFont = true;
|
||||
this.cbCanIndex.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.cbCanIndex.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.cbCanIndex.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.cbCanIndex.Properties.Items.AddRange(new object[] {
|
||||
"0",
|
||||
"1",
|
||||
"2"});
|
||||
this.cbCanIndex.Size = new System.Drawing.Size(249, 24);
|
||||
this.cbCanIndex.StyleController = this.layoutControl3;
|
||||
this.cbCanIndex.TabIndex = 7;
|
||||
//
|
||||
// lcgbCommConfig
|
||||
//
|
||||
this.lcgbCommConfig.CustomizationFormText = "layoutControlGroup3";
|
||||
this.lcgbCommConfig.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.lcgbCommConfig.GroupBordersVisible = false;
|
||||
this.lcgbCommConfig.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.emptySpaceItem2,
|
||||
this.lcgbCanConfig,
|
||||
this.lcgbDatabaseConfig,
|
||||
this.lcgbUartConfig,
|
||||
this.lcgbDeviceType,
|
||||
this.lcgbDeviceModel});
|
||||
this.lcgbCommConfig.Name = "Root";
|
||||
this.lcgbCommConfig.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.lcgbCommConfig.Size = new System.Drawing.Size(395, 417);
|
||||
this.lcgbCommConfig.Text = "CommConfig";
|
||||
this.lcgbCommConfig.TextVisible = false;
|
||||
//
|
||||
// emptySpaceItem2
|
||||
//
|
||||
this.emptySpaceItem2.AllowHotTrack = false;
|
||||
this.emptySpaceItem2.Location = new System.Drawing.Point(0, 398);
|
||||
this.emptySpaceItem2.Name = "emptySpaceItem2";
|
||||
this.emptySpaceItem2.Size = new System.Drawing.Size(393, 17);
|
||||
this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// lcgbCanConfig
|
||||
//
|
||||
this.lcgbCanConfig.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.slbDeviceType,
|
||||
this.layoutControlItem1,
|
||||
this.slbDeviceIndex,
|
||||
this.layoutControlItem3,
|
||||
this.slbCanNo,
|
||||
this.layoutControlItem4,
|
||||
this.slbCanSpeed,
|
||||
this.layoutControlItem5});
|
||||
this.lcgbCanConfig.Location = new System.Drawing.Point(0, 115);
|
||||
this.lcgbCanConfig.Name = "lcgbCanConfig";
|
||||
this.lcgbCanConfig.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.lcgbCanConfig.Size = new System.Drawing.Size(393, 141);
|
||||
this.lcgbCanConfig.Text = "CAN CONFIG";
|
||||
//
|
||||
// slbDeviceType
|
||||
//
|
||||
this.slbDeviceType.AllowHotTrack = false;
|
||||
this.slbDeviceType.Location = new System.Drawing.Point(0, 0);
|
||||
this.slbDeviceType.MaxSize = new System.Drawing.Size(0, 28);
|
||||
this.slbDeviceType.MinSize = new System.Drawing.Size(126, 28);
|
||||
this.slbDeviceType.Name = "slbDeviceType";
|
||||
this.slbDeviceType.Size = new System.Drawing.Size(132, 28);
|
||||
this.slbDeviceType.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.slbDeviceType.Text = " Device Type";
|
||||
this.slbDeviceType.TextSize = new System.Drawing.Size(113, 14);
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.cbCanDevice;
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(132, 0);
|
||||
this.layoutControlItem1.MaxSize = new System.Drawing.Size(0, 28);
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(54, 28);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(253, 28);
|
||||
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// slbDeviceIndex
|
||||
//
|
||||
this.slbDeviceIndex.AllowHotTrack = false;
|
||||
this.slbDeviceIndex.Location = new System.Drawing.Point(0, 28);
|
||||
this.slbDeviceIndex.MaxSize = new System.Drawing.Size(0, 28);
|
||||
this.slbDeviceIndex.MinSize = new System.Drawing.Size(126, 28);
|
||||
this.slbDeviceIndex.Name = "slbDeviceIndex";
|
||||
this.slbDeviceIndex.Size = new System.Drawing.Size(132, 28);
|
||||
this.slbDeviceIndex.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.slbDeviceIndex.Text = " Device Index";
|
||||
this.slbDeviceIndex.TextSize = new System.Drawing.Size(113, 14);
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.cbCanIndex;
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(132, 28);
|
||||
this.layoutControlItem3.MaxSize = new System.Drawing.Size(0, 28);
|
||||
this.layoutControlItem3.MinSize = new System.Drawing.Size(54, 28);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(253, 28);
|
||||
this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem3.TextVisible = false;
|
||||
//
|
||||
// slbCanNo
|
||||
//
|
||||
this.slbCanNo.AllowHotTrack = false;
|
||||
this.slbCanNo.Location = new System.Drawing.Point(0, 56);
|
||||
this.slbCanNo.MaxSize = new System.Drawing.Size(0, 28);
|
||||
this.slbCanNo.MinSize = new System.Drawing.Size(126, 28);
|
||||
this.slbCanNo.Name = "slbCanNo";
|
||||
this.slbCanNo.Size = new System.Drawing.Size(132, 28);
|
||||
this.slbCanNo.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.slbCanNo.Text = " CAN No.";
|
||||
this.slbCanNo.TextSize = new System.Drawing.Size(113, 14);
|
||||
//
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.cbCanNo;
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(132, 56);
|
||||
this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 28);
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(54, 28);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(253, 28);
|
||||
this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem4.TextVisible = false;
|
||||
//
|
||||
// slbCanSpeed
|
||||
//
|
||||
this.slbCanSpeed.AllowHotTrack = false;
|
||||
this.slbCanSpeed.Location = new System.Drawing.Point(0, 84);
|
||||
this.slbCanSpeed.MaxSize = new System.Drawing.Size(0, 28);
|
||||
this.slbCanSpeed.MinSize = new System.Drawing.Size(126, 28);
|
||||
this.slbCanSpeed.Name = "slbCanSpeed";
|
||||
this.slbCanSpeed.Size = new System.Drawing.Size(132, 28);
|
||||
this.slbCanSpeed.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.slbCanSpeed.Text = " CAN Speed";
|
||||
this.slbCanSpeed.TextSize = new System.Drawing.Size(113, 14);
|
||||
//
|
||||
// layoutControlItem5
|
||||
//
|
||||
this.layoutControlItem5.Control = this.cbCanBaudrate;
|
||||
this.layoutControlItem5.Location = new System.Drawing.Point(132, 84);
|
||||
this.layoutControlItem5.MaxSize = new System.Drawing.Size(0, 28);
|
||||
this.layoutControlItem5.MinSize = new System.Drawing.Size(54, 28);
|
||||
this.layoutControlItem5.Name = "layoutControlItem5";
|
||||
this.layoutControlItem5.Size = new System.Drawing.Size(253, 28);
|
||||
this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem5.TextVisible = false;
|
||||
//
|
||||
// lcgbDatabaseConfig
|
||||
//
|
||||
this.lcgbDatabaseConfig.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.slbDatabaseLogPeriod,
|
||||
this.layoutControlItem7});
|
||||
this.lcgbDatabaseConfig.Location = new System.Drawing.Point(0, 341);
|
||||
this.lcgbDatabaseConfig.Name = "lcgbDatabaseConfig";
|
||||
this.lcgbDatabaseConfig.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.lcgbDatabaseConfig.Size = new System.Drawing.Size(393, 57);
|
||||
this.lcgbDatabaseConfig.Text = "DATABASE CONFIG";
|
||||
//
|
||||
// slbDatabaseLogPeriod
|
||||
//
|
||||
this.slbDatabaseLogPeriod.AllowHotTrack = false;
|
||||
this.slbDatabaseLogPeriod.Location = new System.Drawing.Point(0, 0);
|
||||
this.slbDatabaseLogPeriod.MaxSize = new System.Drawing.Size(0, 28);
|
||||
this.slbDatabaseLogPeriod.MinSize = new System.Drawing.Size(117, 28);
|
||||
this.slbDatabaseLogPeriod.Name = "slbDatabaseLogPeriod";
|
||||
this.slbDatabaseLogPeriod.Size = new System.Drawing.Size(133, 28);
|
||||
this.slbDatabaseLogPeriod.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.slbDatabaseLogPeriod.Text = " DB Log Period (sec)";
|
||||
this.slbDatabaseLogPeriod.TextSize = new System.Drawing.Size(113, 14);
|
||||
//
|
||||
// layoutControlItem7
|
||||
//
|
||||
this.layoutControlItem7.Control = this.cbDbLogPeriod;
|
||||
this.layoutControlItem7.Location = new System.Drawing.Point(133, 0);
|
||||
this.layoutControlItem7.MaxSize = new System.Drawing.Size(0, 28);
|
||||
this.layoutControlItem7.MinSize = new System.Drawing.Size(54, 28);
|
||||
this.layoutControlItem7.Name = "layoutControlItem7";
|
||||
this.layoutControlItem7.Size = new System.Drawing.Size(252, 28);
|
||||
this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem7.TextVisible = false;
|
||||
//
|
||||
// lcgbUartConfig
|
||||
//
|
||||
this.lcgbUartConfig.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.simpleLabelItem1,
|
||||
this.simpleLabelItem2,
|
||||
this.layoutControlItem9,
|
||||
this.layoutControlItem8});
|
||||
this.lcgbUartConfig.Location = new System.Drawing.Point(0, 256);
|
||||
this.lcgbUartConfig.Name = "lcgbUartConfig";
|
||||
this.lcgbUartConfig.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.lcgbUartConfig.Size = new System.Drawing.Size(393, 85);
|
||||
this.lcgbUartConfig.Text = "UART CONFIG";
|
||||
//
|
||||
// simpleLabelItem1
|
||||
//
|
||||
this.simpleLabelItem1.AllowHotTrack = false;
|
||||
this.simpleLabelItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.simpleLabelItem1.Name = "simpleLabelItem1";
|
||||
this.simpleLabelItem1.Size = new System.Drawing.Size(132, 28);
|
||||
this.simpleLabelItem1.Text = "UART Port";
|
||||
this.simpleLabelItem1.TextSize = new System.Drawing.Size(113, 14);
|
||||
//
|
||||
// simpleLabelItem2
|
||||
//
|
||||
this.simpleLabelItem2.AllowHotTrack = false;
|
||||
this.simpleLabelItem2.Location = new System.Drawing.Point(0, 28);
|
||||
this.simpleLabelItem2.Name = "simpleLabelItem2";
|
||||
this.simpleLabelItem2.Size = new System.Drawing.Size(132, 28);
|
||||
this.simpleLabelItem2.Text = "UART Speed";
|
||||
this.simpleLabelItem2.TextSize = new System.Drawing.Size(113, 14);
|
||||
//
|
||||
// layoutControlItem9
|
||||
//
|
||||
this.layoutControlItem9.Control = this.cbUartSpeed;
|
||||
this.layoutControlItem9.Location = new System.Drawing.Point(132, 28);
|
||||
this.layoutControlItem9.Name = "layoutControlItem9";
|
||||
this.layoutControlItem9.Size = new System.Drawing.Size(253, 28);
|
||||
this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem9.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem8
|
||||
//
|
||||
this.layoutControlItem8.Control = this.cbUartPort;
|
||||
this.layoutControlItem8.Location = new System.Drawing.Point(132, 0);
|
||||
this.layoutControlItem8.Name = "layoutControlItem8";
|
||||
this.layoutControlItem8.Size = new System.Drawing.Size(253, 28);
|
||||
this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem8.TextVisible = false;
|
||||
//
|
||||
// lcgbDeviceType
|
||||
//
|
||||
this.lcgbDeviceType.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem10,
|
||||
this.layoutControlItem11});
|
||||
this.lcgbDeviceType.Location = new System.Drawing.Point(0, 0);
|
||||
this.lcgbDeviceType.Name = "lcgbDeviceType";
|
||||
this.lcgbDeviceType.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.lcgbDeviceType.Size = new System.Drawing.Size(393, 58);
|
||||
this.lcgbDeviceType.Text = "DEVICE TYPE";
|
||||
//
|
||||
// layoutControlItem10
|
||||
//
|
||||
this.layoutControlItem10.Control = this.rbtnUSBCAN;
|
||||
this.layoutControlItem10.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem10.Name = "layoutControlItem10";
|
||||
this.layoutControlItem10.Size = new System.Drawing.Size(192, 29);
|
||||
this.layoutControlItem10.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem10.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem11
|
||||
//
|
||||
this.layoutControlItem11.Control = this.rbtnUARTCAN;
|
||||
this.layoutControlItem11.Location = new System.Drawing.Point(192, 0);
|
||||
this.layoutControlItem11.Name = "layoutControlItem11";
|
||||
this.layoutControlItem11.Size = new System.Drawing.Size(193, 29);
|
||||
this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem11.TextVisible = false;
|
||||
//
|
||||
// lcgbDeviceModel
|
||||
//
|
||||
this.lcgbDeviceModel.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.slbDeviceModel,
|
||||
this.layoutControlItem6});
|
||||
this.lcgbDeviceModel.Location = new System.Drawing.Point(0, 58);
|
||||
this.lcgbDeviceModel.Name = "lcgbDeviceModel";
|
||||
this.lcgbDeviceModel.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.lcgbDeviceModel.Size = new System.Drawing.Size(393, 57);
|
||||
this.lcgbDeviceModel.Text = "TARGET MODEL";
|
||||
//
|
||||
// slbDeviceModel
|
||||
//
|
||||
this.slbDeviceModel.AllowHotTrack = false;
|
||||
this.slbDeviceModel.Location = new System.Drawing.Point(0, 0);
|
||||
this.slbDeviceModel.MaxSize = new System.Drawing.Size(0, 28);
|
||||
this.slbDeviceModel.MinSize = new System.Drawing.Size(126, 28);
|
||||
this.slbDeviceModel.Name = "slbDeviceModel";
|
||||
this.slbDeviceModel.Size = new System.Drawing.Size(132, 28);
|
||||
this.slbDeviceModel.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.slbDeviceModel.Text = " Model";
|
||||
this.slbDeviceModel.TextSize = new System.Drawing.Size(113, 14);
|
||||
//
|
||||
// layoutControlItem6
|
||||
//
|
||||
this.layoutControlItem6.Control = this.cbTargetModel;
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(132, 0);
|
||||
this.layoutControlItem6.MaxSize = new System.Drawing.Size(0, 28);
|
||||
this.layoutControlItem6.MinSize = new System.Drawing.Size(54, 28);
|
||||
this.layoutControlItem6.Name = "layoutControlItem6";
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(253, 28);
|
||||
this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem6.TextVisible = false;
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem2,
|
||||
this.layoutControlItem12,
|
||||
this.layoutControlItem13,
|
||||
this.emptySpaceItem1});
|
||||
this.layoutControlGroup1.Name = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(407, 501);
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.gbCommConfig;
|
||||
this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem2.MinSize = new System.Drawing.Size(104, 24);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(403, 446);
|
||||
this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem12
|
||||
//
|
||||
this.layoutControlItem12.Control = this.btnSave;
|
||||
this.layoutControlItem12.CustomizationFormText = "layoutControlItem12";
|
||||
this.layoutControlItem12.Location = new System.Drawing.Point(0, 457);
|
||||
this.layoutControlItem12.MaxSize = new System.Drawing.Size(0, 40);
|
||||
this.layoutControlItem12.MinSize = new System.Drawing.Size(93, 40);
|
||||
this.layoutControlItem12.Name = "layoutControlItem12";
|
||||
this.layoutControlItem12.Size = new System.Drawing.Size(202, 40);
|
||||
this.layoutControlItem12.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem12.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem13
|
||||
//
|
||||
this.layoutControlItem13.Control = this.btnClose;
|
||||
this.layoutControlItem13.CustomizationFormText = "layoutControlItem13";
|
||||
this.layoutControlItem13.Location = new System.Drawing.Point(202, 457);
|
||||
this.layoutControlItem13.MaxSize = new System.Drawing.Size(0, 40);
|
||||
this.layoutControlItem13.MinSize = new System.Drawing.Size(93, 40);
|
||||
this.layoutControlItem13.Name = "layoutControlItem13";
|
||||
this.layoutControlItem13.Size = new System.Drawing.Size(201, 40);
|
||||
this.layoutControlItem13.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem13.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem13.TextVisible = false;
|
||||
//
|
||||
// emptySpaceItem1
|
||||
//
|
||||
this.emptySpaceItem1.AllowHotTrack = false;
|
||||
this.emptySpaceItem1.CustomizationFormText = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Location = new System.Drawing.Point(0, 446);
|
||||
this.emptySpaceItem1.Name = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Size = new System.Drawing.Size(403, 11);
|
||||
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// ucCommConfig
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Name = "ucCommConfig";
|
||||
this.Size = new System.Drawing.Size(407, 501);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbCommConfig)).EndInit();
|
||||
this.gbCommConfig.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).EndInit();
|
||||
this.layoutControl3.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbUartSpeed.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbUartPort.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbDbLogPeriod.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbTargetModel.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbCanBaudrate.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbCanDevice.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbCanNo.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbCanIndex.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbCommConfig)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbCanConfig)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbDeviceType)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbDeviceIndex)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbCanNo)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbCanSpeed)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbDatabaseConfig)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbDatabaseLogPeriod)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbUartConfig)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.simpleLabelItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbDeviceType)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbDeviceModel)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbDeviceModel)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.GroupControl gbCommConfig;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl3;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup lcgbCommConfig;
|
||||
private DevExpress.XtraEditors.SimpleButton btnClose;
|
||||
private DevExpress.XtraEditors.SimpleButton btnSave;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13;
|
||||
private DevExpress.XtraEditors.ComboBoxEdit cbCanIndex;
|
||||
private DevExpress.XtraEditors.ComboBoxEdit cbCanDevice;
|
||||
private DevExpress.XtraEditors.ComboBoxEdit cbCanNo;
|
||||
private DevExpress.XtraEditors.ComboBoxEdit cbCanBaudrate;
|
||||
private DevExpress.XtraEditors.ComboBoxEdit cbTargetModel;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup lcgbCanConfig;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem slbDeviceType;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem slbDeviceIndex;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem slbCanNo;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem slbCanSpeed;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem slbDeviceModel;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
|
||||
private DevExpress.XtraEditors.ComboBoxEdit cbDbLogPeriod;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem slbDatabaseLogPeriod;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup lcgbDatabaseConfig;
|
||||
private System.Windows.Forms.RadioButton rbtnUARTCAN;
|
||||
private System.Windows.Forms.RadioButton rbtnUSBCAN;
|
||||
private DevExpress.XtraEditors.ComboBoxEdit cbUartSpeed;
|
||||
private DevExpress.XtraEditors.ComboBoxEdit cbUartPort;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup lcgbUartConfig;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem simpleLabelItem1;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem simpleLabelItem2;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup lcgbDeviceType;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup lcgbDeviceModel;
|
||||
}
|
||||
}
|
||||
248
LFP_Manager_PRM/Controls/ucCommConfig.cs
Normal file
248
LFP_Manager_PRM/Controls/ucCommConfig.cs
Normal file
@@ -0,0 +1,248 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using System.IO;
|
||||
using System.IO.Ports;
|
||||
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Function;
|
||||
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
public delegate void CloseEvent(object aConfig);
|
||||
|
||||
public partial class ucCommConfig : DevExpress.XtraEditors.XtraUserControl
|
||||
{
|
||||
#region VARIABLES
|
||||
|
||||
CommConfig Config;
|
||||
public event CloseEvent OnClose = null;
|
||||
|
||||
DataTable dtComport = new DataTable();
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public ucCommConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
CanDeviceLoad();
|
||||
UartPortLoad();
|
||||
IniLoad();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region DATA LOAD AND SAVE
|
||||
|
||||
private void CanDeviceLoad()
|
||||
{
|
||||
cbCanDevice.Properties.Items.Clear();
|
||||
foreach (string d_name in csCanConstData.CanDeviceInfo.DeviceNames)
|
||||
{
|
||||
cbCanDevice.Properties.Items.Add(d_name);
|
||||
}
|
||||
}
|
||||
|
||||
private void InitComportDataTable()
|
||||
{
|
||||
dtComport = new DataTable();
|
||||
dtComport.Columns.Add("name", typeof(string));
|
||||
dtComport.Columns.Add("name2", typeof(string));
|
||||
}
|
||||
|
||||
private void UartPortLoad()
|
||||
{
|
||||
InitComportDataTable();
|
||||
foreach (string comport in SerialPort.GetPortNames())
|
||||
{
|
||||
DataRow aRow = dtComport.NewRow();
|
||||
aRow["name"] = comport;
|
||||
dtComport.Rows.Add(aRow);
|
||||
}
|
||||
|
||||
cbUartPort.Properties.Items.Clear();
|
||||
for (int i = 0; i < dtComport.Rows.Count; i++)
|
||||
{
|
||||
cbUartPort.Properties.Items.Add(dtComport.Rows[i]["name"].ToString());
|
||||
}
|
||||
|
||||
cbUartSpeed.Properties.Items.Clear();
|
||||
for (int i = 0; i < csConstData.CommType.UartCAN_Speed.Length; i++)
|
||||
{
|
||||
cbUartSpeed.Properties.Items.Add(csConstData.CommType.UartCAN_Speed[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private void IniLoad()
|
||||
{
|
||||
Config = csIniControlFunction.IniLoad(Application.ExecutablePath, Config);
|
||||
|
||||
cbTargetModel.Properties.Items.Clear();
|
||||
foreach (string d_name in csConstData.CommType.CAN_MODEL)
|
||||
{
|
||||
cbTargetModel.Properties.Items.Add(d_name);
|
||||
}
|
||||
|
||||
cbCanDevice.SelectedIndex = Config.CanDevice;
|
||||
cbCanIndex.SelectedIndex = Config.CanIndex;
|
||||
cbCanNo.SelectedIndex = Config.CanNo;
|
||||
cbCanBaudrate.SelectedIndex = Config.CanBaudrate;
|
||||
cbTargetModel.SelectedIndex = Config.TargetModelIndex;
|
||||
|
||||
cbUartPort.Text = Config.UartPort;
|
||||
cbUartSpeed.SelectedIndex = Config.UartBaudrate;
|
||||
|
||||
switch (Config.CommType)
|
||||
{
|
||||
case csConstData.CommType.COMM_SNMP:
|
||||
break;
|
||||
case csConstData.CommType.COMM_USBCAN:
|
||||
rbtnUSBCAN.Checked = true;
|
||||
break;
|
||||
case csConstData.CommType.COMM_UARTCAN:
|
||||
rbtnUARTCAN.Checked = true;
|
||||
|
||||
bool found = false;
|
||||
int ComId = 0;
|
||||
|
||||
if (Config.UartPort != "")
|
||||
{
|
||||
for (int i = 0; i < cbUartPort.Properties.Items.Count; i++)
|
||||
{
|
||||
if (dtComport.Rows[i]["name"].ToString() == Config.UartPort)
|
||||
{
|
||||
found = true;
|
||||
ComId = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (found)
|
||||
{
|
||||
cbUartPort.SelectedIndex = ComId;
|
||||
Config.UartPort = cbUartPort.Properties.Items[ComId].ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cbUartPort.Properties.Items.Count > 0)
|
||||
cbUartPort.SelectedIndex = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
cbDbLogPeriod.Text = Config.DbLogPeriod.ToString();
|
||||
}
|
||||
|
||||
private void IniSave()
|
||||
{
|
||||
if (rbtnUARTCAN.Checked)
|
||||
Config.CommType = csConstData.CommType.COMM_UARTCAN;
|
||||
else if (rbtnUSBCAN.Checked)
|
||||
Config.CommType = csConstData.CommType.COMM_USBCAN;
|
||||
|
||||
Config.CanDevice = cbCanDevice.SelectedIndex;
|
||||
Config.CanIndex = cbCanIndex.SelectedIndex;
|
||||
Config.CanNo = cbCanNo.SelectedIndex;
|
||||
Config.CanBaudrate = cbCanBaudrate.SelectedIndex;
|
||||
Config.TargetModelIndex = cbTargetModel.SelectedIndex;
|
||||
|
||||
Config.UartPort = cbUartPort.Text;
|
||||
Config.UartBaudrate = cbUartSpeed.SelectedIndex;
|
||||
|
||||
Config.DbLogPeriod = Convert.ToInt32(cbDbLogPeriod.Text);
|
||||
|
||||
csIniControlFunction.IniSave(Application.ExecutablePath, Config);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EVENT
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (OnClose != null) OnClose(Config);
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
IniSave();
|
||||
}
|
||||
|
||||
private void cbCanDevice_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
int DeviceID = csCanConstData.CanDeviceInfo.DeviceIds[cbCanDevice.SelectedIndex];
|
||||
|
||||
if (DeviceID == csCanConstData.CanDeviceInfo.VCI_VALUE_CAN4_1)
|
||||
{
|
||||
cbCanIndex.Enabled = false;
|
||||
cbCanNo.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
cbCanIndex.Enabled = true;
|
||||
cbCanNo.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void rbtnUSBCAN_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (rbtnUSBCAN.Checked)
|
||||
{
|
||||
cbCanDevice.Enabled = true;
|
||||
cbCanIndex.Enabled = true;
|
||||
cbCanNo.Enabled = true;
|
||||
cbCanBaudrate.Enabled = true;
|
||||
|
||||
cbUartPort.Enabled = false;
|
||||
cbUartSpeed.Enabled = false;
|
||||
}
|
||||
else if (rbtnUARTCAN.Checked)
|
||||
{
|
||||
cbCanDevice.Enabled = false;
|
||||
cbCanIndex.Enabled = false;
|
||||
cbCanNo.Enabled = false;
|
||||
cbCanBaudrate.Enabled = false;
|
||||
|
||||
cbUartPort.Enabled = true;
|
||||
cbUartSpeed.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void rbtnUARTCAN_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (rbtnUSBCAN.Checked)
|
||||
{
|
||||
cbCanDevice.Enabled = true;
|
||||
cbCanIndex.Enabled = true;
|
||||
cbCanNo.Enabled = true;
|
||||
cbCanBaudrate.Enabled = true;
|
||||
|
||||
cbUartPort.Enabled = false;
|
||||
cbUartSpeed.Enabled = false;
|
||||
}
|
||||
else if (rbtnUARTCAN.Checked)
|
||||
{
|
||||
cbCanDevice.Enabled = false;
|
||||
cbCanIndex.Enabled = false;
|
||||
cbCanNo.Enabled = false;
|
||||
cbCanBaudrate.Enabled = false;
|
||||
|
||||
cbUartPort.Enabled = true;
|
||||
cbUartSpeed.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
120
LFP_Manager_PRM/Controls/ucCommConfig.resx
Normal file
120
LFP_Manager_PRM/Controls/ucCommConfig.resx
Normal 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>
|
||||
140
LFP_Manager_PRM/Controls/ucCommConfig2.Designer.cs
generated
Normal file
140
LFP_Manager_PRM/Controls/ucCommConfig2.Designer.cs
generated
Normal file
@@ -0,0 +1,140 @@
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
partial class ucCommConfig2
|
||||
{
|
||||
/// <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 Component 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.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.btnStart = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.lbStatus = new DevExpress.XtraEditors.LabelControl();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.btnStart);
|
||||
this.layoutControl1.Controls.Add(this.lbStatus);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(298, 140, 250, 350);
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(107, 94);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// btnStart
|
||||
//
|
||||
this.btnStart.Appearance.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold);
|
||||
this.btnStart.Appearance.Options.UseFont = true;
|
||||
this.btnStart.Location = new System.Drawing.Point(3, 24);
|
||||
this.btnStart.Name = "btnStart";
|
||||
this.btnStart.Size = new System.Drawing.Size(101, 67);
|
||||
this.btnStart.StyleController = this.layoutControl1;
|
||||
this.btnStart.TabIndex = 5;
|
||||
this.btnStart.Text = "RUN";
|
||||
this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
|
||||
//
|
||||
// lbStatus
|
||||
//
|
||||
this.lbStatus.Location = new System.Drawing.Point(3, 3);
|
||||
this.lbStatus.Name = "lbStatus";
|
||||
this.lbStatus.Size = new System.Drawing.Size(101, 17);
|
||||
this.lbStatus.StyleController = this.layoutControl1;
|
||||
this.lbStatus.TabIndex = 4;
|
||||
this.lbStatus.Text = "Stop";
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1,
|
||||
this.layoutControlItem2});
|
||||
this.layoutControlGroup1.Name = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(107, 94);
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.lbStatus;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(105, 21);
|
||||
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.btnStart;
|
||||
this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(0, 21);
|
||||
this.layoutControlItem2.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(105, 71);
|
||||
this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// ucCommConfig2
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Name = "ucCommConfig2";
|
||||
this.Size = new System.Drawing.Size(107, 94);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnStart;
|
||||
private DevExpress.XtraEditors.LabelControl lbStatus;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
}
|
||||
}
|
||||
66
LFP_Manager_PRM/Controls/ucCommConfig2.cs
Normal file
66
LFP_Manager_PRM/Controls/ucCommConfig2.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
using LFP_Manager.Forms;
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Function;
|
||||
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
public partial class ucCommConfig2 : DevExpress.XtraEditors.XtraUserControl
|
||||
{
|
||||
#region VARIABLES
|
||||
public event ButtonEvent OnStart = null;
|
||||
|
||||
string info;
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
public ucCommConfig2()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
#endregion
|
||||
|
||||
public void UpdateConfig(ref CommConfig Config)
|
||||
{
|
||||
if (Config.CommType == 1)
|
||||
{
|
||||
info = String.Format("INTERFACE: UART, PORT: {0}, BAUDRATE: {1}, MODEL: {2}"
|
||||
, Config.UartPort
|
||||
, Config.UartBaudrate
|
||||
, csConstData.CommType.UART_MODEL[Config.UartModelIndex]
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
info = String.Format("INF: CAN");
|
||||
}
|
||||
|
||||
lbStatus.Text = info;
|
||||
}
|
||||
|
||||
public void UpdateStatus(bool flag, int mId)
|
||||
{
|
||||
if (flag)
|
||||
btnStart.Text = "STOP";
|
||||
else
|
||||
btnStart.Text = "RUN";
|
||||
|
||||
lbStatus.Text = String.Format("{0} - {1}", info, mId);
|
||||
}
|
||||
|
||||
private void btnStart_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (OnStart != null)
|
||||
OnStart(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
120
LFP_Manager_PRM/Controls/ucCommConfig2.resx
Normal file
120
LFP_Manager_PRM/Controls/ucCommConfig2.resx
Normal 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>
|
||||
265
LFP_Manager_PRM/Controls/ucDataLog.Designer.cs
generated
Normal file
265
LFP_Manager_PRM/Controls/ucDataLog.Designer.cs
generated
Normal file
@@ -0,0 +1,265 @@
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
partial class ucDataLog
|
||||
{
|
||||
/// <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 Component 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.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.gbDataLog = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl6 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.btnOpenLogFolder = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnLogStart = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.cbLogTime = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.layoutControlGroup6 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.lcitemLogTime = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.tmrLogging = new System.Windows.Forms.Timer(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbDataLog)).BeginInit();
|
||||
this.gbDataLog.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl6)).BeginInit();
|
||||
this.layoutControl6.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbLogTime.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcitemLogTime)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.gbDataLog);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(354, 204);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// gbDataLog
|
||||
//
|
||||
this.gbDataLog.Controls.Add(this.layoutControl6);
|
||||
this.gbDataLog.Location = new System.Drawing.Point(3, 3);
|
||||
this.gbDataLog.Name = "gbDataLog";
|
||||
this.gbDataLog.Size = new System.Drawing.Size(348, 198);
|
||||
this.gbDataLog.TabIndex = 9;
|
||||
this.gbDataLog.Text = "Data Logging";
|
||||
//
|
||||
// layoutControl6
|
||||
//
|
||||
this.layoutControl6.Controls.Add(this.btnOpenLogFolder);
|
||||
this.layoutControl6.Controls.Add(this.btnLogStart);
|
||||
this.layoutControl6.Controls.Add(this.cbLogTime);
|
||||
this.layoutControl6.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl6.Location = new System.Drawing.Point(2, 22);
|
||||
this.layoutControl6.Name = "layoutControl6";
|
||||
this.layoutControl6.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1209, 389, 250, 350);
|
||||
this.layoutControl6.Root = this.layoutControlGroup6;
|
||||
this.layoutControl6.Size = new System.Drawing.Size(344, 174);
|
||||
this.layoutControl6.TabIndex = 0;
|
||||
this.layoutControl6.Text = "layoutControl6";
|
||||
//
|
||||
// btnOpenLogFolder
|
||||
//
|
||||
this.btnOpenLogFolder.Location = new System.Drawing.Point(3, 109);
|
||||
this.btnOpenLogFolder.Name = "btnOpenLogFolder";
|
||||
this.btnOpenLogFolder.Size = new System.Drawing.Size(338, 62);
|
||||
this.btnOpenLogFolder.StyleController = this.layoutControl6;
|
||||
this.btnOpenLogFolder.TabIndex = 6;
|
||||
this.btnOpenLogFolder.Text = "Open Log Folder";
|
||||
this.btnOpenLogFolder.Click += new System.EventHandler(this.btnOpenLogFolder_Click);
|
||||
//
|
||||
// btnLogStart
|
||||
//
|
||||
this.btnLogStart.Location = new System.Drawing.Point(3, 37);
|
||||
this.btnLogStart.Name = "btnLogStart";
|
||||
this.btnLogStart.Size = new System.Drawing.Size(338, 68);
|
||||
this.btnLogStart.StyleController = this.layoutControl6;
|
||||
this.btnLogStart.TabIndex = 5;
|
||||
this.btnLogStart.Text = "Log Start";
|
||||
this.btnLogStart.Click += new System.EventHandler(this.btnLogStart_Click);
|
||||
//
|
||||
// cbLogTime
|
||||
//
|
||||
this.cbLogTime.EditValue = "5";
|
||||
this.cbLogTime.Location = new System.Drawing.Point(68, 3);
|
||||
this.cbLogTime.Name = "cbLogTime";
|
||||
this.cbLogTime.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.cbLogTime.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.cbLogTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.cbLogTime.Properties.Items.AddRange(new object[] {
|
||||
"1",
|
||||
"5",
|
||||
"10",
|
||||
"15",
|
||||
"30",
|
||||
"60"});
|
||||
this.cbLogTime.Size = new System.Drawing.Size(273, 20);
|
||||
this.cbLogTime.StyleController = this.layoutControl6;
|
||||
this.cbLogTime.TabIndex = 4;
|
||||
//
|
||||
// layoutControlGroup6
|
||||
//
|
||||
this.layoutControlGroup6.CustomizationFormText = "layoutControlGroup6";
|
||||
this.layoutControlGroup6.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup6.GroupBordersVisible = false;
|
||||
this.layoutControlGroup6.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.lcitemLogTime,
|
||||
this.layoutControlItem13,
|
||||
this.layoutControlItem12});
|
||||
this.layoutControlGroup6.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlGroup6.Name = "layoutControlGroup6";
|
||||
this.layoutControlGroup6.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup6.Size = new System.Drawing.Size(344, 174);
|
||||
this.layoutControlGroup6.Text = "layoutControlGroup6";
|
||||
this.layoutControlGroup6.TextVisible = false;
|
||||
//
|
||||
// lcitemLogTime
|
||||
//
|
||||
this.lcitemLogTime.AppearanceItemCaption.Options.UseTextOptions = true;
|
||||
this.lcitemLogTime.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.lcitemLogTime.Control = this.cbLogTime;
|
||||
this.lcitemLogTime.CustomizationFormText = "Log Time";
|
||||
this.lcitemLogTime.Location = new System.Drawing.Point(0, 0);
|
||||
this.lcitemLogTime.MinSize = new System.Drawing.Size(119, 24);
|
||||
this.lcitemLogTime.Name = "lcitemLogTime";
|
||||
this.lcitemLogTime.Size = new System.Drawing.Size(342, 34);
|
||||
this.lcitemLogTime.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lcitemLogTime.Text = "Log Time";
|
||||
this.lcitemLogTime.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
|
||||
this.lcitemLogTime.TextSize = new System.Drawing.Size(60, 20);
|
||||
this.lcitemLogTime.TextToControlDistance = 5;
|
||||
//
|
||||
// layoutControlItem13
|
||||
//
|
||||
this.layoutControlItem13.Control = this.btnLogStart;
|
||||
this.layoutControlItem13.CustomizationFormText = "layoutControlItem13";
|
||||
this.layoutControlItem13.Location = new System.Drawing.Point(0, 34);
|
||||
this.layoutControlItem13.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem13.Name = "layoutControlItem13";
|
||||
this.layoutControlItem13.Size = new System.Drawing.Size(342, 72);
|
||||
this.layoutControlItem13.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem13.Text = "layoutControlItem13";
|
||||
this.layoutControlItem13.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem13.TextToControlDistance = 0;
|
||||
this.layoutControlItem13.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem12
|
||||
//
|
||||
this.layoutControlItem12.Control = this.btnOpenLogFolder;
|
||||
this.layoutControlItem12.CustomizationFormText = "layoutControlItem12";
|
||||
this.layoutControlItem12.Location = new System.Drawing.Point(0, 106);
|
||||
this.layoutControlItem12.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem12.Name = "layoutControlItem12";
|
||||
this.layoutControlItem12.Size = new System.Drawing.Size(342, 66);
|
||||
this.layoutControlItem12.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem12.Text = "layoutControlItem12";
|
||||
this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem12.TextToControlDistance = 0;
|
||||
this.layoutControlItem12.TextVisible = false;
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1});
|
||||
this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlGroup1.Name = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(354, 204);
|
||||
this.layoutControlGroup1.Text = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.gbDataLog;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(352, 202);
|
||||
this.layoutControlItem1.Text = "layoutControlItem1";
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextToControlDistance = 0;
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// tmrLogging
|
||||
//
|
||||
this.tmrLogging.Interval = 500;
|
||||
this.tmrLogging.Tick += new System.EventHandler(this.tmrLogging_Tick);
|
||||
//
|
||||
// ucDataLog
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Name = "ucDataLog";
|
||||
this.Size = new System.Drawing.Size(354, 204);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbDataLog)).EndInit();
|
||||
this.gbDataLog.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl6)).EndInit();
|
||||
this.layoutControl6.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbLogTime.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcitemLogTime)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.GroupControl gbDataLog;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl6;
|
||||
private DevExpress.XtraEditors.SimpleButton btnOpenLogFolder;
|
||||
private DevExpress.XtraEditors.SimpleButton btnLogStart;
|
||||
private DevExpress.XtraEditors.ComboBoxEdit cbLogTime;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup6;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcitemLogTime;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private System.Windows.Forms.Timer tmrLogging;
|
||||
}
|
||||
}
|
||||
141
LFP_Manager_PRM/Controls/ucDataLog.cs
Normal file
141
LFP_Manager_PRM/Controls/ucDataLog.cs
Normal file
@@ -0,0 +1,141 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Utils;
|
||||
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
public delegate void LogDataUpdate(object sender, string LogResult, bool active, int aLogTime);
|
||||
|
||||
public partial class ucDataLog : DevExpress.XtraEditors.XtraUserControl
|
||||
{
|
||||
#region VARIABLES
|
||||
|
||||
CommConfig Config;
|
||||
DeviceSystemData SystemData;
|
||||
DateTime bakDateTime;
|
||||
|
||||
String LogFileName = "";
|
||||
String LogFileNameTotal = "";
|
||||
|
||||
bool logging = false;
|
||||
bool Active = false;
|
||||
|
||||
public event LogDataUpdate OnUpdate = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public ucDataLog()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PUBLIC UPDATE
|
||||
|
||||
public void UpdateActiveStatus(bool aStatus, CommConfig aConfig, ref DeviceSystemData aSystemData)
|
||||
{
|
||||
Active = aStatus;
|
||||
Config = aConfig;
|
||||
SystemData = aSystemData;
|
||||
}
|
||||
|
||||
public void UpdateData(ref DeviceSystemData aSystemData)
|
||||
{
|
||||
SystemData = aSystemData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region TIMER EVENT
|
||||
|
||||
private void tmrLogging_Tick(object sender, EventArgs e)
|
||||
{
|
||||
DateTime cDate = DateTime.Now;
|
||||
int ss;
|
||||
|
||||
if ((logging) && (Active))
|
||||
{
|
||||
ss = Convert.ToInt16(cbLogTime.Text);
|
||||
|
||||
if (
|
||||
((bakDateTime.Minute != cDate.Minute)
|
||||
|| (bakDateTime.Second != cDate.Second))
|
||||
&& ((cDate.Second % ss) == 0)
|
||||
)
|
||||
{
|
||||
// CSV Log Process
|
||||
try
|
||||
{
|
||||
csLog.SystemDataLog(1, Config, SystemData, cDate, Application.ExecutablePath, LogFileName);
|
||||
bakDateTime = cDate;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
//// Database Log Process
|
||||
//csDbUtils.LogDbCreate(csConstData.CAN_MODEL[Config.CanModelIndex]);
|
||||
//csDbUtils.BmsLogDataInsert(ref Config, ref SystemData, cDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BUTTON EVENT
|
||||
|
||||
private void btnLogStart_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (logging == true)
|
||||
{
|
||||
tmrLogging.Stop();
|
||||
cbLogTime.Enabled = true;
|
||||
logging = false;
|
||||
btnLogStart.Text = "Log Start";
|
||||
|
||||
if (OnUpdate != null)
|
||||
{
|
||||
OnUpdate(this, String.Format("LogStop: {0:yyyy/MM/dd HH:mm:ss}", DateTime.Now), false, Convert.ToInt16(cbLogTime.Text));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogFileNameTotal = String.Format("{0:yyMMddHHmmss}", DateTime.Now);
|
||||
LogFileName = String.Format("{0:yyMMddHHmmss}", DateTime.Now);
|
||||
tmrLogging.Start();
|
||||
cbLogTime.Enabled = false;
|
||||
logging = true;
|
||||
btnLogStart.Text = "Log Stop";
|
||||
|
||||
OnUpdate?.Invoke(this, String.Format("Logging: SHELFX_LOG_{0}.csv", LogFileName), true, Convert.ToInt16(cbLogTime.Text));
|
||||
|
||||
csDbUtils.LogDbCreate(csConstData.CommType.CAN_MODEL[Config.TargetModelIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnOpenLogFolder_Click(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process ps = new System.Diagnostics.Process();
|
||||
ps.StartInfo.FileName = "explorer.exe";
|
||||
ps.StartInfo.Arguments = csLog.GetLogFolder(Application.ExecutablePath);
|
||||
ps.StartInfo.WorkingDirectory = csLog.GetLogFolder(Application.ExecutablePath);
|
||||
ps.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
|
||||
|
||||
ps.Start();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
123
LFP_Manager_PRM/Controls/ucDataLog.resx
Normal file
123
LFP_Manager_PRM/Controls/ucDataLog.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?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="tmrLogging.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
288
LFP_Manager_PRM/Controls/ucEventLog.Designer.cs
generated
Normal file
288
LFP_Manager_PRM/Controls/ucEventLog.Designer.cs
generated
Normal file
@@ -0,0 +1,288 @@
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
partial class ucEventLog
|
||||
{
|
||||
/// <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 Component 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.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.gcLogging = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl2 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.cbPacketLog = new DevExpress.XtraEditors.CheckEdit();
|
||||
this.btnLogClear = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.tabDataLog = new DevExpress.XtraTab.XtraTabControl();
|
||||
this.tpDataLog = new DevExpress.XtraTab.XtraTabPage();
|
||||
this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
|
||||
this.meDataLog = new DevExpress.XtraEditors.MemoEdit();
|
||||
this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lcCheckEdit = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gcLogging)).BeginInit();
|
||||
this.gcLogging.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).BeginInit();
|
||||
this.layoutControl2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbPacketLog.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tabDataLog)).BeginInit();
|
||||
this.tabDataLog.SuspendLayout();
|
||||
this.tpDataLog.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
|
||||
this.panelControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.meDataLog.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcCheckEdit)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.gcLogging);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(302, 140, 250, 350);
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(799, 173);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// gcLogging
|
||||
//
|
||||
this.gcLogging.Controls.Add(this.layoutControl2);
|
||||
this.gcLogging.Location = new System.Drawing.Point(3, 3);
|
||||
this.gcLogging.Name = "gcLogging";
|
||||
this.gcLogging.Size = new System.Drawing.Size(793, 167);
|
||||
this.gcLogging.TabIndex = 6;
|
||||
this.gcLogging.Text = "Event";
|
||||
//
|
||||
// layoutControl2
|
||||
//
|
||||
this.layoutControl2.Controls.Add(this.cbPacketLog);
|
||||
this.layoutControl2.Controls.Add(this.btnLogClear);
|
||||
this.layoutControl2.Controls.Add(this.tabDataLog);
|
||||
this.layoutControl2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl2.Location = new System.Drawing.Point(2, 22);
|
||||
this.layoutControl2.Name = "layoutControl2";
|
||||
this.layoutControl2.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1234, 235, 250, 350);
|
||||
this.layoutControl2.Root = this.layoutControlGroup2;
|
||||
this.layoutControl2.Size = new System.Drawing.Size(789, 143);
|
||||
this.layoutControl2.TabIndex = 0;
|
||||
this.layoutControl2.Text = "layoutControl2";
|
||||
//
|
||||
// cbPacketLog
|
||||
//
|
||||
this.cbPacketLog.Location = new System.Drawing.Point(702, 4);
|
||||
this.cbPacketLog.Name = "cbPacketLog";
|
||||
this.cbPacketLog.Properties.Caption = "Packet";
|
||||
this.cbPacketLog.Size = new System.Drawing.Size(83, 19);
|
||||
this.cbPacketLog.StyleController = this.layoutControl2;
|
||||
this.cbPacketLog.TabIndex = 6;
|
||||
//
|
||||
// btnLogClear
|
||||
//
|
||||
this.btnLogClear.Location = new System.Drawing.Point(702, 28);
|
||||
this.btnLogClear.Name = "btnLogClear";
|
||||
this.btnLogClear.Size = new System.Drawing.Size(83, 111);
|
||||
this.btnLogClear.StyleController = this.layoutControl2;
|
||||
this.btnLogClear.TabIndex = 5;
|
||||
this.btnLogClear.Text = "Clear";
|
||||
this.btnLogClear.Click += new System.EventHandler(this.btnLogClear_Click);
|
||||
//
|
||||
// tabDataLog
|
||||
//
|
||||
this.tabDataLog.Location = new System.Drawing.Point(4, 4);
|
||||
this.tabDataLog.Name = "tabDataLog";
|
||||
this.tabDataLog.SelectedTabPage = this.tpDataLog;
|
||||
this.tabDataLog.Size = new System.Drawing.Size(694, 135);
|
||||
this.tabDataLog.TabIndex = 4;
|
||||
this.tabDataLog.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
|
||||
this.tpDataLog});
|
||||
//
|
||||
// tpDataLog
|
||||
//
|
||||
this.tpDataLog.Controls.Add(this.panelControl1);
|
||||
this.tpDataLog.Name = "tpDataLog";
|
||||
this.tpDataLog.Size = new System.Drawing.Size(688, 106);
|
||||
this.tpDataLog.Text = "Data Log";
|
||||
//
|
||||
// panelControl1
|
||||
//
|
||||
this.panelControl1.Controls.Add(this.meDataLog);
|
||||
this.panelControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panelControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panelControl1.Name = "panelControl1";
|
||||
this.panelControl1.Size = new System.Drawing.Size(688, 106);
|
||||
this.panelControl1.TabIndex = 0;
|
||||
//
|
||||
// meDataLog
|
||||
//
|
||||
this.meDataLog.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.meDataLog.Location = new System.Drawing.Point(2, 2);
|
||||
this.meDataLog.Name = "meDataLog";
|
||||
this.meDataLog.Properties.MaxLength = 1000;
|
||||
this.meDataLog.Size = new System.Drawing.Size(684, 102);
|
||||
this.meDataLog.TabIndex = 0;
|
||||
//
|
||||
// layoutControlGroup2
|
||||
//
|
||||
this.layoutControlGroup2.CustomizationFormText = "layoutControlGroup2";
|
||||
this.layoutControlGroup2.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup2.GroupBordersVisible = false;
|
||||
this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem6,
|
||||
this.layoutControlItem14,
|
||||
this.lcCheckEdit});
|
||||
this.layoutControlGroup2.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlGroup2.Name = "layoutControlGroup2";
|
||||
this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2);
|
||||
this.layoutControlGroup2.Size = new System.Drawing.Size(789, 143);
|
||||
this.layoutControlGroup2.Text = "layoutControlGroup2";
|
||||
this.layoutControlGroup2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem6
|
||||
//
|
||||
this.layoutControlItem6.Control = this.tabDataLog;
|
||||
this.layoutControlItem6.CustomizationFormText = "layoutControlItem6";
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem6.MinSize = new System.Drawing.Size(104, 24);
|
||||
this.layoutControlItem6.Name = "layoutControlItem6";
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(698, 139);
|
||||
this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem6.Text = "layoutControlItem6";
|
||||
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem6.TextToControlDistance = 0;
|
||||
this.layoutControlItem6.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem14
|
||||
//
|
||||
this.layoutControlItem14.Control = this.btnLogClear;
|
||||
this.layoutControlItem14.CustomizationFormText = "layoutControlItem14";
|
||||
this.layoutControlItem14.Location = new System.Drawing.Point(698, 24);
|
||||
this.layoutControlItem14.MinSize = new System.Drawing.Size(60, 26);
|
||||
this.layoutControlItem14.Name = "layoutControlItem14";
|
||||
this.layoutControlItem14.Size = new System.Drawing.Size(87, 115);
|
||||
this.layoutControlItem14.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem14.Text = "layoutControlItem14";
|
||||
this.layoutControlItem14.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem14.TextToControlDistance = 0;
|
||||
this.layoutControlItem14.TextVisible = false;
|
||||
//
|
||||
// lcCheckEdit
|
||||
//
|
||||
this.lcCheckEdit.Control = this.cbPacketLog;
|
||||
this.lcCheckEdit.CustomizationFormText = "lcCheckEdit";
|
||||
this.lcCheckEdit.Location = new System.Drawing.Point(698, 0);
|
||||
this.lcCheckEdit.MinSize = new System.Drawing.Size(87, 23);
|
||||
this.lcCheckEdit.Name = "lcCheckEdit";
|
||||
this.lcCheckEdit.Size = new System.Drawing.Size(87, 24);
|
||||
this.lcCheckEdit.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lcCheckEdit.Text = "lcCheckEdit";
|
||||
this.lcCheckEdit.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.lcCheckEdit.TextToControlDistance = 0;
|
||||
this.lcCheckEdit.TextVisible = false;
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1});
|
||||
this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlGroup1.Name = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(799, 173);
|
||||
this.layoutControlGroup1.Text = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.gcLogging;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(797, 171);
|
||||
this.layoutControlItem1.Text = "layoutControlItem1";
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextToControlDistance = 0;
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// ucEventLog
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Name = "ucEventLog";
|
||||
this.Size = new System.Drawing.Size(799, 173);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gcLogging)).EndInit();
|
||||
this.gcLogging.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).EndInit();
|
||||
this.layoutControl2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbPacketLog.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tabDataLog)).EndInit();
|
||||
this.tabDataLog.ResumeLayout(false);
|
||||
this.tpDataLog.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
|
||||
this.panelControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.meDataLog.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcCheckEdit)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.GroupControl gcLogging;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl2;
|
||||
private DevExpress.XtraEditors.SimpleButton btnLogClear;
|
||||
private DevExpress.XtraTab.XtraTabControl tabDataLog;
|
||||
private DevExpress.XtraTab.XtraTabPage tpDataLog;
|
||||
private DevExpress.XtraEditors.PanelControl panelControl1;
|
||||
private DevExpress.XtraEditors.MemoEdit meDataLog;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraEditors.CheckEdit cbPacketLog;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcCheckEdit;
|
||||
}
|
||||
}
|
||||
47
LFP_Manager_PRM/Controls/ucEventLog.cs
Normal file
47
LFP_Manager_PRM/Controls/ucEventLog.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
public partial class ucEventLog : DevExpress.XtraEditors.XtraUserControl
|
||||
{
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public ucEventLog()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PUBLIC UPDATE
|
||||
|
||||
public void EventUpdate(string aEvent)
|
||||
{
|
||||
if (cbPacketLog.Checked)
|
||||
meDataLog.Text = aEvent + meDataLog.Text;
|
||||
}
|
||||
public void MsgUpdate(string aEvent)
|
||||
{
|
||||
meDataLog.Text = aEvent + meDataLog.Text;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ENVENT
|
||||
|
||||
private void btnLogClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
meDataLog.Text = "";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
120
LFP_Manager_PRM/Controls/ucEventLog.resx
Normal file
120
LFP_Manager_PRM/Controls/ucEventLog.resx
Normal 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>
|
||||
331
LFP_Manager_PRM/Controls/ucHistroy.Designer.cs
generated
Normal file
331
LFP_Manager_PRM/Controls/ucHistroy.Designer.cs
generated
Normal file
@@ -0,0 +1,331 @@
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
partial class ucHistroy
|
||||
{
|
||||
/// <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 Component 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.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.btnSearch = new System.Windows.Forms.Button();
|
||||
this.dtpEnd = new System.Windows.Forms.DateTimePicker();
|
||||
this.dtpStart = new System.Windows.Forms.DateTimePicker();
|
||||
this.xtcSearchResult = new DevExpress.XtraTab.XtraTabControl();
|
||||
this.pgGrid = new DevExpress.XtraTab.XtraTabPage();
|
||||
this.layoutControl3 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.gridSearchResult = new System.Windows.Forms.DataGridView();
|
||||
this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.lcgbSelectDatetime = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.slbStartDate = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.slbEndDate = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lcgbSearchResult = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.DbWaitForm = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::LFP_Manager.Forms.fmxWait), true, true, typeof(System.Windows.Forms.UserControl));
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xtcSearchResult)).BeginInit();
|
||||
this.xtcSearchResult.SuspendLayout();
|
||||
this.pgGrid.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).BeginInit();
|
||||
this.layoutControl3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridSearchResult)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbSelectDatetime)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbStartDate)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbEndDate)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbSearchResult)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.btnSearch);
|
||||
this.layoutControl1.Controls.Add(this.dtpEnd);
|
||||
this.layoutControl1.Controls.Add(this.dtpStart);
|
||||
this.layoutControl1.Controls.Add(this.xtcSearchResult);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(947, 249, 650, 400);
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(850, 635);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// btnSearch
|
||||
//
|
||||
this.btnSearch.Location = new System.Drawing.Point(592, 28);
|
||||
this.btnSearch.Name = "btnSearch";
|
||||
this.btnSearch.Size = new System.Drawing.Size(251, 25);
|
||||
this.btnSearch.TabIndex = 7;
|
||||
this.btnSearch.Text = "SEARCH";
|
||||
this.btnSearch.UseVisualStyleBackColor = true;
|
||||
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
|
||||
//
|
||||
// dtpEnd
|
||||
//
|
||||
this.dtpEnd.CustomFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
this.dtpEnd.Font = new System.Drawing.Font("Tahoma", 11F);
|
||||
this.dtpEnd.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.dtpEnd.Location = new System.Drawing.Point(395, 28);
|
||||
this.dtpEnd.Name = "dtpEnd";
|
||||
this.dtpEnd.Size = new System.Drawing.Size(193, 25);
|
||||
this.dtpEnd.TabIndex = 6;
|
||||
//
|
||||
// dtpStart
|
||||
//
|
||||
this.dtpStart.CalendarFont = new System.Drawing.Font("Tahoma", 9F);
|
||||
this.dtpStart.CustomFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
this.dtpStart.Font = new System.Drawing.Font("Tahoma", 11F);
|
||||
this.dtpStart.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.dtpStart.Location = new System.Drawing.Point(102, 28);
|
||||
this.dtpStart.Name = "dtpStart";
|
||||
this.dtpStart.Size = new System.Drawing.Size(194, 25);
|
||||
this.dtpStart.TabIndex = 5;
|
||||
//
|
||||
// xtcSearchResult
|
||||
//
|
||||
this.xtcSearchResult.Location = new System.Drawing.Point(7, 86);
|
||||
this.xtcSearchResult.Name = "xtcSearchResult";
|
||||
this.xtcSearchResult.SelectedTabPage = this.pgGrid;
|
||||
this.xtcSearchResult.Size = new System.Drawing.Size(836, 542);
|
||||
this.xtcSearchResult.TabIndex = 4;
|
||||
this.xtcSearchResult.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
|
||||
this.pgGrid});
|
||||
//
|
||||
// pgGrid
|
||||
//
|
||||
this.pgGrid.Controls.Add(this.layoutControl3);
|
||||
this.pgGrid.Name = "pgGrid";
|
||||
this.pgGrid.Size = new System.Drawing.Size(834, 516);
|
||||
this.pgGrid.Text = "Result Data";
|
||||
//
|
||||
// layoutControl3
|
||||
//
|
||||
this.layoutControl3.Controls.Add(this.gridSearchResult);
|
||||
this.layoutControl3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl3.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl3.Name = "layoutControl3";
|
||||
this.layoutControl3.Root = this.Root;
|
||||
this.layoutControl3.Size = new System.Drawing.Size(834, 516);
|
||||
this.layoutControl3.TabIndex = 0;
|
||||
this.layoutControl3.Text = "layoutControl3";
|
||||
//
|
||||
// gridSearchResult
|
||||
//
|
||||
this.gridSearchResult.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.gridSearchResult.Location = new System.Drawing.Point(3, 3);
|
||||
this.gridSearchResult.Name = "gridSearchResult";
|
||||
this.gridSearchResult.RowTemplate.Height = 23;
|
||||
this.gridSearchResult.Size = new System.Drawing.Size(828, 510);
|
||||
this.gridSearchResult.TabIndex = 4;
|
||||
//
|
||||
// Root
|
||||
//
|
||||
this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.Root.GroupBordersVisible = false;
|
||||
this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem5});
|
||||
this.Root.Name = "Root";
|
||||
this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.Root.Size = new System.Drawing.Size(834, 516);
|
||||
this.Root.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem5
|
||||
//
|
||||
this.layoutControlItem5.Control = this.gridSearchResult;
|
||||
this.layoutControlItem5.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem5.Name = "layoutControlItem5";
|
||||
this.layoutControlItem5.Size = new System.Drawing.Size(832, 514);
|
||||
this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem5.TextVisible = false;
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.lcgbSelectDatetime,
|
||||
this.lcgbSearchResult});
|
||||
this.layoutControlGroup1.Name = "Root";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(850, 635);
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// lcgbSelectDatetime
|
||||
//
|
||||
this.lcgbSelectDatetime.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.slbStartDate,
|
||||
this.layoutControlItem2,
|
||||
this.slbEndDate,
|
||||
this.layoutControlItem4,
|
||||
this.layoutControlItem3});
|
||||
this.lcgbSelectDatetime.Location = new System.Drawing.Point(0, 0);
|
||||
this.lcgbSelectDatetime.Name = "lcgbSelectDatetime";
|
||||
this.lcgbSelectDatetime.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.lcgbSelectDatetime.Size = new System.Drawing.Size(848, 58);
|
||||
this.lcgbSelectDatetime.Text = "Select Datetime";
|
||||
//
|
||||
// slbStartDate
|
||||
//
|
||||
this.slbStartDate.AllowHotTrack = false;
|
||||
this.slbStartDate.Location = new System.Drawing.Point(0, 0);
|
||||
this.slbStartDate.MinSize = new System.Drawing.Size(95, 18);
|
||||
this.slbStartDate.Name = "slbStartDate";
|
||||
this.slbStartDate.Size = new System.Drawing.Size(95, 29);
|
||||
this.slbStartDate.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.slbStartDate.Text = " Start Datetime";
|
||||
this.slbStartDate.TextSize = new System.Drawing.Size(85, 14);
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.dtpStart;
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(95, 0);
|
||||
this.layoutControlItem2.MinSize = new System.Drawing.Size(24, 24);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(198, 29);
|
||||
this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// slbEndDate
|
||||
//
|
||||
this.slbEndDate.AllowHotTrack = false;
|
||||
this.slbEndDate.Location = new System.Drawing.Point(293, 0);
|
||||
this.slbEndDate.MinSize = new System.Drawing.Size(95, 18);
|
||||
this.slbEndDate.Name = "slbEndDate";
|
||||
this.slbEndDate.Size = new System.Drawing.Size(95, 29);
|
||||
this.slbEndDate.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.slbEndDate.Text = " End Datetime";
|
||||
this.slbEndDate.TextSize = new System.Drawing.Size(85, 14);
|
||||
//
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.btnSearch;
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(585, 0);
|
||||
this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 29);
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(24, 29);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(255, 29);
|
||||
this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem4.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.dtpEnd;
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(388, 0);
|
||||
this.layoutControlItem3.MinSize = new System.Drawing.Size(24, 24);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(197, 29);
|
||||
this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem3.TextVisible = false;
|
||||
//
|
||||
// lcgbSearchResult
|
||||
//
|
||||
this.lcgbSearchResult.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1});
|
||||
this.lcgbSearchResult.Location = new System.Drawing.Point(0, 58);
|
||||
this.lcgbSearchResult.Name = "lcgbSearchResult";
|
||||
this.lcgbSearchResult.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.lcgbSearchResult.Size = new System.Drawing.Size(848, 575);
|
||||
this.lcgbSearchResult.Text = "Search Result";
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.xtcSearchResult;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(840, 546);
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// ucHistroy
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Name = "ucHistroy";
|
||||
this.Size = new System.Drawing.Size(850, 635);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xtcSearchResult)).EndInit();
|
||||
this.xtcSearchResult.ResumeLayout(false);
|
||||
this.pgGrid.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).EndInit();
|
||||
this.layoutControl3.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridSearchResult)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbSelectDatetime)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbStartDate)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.slbEndDate)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcgbSearchResult)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraTab.XtraTabControl xtcSearchResult;
|
||||
private DevExpress.XtraTab.XtraTabPage pgGrid;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraSplashScreen.SplashScreenManager DbWaitForm;
|
||||
private System.Windows.Forms.Button btnSearch;
|
||||
private System.Windows.Forms.DateTimePicker dtpEnd;
|
||||
private System.Windows.Forms.DateTimePicker dtpStart;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup lcgbSelectDatetime;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem slbStartDate;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem slbEndDate;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup lcgbSearchResult;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl3;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup Root;
|
||||
private System.Windows.Forms.DataGridView gridSearchResult;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
|
||||
}
|
||||
}
|
||||
174
LFP_Manager_PRM/Controls/ucHistroy.cs
Normal file
174
LFP_Manager_PRM/Controls/ucHistroy.cs
Normal file
@@ -0,0 +1,174 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
using DevExpress.XtraWaitForm;
|
||||
using DevExpress.XtraSplashScreen;
|
||||
|
||||
using System.Data.SQLite;
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Utils;
|
||||
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
public partial class ucHistroy : DevExpress.XtraEditors.XtraUserControl
|
||||
{
|
||||
#region VARIABLES
|
||||
|
||||
CommConfig Config;
|
||||
|
||||
DataTable dt;
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTOR
|
||||
|
||||
public ucHistroy()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
dt = new DataTable();
|
||||
}
|
||||
|
||||
public void SetCommCofig(CommConfig aConfig)
|
||||
{
|
||||
Config = aConfig;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region SQL Quary Excute
|
||||
|
||||
private void quaryExcute(string quary)
|
||||
{
|
||||
string dbFilename = System.IO.Path.GetDirectoryName(Application.ExecutablePath) + csDbConstData.DataBase.FileName;
|
||||
|
||||
// Open database
|
||||
string strConn = @"Data Source=" + dbFilename;
|
||||
using (var connection = new SQLiteConnection(strConn))
|
||||
{
|
||||
connection.Open();
|
||||
try
|
||||
{
|
||||
DataTable aT = new DataTable();
|
||||
|
||||
DbWaitForm.ShowWaitForm();
|
||||
|
||||
csDbUtils.BeginTran(connection);
|
||||
// Update data
|
||||
using (SQLiteCommand command = connection.CreateCommand())
|
||||
{
|
||||
//sSQL = "insert into TrendTable ( TrendStamp, TagName, TagValue) Values ( " + IntToStr(stamp) + "," + name + "," + value + ");";
|
||||
command.CommandText = quary;
|
||||
|
||||
try
|
||||
{
|
||||
SQLiteDataReader reader = command.ExecuteReader();
|
||||
aT.Load(reader);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
csDbUtils.CommitTran(connection);
|
||||
dt = aT;
|
||||
//RealGridView.DataSource = dt;
|
||||
|
||||
DbWaitForm.CloseWaitForm();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show(e.ToString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
connection.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BUTTON EVENT
|
||||
|
||||
private void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
DateTime start = dtpStart.Value;
|
||||
DateTime mid;
|
||||
DateTime end = dtpEnd.Value;
|
||||
TimeSpan span = end - start;
|
||||
|
||||
DataTable result = new DataTable();
|
||||
|
||||
int sDay = start.Day;
|
||||
int eDay = end.Day;
|
||||
|
||||
int total_days = eDay - sDay;
|
||||
|
||||
DataTable[] dDt = new DataTable[total_days + 1];
|
||||
|
||||
string quary = "";
|
||||
|
||||
try
|
||||
{
|
||||
if (total_days == 0)
|
||||
{
|
||||
quary = String.Format(" where create_date > '{0:yyyy-MM-dd HH:mm:ss}'", start);
|
||||
quary += String.Format(" and create_date < '{0:yyyy-MM-dd HH:mm:ss}'", end);
|
||||
dDt[0] = csDbUtils.BmsDataSelectToDataTable(Config, start, quary);
|
||||
if (dDt[0] == null)
|
||||
MessageBox.Show("No data", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
else
|
||||
{
|
||||
gridSearchResult.DataSource = dDt[0];
|
||||
//gridSearchResult.();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DataTable bDt = new DataTable();
|
||||
for (int i = 0; i < (total_days + 1); i++)
|
||||
{
|
||||
//dDt[i] = new DataTable();
|
||||
if (i == 0)
|
||||
{
|
||||
quary = String.Format(" where create_date > '{0:yyyy-MM-dd HH:mm:ss}'", start);
|
||||
dDt[i] = csDbUtils.BmsDataSelectToDataTable(Config, start, quary);
|
||||
}
|
||||
else if (i == total_days)
|
||||
{
|
||||
quary = String.Format(" where create_date < '{0:yyyy-MM-dd HH:mm:ss}'", end);
|
||||
dDt[i] = csDbUtils.BmsDataSelectToDataTable(Config, end, quary);
|
||||
}
|
||||
else
|
||||
{
|
||||
quary = "";
|
||||
mid = start.AddDays(i);
|
||||
dDt[i] = csDbUtils.BmsDataSelectToDataTable(Config, mid, quary);
|
||||
}
|
||||
if (dDt[i] != null)
|
||||
bDt.Merge(dDt[i]);
|
||||
}
|
||||
if (bDt == null)
|
||||
MessageBox.Show("No data", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
else
|
||||
{
|
||||
gridSearchResult.DataSource = bDt;
|
||||
//gridSearchResult.();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
120
LFP_Manager_PRM/Controls/ucHistroy.resx
Normal file
120
LFP_Manager_PRM/Controls/ucHistroy.resx
Normal 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>
|
||||
697
LFP_Manager_PRM/Controls/ucMainStatus.Designer.cs
generated
Normal file
697
LFP_Manager_PRM/Controls/ucMainStatus.Designer.cs
generated
Normal file
@@ -0,0 +1,697 @@
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
partial class ucMainStatus
|
||||
{
|
||||
/// <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 Component 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()
|
||||
{
|
||||
DevExpress.XtraCharts.XYDiagram xyDiagram1 = new DevExpress.XtraCharts.XYDiagram();
|
||||
DevExpress.XtraCharts.Series series1 = new DevExpress.XtraCharts.Series();
|
||||
DevExpress.XtraCharts.LineSeriesView lineSeriesView1 = new DevExpress.XtraCharts.LineSeriesView();
|
||||
DevExpress.XtraCharts.Series series2 = new DevExpress.XtraCharts.Series();
|
||||
DevExpress.XtraCharts.LineSeriesView lineSeriesView2 = new DevExpress.XtraCharts.LineSeriesView();
|
||||
DevExpress.XtraCharts.ChartTitle chartTitle1 = new DevExpress.XtraCharts.ChartTitle();
|
||||
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.groupControl1 = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl3 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.gbStatusAlarm = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl4 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
|
||||
this.lbAlarm = new DevExpress.XtraEditors.LabelControl();
|
||||
this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
|
||||
this.lbStatus = new DevExpress.XtraEditors.LabelControl();
|
||||
this.layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.lcitemStatus = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lcitemAlarm = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.gaugeControl4 = new DevExpress.XtraGauges.Win.GaugeControl();
|
||||
this.dgTotalSOC = new DevExpress.XtraGauges.Win.Gauges.Digital.DigitalGauge();
|
||||
this.digitalBackgroundLayerComponent4 = new DevExpress.XtraGauges.Win.Gauges.Digital.DigitalBackgroundLayerComponent();
|
||||
this.gaugeControl3 = new DevExpress.XtraGauges.Win.GaugeControl();
|
||||
this.dgTotalTemp = new DevExpress.XtraGauges.Win.Gauges.Digital.DigitalGauge();
|
||||
this.digitalBackgroundLayerComponent3 = new DevExpress.XtraGauges.Win.Gauges.Digital.DigitalBackgroundLayerComponent();
|
||||
this.gaugeControl2 = new DevExpress.XtraGauges.Win.GaugeControl();
|
||||
this.dgTotalCurrent = new DevExpress.XtraGauges.Win.Gauges.Digital.DigitalGauge();
|
||||
this.digitalBackgroundLayerComponent2 = new DevExpress.XtraGauges.Win.Gauges.Digital.DigitalBackgroundLayerComponent();
|
||||
this.gaugeControl1 = new DevExpress.XtraGauges.Win.GaugeControl();
|
||||
this.dgTotalVoltage = new DevExpress.XtraGauges.Win.Gauges.Digital.DigitalGauge();
|
||||
this.digitalBackgroundLayerComponent1 = new DevExpress.XtraGauges.Win.Gauges.Digital.DigitalBackgroundLayerComponent();
|
||||
this.layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.lcItemTotalVoltage = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.lcItemTotalCurrent = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lcItemTemp = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lcItemSOC = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.groupControl2 = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl2 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.tmrDisplay = new System.Windows.Forms.Timer();
|
||||
this.chartVI = new DevExpress.XtraCharts.ChartControl();
|
||||
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.groupControl1)).BeginInit();
|
||||
this.groupControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).BeginInit();
|
||||
this.layoutControl3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbStatusAlarm)).BeginInit();
|
||||
this.gbStatusAlarm.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl4)).BeginInit();
|
||||
this.layoutControl4.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
|
||||
this.panelControl2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
|
||||
this.panelControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcitemStatus)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcitemAlarm)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgTotalSOC)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.digitalBackgroundLayerComponent4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgTotalTemp)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.digitalBackgroundLayerComponent3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgTotalCurrent)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.digitalBackgroundLayerComponent2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgTotalVoltage)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.digitalBackgroundLayerComponent1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcItemTotalVoltage)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcItemTotalCurrent)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcItemTemp)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcItemSOC)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.groupControl2)).BeginInit();
|
||||
this.groupControl2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).BeginInit();
|
||||
this.layoutControl2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chartVI)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(xyDiagram1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(series1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(lineSeriesView1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(series2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(lineSeriesView2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.groupControl1);
|
||||
this.layoutControl1.Controls.Add(this.groupControl2);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(1302, 574);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// groupControl1
|
||||
//
|
||||
this.groupControl1.Controls.Add(this.layoutControl3);
|
||||
this.groupControl1.Location = new System.Drawing.Point(3, 3);
|
||||
this.groupControl1.Name = "groupControl1";
|
||||
this.groupControl1.Size = new System.Drawing.Size(199, 568);
|
||||
this.groupControl1.TabIndex = 5;
|
||||
this.groupControl1.Text = "System Value";
|
||||
//
|
||||
// layoutControl3
|
||||
//
|
||||
this.layoutControl3.Controls.Add(this.gbStatusAlarm);
|
||||
this.layoutControl3.Controls.Add(this.gaugeControl4);
|
||||
this.layoutControl3.Controls.Add(this.gaugeControl3);
|
||||
this.layoutControl3.Controls.Add(this.gaugeControl2);
|
||||
this.layoutControl3.Controls.Add(this.gaugeControl1);
|
||||
this.layoutControl3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl3.Location = new System.Drawing.Point(2, 23);
|
||||
this.layoutControl3.Name = "layoutControl3";
|
||||
this.layoutControl3.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(498, 165, 250, 350);
|
||||
this.layoutControl3.Root = this.layoutControlGroup3;
|
||||
this.layoutControl3.Size = new System.Drawing.Size(195, 543);
|
||||
this.layoutControl3.TabIndex = 0;
|
||||
this.layoutControl3.Text = "layoutControl3";
|
||||
//
|
||||
// gbStatusAlarm
|
||||
//
|
||||
this.gbStatusAlarm.Controls.Add(this.layoutControl4);
|
||||
this.gbStatusAlarm.Location = new System.Drawing.Point(3, 391);
|
||||
this.gbStatusAlarm.Name = "gbStatusAlarm";
|
||||
this.gbStatusAlarm.Size = new System.Drawing.Size(189, 88);
|
||||
this.gbStatusAlarm.TabIndex = 7;
|
||||
this.gbStatusAlarm.Text = "Operating Status";
|
||||
//
|
||||
// layoutControl4
|
||||
//
|
||||
this.layoutControl4.Controls.Add(this.panelControl2);
|
||||
this.layoutControl4.Controls.Add(this.panelControl1);
|
||||
this.layoutControl4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl4.Location = new System.Drawing.Point(2, 23);
|
||||
this.layoutControl4.Name = "layoutControl4";
|
||||
this.layoutControl4.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1163, 334, 250, 350);
|
||||
this.layoutControl4.Root = this.layoutControlGroup4;
|
||||
this.layoutControl4.Size = new System.Drawing.Size(185, 63);
|
||||
this.layoutControl4.TabIndex = 0;
|
||||
this.layoutControl4.Text = "layoutControl4";
|
||||
//
|
||||
// panelControl2
|
||||
//
|
||||
this.panelControl2.Controls.Add(this.lbAlarm);
|
||||
this.panelControl2.Location = new System.Drawing.Point(44, 34);
|
||||
this.panelControl2.Name = "panelControl2";
|
||||
this.panelControl2.Size = new System.Drawing.Size(138, 26);
|
||||
this.panelControl2.TabIndex = 5;
|
||||
//
|
||||
// lbAlarm
|
||||
//
|
||||
this.lbAlarm.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbAlarm.Appearance.Options.UseFont = true;
|
||||
this.lbAlarm.Appearance.Options.UseTextOptions = true;
|
||||
this.lbAlarm.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.lbAlarm.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.lbAlarm.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lbAlarm.Location = new System.Drawing.Point(2, 2);
|
||||
this.lbAlarm.Name = "lbAlarm";
|
||||
this.lbAlarm.Size = new System.Drawing.Size(134, 22);
|
||||
this.lbAlarm.TabIndex = 0;
|
||||
this.lbAlarm.Text = "Alarm";
|
||||
//
|
||||
// panelControl1
|
||||
//
|
||||
this.panelControl1.Controls.Add(this.lbStatus);
|
||||
this.panelControl1.Location = new System.Drawing.Point(44, 3);
|
||||
this.panelControl1.Name = "panelControl1";
|
||||
this.panelControl1.Size = new System.Drawing.Size(138, 27);
|
||||
this.panelControl1.TabIndex = 4;
|
||||
//
|
||||
// lbStatus
|
||||
//
|
||||
this.lbStatus.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbStatus.Appearance.Options.UseFont = true;
|
||||
this.lbStatus.Appearance.Options.UseTextOptions = true;
|
||||
this.lbStatus.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.lbStatus.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.lbStatus.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lbStatus.Location = new System.Drawing.Point(2, 2);
|
||||
this.lbStatus.Name = "lbStatus";
|
||||
this.lbStatus.Size = new System.Drawing.Size(134, 23);
|
||||
this.lbStatus.TabIndex = 0;
|
||||
this.lbStatus.Text = "Status";
|
||||
//
|
||||
// layoutControlGroup4
|
||||
//
|
||||
this.layoutControlGroup4.CustomizationFormText = "layoutControlGroup3";
|
||||
this.layoutControlGroup4.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup4.GroupBordersVisible = false;
|
||||
this.layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.lcitemStatus,
|
||||
this.lcitemAlarm});
|
||||
this.layoutControlGroup4.Name = "layoutControlGroup3";
|
||||
this.layoutControlGroup4.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup4.Size = new System.Drawing.Size(185, 63);
|
||||
this.layoutControlGroup4.TextVisible = false;
|
||||
//
|
||||
// lcitemStatus
|
||||
//
|
||||
this.lcitemStatus.AppearanceItemCaption.Options.UseTextOptions = true;
|
||||
this.lcitemStatus.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.lcitemStatus.Control = this.panelControl1;
|
||||
this.lcitemStatus.CustomizationFormText = "Status";
|
||||
this.lcitemStatus.Location = new System.Drawing.Point(0, 0);
|
||||
this.lcitemStatus.MaxSize = new System.Drawing.Size(0, 31);
|
||||
this.lcitemStatus.MinSize = new System.Drawing.Size(100, 31);
|
||||
this.lcitemStatus.Name = "lcitemStatus";
|
||||
this.lcitemStatus.Size = new System.Drawing.Size(183, 31);
|
||||
this.lcitemStatus.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lcitemStatus.Text = "Status";
|
||||
this.lcitemStatus.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
|
||||
this.lcitemStatus.TextSize = new System.Drawing.Size(40, 14);
|
||||
this.lcitemStatus.TextToControlDistance = 1;
|
||||
//
|
||||
// lcitemAlarm
|
||||
//
|
||||
this.lcitemAlarm.AppearanceItemCaption.Options.UseTextOptions = true;
|
||||
this.lcitemAlarm.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.lcitemAlarm.Control = this.panelControl2;
|
||||
this.lcitemAlarm.CustomizationFormText = "Alarm";
|
||||
this.lcitemAlarm.Location = new System.Drawing.Point(0, 31);
|
||||
this.lcitemAlarm.MinSize = new System.Drawing.Size(100, 24);
|
||||
this.lcitemAlarm.Name = "lcitemAlarm";
|
||||
this.lcitemAlarm.Size = new System.Drawing.Size(183, 30);
|
||||
this.lcitemAlarm.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lcitemAlarm.Text = "Alarm";
|
||||
this.lcitemAlarm.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
|
||||
this.lcitemAlarm.TextSize = new System.Drawing.Size(40, 20);
|
||||
this.lcitemAlarm.TextToControlDistance = 1;
|
||||
//
|
||||
// gaugeControl4
|
||||
//
|
||||
this.gaugeControl4.Gauges.AddRange(new DevExpress.XtraGauges.Base.IGauge[] {
|
||||
this.dgTotalSOC});
|
||||
this.gaugeControl4.Location = new System.Drawing.Point(3, 311);
|
||||
this.gaugeControl4.Name = "gaugeControl4";
|
||||
this.gaugeControl4.Size = new System.Drawing.Size(189, 76);
|
||||
this.gaugeControl4.TabIndex = 7;
|
||||
//
|
||||
// dgTotalSOC
|
||||
//
|
||||
this.dgTotalSOC.AppearanceOff.ContentBrush = new DevExpress.XtraGauges.Core.Drawing.SolidBrushObject("Color:#E3E5EA");
|
||||
this.dgTotalSOC.AppearanceOn.ContentBrush = new DevExpress.XtraGauges.Core.Drawing.SolidBrushObject("Color:#59616F");
|
||||
this.dgTotalSOC.BackgroundLayers.AddRange(new DevExpress.XtraGauges.Win.Gauges.Digital.DigitalBackgroundLayerComponent[] {
|
||||
this.digitalBackgroundLayerComponent4});
|
||||
this.dgTotalSOC.Bounds = new System.Drawing.Rectangle(6, 6, 177, 64);
|
||||
this.dgTotalSOC.DigitCount = 5;
|
||||
this.dgTotalSOC.Name = "dgTotalSOC";
|
||||
this.dgTotalSOC.Padding = new DevExpress.XtraGauges.Core.Base.TextSpacing(26, 20, 26, 20);
|
||||
this.dgTotalSOC.Text = "00,000";
|
||||
//
|
||||
// digitalBackgroundLayerComponent4
|
||||
//
|
||||
this.digitalBackgroundLayerComponent4.BottomRight = new DevExpress.XtraGauges.Core.Base.PointF2D(265.8125F, 99.9625F);
|
||||
this.digitalBackgroundLayerComponent4.Name = "digitalBackgroundLayerComponent1";
|
||||
this.digitalBackgroundLayerComponent4.ShapeType = DevExpress.XtraGauges.Core.Model.DigitalBackgroundShapeSetType.Style18;
|
||||
this.digitalBackgroundLayerComponent4.TopLeft = new DevExpress.XtraGauges.Core.Base.PointF2D(26F, 0F);
|
||||
this.digitalBackgroundLayerComponent4.ZOrder = 1000;
|
||||
//
|
||||
// gaugeControl3
|
||||
//
|
||||
this.gaugeControl3.Gauges.AddRange(new DevExpress.XtraGauges.Base.IGauge[] {
|
||||
this.dgTotalTemp});
|
||||
this.gaugeControl3.Location = new System.Drawing.Point(3, 214);
|
||||
this.gaugeControl3.Name = "gaugeControl3";
|
||||
this.gaugeControl3.Size = new System.Drawing.Size(189, 76);
|
||||
this.gaugeControl3.TabIndex = 6;
|
||||
//
|
||||
// dgTotalTemp
|
||||
//
|
||||
this.dgTotalTemp.AppearanceOff.ContentBrush = new DevExpress.XtraGauges.Core.Drawing.SolidBrushObject("Color:#E3E5EA");
|
||||
this.dgTotalTemp.AppearanceOn.ContentBrush = new DevExpress.XtraGauges.Core.Drawing.SolidBrushObject("Color:#59616F");
|
||||
this.dgTotalTemp.BackgroundLayers.AddRange(new DevExpress.XtraGauges.Win.Gauges.Digital.DigitalBackgroundLayerComponent[] {
|
||||
this.digitalBackgroundLayerComponent3});
|
||||
this.dgTotalTemp.Bounds = new System.Drawing.Rectangle(6, 6, 177, 64);
|
||||
this.dgTotalTemp.DigitCount = 5;
|
||||
this.dgTotalTemp.Name = "dgTotalTemp";
|
||||
this.dgTotalTemp.Padding = new DevExpress.XtraGauges.Core.Base.TextSpacing(26, 20, 26, 20);
|
||||
this.dgTotalTemp.Text = "00,000";
|
||||
//
|
||||
// digitalBackgroundLayerComponent3
|
||||
//
|
||||
this.digitalBackgroundLayerComponent3.BottomRight = new DevExpress.XtraGauges.Core.Base.PointF2D(265.8125F, 99.9625F);
|
||||
this.digitalBackgroundLayerComponent3.Name = "digitalBackgroundLayerComponent1";
|
||||
this.digitalBackgroundLayerComponent3.ShapeType = DevExpress.XtraGauges.Core.Model.DigitalBackgroundShapeSetType.Style18;
|
||||
this.digitalBackgroundLayerComponent3.TopLeft = new DevExpress.XtraGauges.Core.Base.PointF2D(26F, 0F);
|
||||
this.digitalBackgroundLayerComponent3.ZOrder = 1000;
|
||||
//
|
||||
// gaugeControl2
|
||||
//
|
||||
this.gaugeControl2.Gauges.AddRange(new DevExpress.XtraGauges.Base.IGauge[] {
|
||||
this.dgTotalCurrent});
|
||||
this.gaugeControl2.Location = new System.Drawing.Point(3, 117);
|
||||
this.gaugeControl2.Name = "gaugeControl2";
|
||||
this.gaugeControl2.Size = new System.Drawing.Size(189, 76);
|
||||
this.gaugeControl2.TabIndex = 5;
|
||||
//
|
||||
// dgTotalCurrent
|
||||
//
|
||||
this.dgTotalCurrent.AppearanceOff.ContentBrush = new DevExpress.XtraGauges.Core.Drawing.SolidBrushObject("Color:#E3E5EA");
|
||||
this.dgTotalCurrent.AppearanceOn.ContentBrush = new DevExpress.XtraGauges.Core.Drawing.SolidBrushObject("Color:#59616F");
|
||||
this.dgTotalCurrent.BackgroundLayers.AddRange(new DevExpress.XtraGauges.Win.Gauges.Digital.DigitalBackgroundLayerComponent[] {
|
||||
this.digitalBackgroundLayerComponent2});
|
||||
this.dgTotalCurrent.Bounds = new System.Drawing.Rectangle(6, 6, 177, 64);
|
||||
this.dgTotalCurrent.DigitCount = 5;
|
||||
this.dgTotalCurrent.Name = "dgTotalCurrent";
|
||||
this.dgTotalCurrent.Padding = new DevExpress.XtraGauges.Core.Base.TextSpacing(26, 20, 26, 20);
|
||||
this.dgTotalCurrent.Text = "00,000";
|
||||
//
|
||||
// digitalBackgroundLayerComponent2
|
||||
//
|
||||
this.digitalBackgroundLayerComponent2.BottomRight = new DevExpress.XtraGauges.Core.Base.PointF2D(265.8125F, 99.9625F);
|
||||
this.digitalBackgroundLayerComponent2.Name = "digitalBackgroundLayerComponent1";
|
||||
this.digitalBackgroundLayerComponent2.ShapeType = DevExpress.XtraGauges.Core.Model.DigitalBackgroundShapeSetType.Style18;
|
||||
this.digitalBackgroundLayerComponent2.TopLeft = new DevExpress.XtraGauges.Core.Base.PointF2D(26F, 0F);
|
||||
this.digitalBackgroundLayerComponent2.ZOrder = 1000;
|
||||
//
|
||||
// gaugeControl1
|
||||
//
|
||||
this.gaugeControl1.Gauges.AddRange(new DevExpress.XtraGauges.Base.IGauge[] {
|
||||
this.dgTotalVoltage});
|
||||
this.gaugeControl1.Location = new System.Drawing.Point(3, 20);
|
||||
this.gaugeControl1.Name = "gaugeControl1";
|
||||
this.gaugeControl1.Size = new System.Drawing.Size(189, 76);
|
||||
this.gaugeControl1.TabIndex = 4;
|
||||
//
|
||||
// dgTotalVoltage
|
||||
//
|
||||
this.dgTotalVoltage.AppearanceOff.ContentBrush = new DevExpress.XtraGauges.Core.Drawing.SolidBrushObject("Color:#E3E5EA");
|
||||
this.dgTotalVoltage.AppearanceOn.ContentBrush = new DevExpress.XtraGauges.Core.Drawing.SolidBrushObject("Color:#59616F");
|
||||
this.dgTotalVoltage.BackgroundLayers.AddRange(new DevExpress.XtraGauges.Win.Gauges.Digital.DigitalBackgroundLayerComponent[] {
|
||||
this.digitalBackgroundLayerComponent1});
|
||||
this.dgTotalVoltage.Bounds = new System.Drawing.Rectangle(6, 6, 177, 64);
|
||||
this.dgTotalVoltage.DigitCount = 5;
|
||||
this.dgTotalVoltage.Name = "dgTotalVoltage";
|
||||
this.dgTotalVoltage.Padding = new DevExpress.XtraGauges.Core.Base.TextSpacing(26, 20, 26, 20);
|
||||
this.dgTotalVoltage.Text = "00,000";
|
||||
//
|
||||
// digitalBackgroundLayerComponent1
|
||||
//
|
||||
this.digitalBackgroundLayerComponent1.BottomRight = new DevExpress.XtraGauges.Core.Base.PointF2D(265.8125F, 99.9625F);
|
||||
this.digitalBackgroundLayerComponent1.Name = "digitalBackgroundLayerComponent1";
|
||||
this.digitalBackgroundLayerComponent1.ShapeType = DevExpress.XtraGauges.Core.Model.DigitalBackgroundShapeSetType.Style18;
|
||||
this.digitalBackgroundLayerComponent1.TopLeft = new DevExpress.XtraGauges.Core.Base.PointF2D(26F, 0F);
|
||||
this.digitalBackgroundLayerComponent1.ZOrder = 1000;
|
||||
//
|
||||
// layoutControlGroup3
|
||||
//
|
||||
this.layoutControlGroup3.CustomizationFormText = "layoutControlGroup3";
|
||||
this.layoutControlGroup3.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup3.GroupBordersVisible = false;
|
||||
this.layoutControlGroup3.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.lcItemTotalVoltage,
|
||||
this.emptySpaceItem1,
|
||||
this.lcItemTotalCurrent,
|
||||
this.lcItemTemp,
|
||||
this.lcItemSOC,
|
||||
this.layoutControlItem4});
|
||||
this.layoutControlGroup3.Name = "layoutControlGroup3";
|
||||
this.layoutControlGroup3.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup3.Size = new System.Drawing.Size(195, 543);
|
||||
this.layoutControlGroup3.TextVisible = false;
|
||||
//
|
||||
// lcItemTotalVoltage
|
||||
//
|
||||
this.lcItemTotalVoltage.AppearanceItemCaption.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lcItemTotalVoltage.AppearanceItemCaption.Options.UseFont = true;
|
||||
this.lcItemTotalVoltage.Control = this.gaugeControl1;
|
||||
this.lcItemTotalVoltage.CustomizationFormText = "layoutControlItem4";
|
||||
this.lcItemTotalVoltage.Location = new System.Drawing.Point(0, 0);
|
||||
this.lcItemTotalVoltage.MaxSize = new System.Drawing.Size(193, 97);
|
||||
this.lcItemTotalVoltage.MinSize = new System.Drawing.Size(193, 97);
|
||||
this.lcItemTotalVoltage.Name = "lcItemTotalVoltage";
|
||||
this.lcItemTotalVoltage.Size = new System.Drawing.Size(193, 97);
|
||||
this.lcItemTotalVoltage.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lcItemTotalVoltage.Text = " Voltage";
|
||||
this.lcItemTotalVoltage.TextLocation = DevExpress.Utils.Locations.Top;
|
||||
this.lcItemTotalVoltage.TextSize = new System.Drawing.Size(82, 14);
|
||||
//
|
||||
// emptySpaceItem1
|
||||
//
|
||||
this.emptySpaceItem1.AllowHotTrack = false;
|
||||
this.emptySpaceItem1.CustomizationFormText = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Location = new System.Drawing.Point(0, 480);
|
||||
this.emptySpaceItem1.Name = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Size = new System.Drawing.Size(193, 61);
|
||||
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// lcItemTotalCurrent
|
||||
//
|
||||
this.lcItemTotalCurrent.AppearanceItemCaption.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lcItemTotalCurrent.AppearanceItemCaption.Options.UseFont = true;
|
||||
this.lcItemTotalCurrent.Control = this.gaugeControl2;
|
||||
this.lcItemTotalCurrent.CustomizationFormText = " Current";
|
||||
this.lcItemTotalCurrent.Location = new System.Drawing.Point(0, 97);
|
||||
this.lcItemTotalCurrent.MaxSize = new System.Drawing.Size(193, 97);
|
||||
this.lcItemTotalCurrent.MinSize = new System.Drawing.Size(193, 97);
|
||||
this.lcItemTotalCurrent.Name = "lcItemTotalCurrent";
|
||||
this.lcItemTotalCurrent.Size = new System.Drawing.Size(193, 97);
|
||||
this.lcItemTotalCurrent.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lcItemTotalCurrent.Text = " Current";
|
||||
this.lcItemTotalCurrent.TextLocation = DevExpress.Utils.Locations.Top;
|
||||
this.lcItemTotalCurrent.TextSize = new System.Drawing.Size(82, 14);
|
||||
//
|
||||
// lcItemTemp
|
||||
//
|
||||
this.lcItemTemp.AppearanceItemCaption.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lcItemTemp.AppearanceItemCaption.Options.UseFont = true;
|
||||
this.lcItemTemp.Control = this.gaugeControl3;
|
||||
this.lcItemTemp.CustomizationFormText = " Temperature";
|
||||
this.lcItemTemp.Location = new System.Drawing.Point(0, 194);
|
||||
this.lcItemTemp.MaxSize = new System.Drawing.Size(193, 97);
|
||||
this.lcItemTemp.MinSize = new System.Drawing.Size(193, 97);
|
||||
this.lcItemTemp.Name = "lcItemTemp";
|
||||
this.lcItemTemp.Size = new System.Drawing.Size(193, 97);
|
||||
this.lcItemTemp.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lcItemTemp.Text = " Temperature";
|
||||
this.lcItemTemp.TextLocation = DevExpress.Utils.Locations.Top;
|
||||
this.lcItemTemp.TextSize = new System.Drawing.Size(82, 14);
|
||||
//
|
||||
// lcItemSOC
|
||||
//
|
||||
this.lcItemSOC.AppearanceItemCaption.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lcItemSOC.AppearanceItemCaption.Options.UseFont = true;
|
||||
this.lcItemSOC.Control = this.gaugeControl4;
|
||||
this.lcItemSOC.CustomizationFormText = " SOC";
|
||||
this.lcItemSOC.Location = new System.Drawing.Point(0, 291);
|
||||
this.lcItemSOC.MaxSize = new System.Drawing.Size(193, 97);
|
||||
this.lcItemSOC.MinSize = new System.Drawing.Size(193, 97);
|
||||
this.lcItemSOC.Name = "lcItemSOC";
|
||||
this.lcItemSOC.Size = new System.Drawing.Size(193, 97);
|
||||
this.lcItemSOC.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lcItemSOC.Text = " SOC";
|
||||
this.lcItemSOC.TextLocation = DevExpress.Utils.Locations.Top;
|
||||
this.lcItemSOC.TextSize = new System.Drawing.Size(82, 14);
|
||||
//
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.gbStatusAlarm;
|
||||
this.layoutControlItem4.CustomizationFormText = "layoutControlItem4";
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(0, 388);
|
||||
this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 92);
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(104, 92);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(193, 92);
|
||||
this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem4.TextVisible = false;
|
||||
//
|
||||
// groupControl2
|
||||
//
|
||||
this.groupControl2.Controls.Add(this.layoutControl2);
|
||||
this.groupControl2.Location = new System.Drawing.Point(206, 3);
|
||||
this.groupControl2.Name = "groupControl2";
|
||||
this.groupControl2.Size = new System.Drawing.Size(1093, 568);
|
||||
this.groupControl2.TabIndex = 5;
|
||||
this.groupControl2.Text = "Real Time Graph";
|
||||
//
|
||||
// layoutControl2
|
||||
//
|
||||
this.layoutControl2.Controls.Add(this.chartVI);
|
||||
this.layoutControl2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl2.Location = new System.Drawing.Point(2, 23);
|
||||
this.layoutControl2.Name = "layoutControl2";
|
||||
this.layoutControl2.Root = this.layoutControlGroup2;
|
||||
this.layoutControl2.Size = new System.Drawing.Size(1089, 543);
|
||||
this.layoutControl2.TabIndex = 0;
|
||||
this.layoutControl2.Text = "layoutControl2";
|
||||
//
|
||||
// layoutControlGroup2
|
||||
//
|
||||
this.layoutControlGroup2.CustomizationFormText = "layoutControlGroup2";
|
||||
this.layoutControlGroup2.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup2.GroupBordersVisible = false;
|
||||
this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem3});
|
||||
this.layoutControlGroup2.Name = "layoutControlGroup2";
|
||||
this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup2.Size = new System.Drawing.Size(1089, 543);
|
||||
this.layoutControlGroup2.TextVisible = false;
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem2,
|
||||
this.layoutControlItem1});
|
||||
this.layoutControlGroup1.Name = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(1302, 574);
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.groupControl2;
|
||||
this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(203, 0);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(1097, 572);
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.groupControl1;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.MaxSize = new System.Drawing.Size(203, 0);
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(203, 24);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(203, 572);
|
||||
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// tmrDisplay
|
||||
//
|
||||
this.tmrDisplay.Interval = 500;
|
||||
this.tmrDisplay.Tick += new System.EventHandler(this.tmrDisplay_Tick);
|
||||
//
|
||||
// chartVI
|
||||
//
|
||||
xyDiagram1.AxisX.VisibleInPanesSerializable = "-1";
|
||||
xyDiagram1.AxisY.VisibleInPanesSerializable = "-1";
|
||||
this.chartVI.Diagram = xyDiagram1;
|
||||
this.chartVI.Legend.Name = "Default Legend";
|
||||
this.chartVI.Location = new System.Drawing.Point(3, 3);
|
||||
this.chartVI.Name = "chartVI";
|
||||
series1.Name = "Series 1";
|
||||
series1.View = lineSeriesView1;
|
||||
series2.Name = "Series 2";
|
||||
series2.View = lineSeriesView2;
|
||||
this.chartVI.SeriesSerializable = new DevExpress.XtraCharts.Series[] {
|
||||
series1,
|
||||
series2};
|
||||
this.chartVI.Size = new System.Drawing.Size(1083, 537);
|
||||
this.chartVI.TabIndex = 4;
|
||||
this.chartVI.Titles.AddRange(new DevExpress.XtraCharts.ChartTitle[] {
|
||||
chartTitle1});
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.chartVI;
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(1087, 541);
|
||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem3.TextVisible = false;
|
||||
//
|
||||
// ucMainStatus
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Name = "ucMainStatus";
|
||||
this.Size = new System.Drawing.Size(1302, 574);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.groupControl1)).EndInit();
|
||||
this.groupControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).EndInit();
|
||||
this.layoutControl3.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbStatusAlarm)).EndInit();
|
||||
this.gbStatusAlarm.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl4)).EndInit();
|
||||
this.layoutControl4.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
|
||||
this.panelControl2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
|
||||
this.panelControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcitemStatus)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcitemAlarm)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgTotalSOC)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.digitalBackgroundLayerComponent4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgTotalTemp)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.digitalBackgroundLayerComponent3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgTotalCurrent)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.digitalBackgroundLayerComponent2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgTotalVoltage)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.digitalBackgroundLayerComponent1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcItemTotalVoltage)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcItemTotalCurrent)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcItemTemp)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcItemSOC)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.groupControl2)).EndInit();
|
||||
this.groupControl2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).EndInit();
|
||||
this.layoutControl2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(xyDiagram1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(lineSeriesView1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(series1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(lineSeriesView2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(series2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chartVI)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.GroupControl groupControl2;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl2;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private DevExpress.XtraEditors.GroupControl groupControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl3;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3;
|
||||
private DevExpress.XtraGauges.Win.GaugeControl gaugeControl1;
|
||||
private DevExpress.XtraGauges.Win.Gauges.Digital.DigitalGauge dgTotalVoltage;
|
||||
private DevExpress.XtraGauges.Win.Gauges.Digital.DigitalBackgroundLayerComponent digitalBackgroundLayerComponent1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcItemTotalVoltage;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
|
||||
private DevExpress.XtraGauges.Win.GaugeControl gaugeControl2;
|
||||
private DevExpress.XtraGauges.Win.Gauges.Digital.DigitalGauge dgTotalCurrent;
|
||||
private DevExpress.XtraGauges.Win.Gauges.Digital.DigitalBackgroundLayerComponent digitalBackgroundLayerComponent2;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcItemTotalCurrent;
|
||||
private System.Windows.Forms.Timer tmrDisplay;
|
||||
private DevExpress.XtraGauges.Win.GaugeControl gaugeControl3;
|
||||
private DevExpress.XtraGauges.Win.Gauges.Digital.DigitalGauge dgTotalTemp;
|
||||
private DevExpress.XtraGauges.Win.Gauges.Digital.DigitalBackgroundLayerComponent digitalBackgroundLayerComponent3;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcItemTemp;
|
||||
private DevExpress.XtraGauges.Win.GaugeControl gaugeControl4;
|
||||
private DevExpress.XtraGauges.Win.Gauges.Digital.DigitalGauge dgTotalSOC;
|
||||
private DevExpress.XtraGauges.Win.Gauges.Digital.DigitalBackgroundLayerComponent digitalBackgroundLayerComponent4;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcItemSOC;
|
||||
private DevExpress.XtraEditors.GroupControl gbStatusAlarm;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl4;
|
||||
private DevExpress.XtraEditors.PanelControl panelControl2;
|
||||
private DevExpress.XtraEditors.LabelControl lbAlarm;
|
||||
private DevExpress.XtraEditors.PanelControl panelControl1;
|
||||
private DevExpress.XtraEditors.LabelControl lbStatus;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcitemStatus;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcitemAlarm;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
|
||||
private DevExpress.XtraCharts.ChartControl chartVI;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
|
||||
}
|
||||
}
|
||||
494
LFP_Manager_PRM/Controls/ucMainStatus.cs
Normal file
494
LFP_Manager_PRM/Controls/ucMainStatus.cs
Normal file
@@ -0,0 +1,494 @@
|
||||
using DevExpress.XtraCharts;
|
||||
using LFP_Manager.DataStructure;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Threading;
|
||||
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
public partial class ucMainStatus : DevExpress.XtraEditors.XtraUserControl
|
||||
{
|
||||
private delegate void CanIJust();
|
||||
|
||||
private List<int> _valueList;
|
||||
private Thread _thread;
|
||||
private CanIJust _doIt;
|
||||
private Random _ran;
|
||||
private int _interval;
|
||||
|
||||
private CommConfig Config;
|
||||
private DeviceSystemData SystemData;
|
||||
|
||||
private DataTable dtVI;
|
||||
private DateTime OldTime;
|
||||
|
||||
Series seriesVolt;
|
||||
Series seriesCurr;
|
||||
Series seriesTemp;
|
||||
Series seriesSoc;
|
||||
LineSeriesView currLineView;
|
||||
LineSeriesView tempLineView;
|
||||
LineSeriesView socLineView;
|
||||
SecondaryAxisY currAxisY;
|
||||
SecondaryAxisY tempAxisY;
|
||||
SecondaryAxisY socAxisY;
|
||||
|
||||
private double TotalVoltage;
|
||||
private double TotalCurrent;
|
||||
private double TotalTemperature;
|
||||
private double TotalSoc;
|
||||
|
||||
private bool active = false;
|
||||
private bool ThreadEnd = false;
|
||||
|
||||
private int logTimeSec = 5;
|
||||
|
||||
public ucMainStatus()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
InitDataTableVolt();
|
||||
InitChart();
|
||||
}
|
||||
|
||||
public void SimStart()
|
||||
{
|
||||
_valueList = new List<int>();
|
||||
_ran = new Random();
|
||||
_interval = 500;
|
||||
GoBoy();
|
||||
}
|
||||
|
||||
private void GoBoy()
|
||||
{
|
||||
_doIt += new CanIJust(AddData);
|
||||
|
||||
_thread = new Thread(new ThreadStart(ComeOnYouThread));
|
||||
_thread.Start();
|
||||
}
|
||||
|
||||
public void Start(CommConfig aConfig, ref DeviceSystemData aSystemData)
|
||||
{
|
||||
Config = aConfig;
|
||||
SystemData = aSystemData;
|
||||
|
||||
reloadChart();
|
||||
|
||||
_interval = 200;
|
||||
_doIt += new CanIJust(AddData);
|
||||
ThreadEnd = false;
|
||||
_thread = new Thread(new ThreadStart(ComeOnYouThread));
|
||||
_thread.Start();
|
||||
|
||||
active = true;
|
||||
tmrDisplay.Start();
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
active = false;
|
||||
tmrDisplay.Stop();
|
||||
|
||||
ThreadEnd = true;
|
||||
|
||||
if (_thread != null)
|
||||
{
|
||||
if (_thread.IsAlive)
|
||||
_thread.Abort();
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateData(ref DeviceSystemData aSystemData)
|
||||
{
|
||||
if (active)
|
||||
{
|
||||
SystemData = aSystemData;
|
||||
|
||||
TotalVoltage = (double)SystemData.ValueData.voltageOfPack / 10;
|
||||
TotalCurrent = (double)SystemData.ValueData.current / 10;
|
||||
TotalSoc = (double)SystemData.ValueData.rSOC / 10;
|
||||
TotalTemperature = (double)SystemData.AvgData.maxTemp / 10;
|
||||
}
|
||||
}
|
||||
|
||||
private void InitDataTableVolt()
|
||||
{
|
||||
dtVI = new DataTable();
|
||||
|
||||
dtVI.Columns.Add("DateTime", typeof(DateTime));
|
||||
|
||||
dtVI.Columns.Add(String.Format("Volt"), typeof(double));
|
||||
dtVI.Columns.Add(String.Format("Curr"), typeof(double));
|
||||
dtVI.Columns.Add(String.Format("Temp"), typeof(double));
|
||||
dtVI.Columns.Add(String.Format("SOC"), typeof(double));
|
||||
|
||||
// Add data rows to the table.
|
||||
DataRow row = null;
|
||||
|
||||
row = dtVI.NewRow();
|
||||
row["DateTime"] = DateTime.Now;
|
||||
|
||||
row[String.Format("Volt")] = 0;
|
||||
row[String.Format("Curr")] = 0;
|
||||
row[String.Format("Temp")] = 0;
|
||||
row[String.Format("SOC")] = 0;
|
||||
|
||||
dtVI.Rows.Add(row);
|
||||
}
|
||||
|
||||
private void InitChart()
|
||||
{
|
||||
chartVI.Series.Clear();
|
||||
chartVI.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;
|
||||
chartVI.Titles[0].Visibility = DevExpress.Utils.DefaultBoolean.False;
|
||||
|
||||
//-------------------- Series VOLT -----------------------//
|
||||
seriesVolt = new Series(String.Format("Volt"), ViewType.Line)
|
||||
{
|
||||
DataSource = dtVI,
|
||||
//seriesVolt.Label.PointOptions.PointView = PointView.Values;
|
||||
//seriesVolt.Label.PointOptions.ValueNumericOptions.Format = NumericFormat.Number;
|
||||
//seriesVolt.Label.PointOptions.ValueNumericOptions.Precision = 1;
|
||||
CrosshairLabelVisibility = DevExpress.Utils.DefaultBoolean.True,
|
||||
CrosshairLabelPattern = "{S} : {V:F1}V",
|
||||
//seriesVolt.CrosshairLabelPattern = "{S} {A:hh:mm:ss} : {V:F1}V";
|
||||
|
||||
// Specify data members to bind the series.
|
||||
ArgumentScaleType = ScaleType.DateTime,
|
||||
ArgumentDataMember = "DateTime",
|
||||
ValueScaleType = ScaleType.Numerical
|
||||
};
|
||||
seriesVolt.ValueDataMembers.AddRange(new string[] { String.Format("Volt") });
|
||||
|
||||
chartVI.Series.Add(seriesVolt);
|
||||
|
||||
//-------------------- Series CURR -----------------------//
|
||||
seriesCurr = new Series(String.Format("Curr"), ViewType.Line)
|
||||
{
|
||||
DataSource = dtVI,
|
||||
|
||||
//seriesCurr.Label.PointOptions.PointView = PointView.Values;
|
||||
//seriesCurr.Label.PointOptions.ValueNumericOptions.Format = NumericFormat.Number;
|
||||
//seriesCurr.Label.PointOptions.ValueNumericOptions.Precision = 1;
|
||||
CrosshairLabelVisibility = DevExpress.Utils.DefaultBoolean.True,
|
||||
CrosshairLabelPattern = "{S} : {V:F1}A",
|
||||
//seriesCurr.CrosshairLabelPattern = "{S} {A:hh:mm:ss} : {V:F1}A";
|
||||
|
||||
// Specify data members to bind the series.
|
||||
ArgumentScaleType = ScaleType.DateTime,
|
||||
ArgumentDataMember = "DateTime",
|
||||
|
||||
ValueScaleType = ScaleType.Numerical
|
||||
};
|
||||
seriesCurr.ValueDataMembers.AddRange(new string[] { String.Format("Curr") });
|
||||
|
||||
chartVI.Series.Add(seriesCurr);
|
||||
|
||||
//-------------------- Series TEMP -----------------------//
|
||||
seriesTemp = new Series(String.Format("Temp"), ViewType.Line)
|
||||
{
|
||||
DataSource = dtVI,
|
||||
|
||||
//seriesTemp.Label.PointOptions.PointView = PointView.Values;
|
||||
//seriesTemp.Label.PointOptions.ValueNumericOptions.Format = NumericFormat.Number;
|
||||
//seriesTemp.Label.PointOptions.ValueNumericOptions.Precision = 1;
|
||||
CrosshairLabelVisibility = DevExpress.Utils.DefaultBoolean.True,
|
||||
CrosshairLabelPattern = "{S} : {V:F1}C",
|
||||
//seriesTemp.CrosshairLabelPattern = "{S} {A:hh:mm:ss} : {V:F1}A";
|
||||
|
||||
// Specify data members to bind the series.
|
||||
ArgumentScaleType = ScaleType.DateTime,
|
||||
ArgumentDataMember = "DateTime",
|
||||
|
||||
ValueScaleType = ScaleType.Numerical
|
||||
};
|
||||
seriesTemp.ValueDataMembers.AddRange(new string[] { String.Format("Temp") });
|
||||
|
||||
chartVI.Series.Add(seriesTemp);
|
||||
|
||||
//-------------------- Series SOC -----------------------//
|
||||
seriesSoc = new Series(String.Format("SOC"), ViewType.Line)
|
||||
{
|
||||
DataSource = dtVI,
|
||||
//seriesSoc.Label.PointOptions.PointView = PointView.Values;
|
||||
//seriesSoc.Label.PointOptions.ValueNumericOptions.Format = NumericFormat.Number;
|
||||
//seriesSoc.Label.PointOptions.ValueNumericOptions.Precision = 1;
|
||||
CrosshairLabelVisibility = DevExpress.Utils.DefaultBoolean.True,
|
||||
CrosshairLabelPattern = "{S} : {V:F1}%",
|
||||
//seriesTemp.CrosshairLabelPattern = "{S} {A:hh:mm:ss} : {V:F1}A";
|
||||
|
||||
// Specify data members to bind the series.
|
||||
ArgumentScaleType = ScaleType.DateTime,
|
||||
ArgumentDataMember = "DateTime",
|
||||
|
||||
ValueScaleType = ScaleType.Numerical
|
||||
};
|
||||
seriesSoc.ValueDataMembers.AddRange(new string[] { String.Format("SOC") });
|
||||
|
||||
chartVI.Series.Add(seriesSoc);
|
||||
|
||||
XYDiagram diagram = (XYDiagram)chartVI.Diagram;
|
||||
|
||||
//diagram.AxisX.DateTimeScaleOptions.AggregateFunction = AggregateFunction.Sum;
|
||||
//diagram.AxisX.DateTimeScaleOptions.GridAlignment = DateTimeGridAlignment.Minute;
|
||||
//diagram.AxisX.DateTimeScaleOptions.MeasureUnit = DateTimeMeasureUnit.Second;
|
||||
|
||||
diagram.AxisX.Title.Text = "Date Time (hh:mm:ss)";
|
||||
diagram.AxisX.Title.Visibility = DevExpress.Utils.DefaultBoolean.False;
|
||||
diagram.AxisX.Title.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular);
|
||||
//diagram.AxisX.Label.DateTimeOptions.Format = DevExpress.XtraCharts.DateTimeFormat.Custom;
|
||||
//diagram.AxisX.Label.DateTimeOptions.FormatString = "HH:mm:ss";
|
||||
|
||||
diagram.AxisY.WholeRange.MaxValue = 60.0;
|
||||
diagram.AxisY.WholeRange.MinValue = 40.0;
|
||||
diagram.AxisY.WholeRange.Auto = false;
|
||||
diagram.AxisY.WholeRange.AlwaysShowZeroLevel = true;
|
||||
diagram.AxisY.VisualRange.MaxValue = 60.0;
|
||||
diagram.AxisY.VisualRange.MinValue = 40.0;
|
||||
diagram.AxisY.VisualRange.Auto = false;
|
||||
|
||||
//diagram.AxisY.GridSpacing = 1;
|
||||
diagram.AxisY.Title.Text = "Voltage (V)";
|
||||
diagram.AxisY.Title.Visibility = DevExpress.Utils.DefaultBoolean.False;
|
||||
diagram.AxisY.Title.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular);
|
||||
|
||||
chartVI.Diagram.Assign(diagram);
|
||||
|
||||
currAxisY = new SecondaryAxisY("Current Y-Axis");
|
||||
((XYDiagram)chartVI.Diagram).SecondaryAxesY.Add(currAxisY);
|
||||
|
||||
//currAxisY.GridSpacing = 10D;
|
||||
//currAxisY.GridSpacingAuto = false;
|
||||
currAxisY.WholeRange.MinValue = "-300";
|
||||
currAxisY.WholeRange.MaxValue = "300";
|
||||
currAxisY.WholeRange.Auto = false;
|
||||
currAxisY.WholeRange.AlwaysShowZeroLevel = true;
|
||||
currAxisY.Visibility = DevExpress.Utils.DefaultBoolean.False;
|
||||
|
||||
currAxisY.Title.Text = "Current (A)";
|
||||
currAxisY.Title.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular);
|
||||
currAxisY.Title.Visibility = DevExpress.Utils.DefaultBoolean.False;
|
||||
|
||||
currLineView = new LineSeriesView();
|
||||
currLineView = (LineSeriesView)seriesCurr.View;
|
||||
currLineView.AxisY = currAxisY;
|
||||
currLineView.LineMarkerOptions.BorderVisible = false;
|
||||
currLineView.LineMarkerOptions.Color = Color.Red;
|
||||
currLineView.LineStyle.Thickness = 2;
|
||||
currLineView.MarkerVisibility = DevExpress.Utils.DefaultBoolean.False;
|
||||
currLineView.Shadow.Visible = false;
|
||||
|
||||
tempAxisY = new SecondaryAxisY("Temperature Y-Axis");
|
||||
((XYDiagram)chartVI.Diagram).SecondaryAxesY.Add(tempAxisY);
|
||||
|
||||
//tempAxisY.GridSpacing = 5D;
|
||||
//tempAxisY.GridSpacingAuto = false;
|
||||
tempAxisY.WholeRange.MinValue = "-25.0";
|
||||
tempAxisY.WholeRange.MaxValue = "80.0";
|
||||
tempAxisY.WholeRange.Auto = false;
|
||||
tempAxisY.WholeRange.AlwaysShowZeroLevel = true;
|
||||
tempAxisY.Visibility = DevExpress.Utils.DefaultBoolean.False;
|
||||
|
||||
tempAxisY.Title.Text = "Temperature (C)";
|
||||
tempAxisY.Title.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular);
|
||||
tempAxisY.Title.Visibility = DevExpress.Utils.DefaultBoolean.False;
|
||||
|
||||
tempLineView = new LineSeriesView();
|
||||
tempLineView = (LineSeriesView)seriesTemp.View;
|
||||
tempLineView.AxisY = tempAxisY;
|
||||
tempLineView.LineMarkerOptions.BorderVisible = false;
|
||||
tempLineView.LineMarkerOptions.Color = Color.Red;
|
||||
tempLineView.LineStyle.Thickness = 2;
|
||||
tempLineView.MarkerVisibility = DevExpress.Utils.DefaultBoolean.False;
|
||||
tempLineView.Shadow.Visible = false;
|
||||
|
||||
// SOC AxisY
|
||||
socAxisY = new SecondaryAxisY("SOC Y-Axis");
|
||||
((XYDiagram)chartVI.Diagram).SecondaryAxesY.Add(socAxisY);
|
||||
|
||||
//socAxisY.GridSpacing = 10D;
|
||||
//socAxisY.GridSpacingAuto = false;
|
||||
socAxisY.WholeRange.MinValue = "-2.0";
|
||||
socAxisY.WholeRange.MaxValue = "102.0";
|
||||
socAxisY.WholeRange.Auto = false;
|
||||
socAxisY.WholeRange.AlwaysShowZeroLevel = true;
|
||||
socAxisY.Visibility = DevExpress.Utils.DefaultBoolean.False;
|
||||
|
||||
socAxisY.Title.Text = "SOC (%)";
|
||||
socAxisY.Title.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular);
|
||||
socAxisY.Title.Visibility = DevExpress.Utils.DefaultBoolean.False;
|
||||
|
||||
socLineView = new LineSeriesView();
|
||||
socLineView = (LineSeriesView)seriesSoc.View;
|
||||
socLineView.AxisY = socAxisY;
|
||||
socLineView.LineMarkerOptions.BorderVisible = false;
|
||||
socLineView.LineMarkerOptions.Color = Color.Red;
|
||||
socLineView.LineStyle.Thickness = 2;
|
||||
socLineView.MarkerVisibility = DevExpress.Utils.DefaultBoolean.False;
|
||||
socLineView.Shadow.Visible = false;
|
||||
}
|
||||
|
||||
private void reloadChart()
|
||||
{
|
||||
chartVI.Series.Clear();
|
||||
|
||||
//for (int i = 0; i < mQty; i++)
|
||||
//{
|
||||
chartVI.Series.Add(seriesVolt);
|
||||
//}
|
||||
|
||||
//for (int i = 0; i < mQty; i++)
|
||||
//{
|
||||
chartVI.Series.Add(seriesCurr);
|
||||
//}
|
||||
|
||||
//for (int i = 0; i < mQty; i++)
|
||||
//{
|
||||
chartVI.Series.Add(seriesTemp);
|
||||
//}
|
||||
|
||||
//for (int i = 0; i < mQty; i++)
|
||||
//{
|
||||
chartVI.Series.Add(seriesSoc);
|
||||
//}
|
||||
}
|
||||
|
||||
private void ComeOnYouThread()
|
||||
{
|
||||
while (ThreadEnd == false)
|
||||
{
|
||||
try
|
||||
{
|
||||
chartVI.Invoke(_doIt);
|
||||
|
||||
Thread.Sleep(_interval);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetLogTime(int aSec)
|
||||
{
|
||||
logTimeSec = aSec;
|
||||
}
|
||||
|
||||
private void AddData()
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
TimeSpan dTime = now - OldTime;
|
||||
|
||||
//if (OldTime.Second != now.Second)
|
||||
if ((dTime.Seconds >= logTimeSec) && ((now.Second % logTimeSec) == 0))
|
||||
{
|
||||
if (dtVI.Rows.Count > 1000)
|
||||
{
|
||||
dtVI.Rows.RemoveAt(0);
|
||||
}
|
||||
|
||||
// Add data rows to the table.
|
||||
DataRow row = null;
|
||||
|
||||
row = dtVI.NewRow();
|
||||
row["DateTime"] = DateTime.Now;
|
||||
|
||||
row[String.Format("Volt")] = TotalVoltage;
|
||||
row[String.Format("Curr")] = TotalCurrent;
|
||||
row[String.Format("Temp")] = TotalTemperature;
|
||||
row[String.Format("SOC")] = TotalSoc;
|
||||
|
||||
dtVI.Rows.Add(row);
|
||||
|
||||
OldTime = now;
|
||||
}
|
||||
}
|
||||
|
||||
private void tmrDisplay_Tick(object sender, EventArgs e)
|
||||
{
|
||||
DisplayTotalValue();
|
||||
DisplayStatusAndAlarm();
|
||||
}
|
||||
|
||||
private void DisplayTotalValue()
|
||||
{
|
||||
if (active)
|
||||
{
|
||||
dgTotalVoltage.Text = String.Format("{0:0.0}", TotalVoltage);
|
||||
dgTotalCurrent.Text = String.Format("{0:0.0}", TotalCurrent);
|
||||
dgTotalTemp.Text = String.Format("{0:0.0}", TotalTemperature);
|
||||
dgTotalSOC.Text = String.Format("{0:0.0}", TotalSoc);
|
||||
|
||||
chartVI.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void DisplayStatusAndAlarm()
|
||||
{
|
||||
if (SystemData.CommFail == false)
|
||||
{
|
||||
// Operating Status
|
||||
if (SystemData.StatusData.status == 0)
|
||||
{
|
||||
lbStatus.Text = "STANDBY";
|
||||
lbStatus.ForeColor = System.Drawing.Color.Black;
|
||||
}
|
||||
else if (SystemData.StatusData.status == 1)
|
||||
{
|
||||
lbStatus.Text = "CHARGING";
|
||||
lbStatus.ForeColor = System.Drawing.Color.Blue;
|
||||
}
|
||||
else if (SystemData.StatusData.status == 2)
|
||||
{
|
||||
lbStatus.Text = "DISCHARGING";
|
||||
lbStatus.ForeColor = System.Drawing.Color.Magenta;
|
||||
}
|
||||
else if (SystemData.StatusData.status == 3)
|
||||
{
|
||||
lbStatus.Text = "FLOATING";
|
||||
lbStatus.ForeColor = System.Drawing.Color.Black;
|
||||
}
|
||||
else
|
||||
{
|
||||
lbStatus.Text = "UNKNOWN";
|
||||
lbStatus.ForeColor = System.Drawing.Color.Black;
|
||||
}
|
||||
// Alarm Display
|
||||
if (SystemData.StatusData.alarm == 0)
|
||||
{
|
||||
lbAlarm.Text = "NORMAL";
|
||||
lbAlarm.ForeColor = System.Drawing.Color.Green;
|
||||
}
|
||||
else if (SystemData.StatusData.alarm == 1)
|
||||
{
|
||||
lbAlarm.Text = "WARNING";
|
||||
lbAlarm.ForeColor = System.Drawing.Color.Orange;
|
||||
}
|
||||
else if (SystemData.StatusData.alarm == 2)
|
||||
{
|
||||
lbAlarm.Text = "FAULT";
|
||||
lbAlarm.ForeColor = System.Drawing.Color.Red;
|
||||
}
|
||||
else if (SystemData.StatusData.alarm == 3)
|
||||
{
|
||||
lbAlarm.Text = "WARMING UP";
|
||||
lbAlarm.ForeColor = System.Drawing.Color.Green;
|
||||
}
|
||||
else
|
||||
{
|
||||
lbAlarm.Text = "UNKNOWN";
|
||||
lbAlarm.ForeColor = System.Drawing.Color.Red;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lbStatus.Text = "OFF LINE";
|
||||
lbStatus.ForeColor = System.Drawing.Color.Red;
|
||||
lbAlarm.Text = "OFF LINE";
|
||||
lbAlarm.ForeColor = System.Drawing.Color.Red;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
123
LFP_Manager_PRM/Controls/ucMainStatus.resx
Normal file
123
LFP_Manager_PRM/Controls/ucMainStatus.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?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="tmrDisplay.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
305
LFP_Manager_PRM/Controls/ucModuleIdSet.Designer.cs
generated
Normal file
305
LFP_Manager_PRM/Controls/ucModuleIdSet.Designer.cs
generated
Normal file
@@ -0,0 +1,305 @@
|
||||
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
partial class ucModuleIdSet
|
||||
{
|
||||
/// <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 Component 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.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.gbBmuAddrSet = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl9 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.edModuleNo = new DevExpress.XtraEditors.TextEdit();
|
||||
this.edSystemAddrNew = new DevExpress.XtraEditors.TextEdit();
|
||||
this.btnBmsAddrSet = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.edSystemAddr = new DevExpress.XtraEditors.TextEdit();
|
||||
this.layoutControlGroup9 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.lcitemBmsId = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem34 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbBmuAddrSet)).BeginInit();
|
||||
this.gbBmuAddrSet.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl9)).BeginInit();
|
||||
this.layoutControl9.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edModuleNo.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edSystemAddrNew.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edSystemAddr.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcitemBmsId)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem34)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.gbBmuAddrSet);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.Root = this.Root;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(198, 126);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// gbBmuAddrSet
|
||||
//
|
||||
this.gbBmuAddrSet.Controls.Add(this.layoutControl9);
|
||||
this.gbBmuAddrSet.Location = new System.Drawing.Point(3, 3);
|
||||
this.gbBmuAddrSet.Name = "gbBmuAddrSet";
|
||||
this.gbBmuAddrSet.Size = new System.Drawing.Size(192, 120);
|
||||
this.gbBmuAddrSet.TabIndex = 12;
|
||||
this.gbBmuAddrSet.Text = "BMS Address";
|
||||
//
|
||||
// layoutControl9
|
||||
//
|
||||
this.layoutControl9.Controls.Add(this.edModuleNo);
|
||||
this.layoutControl9.Controls.Add(this.edSystemAddrNew);
|
||||
this.layoutControl9.Controls.Add(this.btnBmsAddrSet);
|
||||
this.layoutControl9.Controls.Add(this.edSystemAddr);
|
||||
this.layoutControl9.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl9.Location = new System.Drawing.Point(2, 23);
|
||||
this.layoutControl9.Name = "layoutControl9";
|
||||
this.layoutControl9.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1050, 323, 618, 350);
|
||||
this.layoutControl9.Root = this.layoutControlGroup9;
|
||||
this.layoutControl9.Size = new System.Drawing.Size(188, 95);
|
||||
this.layoutControl9.TabIndex = 0;
|
||||
this.layoutControl9.Text = "layoutControl9";
|
||||
//
|
||||
// edModuleNo
|
||||
//
|
||||
this.edModuleNo.Location = new System.Drawing.Point(125, 32);
|
||||
this.edModuleNo.Name = "edModuleNo";
|
||||
this.edModuleNo.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
|
||||
this.edModuleNo.Properties.Appearance.Options.UseFont = true;
|
||||
this.edModuleNo.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.edModuleNo.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.edModuleNo.Size = new System.Drawing.Size(59, 24);
|
||||
this.edModuleNo.StyleController = this.layoutControl9;
|
||||
this.edModuleNo.TabIndex = 9;
|
||||
this.edModuleNo.EditValueChanged += new System.EventHandler(this.edModuleNo_EditValueChanged);
|
||||
//
|
||||
// edSystemAddrNew
|
||||
//
|
||||
this.edSystemAddrNew.Location = new System.Drawing.Point(109, 4);
|
||||
this.edSystemAddrNew.Name = "edSystemAddrNew";
|
||||
this.edSystemAddrNew.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
|
||||
this.edSystemAddrNew.Properties.Appearance.Options.UseFont = true;
|
||||
this.edSystemAddrNew.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.edSystemAddrNew.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.edSystemAddrNew.Size = new System.Drawing.Size(75, 24);
|
||||
this.edSystemAddrNew.StyleController = this.layoutControl9;
|
||||
this.edSystemAddrNew.TabIndex = 8;
|
||||
//
|
||||
// btnBmsAddrSet
|
||||
//
|
||||
this.btnBmsAddrSet.Location = new System.Drawing.Point(108, 60);
|
||||
this.btnBmsAddrSet.Name = "btnBmsAddrSet";
|
||||
this.btnBmsAddrSet.Size = new System.Drawing.Size(76, 31);
|
||||
this.btnBmsAddrSet.StyleController = this.layoutControl9;
|
||||
this.btnBmsAddrSet.TabIndex = 6;
|
||||
this.btnBmsAddrSet.Text = "Set";
|
||||
this.btnBmsAddrSet.Click += new System.EventHandler(this.btnBmsAddrSet_Click);
|
||||
//
|
||||
// edSystemAddr
|
||||
//
|
||||
this.edSystemAddr.Location = new System.Drawing.Point(49, 4);
|
||||
this.edSystemAddr.Name = "edSystemAddr";
|
||||
this.edSystemAddr.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F);
|
||||
this.edSystemAddr.Properties.Appearance.Options.UseFont = true;
|
||||
this.edSystemAddr.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.edSystemAddr.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.edSystemAddr.Properties.ReadOnly = true;
|
||||
this.edSystemAddr.Size = new System.Drawing.Size(56, 24);
|
||||
this.edSystemAddr.StyleController = this.layoutControl9;
|
||||
this.edSystemAddr.TabIndex = 4;
|
||||
//
|
||||
// layoutControlGroup9
|
||||
//
|
||||
this.layoutControlGroup9.CustomizationFormText = "layoutControlGroup9";
|
||||
this.layoutControlGroup9.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup9.GroupBordersVisible = false;
|
||||
this.layoutControlGroup9.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.lcitemBmsId,
|
||||
this.layoutControlItem34,
|
||||
this.layoutControlItem6,
|
||||
this.emptySpaceItem2,
|
||||
this.layoutControlItem1,
|
||||
this.emptySpaceItem1});
|
||||
this.layoutControlGroup9.Name = "Root";
|
||||
this.layoutControlGroup9.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2);
|
||||
this.layoutControlGroup9.Size = new System.Drawing.Size(188, 95);
|
||||
this.layoutControlGroup9.TextVisible = false;
|
||||
//
|
||||
// lcitemBmsId
|
||||
//
|
||||
this.lcitemBmsId.Control = this.edSystemAddr;
|
||||
this.lcitemBmsId.CustomizationFormText = "BMS ID";
|
||||
this.lcitemBmsId.Location = new System.Drawing.Point(0, 0);
|
||||
this.lcitemBmsId.MinSize = new System.Drawing.Size(80, 28);
|
||||
this.lcitemBmsId.Name = "lcitemBmsId";
|
||||
this.lcitemBmsId.Size = new System.Drawing.Size(105, 28);
|
||||
this.lcitemBmsId.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lcitemBmsId.Text = " Address";
|
||||
this.lcitemBmsId.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
|
||||
this.lcitemBmsId.TextSize = new System.Drawing.Size(40, 20);
|
||||
this.lcitemBmsId.TextToControlDistance = 5;
|
||||
//
|
||||
// layoutControlItem34
|
||||
//
|
||||
this.layoutControlItem34.Control = this.btnBmsAddrSet;
|
||||
this.layoutControlItem34.CustomizationFormText = "layoutControlItem34";
|
||||
this.layoutControlItem34.Location = new System.Drawing.Point(104, 56);
|
||||
this.layoutControlItem34.MinSize = new System.Drawing.Size(30, 26);
|
||||
this.layoutControlItem34.Name = "layoutControlItem34";
|
||||
this.layoutControlItem34.Size = new System.Drawing.Size(80, 35);
|
||||
this.layoutControlItem34.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem34.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem34.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem6
|
||||
//
|
||||
this.layoutControlItem6.Control = this.edSystemAddrNew;
|
||||
this.layoutControlItem6.CustomizationFormText = "layoutControlItem6";
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(105, 0);
|
||||
this.layoutControlItem6.MinSize = new System.Drawing.Size(30, 28);
|
||||
this.layoutControlItem6.Name = "layoutControlItem6";
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(79, 28);
|
||||
this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem6.TextVisible = false;
|
||||
//
|
||||
// emptySpaceItem2
|
||||
//
|
||||
this.emptySpaceItem2.AllowHotTrack = false;
|
||||
this.emptySpaceItem2.Location = new System.Drawing.Point(0, 28);
|
||||
this.emptySpaceItem2.MinSize = new System.Drawing.Size(1, 1);
|
||||
this.emptySpaceItem2.Name = "emptySpaceItem2";
|
||||
this.emptySpaceItem2.Size = new System.Drawing.Size(46, 28);
|
||||
this.emptySpaceItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.edModuleNo;
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(46, 28);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(138, 28);
|
||||
this.layoutControlItem1.Text = "Module S/N";
|
||||
this.layoutControlItem1.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(70, 0);
|
||||
this.layoutControlItem1.TextToControlDistance = 5;
|
||||
//
|
||||
// Root
|
||||
//
|
||||
this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.Root.GroupBordersVisible = false;
|
||||
this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem2});
|
||||
this.Root.Name = "Root";
|
||||
this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.Root.Size = new System.Drawing.Size(198, 126);
|
||||
this.Root.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.gbBmuAddrSet;
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(196, 124);
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// emptySpaceItem1
|
||||
//
|
||||
this.emptySpaceItem1.AllowHotTrack = false;
|
||||
this.emptySpaceItem1.Location = new System.Drawing.Point(0, 56);
|
||||
this.emptySpaceItem1.MinSize = new System.Drawing.Size(104, 24);
|
||||
this.emptySpaceItem1.Name = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Size = new System.Drawing.Size(104, 35);
|
||||
this.emptySpaceItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// ucModuleIdSet
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Name = "ucModuleIdSet";
|
||||
this.Size = new System.Drawing.Size(198, 126);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbBmuAddrSet)).EndInit();
|
||||
this.gbBmuAddrSet.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl9)).EndInit();
|
||||
this.layoutControl9.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.edModuleNo.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edSystemAddrNew.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edSystemAddr.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcitemBmsId)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem34)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup Root;
|
||||
private DevExpress.XtraEditors.GroupControl gbBmuAddrSet;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl9;
|
||||
private DevExpress.XtraEditors.TextEdit edModuleNo;
|
||||
private DevExpress.XtraEditors.TextEdit edSystemAddrNew;
|
||||
private DevExpress.XtraEditors.SimpleButton btnBmsAddrSet;
|
||||
private DevExpress.XtraEditors.TextEdit edSystemAddr;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup9;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcitemBmsId;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem34;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
|
||||
}
|
||||
}
|
||||
131
LFP_Manager_PRM/Controls/ucModuleIdSet.cs
Normal file
131
LFP_Manager_PRM/Controls/ucModuleIdSet.cs
Normal file
@@ -0,0 +1,131 @@
|
||||
using DevExpress.XtraEditors;
|
||||
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 LFP_Manager.Forms;
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Utils;
|
||||
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
public partial class ucModuleIdSet : DevExpress.XtraEditors.XtraUserControl
|
||||
{
|
||||
#region VARIABLES
|
||||
|
||||
int mID = 0;
|
||||
|
||||
DeviceCalibration rCalib;
|
||||
DeviceCalibration wCalib;
|
||||
|
||||
DeviceParamData rParam;
|
||||
|
||||
int maxModule = 1;
|
||||
//UInt32 cValue = 0;
|
||||
|
||||
//bool wFlag = false;
|
||||
|
||||
public event CalibCmdEvent OnCommand = null;
|
||||
|
||||
#endregion
|
||||
|
||||
public ucModuleIdSet()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#region EXT EVENT FUNCTION
|
||||
|
||||
private void OnCommnadEvent(int sId, int mode, int flag, ref DeviceParamData aParam, ref DeviceCalibration aCalib)
|
||||
{
|
||||
OnCommand?.Invoke(sId, mode, flag, ref aParam, ref aCalib);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PUBLIC FUCTIONS
|
||||
|
||||
public void UpdateData(int sId, DeviceCalibration aCalib)
|
||||
{
|
||||
mID = sId;
|
||||
rCalib = aCalib;
|
||||
DisplayCalib();
|
||||
}
|
||||
|
||||
public void SetMaxModule(int aMaxModule)
|
||||
{
|
||||
maxModule = aMaxModule;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region DISPLAY DATA
|
||||
|
||||
private void DisplayCalib()
|
||||
{
|
||||
if (this.InvokeRequired)
|
||||
{
|
||||
this.Invoke(new MethodInvoker(delegate ()
|
||||
{
|
||||
// Device Address
|
||||
edSystemAddr.Text = String.Format("{0:0}", rCalib.SystemInfo.devAddr);
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Device Address
|
||||
edSystemAddr.Text = String.Format("{0:0}", rCalib.SystemInfo.devAddr);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void edModuleNo_EditValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (edModuleNo.Text != "")
|
||||
{
|
||||
int mdID;
|
||||
int mdNo;
|
||||
string strMdNo = edModuleNo.Text;
|
||||
|
||||
try
|
||||
{
|
||||
mdNo = Convert.ToInt32(strMdNo);
|
||||
|
||||
mdID = (mdNo - 1) % maxModule + 1;
|
||||
|
||||
edSystemAddrNew.Text = mdID.ToString();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
edModuleNo.Text = "";
|
||||
MessageBox.Show(ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region BUTTON EVENT
|
||||
|
||||
private void btnBmsAddrGet_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnCommnadEvent(mID, 9, 0, ref rParam, ref wCalib);
|
||||
}
|
||||
|
||||
private void btnBmsAddrSet_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (edSystemAddrNew.Text == string.Empty) return;
|
||||
wCalib = rCalib;
|
||||
wCalib.SystemInfo.devAddr = (UInt16)(Convert.ToInt32(edSystemAddrNew.Text));
|
||||
|
||||
OnCommnadEvent(mID, 9, 1, ref rParam, ref wCalib);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
120
LFP_Manager_PRM/Controls/ucModuleIdSet.resx
Normal file
120
LFP_Manager_PRM/Controls/ucModuleIdSet.resx
Normal 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>
|
||||
601
LFP_Manager_PRM/Controls/ucParamSet.Designer.cs
generated
Normal file
601
LFP_Manager_PRM/Controls/ucParamSet.Designer.cs
generated
Normal file
@@ -0,0 +1,601 @@
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
partial class ucParamSet
|
||||
{
|
||||
/// <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.gbParamSet = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.edReleaseNew = new DevExpress.XtraEditors.TextEdit();
|
||||
this.edWarningNew = new DevExpress.XtraEditors.TextEdit();
|
||||
this.edTripNew = new DevExpress.XtraEditors.TextEdit();
|
||||
this.btnSet = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnGet = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.edRelease = new DevExpress.XtraEditors.TextEdit();
|
||||
this.edWarning = new DevExpress.XtraEditors.TextEdit();
|
||||
this.edTrip = new DevExpress.XtraEditors.TextEdit();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.lcTripParam = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lcWarningParam = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lcReleaseParam = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.lbTripUnit = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.lbWarningUnit = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.lbReleaseUnit = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lbCurr = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.lbNew = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.emptySpaceItem3 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.emptySpaceItem4 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.lbFault = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.lbWarning = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.lbRelease = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbParamSet)).BeginInit();
|
||||
this.gbParamSet.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edReleaseNew.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edWarningNew.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edTripNew.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edRelease.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edWarning.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edTrip.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcTripParam)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcWarningParam)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcReleaseParam)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbTripUnit)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbWarningUnit)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbReleaseUnit)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbCurr)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbNew)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbFault)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbWarning)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbRelease)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// gbParamSet
|
||||
//
|
||||
this.gbParamSet.Controls.Add(this.layoutControl1);
|
||||
this.gbParamSet.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.gbParamSet.Location = new System.Drawing.Point(0, 0);
|
||||
this.gbParamSet.Name = "gbParamSet";
|
||||
this.gbParamSet.Size = new System.Drawing.Size(219, 171);
|
||||
this.gbParamSet.TabIndex = 0;
|
||||
this.gbParamSet.Text = "groupControl1";
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.edReleaseNew);
|
||||
this.layoutControl1.Controls.Add(this.edWarningNew);
|
||||
this.layoutControl1.Controls.Add(this.edTripNew);
|
||||
this.layoutControl1.Controls.Add(this.btnSet);
|
||||
this.layoutControl1.Controls.Add(this.btnGet);
|
||||
this.layoutControl1.Controls.Add(this.edRelease);
|
||||
this.layoutControl1.Controls.Add(this.edWarning);
|
||||
this.layoutControl1.Controls.Add(this.edTrip);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(2, 22);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(870, 50, 372, 627);
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(215, 147);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// edReleaseNew
|
||||
//
|
||||
this.edReleaseNew.Location = new System.Drawing.Point(124, 79);
|
||||
this.edReleaseNew.Name = "edReleaseNew";
|
||||
this.edReleaseNew.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.edReleaseNew.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.edReleaseNew.Size = new System.Drawing.Size(56, 20);
|
||||
this.edReleaseNew.StyleController = this.layoutControl1;
|
||||
this.edReleaseNew.TabIndex = 11;
|
||||
this.edReleaseNew.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextBox_KeyPress);
|
||||
//
|
||||
// edWarningNew
|
||||
//
|
||||
this.edWarningNew.Location = new System.Drawing.Point(124, 54);
|
||||
this.edWarningNew.Name = "edWarningNew";
|
||||
this.edWarningNew.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.edWarningNew.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.edWarningNew.Size = new System.Drawing.Size(56, 20);
|
||||
this.edWarningNew.StyleController = this.layoutControl1;
|
||||
this.edWarningNew.TabIndex = 10;
|
||||
this.edWarningNew.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextBox_KeyPress);
|
||||
//
|
||||
// edTripNew
|
||||
//
|
||||
this.edTripNew.Location = new System.Drawing.Point(124, 29);
|
||||
this.edTripNew.Name = "edTripNew";
|
||||
this.edTripNew.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.edTripNew.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.edTripNew.Size = new System.Drawing.Size(56, 20);
|
||||
this.edTripNew.StyleController = this.layoutControl1;
|
||||
this.edTripNew.TabIndex = 9;
|
||||
this.edTripNew.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextBox_KeyPress);
|
||||
//
|
||||
// btnSet
|
||||
//
|
||||
this.btnSet.Location = new System.Drawing.Point(135, 117);
|
||||
this.btnSet.Name = "btnSet";
|
||||
this.btnSet.Size = new System.Drawing.Size(76, 26);
|
||||
this.btnSet.StyleController = this.layoutControl1;
|
||||
this.btnSet.TabIndex = 8;
|
||||
this.btnSet.Text = "Set";
|
||||
this.btnSet.Click += new System.EventHandler(this.btnSet_Click);
|
||||
//
|
||||
// btnGet
|
||||
//
|
||||
this.btnGet.Location = new System.Drawing.Point(55, 117);
|
||||
this.btnGet.Name = "btnGet";
|
||||
this.btnGet.Size = new System.Drawing.Size(76, 26);
|
||||
this.btnGet.StyleController = this.layoutControl1;
|
||||
this.btnGet.TabIndex = 7;
|
||||
this.btnGet.Text = "Get";
|
||||
this.btnGet.Click += new System.EventHandler(this.btnRead_Click);
|
||||
//
|
||||
// edRelease
|
||||
//
|
||||
this.edRelease.Location = new System.Drawing.Point(64, 79);
|
||||
this.edRelease.Name = "edRelease";
|
||||
this.edRelease.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.edRelease.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.edRelease.Properties.ReadOnly = true;
|
||||
this.edRelease.Size = new System.Drawing.Size(56, 20);
|
||||
this.edRelease.StyleController = this.layoutControl1;
|
||||
this.edRelease.TabIndex = 6;
|
||||
//
|
||||
// edWarning
|
||||
//
|
||||
this.edWarning.Location = new System.Drawing.Point(64, 54);
|
||||
this.edWarning.Name = "edWarning";
|
||||
this.edWarning.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.edWarning.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.edWarning.Properties.ReadOnly = true;
|
||||
this.edWarning.Size = new System.Drawing.Size(56, 20);
|
||||
this.edWarning.StyleController = this.layoutControl1;
|
||||
this.edWarning.TabIndex = 5;
|
||||
//
|
||||
// edTrip
|
||||
//
|
||||
this.edTrip.Location = new System.Drawing.Point(64, 29);
|
||||
this.edTrip.Name = "edTrip";
|
||||
this.edTrip.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.edTrip.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.edTrip.Properties.ReadOnly = true;
|
||||
this.edTrip.Size = new System.Drawing.Size(56, 20);
|
||||
this.edTrip.StyleController = this.layoutControl1;
|
||||
this.edTrip.TabIndex = 4;
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "Root";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.lcTripParam,
|
||||
this.lcWarningParam,
|
||||
this.lcReleaseParam,
|
||||
this.emptySpaceItem1,
|
||||
this.layoutControlItem4,
|
||||
this.layoutControlItem5,
|
||||
this.emptySpaceItem2,
|
||||
this.lbTripUnit,
|
||||
this.lbWarningUnit,
|
||||
this.lbReleaseUnit,
|
||||
this.layoutControlItem1,
|
||||
this.layoutControlItem2,
|
||||
this.layoutControlItem3,
|
||||
this.lbCurr,
|
||||
this.lbNew,
|
||||
this.emptySpaceItem3,
|
||||
this.emptySpaceItem4,
|
||||
this.lbFault,
|
||||
this.lbWarning,
|
||||
this.lbRelease});
|
||||
this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlGroup1.Name = "Root";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(215, 147);
|
||||
this.layoutControlGroup1.Text = "Root";
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// lcTripParam
|
||||
//
|
||||
this.lcTripParam.Control = this.edTrip;
|
||||
this.lcTripParam.CustomizationFormText = "Fault";
|
||||
this.lcTripParam.Location = new System.Drawing.Point(60, 25);
|
||||
this.lcTripParam.MaxSize = new System.Drawing.Size(60, 25);
|
||||
this.lcTripParam.MinSize = new System.Drawing.Size(60, 25);
|
||||
this.lcTripParam.Name = "lcTripParam";
|
||||
this.lcTripParam.Size = new System.Drawing.Size(60, 25);
|
||||
this.lcTripParam.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lcTripParam.Text = "Fault";
|
||||
this.lcTripParam.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.lcTripParam.TextToControlDistance = 0;
|
||||
this.lcTripParam.TextVisible = false;
|
||||
//
|
||||
// lcWarningParam
|
||||
//
|
||||
this.lcWarningParam.Control = this.edWarning;
|
||||
this.lcWarningParam.CustomizationFormText = "Warning";
|
||||
this.lcWarningParam.Location = new System.Drawing.Point(60, 50);
|
||||
this.lcWarningParam.MaxSize = new System.Drawing.Size(60, 25);
|
||||
this.lcWarningParam.MinSize = new System.Drawing.Size(60, 25);
|
||||
this.lcWarningParam.Name = "lcWarningParam";
|
||||
this.lcWarningParam.Size = new System.Drawing.Size(60, 25);
|
||||
this.lcWarningParam.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lcWarningParam.Text = "Warning";
|
||||
this.lcWarningParam.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.lcWarningParam.TextToControlDistance = 0;
|
||||
this.lcWarningParam.TextVisible = false;
|
||||
//
|
||||
// lcReleaseParam
|
||||
//
|
||||
this.lcReleaseParam.Control = this.edRelease;
|
||||
this.lcReleaseParam.CustomizationFormText = "Release";
|
||||
this.lcReleaseParam.Location = new System.Drawing.Point(60, 75);
|
||||
this.lcReleaseParam.MaxSize = new System.Drawing.Size(60, 25);
|
||||
this.lcReleaseParam.MinSize = new System.Drawing.Size(60, 25);
|
||||
this.lcReleaseParam.Name = "lcReleaseParam";
|
||||
this.lcReleaseParam.Size = new System.Drawing.Size(60, 25);
|
||||
this.lcReleaseParam.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lcReleaseParam.Text = "Release";
|
||||
this.lcReleaseParam.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.lcReleaseParam.TextToControlDistance = 0;
|
||||
this.lcReleaseParam.TextVisible = false;
|
||||
//
|
||||
// emptySpaceItem1
|
||||
//
|
||||
this.emptySpaceItem1.AllowHotTrack = false;
|
||||
this.emptySpaceItem1.CustomizationFormText = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Location = new System.Drawing.Point(0, 100);
|
||||
this.emptySpaceItem1.MinSize = new System.Drawing.Size(1, 1);
|
||||
this.emptySpaceItem1.Name = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Size = new System.Drawing.Size(211, 13);
|
||||
this.emptySpaceItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.emptySpaceItem1.Text = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.btnGet;
|
||||
this.layoutControlItem4.CustomizationFormText = "layoutControlItem4";
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(51, 113);
|
||||
this.layoutControlItem4.MaxSize = new System.Drawing.Size(80, 30);
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(80, 30);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(80, 30);
|
||||
this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem4.Text = "layoutControlItem4";
|
||||
this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem4.TextToControlDistance = 0;
|
||||
this.layoutControlItem4.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem5
|
||||
//
|
||||
this.layoutControlItem5.Control = this.btnSet;
|
||||
this.layoutControlItem5.CustomizationFormText = "layoutControlItem5";
|
||||
this.layoutControlItem5.Location = new System.Drawing.Point(131, 113);
|
||||
this.layoutControlItem5.MaxSize = new System.Drawing.Size(80, 30);
|
||||
this.layoutControlItem5.MinSize = new System.Drawing.Size(80, 30);
|
||||
this.layoutControlItem5.Name = "layoutControlItem5";
|
||||
this.layoutControlItem5.Size = new System.Drawing.Size(80, 30);
|
||||
this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem5.Text = "layoutControlItem5";
|
||||
this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem5.TextToControlDistance = 0;
|
||||
this.layoutControlItem5.TextVisible = false;
|
||||
//
|
||||
// emptySpaceItem2
|
||||
//
|
||||
this.emptySpaceItem2.AllowHotTrack = false;
|
||||
this.emptySpaceItem2.CustomizationFormText = "emptySpaceItem2";
|
||||
this.emptySpaceItem2.Location = new System.Drawing.Point(0, 113);
|
||||
this.emptySpaceItem2.MinSize = new System.Drawing.Size(1, 1);
|
||||
this.emptySpaceItem2.Name = "emptySpaceItem2";
|
||||
this.emptySpaceItem2.Size = new System.Drawing.Size(51, 30);
|
||||
this.emptySpaceItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.emptySpaceItem2.Text = "emptySpaceItem2";
|
||||
this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// lbTripUnit
|
||||
//
|
||||
this.lbTripUnit.AllowHotTrack = false;
|
||||
this.lbTripUnit.AppearanceItemCaption.Options.UseTextOptions = true;
|
||||
this.lbTripUnit.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.lbTripUnit.CustomizationFormText = "-";
|
||||
this.lbTripUnit.Location = new System.Drawing.Point(180, 25);
|
||||
this.lbTripUnit.MaxSize = new System.Drawing.Size(31, 25);
|
||||
this.lbTripUnit.MinSize = new System.Drawing.Size(31, 25);
|
||||
this.lbTripUnit.Name = "lbTripUnit";
|
||||
this.lbTripUnit.Size = new System.Drawing.Size(31, 25);
|
||||
this.lbTripUnit.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lbTripUnit.Text = "-";
|
||||
this.lbTripUnit.TextSize = new System.Drawing.Size(45, 14);
|
||||
//
|
||||
// lbWarningUnit
|
||||
//
|
||||
this.lbWarningUnit.AllowHotTrack = false;
|
||||
this.lbWarningUnit.AppearanceItemCaption.Options.UseTextOptions = true;
|
||||
this.lbWarningUnit.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.lbWarningUnit.CustomizationFormText = "-";
|
||||
this.lbWarningUnit.Location = new System.Drawing.Point(180, 50);
|
||||
this.lbWarningUnit.MaxSize = new System.Drawing.Size(31, 25);
|
||||
this.lbWarningUnit.MinSize = new System.Drawing.Size(31, 25);
|
||||
this.lbWarningUnit.Name = "lbWarningUnit";
|
||||
this.lbWarningUnit.Size = new System.Drawing.Size(31, 25);
|
||||
this.lbWarningUnit.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lbWarningUnit.Text = "-";
|
||||
this.lbWarningUnit.TextSize = new System.Drawing.Size(45, 14);
|
||||
//
|
||||
// lbReleaseUnit
|
||||
//
|
||||
this.lbReleaseUnit.AllowHotTrack = false;
|
||||
this.lbReleaseUnit.AppearanceItemCaption.Options.UseTextOptions = true;
|
||||
this.lbReleaseUnit.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.lbReleaseUnit.CustomizationFormText = "-";
|
||||
this.lbReleaseUnit.Location = new System.Drawing.Point(180, 75);
|
||||
this.lbReleaseUnit.MaxSize = new System.Drawing.Size(31, 25);
|
||||
this.lbReleaseUnit.MinSize = new System.Drawing.Size(31, 25);
|
||||
this.lbReleaseUnit.Name = "lbReleaseUnit";
|
||||
this.lbReleaseUnit.Size = new System.Drawing.Size(31, 25);
|
||||
this.lbReleaseUnit.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lbReleaseUnit.Text = "-";
|
||||
this.lbReleaseUnit.TextSize = new System.Drawing.Size(45, 14);
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.edTripNew;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(120, 25);
|
||||
this.layoutControlItem1.MaxSize = new System.Drawing.Size(60, 25);
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(60, 25);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(60, 25);
|
||||
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem1.Text = "layoutControlItem1";
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextToControlDistance = 0;
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.edWarningNew;
|
||||
this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(120, 50);
|
||||
this.layoutControlItem2.MaxSize = new System.Drawing.Size(60, 25);
|
||||
this.layoutControlItem2.MinSize = new System.Drawing.Size(60, 25);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(60, 25);
|
||||
this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem2.Text = "layoutControlItem2";
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextToControlDistance = 0;
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.edReleaseNew;
|
||||
this.layoutControlItem3.CustomizationFormText = "layoutControlItem3";
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(120, 75);
|
||||
this.layoutControlItem3.MaxSize = new System.Drawing.Size(60, 25);
|
||||
this.layoutControlItem3.MinSize = new System.Drawing.Size(60, 25);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(60, 25);
|
||||
this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem3.Text = "layoutControlItem3";
|
||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem3.TextToControlDistance = 0;
|
||||
this.layoutControlItem3.TextVisible = false;
|
||||
//
|
||||
// lbCurr
|
||||
//
|
||||
this.lbCurr.AllowHotTrack = false;
|
||||
this.lbCurr.AppearanceItemCaption.Options.UseTextOptions = true;
|
||||
this.lbCurr.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.lbCurr.CustomizationFormText = "LabelsimpleLabelItem2";
|
||||
this.lbCurr.Location = new System.Drawing.Point(60, 0);
|
||||
this.lbCurr.MaxSize = new System.Drawing.Size(60, 25);
|
||||
this.lbCurr.MinSize = new System.Drawing.Size(60, 25);
|
||||
this.lbCurr.Name = "lbCurr";
|
||||
this.lbCurr.Size = new System.Drawing.Size(60, 25);
|
||||
this.lbCurr.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lbCurr.Text = "Current";
|
||||
this.lbCurr.TextSize = new System.Drawing.Size(45, 14);
|
||||
//
|
||||
// lbNew
|
||||
//
|
||||
this.lbNew.AllowHotTrack = false;
|
||||
this.lbNew.AppearanceItemCaption.Options.UseTextOptions = true;
|
||||
this.lbNew.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.lbNew.CustomizationFormText = "LabelsimpleLabelItem1";
|
||||
this.lbNew.Location = new System.Drawing.Point(120, 0);
|
||||
this.lbNew.MaxSize = new System.Drawing.Size(60, 25);
|
||||
this.lbNew.MinSize = new System.Drawing.Size(60, 25);
|
||||
this.lbNew.Name = "lbNew";
|
||||
this.lbNew.Size = new System.Drawing.Size(60, 25);
|
||||
this.lbNew.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lbNew.Text = "New";
|
||||
this.lbNew.TextSize = new System.Drawing.Size(45, 14);
|
||||
//
|
||||
// emptySpaceItem3
|
||||
//
|
||||
this.emptySpaceItem3.AllowHotTrack = false;
|
||||
this.emptySpaceItem3.CustomizationFormText = "emptySpaceItem3";
|
||||
this.emptySpaceItem3.Location = new System.Drawing.Point(0, 0);
|
||||
this.emptySpaceItem3.MaxSize = new System.Drawing.Size(60, 25);
|
||||
this.emptySpaceItem3.MinSize = new System.Drawing.Size(60, 25);
|
||||
this.emptySpaceItem3.Name = "emptySpaceItem3";
|
||||
this.emptySpaceItem3.Size = new System.Drawing.Size(60, 25);
|
||||
this.emptySpaceItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.emptySpaceItem3.Text = "emptySpaceItem3";
|
||||
this.emptySpaceItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// emptySpaceItem4
|
||||
//
|
||||
this.emptySpaceItem4.AllowHotTrack = false;
|
||||
this.emptySpaceItem4.CustomizationFormText = "emptySpaceItem4";
|
||||
this.emptySpaceItem4.Location = new System.Drawing.Point(180, 0);
|
||||
this.emptySpaceItem4.Name = "emptySpaceItem4";
|
||||
this.emptySpaceItem4.Size = new System.Drawing.Size(31, 25);
|
||||
this.emptySpaceItem4.Text = "emptySpaceItem4";
|
||||
this.emptySpaceItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// lbFault
|
||||
//
|
||||
this.lbFault.AllowHotTrack = false;
|
||||
this.lbFault.CustomizationFormText = "Fault";
|
||||
this.lbFault.Location = new System.Drawing.Point(0, 25);
|
||||
this.lbFault.MaxSize = new System.Drawing.Size(60, 25);
|
||||
this.lbFault.MinSize = new System.Drawing.Size(60, 25);
|
||||
this.lbFault.Name = "lbFault";
|
||||
this.lbFault.Size = new System.Drawing.Size(60, 25);
|
||||
this.lbFault.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lbFault.Text = "Fault";
|
||||
this.lbFault.TextSize = new System.Drawing.Size(45, 14);
|
||||
//
|
||||
// lbWarning
|
||||
//
|
||||
this.lbWarning.AllowHotTrack = false;
|
||||
this.lbWarning.CustomizationFormText = "Warning";
|
||||
this.lbWarning.Location = new System.Drawing.Point(0, 50);
|
||||
this.lbWarning.MaxSize = new System.Drawing.Size(60, 25);
|
||||
this.lbWarning.MinSize = new System.Drawing.Size(60, 25);
|
||||
this.lbWarning.Name = "lbWarning";
|
||||
this.lbWarning.Size = new System.Drawing.Size(60, 25);
|
||||
this.lbWarning.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lbWarning.Text = "Warning";
|
||||
this.lbWarning.TextSize = new System.Drawing.Size(45, 14);
|
||||
//
|
||||
// lbRelease
|
||||
//
|
||||
this.lbRelease.AllowHotTrack = false;
|
||||
this.lbRelease.CustomizationFormText = "Release";
|
||||
this.lbRelease.Location = new System.Drawing.Point(0, 75);
|
||||
this.lbRelease.MaxSize = new System.Drawing.Size(60, 25);
|
||||
this.lbRelease.MinSize = new System.Drawing.Size(60, 25);
|
||||
this.lbRelease.Name = "lbRelease";
|
||||
this.lbRelease.Size = new System.Drawing.Size(60, 25);
|
||||
this.lbRelease.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lbRelease.Text = "Release";
|
||||
this.lbRelease.TextSize = new System.Drawing.Size(45, 14);
|
||||
//
|
||||
// ucParamSet
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.gbParamSet);
|
||||
this.Name = "ucParamSet";
|
||||
this.Size = new System.Drawing.Size(219, 171);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbParamSet)).EndInit();
|
||||
this.gbParamSet.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.edReleaseNew.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edWarningNew.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edTripNew.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edRelease.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edWarning.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edTrip.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcTripParam)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcWarningParam)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcReleaseParam)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbTripUnit)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbWarningUnit)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbReleaseUnit)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbCurr)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbNew)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbFault)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbWarning)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbRelease)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraEditors.GroupControl gbParamSet;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.TextEdit edRelease;
|
||||
private DevExpress.XtraEditors.TextEdit edWarning;
|
||||
private DevExpress.XtraEditors.TextEdit edTrip;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcTripParam;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcWarningParam;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcReleaseParam;
|
||||
private DevExpress.XtraEditors.SimpleButton btnSet;
|
||||
private DevExpress.XtraEditors.SimpleButton btnGet;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem lbTripUnit;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem lbWarningUnit;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem lbReleaseUnit;
|
||||
private DevExpress.XtraEditors.TextEdit edReleaseNew;
|
||||
private DevExpress.XtraEditors.TextEdit edWarningNew;
|
||||
private DevExpress.XtraEditors.TextEdit edTripNew;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem lbCurr;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem lbNew;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem3;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem4;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem lbFault;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem lbWarning;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem lbRelease;
|
||||
|
||||
}
|
||||
}
|
||||
274
LFP_Manager_PRM/Controls/ucParamSet.cs
Normal file
274
LFP_Manager_PRM/Controls/ucParamSet.cs
Normal file
@@ -0,0 +1,274 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Function;
|
||||
using LFP_Manager.Utils;
|
||||
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
public delegate void setUpdate(object sender);
|
||||
public delegate void setCommand(int mode, int flag, ParamData aParam);
|
||||
|
||||
public class ParamData
|
||||
{
|
||||
public short Fault;
|
||||
public short Warning;
|
||||
public short Release;
|
||||
public short Time;
|
||||
|
||||
public ParamData()
|
||||
{
|
||||
Fault = 0;
|
||||
Warning = 0;
|
||||
Release = 0;
|
||||
Time = 0;
|
||||
}
|
||||
|
||||
public ParamData DeepCopy()
|
||||
{
|
||||
ParamData newCopy = new ParamData
|
||||
{
|
||||
Fault = Fault,
|
||||
Warning = Warning,
|
||||
Release = Release,
|
||||
Time = Time,
|
||||
};
|
||||
return newCopy;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class ucParamSet : UserControl
|
||||
{
|
||||
#region VARIABLES
|
||||
|
||||
int id = 0;
|
||||
ParamData rParam;
|
||||
ParamData wParam;
|
||||
|
||||
bool wFlag = false;
|
||||
|
||||
public event setCommand OnCommand = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public ucParamSet()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
rParam = new ParamData();
|
||||
wParam = new ParamData();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region EXT EVENT FUNCTION
|
||||
|
||||
private void OnCommnadEvent(int mode, int flag, ParamData aParam)
|
||||
{
|
||||
OnCommand?.Invoke(mode, flag, aParam);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BUTTON EVENT
|
||||
|
||||
private void btnRead_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnCommnadEvent(id, 0, rParam);
|
||||
}
|
||||
|
||||
private void btnSet_Click(object sender, EventArgs e)
|
||||
{
|
||||
if ((edTripNew.Text == "") || (edWarningNew.Text == "") || (edReleaseNew.Text == ""))
|
||||
{
|
||||
return;
|
||||
}
|
||||
wParam = rParam.DeepCopy();
|
||||
OnCommnadEvent(id, 1, MakeNewParam(id));
|
||||
}
|
||||
|
||||
private ParamData MakeNewParam(int aId)
|
||||
{
|
||||
switch (aId)
|
||||
{
|
||||
case 0: // Cell Over Voltage
|
||||
case 1: // Cell Under Voltage
|
||||
wParam.Fault = Convert.ToInt16(edTripNew.Text);
|
||||
wParam.Warning = Convert.ToInt16(edWarningNew.Text);
|
||||
wParam.Release = Convert.ToInt16(edReleaseNew.Text);
|
||||
break;
|
||||
case 2: // Module Over Voltage
|
||||
case 3: // Module Under Voltage
|
||||
wParam.Fault = (short)(Convert.ToDouble(edTripNew.Text) * 100);
|
||||
wParam.Warning = (short)(Convert.ToDouble(edWarningNew.Text) * 100);
|
||||
wParam.Release = (short)(Convert.ToDouble(edReleaseNew.Text) * 100);
|
||||
break;
|
||||
case 4: // Charge High Temperature
|
||||
case 5: // Charge Loq Temperature
|
||||
case 6: // Discharge High Temperature
|
||||
case 7: // Discharge Low Temperature
|
||||
case 10: // Low SOC
|
||||
case 11: // Low SOC
|
||||
wParam.Fault = Convert.ToInt16(edTripNew.Text);
|
||||
wParam.Warning = Convert.ToInt16(edWarningNew.Text);
|
||||
wParam.Release = Convert.ToInt16(edReleaseNew.Text);
|
||||
break;
|
||||
case 8: // Charge Over Current
|
||||
case 9: // Discharge Over Current
|
||||
wParam.Fault = (short)(Convert.ToDouble(edTripNew.Text) * 10);
|
||||
wParam.Warning = (short)(Convert.ToDouble(edWarningNew.Text) * 10);
|
||||
wParam.Release = (short)(Convert.ToDouble(edReleaseNew.Text) * 10);
|
||||
break;
|
||||
}
|
||||
return wParam;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PUBLIC FUCTIONS
|
||||
|
||||
public void SetId(int aId)
|
||||
{
|
||||
id = aId;
|
||||
}
|
||||
|
||||
public void UpdateData(ParamData aParam)
|
||||
{
|
||||
rParam = aParam;
|
||||
DisplayParam();
|
||||
UpdateNewParam();
|
||||
}
|
||||
|
||||
public void EnableItem(int item, bool flag)
|
||||
{
|
||||
switch (item)
|
||||
{
|
||||
case 0:
|
||||
edTrip.Enabled = flag;
|
||||
edTripNew.Enabled = flag;
|
||||
break;
|
||||
case 1:
|
||||
edWarning.Enabled = flag;
|
||||
edWarningNew.Enabled = flag;
|
||||
break;
|
||||
case 2:
|
||||
edRelease.Enabled = flag;
|
||||
edReleaseNew.Enabled = flag;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetParamName(int no, string nm)
|
||||
{
|
||||
switch (no)
|
||||
{
|
||||
case 0: gbParamSet.Text = nm; break;
|
||||
case 1:
|
||||
lbTripUnit.Text = nm;
|
||||
lbWarningUnit.Text = nm;
|
||||
lbReleaseUnit.Text = nm;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region DISPLAY
|
||||
|
||||
private void DisplayParam()
|
||||
{
|
||||
ParamData Param = new ParamData();
|
||||
Param = rParam;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
edTrip.Text = String.Format("{0}", Param.Fault);
|
||||
edWarning.Text = String.Format("{0}", Param.Warning);
|
||||
edRelease.Text = String.Format("{0}", Param.Release);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
edTrip.Text = String.Format("{0:#0.0}", (float)Param.Fault / 100);
|
||||
edWarning.Text = String.Format("{0:#0.0}", (float)Param.Warning / 100);
|
||||
edRelease.Text = String.Format("{0:#0.0}", (float)Param.Release / 100);
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 10:
|
||||
case 11:
|
||||
edTrip.Text = String.Format("{0}", Param.Fault);
|
||||
edWarning.Text = String.Format("{0}", Param.Warning);
|
||||
edRelease.Text = String.Format("{0}", Param.Release);
|
||||
break;
|
||||
case 8:
|
||||
case 9:
|
||||
edTrip.Text = String.Format("{0:#0.0}", (float)Param.Fault / 10);
|
||||
edWarning.Text = String.Format("{0:#0.0}", (float)Param.Warning / 10);
|
||||
edRelease.Text = String.Format("{0:#0.0}", (float)Param.Release / 10);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateNewParam()
|
||||
{
|
||||
if (wFlag == false)
|
||||
{
|
||||
ParamData Param = new ParamData();
|
||||
Param = rParam;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
edTripNew.Text = String.Format("{0}", Param.Fault);
|
||||
edWarningNew.Text = String.Format("{0}", Param.Warning);
|
||||
edReleaseNew.Text = String.Format("{0}", Param.Release);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
edTripNew.Text = String.Format("{0:#0.0}", (float)Param.Fault / 100);
|
||||
edWarningNew.Text = String.Format("{0:#0.0}", (float)Param.Warning / 100);
|
||||
edReleaseNew.Text = String.Format("{0:#0.0}", (float)Param.Release / 100);
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 10:
|
||||
case 11:
|
||||
edTripNew.Text = String.Format("{0}", Param.Fault);
|
||||
edWarningNew.Text = String.Format("{0}", Param.Warning);
|
||||
edReleaseNew.Text = String.Format("{0}", Param.Release);
|
||||
break;
|
||||
case 8:
|
||||
case 9:
|
||||
edTripNew.Text = String.Format("{0:#0.0}", (float)Param.Fault / 10);
|
||||
edWarningNew.Text = String.Format("{0:#0.0}", (float)Param.Warning / 10);
|
||||
edReleaseNew.Text = String.Format("{0:#0.0}", (float)Param.Release / 10);
|
||||
break;
|
||||
}
|
||||
wFlag = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void TextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
csUtils.TypingOnlyNumber(sender, e, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
120
LFP_Manager_PRM/Controls/ucParamSet.resx
Normal file
120
LFP_Manager_PRM/Controls/ucParamSet.resx
Normal 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>
|
||||
1412
LFP_Manager_PRM/Controls/ucShelfStatus.Designer.cs
generated
Normal file
1412
LFP_Manager_PRM/Controls/ucShelfStatus.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
1228
LFP_Manager_PRM/Controls/ucShelfStatus.cs
Normal file
1228
LFP_Manager_PRM/Controls/ucShelfStatus.cs
Normal file
File diff suppressed because it is too large
Load Diff
123
LFP_Manager_PRM/Controls/ucShelfStatus.resx
Normal file
123
LFP_Manager_PRM/Controls/ucShelfStatus.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?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="tmrDisplay.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
188
LFP_Manager_PRM/Controls/ucStatus.Designer.cs
generated
Normal file
188
LFP_Manager_PRM/Controls/ucStatus.Designer.cs
generated
Normal file
@@ -0,0 +1,188 @@
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
partial class ucStatus
|
||||
{
|
||||
/// <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 Component 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.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.pcStatus = new DevExpress.XtraEditors.PanelControl();
|
||||
this.layoutControl2 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.lcStatus = new DevExpress.XtraEditors.LabelControl();
|
||||
this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pcStatus)).BeginInit();
|
||||
this.pcStatus.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).BeginInit();
|
||||
this.layoutControl2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(236)))), ((int)(((byte)(239)))));
|
||||
this.layoutControl1.Controls.Add(this.pcStatus);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(717, 178, 250, 350);
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(147, 27);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// pcStatus
|
||||
//
|
||||
this.pcStatus.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Style3D;
|
||||
this.pcStatus.Controls.Add(this.layoutControl2);
|
||||
this.pcStatus.Location = new System.Drawing.Point(1, 1);
|
||||
this.pcStatus.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.pcStatus.Name = "pcStatus";
|
||||
this.pcStatus.Size = new System.Drawing.Size(145, 25);
|
||||
this.pcStatus.TabIndex = 4;
|
||||
//
|
||||
// layoutControl2
|
||||
//
|
||||
this.layoutControl2.Controls.Add(this.lcStatus);
|
||||
this.layoutControl2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl2.Location = new System.Drawing.Point(2, 2);
|
||||
this.layoutControl2.Name = "layoutControl2";
|
||||
this.layoutControl2.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.layoutControl2.Root = this.layoutControlGroup2;
|
||||
this.layoutControl2.Size = new System.Drawing.Size(141, 21);
|
||||
this.layoutControl2.TabIndex = 0;
|
||||
this.layoutControl2.Text = "layoutControl2";
|
||||
//
|
||||
// lcStatus
|
||||
//
|
||||
this.lcStatus.Appearance.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lcStatus.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.lcStatus.Location = new System.Drawing.Point(2, 2);
|
||||
this.lcStatus.Name = "lcStatus";
|
||||
this.lcStatus.Size = new System.Drawing.Size(137, 17);
|
||||
this.lcStatus.StyleController = this.layoutControl2;
|
||||
this.lcStatus.TabIndex = 4;
|
||||
this.lcStatus.Text = "labelControl1";
|
||||
//
|
||||
// layoutControlGroup2
|
||||
//
|
||||
this.layoutControlGroup2.CustomizationFormText = "layoutControlGroup2";
|
||||
this.layoutControlGroup2.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup2.GroupBordersVisible = false;
|
||||
this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem2});
|
||||
this.layoutControlGroup2.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlGroup2.Name = "layoutControlGroup2";
|
||||
this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup2.Size = new System.Drawing.Size(141, 21);
|
||||
this.layoutControlGroup2.Text = "layoutControlGroup2";
|
||||
this.layoutControlGroup2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.lcStatus;
|
||||
this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem2.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(139, 19);
|
||||
this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem2.Text = "layoutControlItem2";
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextToControlDistance = 0;
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1});
|
||||
this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlGroup1.Name = "Root";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(147, 27);
|
||||
this.layoutControlGroup1.Text = "Root";
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.pcStatus;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(147, 27);
|
||||
this.layoutControlItem1.Text = "layoutControlItem1";
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextToControlDistance = 0;
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// ucStatus
|
||||
//
|
||||
this.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(236)))), ((int)(((byte)(239)))));
|
||||
this.Appearance.Options.UseBackColor = true;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.MinimumSize = new System.Drawing.Size(0, 27);
|
||||
this.Name = "ucStatus";
|
||||
this.Size = new System.Drawing.Size(147, 27);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pcStatus)).EndInit();
|
||||
this.pcStatus.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).EndInit();
|
||||
this.layoutControl2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.PanelControl pcStatus;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl2;
|
||||
private DevExpress.XtraEditors.LabelControl lcStatus;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
}
|
||||
}
|
||||
49
LFP_Manager_PRM/Controls/ucStatus.cs
Normal file
49
LFP_Manager_PRM/Controls/ucStatus.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
public partial class ucStatus : DevExpress.XtraEditors.XtraUserControl
|
||||
{
|
||||
public ucStatus()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetName(string name)
|
||||
{
|
||||
lcStatus.Text = " " + name + " ";
|
||||
}
|
||||
|
||||
public void SetTextWidth(int width)
|
||||
{
|
||||
lcStatus.Size = new System.Drawing.Size(width, 14);
|
||||
}
|
||||
|
||||
public void SetValue(int nValue)
|
||||
{
|
||||
switch (nValue)
|
||||
{
|
||||
case 0:
|
||||
pcStatus.BackColor = System.Drawing.Color.Green;
|
||||
lcStatus.ForeColor = System.Drawing.Color.White;
|
||||
break;
|
||||
case 1:
|
||||
pcStatus.BackColor = System.Drawing.Color.Orange;
|
||||
lcStatus.ForeColor = System.Drawing.Color.Black;
|
||||
break;
|
||||
case 2:
|
||||
pcStatus.BackColor = System.Drawing.Color.Red;
|
||||
lcStatus.ForeColor = System.Drawing.Color.White;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
LFP_Manager_PRM/Controls/ucStatus.resx
Normal file
120
LFP_Manager_PRM/Controls/ucStatus.resx
Normal 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>
|
||||
308
LFP_Manager_PRM/Controls/ucTargetControl.Designer.cs
generated
Normal file
308
LFP_Manager_PRM/Controls/ucTargetControl.Designer.cs
generated
Normal file
@@ -0,0 +1,308 @@
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
partial class ucTargetControl
|
||||
{
|
||||
/// <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 Component 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.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.gcTargetConfig = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl2 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.lbStatus = new DevExpress.XtraEditors.LabelControl();
|
||||
this.lbTargetInfo = new DevExpress.XtraEditors.LabelControl();
|
||||
this.btnConfig = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnStart = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.lbTarget = new DevExpress.XtraEditors.LabelControl();
|
||||
this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gcTargetConfig)).BeginInit();
|
||||
this.gcTargetConfig.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).BeginInit();
|
||||
this.layoutControl2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.gcTargetConfig);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(803, 61);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// gcTargetConfig
|
||||
//
|
||||
this.gcTargetConfig.Controls.Add(this.layoutControl2);
|
||||
this.gcTargetConfig.Location = new System.Drawing.Point(3, 3);
|
||||
this.gcTargetConfig.Name = "gcTargetConfig";
|
||||
this.gcTargetConfig.Size = new System.Drawing.Size(797, 55);
|
||||
this.gcTargetConfig.TabIndex = 6;
|
||||
this.gcTargetConfig.Text = "Target Config";
|
||||
//
|
||||
// layoutControl2
|
||||
//
|
||||
this.layoutControl2.Controls.Add(this.lbStatus);
|
||||
this.layoutControl2.Controls.Add(this.lbTargetInfo);
|
||||
this.layoutControl2.Controls.Add(this.btnConfig);
|
||||
this.layoutControl2.Controls.Add(this.btnStart);
|
||||
this.layoutControl2.Controls.Add(this.lbTarget);
|
||||
this.layoutControl2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl2.Location = new System.Drawing.Point(2, 22);
|
||||
this.layoutControl2.Name = "layoutControl2";
|
||||
this.layoutControl2.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(932, 307, 250, 350);
|
||||
this.layoutControl2.Root = this.layoutControlGroup2;
|
||||
this.layoutControl2.Size = new System.Drawing.Size(793, 31);
|
||||
this.layoutControl2.TabIndex = 0;
|
||||
this.layoutControl2.Text = "layoutControl2";
|
||||
//
|
||||
// lbStatus
|
||||
//
|
||||
this.lbStatus.Appearance.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbStatus.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.lbStatus.Location = new System.Drawing.Point(526, 4);
|
||||
this.lbStatus.Name = "lbStatus";
|
||||
this.lbStatus.Size = new System.Drawing.Size(77, 23);
|
||||
this.lbStatus.StyleController = this.layoutControl2;
|
||||
this.lbStatus.TabIndex = 9;
|
||||
this.lbStatus.Text = "STOP";
|
||||
//
|
||||
// lbTargetInfo
|
||||
//
|
||||
this.lbTargetInfo.Appearance.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbTargetInfo.Location = new System.Drawing.Point(78, 4);
|
||||
this.lbTargetInfo.Name = "lbTargetInfo";
|
||||
this.lbTargetInfo.Size = new System.Drawing.Size(444, 23);
|
||||
this.lbTargetInfo.StyleController = this.layoutControl2;
|
||||
this.lbTargetInfo.TabIndex = 8;
|
||||
//
|
||||
// btnConfig
|
||||
//
|
||||
this.btnConfig.Location = new System.Drawing.Point(607, 4);
|
||||
this.btnConfig.Name = "btnConfig";
|
||||
this.btnConfig.Size = new System.Drawing.Size(89, 23);
|
||||
this.btnConfig.StyleController = this.layoutControl2;
|
||||
this.btnConfig.TabIndex = 7;
|
||||
this.btnConfig.Text = "CONFIG";
|
||||
this.btnConfig.Click += new System.EventHandler(this.btnConfig_Click);
|
||||
//
|
||||
// btnStart
|
||||
//
|
||||
this.btnStart.Location = new System.Drawing.Point(700, 4);
|
||||
this.btnStart.Name = "btnStart";
|
||||
this.btnStart.Size = new System.Drawing.Size(89, 23);
|
||||
this.btnStart.StyleController = this.layoutControl2;
|
||||
this.btnStart.TabIndex = 6;
|
||||
this.btnStart.Text = "START";
|
||||
this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
|
||||
//
|
||||
// lbTarget
|
||||
//
|
||||
this.lbTarget.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.lbTarget.Location = new System.Drawing.Point(4, 4);
|
||||
this.lbTarget.Name = "lbTarget";
|
||||
this.lbTarget.Size = new System.Drawing.Size(70, 23);
|
||||
this.lbTarget.StyleController = this.layoutControl2;
|
||||
this.lbTarget.TabIndex = 4;
|
||||
this.lbTarget.Text = "Target";
|
||||
//
|
||||
// layoutControlGroup2
|
||||
//
|
||||
this.layoutControlGroup2.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup2.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup2.GroupBordersVisible = false;
|
||||
this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem2,
|
||||
this.layoutControlItem4,
|
||||
this.layoutControlItem3,
|
||||
this.layoutControlItem5,
|
||||
this.layoutControlItem6});
|
||||
this.layoutControlGroup2.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlGroup2.Name = "Root";
|
||||
this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2);
|
||||
this.layoutControlGroup2.Size = new System.Drawing.Size(793, 31);
|
||||
this.layoutControlGroup2.Text = "Root";
|
||||
this.layoutControlGroup2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.lbTarget;
|
||||
this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem2.MaxSize = new System.Drawing.Size(74, 0);
|
||||
this.layoutControlItem2.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(74, 27);
|
||||
this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem2.Text = "layoutControlItem2";
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextToControlDistance = 0;
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.btnStart;
|
||||
this.layoutControlItem4.CustomizationFormText = "layoutControlItem4";
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(696, 0);
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(53, 26);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(93, 27);
|
||||
this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem4.Text = "layoutControlItem4";
|
||||
this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem4.TextToControlDistance = 0;
|
||||
this.layoutControlItem4.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.btnConfig;
|
||||
this.layoutControlItem3.CustomizationFormText = "layoutControlItem3";
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(603, 0);
|
||||
this.layoutControlItem3.MinSize = new System.Drawing.Size(57, 26);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(93, 27);
|
||||
this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem3.Text = "layoutControlItem3";
|
||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem3.TextToControlDistance = 0;
|
||||
this.layoutControlItem3.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem5
|
||||
//
|
||||
this.layoutControlItem5.Control = this.lbTargetInfo;
|
||||
this.layoutControlItem5.CustomizationFormText = "layoutControlItem5";
|
||||
this.layoutControlItem5.Location = new System.Drawing.Point(74, 0);
|
||||
this.layoutControlItem5.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem5.Name = "layoutControlItem5";
|
||||
this.layoutControlItem5.Size = new System.Drawing.Size(448, 27);
|
||||
this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem5.Text = "layoutControlItem5";
|
||||
this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem5.TextToControlDistance = 0;
|
||||
this.layoutControlItem5.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem6
|
||||
//
|
||||
this.layoutControlItem6.Control = this.lbStatus;
|
||||
this.layoutControlItem6.CustomizationFormText = "layoutControlItem6";
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(522, 0);
|
||||
this.layoutControlItem6.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem6.Name = "layoutControlItem6";
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(81, 27);
|
||||
this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem6.Text = "layoutControlItem6";
|
||||
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem6.TextToControlDistance = 0;
|
||||
this.layoutControlItem6.TextVisible = false;
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1});
|
||||
this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlGroup1.Name = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(803, 61);
|
||||
this.layoutControlGroup1.Text = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.gcTargetConfig;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(801, 59);
|
||||
this.layoutControlItem1.Text = "layoutControlItem1";
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextToControlDistance = 0;
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// ucTargetControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Name = "ucTargetControl";
|
||||
this.Size = new System.Drawing.Size(803, 61);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gcTargetConfig)).EndInit();
|
||||
this.gcTargetConfig.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).EndInit();
|
||||
this.layoutControl2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.GroupControl gcTargetConfig;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl2;
|
||||
private DevExpress.XtraEditors.LabelControl lbTargetInfo;
|
||||
private DevExpress.XtraEditors.SimpleButton btnConfig;
|
||||
private DevExpress.XtraEditors.SimpleButton btnStart;
|
||||
private DevExpress.XtraEditors.LabelControl lbTarget;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraEditors.LabelControl lbStatus;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
|
||||
}
|
||||
}
|
||||
105
LFP_Manager_PRM/Controls/ucTargetControl.cs
Normal file
105
LFP_Manager_PRM/Controls/ucTargetControl.cs
Normal file
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
using LFP_Manager.Forms;
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Function;
|
||||
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
public delegate void ButtonEvent(object sender, EventArgs e);
|
||||
|
||||
public partial class ucTargetControl : DevExpress.XtraEditors.XtraUserControl
|
||||
{
|
||||
#region VARIABLES
|
||||
|
||||
public event ButtonEvent OnConfig = null;
|
||||
public event ButtonEvent OnStart = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public ucTargetControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
lbStatus.Appearance.ForeColor = System.Drawing.Color.Red;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region UPDATE DATA
|
||||
|
||||
public void UpdateConfig(CommConfig Config)
|
||||
{
|
||||
string info;
|
||||
|
||||
if (Config.CommType == 1)
|
||||
{
|
||||
info = String.Format("INTERFACE: UART, PORT: {0}, BAUDRATE: {1}, MODEL: {2}"
|
||||
, Config.UartPort
|
||||
, Config.UartBaudrate
|
||||
, csConstData.CommType.UART_MODEL[Config.UartModelIndex]
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
info = String.Format("INTERFACE: CAN, DEVICE: {0}({1}), PORT: {2}, BAUDRATE: {3}, MODEL: {4}"
|
||||
, csCanConstData.CanDeviceInfo.DeviceNames[Config.CanDevice]
|
||||
, Config.CanIndex
|
||||
, Config.CanNo
|
||||
, csCanConstData.BaudRate.BaudRateStrings[Config.CanBaudrate]
|
||||
, csConstData.CommType.CAN_MODEL[Config.TargetModelIndex]
|
||||
);
|
||||
}
|
||||
|
||||
lbTargetInfo.Text = info;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void UpdateStatus(bool flag)
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
btnConfig.Enabled = false;
|
||||
btnStart.Text = "STOP";
|
||||
|
||||
lbStatus.Text = "RUN";
|
||||
lbStatus.Appearance.ForeColor = System.Drawing.Color.Blue;
|
||||
}
|
||||
else
|
||||
{
|
||||
btnConfig.Enabled = true;
|
||||
btnStart.Text = "START";
|
||||
|
||||
lbStatus.Text = "STOP";
|
||||
lbStatus.Appearance.ForeColor = System.Drawing.Color.Red;
|
||||
}
|
||||
}
|
||||
|
||||
#region BUTTON EVENT
|
||||
|
||||
private void btnConfig_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (OnConfig != null)
|
||||
OnConfig(sender, e);
|
||||
}
|
||||
|
||||
private void btnStart_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (OnStart != null)
|
||||
OnStart(sender, e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
120
LFP_Manager_PRM/Controls/ucTargetControl.resx
Normal file
120
LFP_Manager_PRM/Controls/ucTargetControl.resx
Normal 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>
|
||||
406
LFP_Manager_PRM/Controls/ucTftpClientcs.Designer.cs
generated
Normal file
406
LFP_Manager_PRM/Controls/ucTftpClientcs.Designer.cs
generated
Normal file
@@ -0,0 +1,406 @@
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
partial class ucTftpClientcs
|
||||
{
|
||||
/// <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 Component 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.groupFwUpdate = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.btnLcdHistoryDelete = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnReset = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnDownload = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.lbDownloadStatus = new DevExpress.XtraEditors.LabelControl();
|
||||
this.btnFindFile = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.teFilename = new DevExpress.XtraEditors.TextEdit();
|
||||
this.progressDownload = new DevExpress.XtraEditors.ProgressBarControl();
|
||||
this.lbFilename = new DevExpress.XtraEditors.LabelControl();
|
||||
this.lbDeviceInfo = new DevExpress.XtraEditors.LabelControl();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.groupFwUpdate)).BeginInit();
|
||||
this.groupFwUpdate.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.teFilename.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.progressDownload.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupFwUpdate
|
||||
//
|
||||
this.groupFwUpdate.Controls.Add(this.layoutControl1);
|
||||
this.groupFwUpdate.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupFwUpdate.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupFwUpdate.Name = "groupFwUpdate";
|
||||
this.groupFwUpdate.Size = new System.Drawing.Size(462, 242);
|
||||
this.groupFwUpdate.TabIndex = 0;
|
||||
this.groupFwUpdate.Text = "Firmware Update";
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.btnLcdHistoryDelete);
|
||||
this.layoutControl1.Controls.Add(this.btnReset);
|
||||
this.layoutControl1.Controls.Add(this.btnDownload);
|
||||
this.layoutControl1.Controls.Add(this.lbDownloadStatus);
|
||||
this.layoutControl1.Controls.Add(this.btnFindFile);
|
||||
this.layoutControl1.Controls.Add(this.teFilename);
|
||||
this.layoutControl1.Controls.Add(this.progressDownload);
|
||||
this.layoutControl1.Controls.Add(this.lbFilename);
|
||||
this.layoutControl1.Controls.Add(this.lbDeviceInfo);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(2, 22);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(756, 30, 250, 350);
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(458, 218);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// btnLcdHistoryDelete
|
||||
//
|
||||
this.btnLcdHistoryDelete.Location = new System.Drawing.Point(3, 186);
|
||||
this.btnLcdHistoryDelete.Name = "btnLcdHistoryDelete";
|
||||
this.btnLcdHistoryDelete.Size = new System.Drawing.Size(140, 29);
|
||||
this.btnLcdHistoryDelete.StyleController = this.layoutControl1;
|
||||
this.btnLcdHistoryDelete.TabIndex = 14;
|
||||
this.btnLcdHistoryDelete.Text = "History Delete (LCD)";
|
||||
this.btnLcdHistoryDelete.Click += new System.EventHandler(this.btnLcdHistoryDelete_Click);
|
||||
//
|
||||
// btnReset
|
||||
//
|
||||
this.btnReset.Location = new System.Drawing.Point(354, 186);
|
||||
this.btnReset.Name = "btnReset";
|
||||
this.btnReset.Size = new System.Drawing.Size(101, 29);
|
||||
this.btnReset.StyleController = this.layoutControl1;
|
||||
this.btnReset.TabIndex = 13;
|
||||
this.btnReset.Text = "Reset";
|
||||
this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
|
||||
//
|
||||
// btnDownload
|
||||
//
|
||||
this.btnDownload.Enabled = false;
|
||||
this.btnDownload.Location = new System.Drawing.Point(366, 35);
|
||||
this.btnDownload.Name = "btnDownload";
|
||||
this.btnDownload.Size = new System.Drawing.Size(89, 22);
|
||||
this.btnDownload.StyleController = this.layoutControl1;
|
||||
this.btnDownload.TabIndex = 12;
|
||||
this.btnDownload.Text = "Update";
|
||||
this.btnDownload.Click += new System.EventHandler(this.btnDownload_Click);
|
||||
//
|
||||
// lbDownloadStatus
|
||||
//
|
||||
this.lbDownloadStatus.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.lbDownloadStatus.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.lbDownloadStatus.Location = new System.Drawing.Point(3, 102);
|
||||
this.lbDownloadStatus.Name = "lbDownloadStatus";
|
||||
this.lbDownloadStatus.Size = new System.Drawing.Size(452, 80);
|
||||
this.lbDownloadStatus.StyleController = this.layoutControl1;
|
||||
this.lbDownloadStatus.TabIndex = 9;
|
||||
this.lbDownloadStatus.Text = "None";
|
||||
//
|
||||
// btnFindFile
|
||||
//
|
||||
this.btnFindFile.Location = new System.Drawing.Point(273, 35);
|
||||
this.btnFindFile.Name = "btnFindFile";
|
||||
this.btnFindFile.Size = new System.Drawing.Size(89, 22);
|
||||
this.btnFindFile.StyleController = this.layoutControl1;
|
||||
this.btnFindFile.TabIndex = 8;
|
||||
this.btnFindFile.Text = "Find...";
|
||||
this.btnFindFile.Click += new System.EventHandler(this.btnFindFile_Click);
|
||||
//
|
||||
// teFilename
|
||||
//
|
||||
this.teFilename.Location = new System.Drawing.Point(105, 35);
|
||||
this.teFilename.Name = "teFilename";
|
||||
this.teFilename.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.teFilename.Properties.Appearance.Options.UseFont = true;
|
||||
this.teFilename.Size = new System.Drawing.Size(164, 22);
|
||||
this.teFilename.StyleController = this.layoutControl1;
|
||||
this.teFilename.TabIndex = 7;
|
||||
//
|
||||
// progressDownload
|
||||
//
|
||||
this.progressDownload.Location = new System.Drawing.Point(3, 61);
|
||||
this.progressDownload.Name = "progressDownload";
|
||||
this.progressDownload.Size = new System.Drawing.Size(452, 37);
|
||||
this.progressDownload.StyleController = this.layoutControl1;
|
||||
this.progressDownload.TabIndex = 6;
|
||||
//
|
||||
// lbFilename
|
||||
//
|
||||
this.lbFilename.Location = new System.Drawing.Point(3, 35);
|
||||
this.lbFilename.Name = "lbFilename";
|
||||
this.lbFilename.Size = new System.Drawing.Size(98, 22);
|
||||
this.lbFilename.StyleController = this.layoutControl1;
|
||||
this.lbFilename.TabIndex = 5;
|
||||
this.lbFilename.Text = " Filename";
|
||||
//
|
||||
// lbDeviceInfo
|
||||
//
|
||||
this.lbDeviceInfo.Location = new System.Drawing.Point(3, 3);
|
||||
this.lbDeviceInfo.Name = "lbDeviceInfo";
|
||||
this.lbDeviceInfo.Size = new System.Drawing.Size(452, 28);
|
||||
this.lbDeviceInfo.StyleController = this.layoutControl1;
|
||||
this.lbDeviceInfo.TabIndex = 4;
|
||||
this.lbDeviceInfo.Text = " Device Information";
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1,
|
||||
this.layoutControlItem2,
|
||||
this.layoutControlItem3,
|
||||
this.emptySpaceItem1,
|
||||
this.layoutControlItem4,
|
||||
this.layoutControlItem5,
|
||||
this.layoutControlItem6,
|
||||
this.layoutControlItem9,
|
||||
this.layoutControlItem7,
|
||||
this.layoutControlItem8});
|
||||
this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlGroup1.Name = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(458, 218);
|
||||
this.layoutControlGroup1.Text = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.lbDeviceInfo;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(456, 32);
|
||||
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem1.Text = "layoutControlItem1";
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextToControlDistance = 0;
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.lbFilename;
|
||||
this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(0, 32);
|
||||
this.layoutControlItem2.MaxSize = new System.Drawing.Size(102, 0);
|
||||
this.layoutControlItem2.MinSize = new System.Drawing.Size(102, 18);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(102, 26);
|
||||
this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem2.Text = "layoutControlItem2";
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextToControlDistance = 0;
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.progressDownload;
|
||||
this.layoutControlItem3.CustomizationFormText = "layoutControlItem3";
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(0, 58);
|
||||
this.layoutControlItem3.MinSize = new System.Drawing.Size(54, 16);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(456, 41);
|
||||
this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem3.Text = "layoutControlItem3";
|
||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem3.TextToControlDistance = 0;
|
||||
this.layoutControlItem3.TextVisible = false;
|
||||
//
|
||||
// emptySpaceItem1
|
||||
//
|
||||
this.emptySpaceItem1.AllowHotTrack = false;
|
||||
this.emptySpaceItem1.CustomizationFormText = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Location = new System.Drawing.Point(144, 183);
|
||||
this.emptySpaceItem1.MinSize = new System.Drawing.Size(104, 24);
|
||||
this.emptySpaceItem1.Name = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Size = new System.Drawing.Size(207, 33);
|
||||
this.emptySpaceItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.emptySpaceItem1.Text = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.teFilename;
|
||||
this.layoutControlItem4.CustomizationFormText = "layoutControlItem4";
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(102, 32);
|
||||
this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 26);
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(54, 26);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(168, 26);
|
||||
this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem4.Text = "layoutControlItem4";
|
||||
this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem4.TextToControlDistance = 0;
|
||||
this.layoutControlItem4.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem5
|
||||
//
|
||||
this.layoutControlItem5.Control = this.btnFindFile;
|
||||
this.layoutControlItem5.CustomizationFormText = "layoutControlItem5";
|
||||
this.layoutControlItem5.Location = new System.Drawing.Point(270, 32);
|
||||
this.layoutControlItem5.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem5.Name = "layoutControlItem5";
|
||||
this.layoutControlItem5.Size = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem5.Text = "layoutControlItem5";
|
||||
this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem5.TextToControlDistance = 0;
|
||||
this.layoutControlItem5.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem6
|
||||
//
|
||||
this.layoutControlItem6.Control = this.lbDownloadStatus;
|
||||
this.layoutControlItem6.CustomizationFormText = "layoutControlItem6";
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(0, 99);
|
||||
this.layoutControlItem6.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem6.Name = "layoutControlItem6";
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(456, 84);
|
||||
this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem6.Text = "layoutControlItem6";
|
||||
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem6.TextToControlDistance = 0;
|
||||
this.layoutControlItem6.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem9
|
||||
//
|
||||
this.layoutControlItem9.Control = this.btnDownload;
|
||||
this.layoutControlItem9.CustomizationFormText = "layoutControlItem9";
|
||||
this.layoutControlItem9.Location = new System.Drawing.Point(363, 32);
|
||||
this.layoutControlItem9.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem9.Name = "layoutControlItem9";
|
||||
this.layoutControlItem9.Size = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem9.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem9.Text = "layoutControlItem9";
|
||||
this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem9.TextToControlDistance = 0;
|
||||
this.layoutControlItem9.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem7
|
||||
//
|
||||
this.layoutControlItem7.Control = this.btnReset;
|
||||
this.layoutControlItem7.CustomizationFormText = "layoutControlItem7";
|
||||
this.layoutControlItem7.Location = new System.Drawing.Point(351, 183);
|
||||
this.layoutControlItem7.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem7.Name = "layoutControlItem7";
|
||||
this.layoutControlItem7.Size = new System.Drawing.Size(105, 33);
|
||||
this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem7.Text = "layoutControlItem7";
|
||||
this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem7.TextToControlDistance = 0;
|
||||
this.layoutControlItem7.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem8
|
||||
//
|
||||
this.layoutControlItem8.Control = this.btnLcdHistoryDelete;
|
||||
this.layoutControlItem8.CustomizationFormText = "layoutControlItem8";
|
||||
this.layoutControlItem8.Location = new System.Drawing.Point(0, 183);
|
||||
this.layoutControlItem8.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem8.Name = "layoutControlItem8";
|
||||
this.layoutControlItem8.Size = new System.Drawing.Size(144, 33);
|
||||
this.layoutControlItem8.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem8.Text = "layoutControlItem8";
|
||||
this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem8.TextToControlDistance = 0;
|
||||
this.layoutControlItem8.TextVisible = false;
|
||||
//
|
||||
// ucTftpClientcs
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupFwUpdate);
|
||||
this.Name = "ucTftpClientcs";
|
||||
this.Size = new System.Drawing.Size(462, 242);
|
||||
((System.ComponentModel.ISupportInitialize)(this.groupFwUpdate)).EndInit();
|
||||
this.groupFwUpdate.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.teFilename.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.progressDownload.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraEditors.GroupControl groupFwUpdate;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnFindFile;
|
||||
private DevExpress.XtraEditors.TextEdit teFilename;
|
||||
private DevExpress.XtraEditors.ProgressBarControl progressDownload;
|
||||
private DevExpress.XtraEditors.LabelControl lbFilename;
|
||||
private DevExpress.XtraEditors.LabelControl lbDeviceInfo;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
|
||||
private DevExpress.XtraEditors.LabelControl lbDownloadStatus;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
|
||||
private DevExpress.XtraEditors.SimpleButton btnDownload;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
|
||||
private DevExpress.XtraEditors.SimpleButton btnReset;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
|
||||
private DevExpress.XtraEditors.SimpleButton btnLcdHistoryDelete;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
|
||||
}
|
||||
}
|
||||
256
LFP_Manager_PRM/Controls/ucTftpClientcs.cs
Normal file
256
LFP_Manager_PRM/Controls/ucTftpClientcs.cs
Normal file
@@ -0,0 +1,256 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
using System.Threading;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using Tftp.Net;
|
||||
|
||||
using LFP_Manager.Utils;
|
||||
using LFP_Manager.DataStructure;
|
||||
|
||||
namespace LFP_Manager.Controls
|
||||
{
|
||||
public delegate void ResetEvent(object sender, int mode, UInt16 value);
|
||||
|
||||
public partial class ucTftpClientcs : DevExpress.XtraEditors.XtraUserControl
|
||||
{
|
||||
#region CONST
|
||||
|
||||
const string BMCB_FILE_NAME = "App.bin";
|
||||
const string mBMS_FILE_NAME = "mBMS_APP_DL.bin";
|
||||
|
||||
#endregion
|
||||
|
||||
#region VARIABLES
|
||||
|
||||
int ID = 0;
|
||||
string hostIP = "";
|
||||
byte[] RbmsVersion;
|
||||
string TarGetFileName = "";
|
||||
|
||||
int transferedBytes = 0;
|
||||
|
||||
public event ResetEvent OnReset = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTOR
|
||||
|
||||
public ucTftpClientcs()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
TarGetFileName = "APP.BIN";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region RESET EVENT
|
||||
|
||||
private void OnResetEvent(object sender, int mode, UInt16 value)
|
||||
{
|
||||
if (OnReset != null)
|
||||
{
|
||||
OnReset(sender, mode, value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region INFORMATION UPDATE
|
||||
|
||||
public void UpdateInfor(int sid, string IpAddr, byte[] fwVersion)
|
||||
{
|
||||
ID = sid;
|
||||
hostIP = IpAddr;
|
||||
RbmsVersion = fwVersion;
|
||||
|
||||
lbDeviceInfo.Text = String.Format(" RBMS ID: {0} IP: {1}"
|
||||
, sid + 1
|
||||
, hostIP
|
||||
);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region TFTP FUNCTION
|
||||
|
||||
public void FwDownload(string host, string filename)
|
||||
{
|
||||
//Setup a TftpClient instance
|
||||
TftpClient client = new TftpClient(host);
|
||||
ITftpTransfer transfer = client.Upload(TarGetFileName);
|
||||
|
||||
transfer.RetryTimeout = TimeSpan.FromMilliseconds(500);
|
||||
transfer.RetryCount = 3;
|
||||
transfer.TransferMode = TftpTransferMode.octet;
|
||||
|
||||
//Capture the events that may happen during the transfer
|
||||
transfer.OnProgress += new TftpProgressHandler(transfer_OnProgress);
|
||||
transfer.OnFinished += new TftpEventHandler(transfer_OnFinshed);
|
||||
transfer.OnError += new TftpErrorHandler(transfer_OnError);
|
||||
|
||||
//Start the transfer and write the data that we're downloading into a memory stream
|
||||
FileStream upLoadFile = new FileStream(teFilename.Text, FileMode.Open);
|
||||
progressDownload.Properties.Maximum = (int)(upLoadFile.Length / 1024);
|
||||
transfer.Start(upLoadFile);
|
||||
}
|
||||
|
||||
void transfer_OnProgress(ITftpTransfer transfer, TftpTransferProgress progress)
|
||||
{
|
||||
string msg = String.Format("Transfer running. Progress: " + progress);
|
||||
transferedBytes = progress.TransferredBytes / 1024;
|
||||
|
||||
TftpMsgProcess(msg, 0);
|
||||
}
|
||||
|
||||
void transfer_OnError(ITftpTransfer transfer, TftpTransferError error)
|
||||
{
|
||||
string msg = String.Format("Transfer failed: " + error);
|
||||
|
||||
TftpMsgProcess(msg, 2);
|
||||
}
|
||||
|
||||
void transfer_OnFinshed(ITftpTransfer transfer)
|
||||
{
|
||||
string msg = String.Format("Transfer succeeded.");
|
||||
|
||||
TftpMsgProcess(msg, 1);
|
||||
}
|
||||
|
||||
private void TftpMsgProcess(string msg, int msgType)
|
||||
{
|
||||
if (this.InvokeRequired)
|
||||
{
|
||||
this.Invoke(new MethodInvoker(delegate()
|
||||
{
|
||||
lbDownloadStatus.Text = msg;
|
||||
if (msgType == 0)
|
||||
{
|
||||
// transfer progress
|
||||
progressDownload.Position = transferedBytes;
|
||||
}
|
||||
else if (msgType == 1)
|
||||
{
|
||||
progressDownload.Position = transferedBytes;
|
||||
MessageBox.Show(msg, "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
else if (msgType == 2)
|
||||
{
|
||||
MessageBox.Show(msg, "Result", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
lbDownloadStatus.Text = msg;
|
||||
if (msgType == 0)
|
||||
{
|
||||
// transfer progress
|
||||
progressDownload.Position = transferedBytes;
|
||||
}
|
||||
else if (msgType == 1)
|
||||
{
|
||||
progressDownload.Position = transferedBytes;
|
||||
MessageBox.Show(msg, "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
else if (msgType == 2)
|
||||
{
|
||||
MessageBox.Show(msg, "Result", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BUTTON EVENT
|
||||
|
||||
private void btnFindFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog fwOpenFile;
|
||||
|
||||
fwOpenFile = new OpenFileDialog();
|
||||
|
||||
if (fwOpenFile.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
teFilename.Text = fwOpenFile.FileName;
|
||||
|
||||
byte[] bName = csUtils.StringToByte(Path.GetFileName(teFilename.Text));
|
||||
if ((bName[0] == (byte)'B')
|
||||
&& (bName[1] == (byte)'M')
|
||||
&& (bName[2] == (byte)'C')
|
||||
&& (bName[3] == (byte)'B')
|
||||
)
|
||||
{
|
||||
TarGetFileName = BMCB_FILE_NAME;
|
||||
}
|
||||
else if ((bName[0] == (byte)'m')
|
||||
&& (bName[1] == (byte)'B')
|
||||
&& (bName[2] == (byte)'M')
|
||||
&& (bName[3] == (byte)'S')
|
||||
)
|
||||
{
|
||||
TarGetFileName = mBMS_FILE_NAME;
|
||||
}
|
||||
|
||||
if (TarGetFileName != "")
|
||||
lbDownloadStatus.Text = TarGetFileName;
|
||||
|
||||
btnDownload.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnDownload_Click(object sender, EventArgs e)
|
||||
{
|
||||
if ((hostIP != "")&&(teFilename.Text != ""))
|
||||
{
|
||||
FwDownload(hostIP, teFilename.Text);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region RBMS RESET EVENT
|
||||
|
||||
private void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnResetEvent(this, 6, csConstData.ResetFlag.SystemReset);
|
||||
}
|
||||
|
||||
private void btnLcdHistoryDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnResetEvent(this, 6, csConstData.ResetFlag.LcdHistoryDelete);
|
||||
}
|
||||
|
||||
public void Reset_Result(string result, bool error)
|
||||
{
|
||||
if (this.InvokeRequired)
|
||||
{
|
||||
this.Invoke(new MethodInvoker(delegate()
|
||||
{
|
||||
if (error)
|
||||
MessageBox.Show(result, "Result", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
else
|
||||
MessageBox.Show(result, "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (error)
|
||||
MessageBox.Show(result, "Result", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
else
|
||||
MessageBox.Show(result, "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
120
LFP_Manager_PRM/Controls/ucTftpClientcs.resx
Normal file
120
LFP_Manager_PRM/Controls/ucTftpClientcs.resx
Normal 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>
|
||||
132
LFP_Manager_PRM/DB Schema/DB_SCHEMA_TABLE.sql
Normal file
132
LFP_Manager_PRM/DB Schema/DB_SCHEMA_TABLE.sql
Normal file
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* Table Name : TInventoryData
|
||||
* Description : BMS Inventory Data
|
||||
* createAt : 2020.12.02
|
||||
* createBy : JK.Woo
|
||||
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
*/
|
||||
drop table if exists TInventoryData;
|
||||
--drop sequence if exists inventory_data_seq;
|
||||
|
||||
--create sequence inventory_data_seq start 1;
|
||||
|
||||
create table TInventoryData
|
||||
(
|
||||
manufacture_date integer not null ,
|
||||
module_name varchar(20) null ,
|
||||
pcb_sn varchar(20) not null ,
|
||||
module_sn varchar(32) null ,
|
||||
create_date timestamp not null ,
|
||||
modify_date timestamp not null ,
|
||||
|
||||
primary key (pcb_sn, module_sn)
|
||||
);
|
||||
create index inventory_data_idx1 on TInventoryData (pcb_sn);
|
||||
create index inventory_data_idx2 on TInventoryData (module_sn);
|
||||
|
||||
/*
|
||||
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* Table Name : TErrorLogTable
|
||||
* Description : Error Message Log Table
|
||||
* createAt : 2019.11.04
|
||||
* createBy : JK.Woo
|
||||
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
*/
|
||||
drop table if exists TErrorLogTable;
|
||||
--drop sequence if exists module_group_seq;
|
||||
|
||||
--create sequence module_group_seq start 1;
|
||||
|
||||
create table TErrorLogTable
|
||||
(
|
||||
create_date timestamp not null ,
|
||||
pcb_sn varchar(20) not null ,
|
||||
module_sn varchar(20) null ,
|
||||
PROCESS varchar(20) not null ,
|
||||
ERROR_TYPE varchar(100) not null ,
|
||||
ERROR_MSG varchar(200) not null
|
||||
);
|
||||
|
||||
/*
|
||||
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* Table Name : TModuleValue
|
||||
* Description : Battery Module Value and Status Table
|
||||
* createAt : 2021.03.04
|
||||
* createBy : JK.Woo
|
||||
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
*/
|
||||
drop table if exists TModuleValue;
|
||||
|
||||
create table TModuleValue
|
||||
(
|
||||
create_date timestamp not null ,
|
||||
module_no integer not null ,
|
||||
pcb_sn varchar(20) null ,
|
||||
module_sn varchar(32) null ,
|
||||
comm_fail BOOLEAN null ,
|
||||
op_status integer null ,
|
||||
alarm_status integer null ,
|
||||
module_voltage float null ,
|
||||
module_current float null ,
|
||||
module_soc float null ,
|
||||
module_soh float null ,
|
||||
cell_voltage_01 float null ,
|
||||
cell_voltage_02 float null ,
|
||||
cell_voltage_03 float null ,
|
||||
cell_voltage_04 float null ,
|
||||
cell_voltage_05 float null ,
|
||||
cell_voltage_06 float null ,
|
||||
cell_voltage_07 float null ,
|
||||
cell_voltage_08 float null ,
|
||||
cell_voltage_09 float null ,
|
||||
cell_voltage_10 float null ,
|
||||
cell_voltage_11 float null ,
|
||||
cell_voltage_12 float null ,
|
||||
cell_voltage_13 float null ,
|
||||
cell_voltage_14 float null ,
|
||||
cell_voltage_15 float null ,
|
||||
cell_voltage_16 float null ,
|
||||
cell_voltage_17 float null ,
|
||||
cell_voltage_18 float null ,
|
||||
cell_voltage_19 float null ,
|
||||
cell_voltage_20 float null ,
|
||||
cell_voltage_21 float null ,
|
||||
cell_voltage_22 float null ,
|
||||
cell_voltage_23 float null ,
|
||||
cell_voltage_24 float null ,
|
||||
cell_voltage_25 float null ,
|
||||
cell_voltage_26 float null ,
|
||||
cell_voltage_27 float null ,
|
||||
cell_voltage_28 float null ,
|
||||
cell_voltage_29 float null ,
|
||||
cell_voltage_30 float null ,
|
||||
cell_voltage_31 float null ,
|
||||
cell_voltage_32 float null ,
|
||||
cell_voltage_33 float null ,
|
||||
cell_voltage_34 float null ,
|
||||
cell_voltage_35 float null ,
|
||||
cell_voltage_36 float null ,
|
||||
temperature_01 float null ,
|
||||
temperature_02 float null ,
|
||||
temperature_03 float null ,
|
||||
temperature_04 float null ,
|
||||
temperature_05 float null ,
|
||||
temperature_06 float null ,
|
||||
temperature_07 float null ,
|
||||
temperature_08 float null ,
|
||||
temperature_09 float null ,
|
||||
temperature_10 float null ,
|
||||
temperature_11 float null ,
|
||||
temperature_12 float null ,
|
||||
temperature_13 float null ,
|
||||
temperature_14 float null ,
|
||||
temperature_15 float null ,
|
||||
temperature_16 float null ,
|
||||
warning smallint null ,
|
||||
fault smallint null ,
|
||||
|
||||
primary key (module_sn)
|
||||
);
|
||||
|
||||
create index ModuleValue_data_idx1 on TModuleValue (create_date);
|
||||
84
LFP_Manager_PRM/DB Schema/LOG_DB_SCHEMA_TABLE.sql
Normal file
84
LFP_Manager_PRM/DB Schema/LOG_DB_SCHEMA_TABLE.sql
Normal file
@@ -0,0 +1,84 @@
|
||||
/********************************** BATTERY VALUE TABLE **************************************************/
|
||||
|
||||
/*
|
||||
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* Table Name : TModuleValue
|
||||
* Description : Battery Module Value and Status Table
|
||||
* createAt : 2021.03.04
|
||||
* createBy : JK.Woo
|
||||
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
*/
|
||||
drop table if exists TModuleValue;
|
||||
|
||||
create table TModuleValue
|
||||
(
|
||||
create_date timestamp not null ,
|
||||
module_no integer not null ,
|
||||
pcb_sn varchar(20) null ,
|
||||
module_sn varchar(32) null ,
|
||||
comm_fail BOOLEAN null ,
|
||||
op_status integer null ,
|
||||
alarm_status integer null ,
|
||||
module_voltage float null ,
|
||||
module_current float null ,
|
||||
module_soc float null ,
|
||||
module_soh float null ,
|
||||
cell_voltage_01 float null ,
|
||||
cell_voltage_02 float null ,
|
||||
cell_voltage_03 float null ,
|
||||
cell_voltage_04 float null ,
|
||||
cell_voltage_05 float null ,
|
||||
cell_voltage_06 float null ,
|
||||
cell_voltage_07 float null ,
|
||||
cell_voltage_08 float null ,
|
||||
cell_voltage_09 float null ,
|
||||
cell_voltage_10 float null ,
|
||||
cell_voltage_11 float null ,
|
||||
cell_voltage_12 float null ,
|
||||
cell_voltage_13 float null ,
|
||||
cell_voltage_14 float null ,
|
||||
cell_voltage_15 float null ,
|
||||
cell_voltage_16 float null ,
|
||||
cell_voltage_17 float null ,
|
||||
cell_voltage_18 float null ,
|
||||
cell_voltage_19 float null ,
|
||||
cell_voltage_20 float null ,
|
||||
cell_voltage_21 float null ,
|
||||
cell_voltage_22 float null ,
|
||||
cell_voltage_23 float null ,
|
||||
cell_voltage_24 float null ,
|
||||
cell_voltage_25 float null ,
|
||||
cell_voltage_26 float null ,
|
||||
cell_voltage_27 float null ,
|
||||
cell_voltage_28 float null ,
|
||||
cell_voltage_29 float null ,
|
||||
cell_voltage_30 float null ,
|
||||
cell_voltage_31 float null ,
|
||||
cell_voltage_32 float null ,
|
||||
cell_voltage_33 float null ,
|
||||
cell_voltage_34 float null ,
|
||||
cell_voltage_35 float null ,
|
||||
cell_voltage_36 float null ,
|
||||
temperature_01 float null ,
|
||||
temperature_02 float null ,
|
||||
temperature_03 float null ,
|
||||
temperature_04 float null ,
|
||||
temperature_05 float null ,
|
||||
temperature_06 float null ,
|
||||
temperature_07 float null ,
|
||||
temperature_08 float null ,
|
||||
temperature_09 float null ,
|
||||
temperature_10 float null ,
|
||||
temperature_11 float null ,
|
||||
temperature_12 float null ,
|
||||
temperature_13 float null ,
|
||||
temperature_14 float null ,
|
||||
temperature_15 float null ,
|
||||
temperature_16 float null ,
|
||||
warning smallint null ,
|
||||
fault smallint null ,
|
||||
|
||||
primary key (create_date, module_no)
|
||||
);
|
||||
|
||||
create index ModuleValue_data_idx1 on TModuleValue (create_date);
|
||||
136
LFP_Manager_PRM/DataStructure/csCanConstData.cs
Normal file
136
LFP_Manager_PRM/DataStructure/csCanConstData.cs
Normal file
@@ -0,0 +1,136 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace LFP_Manager.DataStructure
|
||||
{
|
||||
public static class csCanConstData
|
||||
{
|
||||
public static class CanDeviceInfo
|
||||
{
|
||||
public const int VCI_PCI5121 = 1;
|
||||
public const int VCI_PCI9810 = 2;
|
||||
public const int VCI_USBCAN1 = 3;
|
||||
public const int VCI_USBCAN2 = 4;
|
||||
public const int VCI_USBCAN2A = 4;
|
||||
public const int VCI_PCI9820 = 5;
|
||||
public const int VCI_CAN232 = 6;
|
||||
public const int VCI_PCI5110 = 7;
|
||||
public const int VCI_CANLITE = 8;
|
||||
public const int VCI_ISA9620 = 9;
|
||||
public const int VCI_ISA5420 = 10;
|
||||
public const int VCI_PC104CAN = 11;
|
||||
public const int VCI_CANETUDP = 12;
|
||||
public const int VCI_CANETE = 12;
|
||||
public const int VCI_DNP9810 = 13;
|
||||
public const int VCI_PCI9840 = 14;
|
||||
public const int VCI_PC104CAN2 = 15;
|
||||
public const int VCI_PCI9820I = 16;
|
||||
public const int VCI_CANETTCP = 17;
|
||||
public const int VCI_PEC9920 = 18;
|
||||
public const int VCI_PCI5010U = 19;
|
||||
public const int VCI_USBCAN_E_U = 20;
|
||||
public const int VCI_USBCAN_2E_U = 21;
|
||||
public const int VCI_PCI5020U = 22;
|
||||
public const int VCI_EG20T_CAN = 23;
|
||||
public const int VCI_VALUE_CAN4_1 = 30;
|
||||
|
||||
private static readonly string[] _deviceNames = new[]
|
||||
{
|
||||
"PCI5121", "PCI9810", "USBCAN1", "USBCAN2", "USBCAN2A",
|
||||
"PCI9820", "CAN232", "PCI5110", "CANLITE", "ISA9620",
|
||||
"ISA5420", "PC104CAN", "CANETUDP", "CANETE", "DNP9810",
|
||||
"PCI9840", "PC104CAN2", "PCI9820I", "CANETTCP", "PEC9920",
|
||||
"PCI5010U", "USBCAN_E_U", "USBCAN_2E_U", "PCI5020U",
|
||||
"EG20T_CAN", "VALUE_CAN4-1"
|
||||
};
|
||||
|
||||
private static readonly int[] _deviceIds = new[]
|
||||
{
|
||||
1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12, 13, 14,
|
||||
15, 16, 17, 18, 19, 20, 21, 22, 23, 30
|
||||
};
|
||||
|
||||
public static string[] DeviceNames => _deviceNames;
|
||||
public static int[] DeviceIds => _deviceIds;
|
||||
}
|
||||
|
||||
public static class BaudRate
|
||||
{
|
||||
/// <summary>
|
||||
/// CAN 통신 속도 (bps)
|
||||
/// </summary>
|
||||
private static readonly int[] _baudRateInts = new[]
|
||||
{
|
||||
1000000, 800000, 500000, 250000, 125000,
|
||||
100000, 50000, 20000, 10000, 5000
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// CAN 통신 속도 설정값
|
||||
/// </summary>
|
||||
private static readonly int[] _baudRates = new[]
|
||||
{
|
||||
0x060003, // 1000Kbps
|
||||
0x060004, // 800Kbps
|
||||
0x060007, // 500Kbps
|
||||
0x1C0008, // 250Kbps
|
||||
0x1C0011, // 125Kbps
|
||||
0x160023, // 100Kbps
|
||||
0x1C002C, // 50Kbps
|
||||
0x1600B3, // 20Kbps
|
||||
0x1C00E0, // 10Kbps
|
||||
0x1C01C1 // 5Kbps
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// USBCAN II 전용 통신 속도 설정값 (Timer 0 + Timer 1)
|
||||
/// </summary>
|
||||
private static readonly int[] _baudRatesOther = new[]
|
||||
{
|
||||
0x0014, // 1000Kbps
|
||||
0x0016, // 800Kbps
|
||||
0x001C, // 500Kbps
|
||||
0x011C, // 250Kbps
|
||||
0x031C, // 125Kbps
|
||||
0x041C, // 100Kbps
|
||||
0x091C, // 50Kbps
|
||||
0x181C, // 20Kbps
|
||||
0x311C, // 10Kbps
|
||||
0xBFFF // 5Kbps
|
||||
};
|
||||
|
||||
private static readonly string[] _baudRateStrings = new[]
|
||||
{
|
||||
"1000Kbps", "800Kbps", "500Kbps", "250Kbps", "125Kbps",
|
||||
"100Kbps", "50Kbps", "20Kbps", "10Kbps", "5Kbps"
|
||||
};
|
||||
|
||||
public static int[] BaudRateInts => _baudRateInts;
|
||||
public static int[] BaudRates => _baudRates;
|
||||
public static int[] BaudRatesOther => _baudRatesOther;
|
||||
public static string[] BaudRateStrings => _baudRateStrings;
|
||||
}
|
||||
|
||||
public static class SendType
|
||||
{
|
||||
public const int Normal = 0;
|
||||
public const int Single_Normal = 1;
|
||||
public const int Loop_Back = 2;
|
||||
public const int Single_Loop_Back = 3;
|
||||
}
|
||||
|
||||
public static class FrameType
|
||||
{
|
||||
public const int Standard = 0;
|
||||
public const int Extended = 1;
|
||||
}
|
||||
|
||||
public static class FrameFormat
|
||||
{
|
||||
public const int Data_Frame = 0;
|
||||
public const int Remote_Frame = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
113
LFP_Manager_PRM/DataStructure/csConstData.cs
Normal file
113
LFP_Manager_PRM/DataStructure/csConstData.cs
Normal file
@@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace LFP_Manager.DataStructure
|
||||
{
|
||||
public static class csConstData
|
||||
{
|
||||
public static class SystemInfo
|
||||
{
|
||||
public const int MAX_MODULE_CELL_SIZE = 36;
|
||||
public const int MAX_MODULE_TEMP_SIZE = 16;
|
||||
public const int CELL_MAX_PER_IC = 18;
|
||||
}
|
||||
|
||||
public static class Unit
|
||||
{
|
||||
public const int CELL_DIV_P3 = 1000;
|
||||
public const int CELL_DIV_P4 = 10000;
|
||||
|
||||
public const string CELL_DIS_P3 = "{0:0.000}";
|
||||
public const string CELL_DIS_P4 = "{0:0.0000}";
|
||||
}
|
||||
|
||||
public static class CommType
|
||||
{
|
||||
public const int COMM_SNMP = 0;
|
||||
public const int COMM_UARTCAN = 1;
|
||||
public const int COMM_USBCAN = 2;
|
||||
|
||||
public static readonly string[] UartCAN_Speed = new[]
|
||||
{
|
||||
"9600",
|
||||
"19200",
|
||||
"38400",
|
||||
"57600",
|
||||
"115200",
|
||||
"230400",
|
||||
"460800",
|
||||
};
|
||||
|
||||
public static readonly string[] UART_MODEL = new[]
|
||||
{
|
||||
"LFPS-48150",
|
||||
};
|
||||
|
||||
public static readonly string[] CAN_MODEL = new[]
|
||||
{
|
||||
"PR-57150",
|
||||
"PR-64150",
|
||||
"LFPM-57080",
|
||||
"PR-102150",
|
||||
"PR-115300",
|
||||
"PR-67150",
|
||||
};
|
||||
}
|
||||
|
||||
public static class ResetFlag
|
||||
{
|
||||
public const ushort SystemReset = 0x0001;
|
||||
public const ushort LcdHistoryDelete = 0x0002;
|
||||
}
|
||||
|
||||
public static class CRC
|
||||
{
|
||||
private static readonly byte[] _auchCRCHi =
|
||||
{
|
||||
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
|
||||
0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
|
||||
0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01,
|
||||
0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41,
|
||||
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81,
|
||||
0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,
|
||||
0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01,
|
||||
0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40,
|
||||
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
|
||||
0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
|
||||
0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01,
|
||||
0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
|
||||
0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
|
||||
0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
|
||||
0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01,
|
||||
0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
|
||||
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,0x40
|
||||
};
|
||||
|
||||
private static readonly byte[] _auchCRCLo =
|
||||
{
|
||||
0x00, 0xC0, 0xC1, 0x01, 0xC3, 0x03, 0x02, 0xC2, 0xC6, 0x06, 0x07, 0xC7, 0x05, 0xC5, 0xC4,
|
||||
0x04, 0xCC, 0x0C, 0x0D, 0xCD, 0x0F, 0xCF, 0xCE, 0x0E, 0x0A, 0xCA, 0xCB, 0x0B, 0xC9, 0x09,
|
||||
0x08, 0xC8, 0xD8, 0x18, 0x19, 0xD9, 0x1B, 0xDB, 0xDA, 0x1A, 0x1E, 0xDE, 0xDF, 0x1F, 0xDD,
|
||||
0x1D, 0x1C, 0xDC, 0x14, 0xD4, 0xD5, 0x15, 0xD7, 0x17, 0x16, 0xD6, 0xD2, 0x12, 0x13, 0xD3,
|
||||
0x11, 0xD1, 0xD0, 0x10, 0xF0, 0x30, 0x31, 0xF1, 0x33, 0xF3, 0xF2, 0x32, 0x36, 0xF6, 0xF7,
|
||||
0x37, 0xF5, 0x35, 0x34, 0xF4, 0x3C, 0xFC, 0xFD, 0x3D, 0xFF, 0x3F, 0x3E, 0xFE, 0xFA, 0x3A,
|
||||
0x3B, 0xFB, 0x39, 0xF9, 0xF8, 0x38, 0x28, 0xE8, 0xE9, 0x29, 0xEB, 0x2B, 0x2A, 0xEA, 0xEE,
|
||||
0x2E, 0x2F, 0xEF, 0x2D, 0xED, 0xEC, 0x2C, 0xE4, 0x24, 0x25, 0xE5, 0x27, 0xE7, 0xE6, 0x26,
|
||||
0x22, 0xE2, 0xE3, 0x23, 0xE1, 0x21, 0x20, 0xE0, 0xA0, 0x60, 0x61, 0xA1, 0x63, 0xA3, 0xA2,
|
||||
0x62, 0x66, 0xA6, 0xA7, 0x67, 0xA5, 0x65, 0x64, 0xA4, 0x6C, 0xAC, 0xAD, 0x6D, 0xAF, 0x6F,
|
||||
0x6E, 0xAE, 0xAA, 0x6A, 0x6B, 0xAB, 0x69, 0xA9, 0xA8, 0x68, 0x78, 0xB8, 0xB9, 0x79, 0xBB,
|
||||
0x7B, 0x7A, 0xBA, 0xBE, 0x7E, 0x7F, 0xBF, 0x7D, 0xBD, 0xBC, 0x7C, 0xB4, 0x74, 0x75, 0xB5,
|
||||
0x77, 0xB7, 0xB6, 0x76, 0x72, 0xB2, 0xB3, 0x73, 0xB1, 0x71, 0x70, 0xB0, 0x50, 0x90, 0x91,
|
||||
0x51, 0x93, 0x53, 0x52, 0x92, 0x96, 0x56, 0x57, 0x97, 0x55, 0x95, 0x94, 0x54, 0x9C, 0x5C,
|
||||
0x5D, 0x9D, 0x5F, 0x9F, 0x9E, 0x5E, 0x5A, 0x9A, 0x9B, 0x5B, 0x99, 0x59, 0x58, 0x98, 0x88,
|
||||
0x48, 0x49, 0x89, 0x4B, 0x8B, 0x8A, 0x4A, 0x4E, 0x8E, 0x8F, 0x4F, 0x8D, 0x4D, 0x4C, 0x8C,
|
||||
0x44, 0x84, 0x85, 0x45, 0x87, 0x47, 0x46, 0x86, 0x82, 0x42, 0x43, 0x83, 0x41, 0x81, 0x80,0x40
|
||||
};
|
||||
|
||||
public static byte[] AuchCRCHi => _auchCRCHi;
|
||||
public static byte[] AuchCRCLo => _auchCRCLo;
|
||||
}
|
||||
}
|
||||
}
|
||||
732
LFP_Manager_PRM/DataStructure/csDataStructure.cs
Normal file
732
LFP_Manager_PRM/DataStructure/csDataStructure.cs
Normal file
@@ -0,0 +1,732 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace LFP_Manager.DataStructure
|
||||
{
|
||||
public class CommConfig
|
||||
{
|
||||
public string AppPath;
|
||||
public string mSN;
|
||||
|
||||
public int CommType;
|
||||
|
||||
public int TargetModelIndex;
|
||||
|
||||
public string SnmpIP;
|
||||
public int SnmpModelIndex;
|
||||
public int SnmpMdQty;
|
||||
|
||||
public string UartPort;
|
||||
public int UartBaudrate;
|
||||
public int UartModelIndex;
|
||||
|
||||
public int CanDevice;
|
||||
public int CanIndex;
|
||||
public int CanNo;
|
||||
public int CanBaudrate;
|
||||
|
||||
public int DbLogPeriod;
|
||||
|
||||
public int CbTestGap;
|
||||
public int CbTestTime;
|
||||
|
||||
public CommConfig()
|
||||
{
|
||||
CommType = 0;
|
||||
TargetModelIndex = 0;
|
||||
SnmpIP = "";
|
||||
SnmpModelIndex = 0;
|
||||
SnmpMdQty = 0;
|
||||
UartPort = "";
|
||||
UartBaudrate = 0;
|
||||
UartModelIndex = 0;
|
||||
CanDevice = 0;
|
||||
CanIndex = 0;
|
||||
CanNo = 0;
|
||||
CanBaudrate = 0;
|
||||
|
||||
DbLogPeriod = 5;
|
||||
|
||||
CbTestGap = 1500;
|
||||
CbTestTime = 3000;
|
||||
}
|
||||
}
|
||||
|
||||
public class TMinMax
|
||||
{
|
||||
public short value;
|
||||
public short num;
|
||||
|
||||
public TMinMax()
|
||||
{
|
||||
value = 0;
|
||||
num = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class DeviceSystemTotalData
|
||||
{
|
||||
public bool CommFail;
|
||||
|
||||
public DeviceValueTotalData ValueData;
|
||||
public DeviceStatusTotalData StatusData;
|
||||
public DeviceAvgData AvgData;
|
||||
|
||||
public DeviceSystemTotalData()
|
||||
{
|
||||
CommFail = false;
|
||||
ValueData = new DeviceValueTotalData();
|
||||
StatusData = new DeviceStatusTotalData();
|
||||
AvgData = new DeviceAvgData();
|
||||
}
|
||||
}
|
||||
|
||||
public class DeviceSystemData
|
||||
{
|
||||
public int mNo;
|
||||
public int cellQty;
|
||||
public int tempQty;
|
||||
public UInt32 heatbeat;
|
||||
public int OneBuffTime;
|
||||
public int AllBuffTime;
|
||||
public bool CommFail;
|
||||
public bool ShelfCommFail;
|
||||
public DateTime LastRxTime;
|
||||
|
||||
public DeviceValueData ValueData;
|
||||
public DeviceAvgData AvgData;
|
||||
public DeviceStatusData StatusData;
|
||||
public DeviceParamData ParamData;
|
||||
public DeviceCalibration CalibriationData;
|
||||
|
||||
public DeviceInforation Information;
|
||||
public DeviceSystemData()
|
||||
{
|
||||
mNo = 0;
|
||||
heatbeat = 0;
|
||||
OneBuffTime = 0;
|
||||
AllBuffTime = 0;
|
||||
CommFail = false;
|
||||
ShelfCommFail = false;
|
||||
LastRxTime = new DateTime();
|
||||
|
||||
ValueData = new DeviceValueData();
|
||||
AvgData = new DeviceAvgData();
|
||||
StatusData = new DeviceStatusData();
|
||||
ParamData = new DeviceParamData();
|
||||
CalibriationData = new DeviceCalibration();
|
||||
|
||||
Information = new DeviceInforation();
|
||||
}
|
||||
}
|
||||
|
||||
public class DeviceValueTotalData
|
||||
{
|
||||
public short TotalVoltage;
|
||||
public short TotalCurrent;
|
||||
public short TotalSOC;
|
||||
public short TotalTemp;
|
||||
|
||||
public DeviceValueTotalData()
|
||||
{
|
||||
TotalVoltage = 0;
|
||||
TotalCurrent = 0;
|
||||
TotalSOC = 0;
|
||||
TotalTemp = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class DeviceValueData
|
||||
{
|
||||
public byte[] fw_ver;
|
||||
|
||||
public short voltageOfPack;
|
||||
public short current;
|
||||
public short averageCurrent;
|
||||
public short rSOC;
|
||||
|
||||
public ushort[] CellVoltage;
|
||||
public short[] CellTemperature;
|
||||
|
||||
public short CpuTemperature;
|
||||
public short FetTemperature;
|
||||
|
||||
public short remainingCapacity;
|
||||
public short stateOfHealth;
|
||||
public short cycleCount;
|
||||
public short fullChargeCapacity;
|
||||
public short designedCapacity;
|
||||
public DeviceValueData()
|
||||
{
|
||||
fw_ver = new byte[4];
|
||||
|
||||
voltageOfPack = 0;
|
||||
current = 0;
|
||||
averageCurrent = 0;
|
||||
rSOC = 0;
|
||||
|
||||
CellVoltage = new ushort[csConstData.SystemInfo.MAX_MODULE_CELL_SIZE];
|
||||
CellTemperature = new short[csConstData.SystemInfo.MAX_MODULE_TEMP_SIZE];
|
||||
|
||||
CpuTemperature = 0;
|
||||
FetTemperature = 0;
|
||||
|
||||
remainingCapacity = 0;
|
||||
stateOfHealth = 0;
|
||||
cycleCount = 0;
|
||||
fullChargeCapacity = 0;
|
||||
designedCapacity = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class DeviceAvgData
|
||||
{
|
||||
public ushort maxCellVoltage;
|
||||
public ushort minCellVoltage;
|
||||
public ushort avgCellVoltage;
|
||||
public ushort diffCellVoltage;
|
||||
public short maxCellNum;
|
||||
public short minCellNum;
|
||||
public short maxTemp;
|
||||
public short minTemp;
|
||||
public short avgTemp;
|
||||
public short diffTemp;
|
||||
public short maxTempNum;
|
||||
public short minTempNum;
|
||||
public DeviceAvgData()
|
||||
{
|
||||
maxCellVoltage = 0;
|
||||
minCellVoltage = 0;
|
||||
avgCellVoltage = 0;
|
||||
diffCellVoltage = 0;
|
||||
maxCellNum = 0;
|
||||
minCellNum = 0;
|
||||
maxTemp = 0;
|
||||
minTemp = 0;
|
||||
avgTemp = 0;
|
||||
diffTemp = 0;
|
||||
maxTempNum = 0;
|
||||
minTempNum = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class DeviceStatusTotalData
|
||||
{
|
||||
public short batteryStatus;
|
||||
public short warning;
|
||||
public short protect;
|
||||
public short status;
|
||||
|
||||
public DeviceStatusTotalData()
|
||||
{
|
||||
batteryStatus = 0;
|
||||
warning = 0;
|
||||
protect = 0;
|
||||
status = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class DeviceStatusData
|
||||
{
|
||||
public short batteryStatusA;
|
||||
public short batteryStatusB;
|
||||
public short warning;
|
||||
public short protect;
|
||||
public short protect1;
|
||||
public short status;
|
||||
public short alarm;
|
||||
public short relayStatus;
|
||||
public uint cellBallanceStatusLv;
|
||||
public uint cellBallanceStatusHv;
|
||||
public ushort cellBalanceValue;
|
||||
|
||||
public uint BalanceEnable;
|
||||
public uint BalanceMode;
|
||||
|
||||
public short cellBalanceInterval;
|
||||
public short cellBalanceEndGap;
|
||||
public short cellBalanceFlag;
|
||||
public DeviceStatusData()
|
||||
{
|
||||
batteryStatusA = 0;
|
||||
batteryStatusB = 0;
|
||||
warning = 0;
|
||||
protect = 0;
|
||||
protect1 = 0;
|
||||
status = 0;
|
||||
alarm = 0;
|
||||
relayStatus = 0;
|
||||
cellBallanceStatusLv = 0;
|
||||
cellBallanceStatusHv = 0;
|
||||
cellBalanceValue = 0;
|
||||
cellBalanceInterval = 0;
|
||||
cellBalanceEndGap = 0;
|
||||
cellBalanceFlag = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class DeviceCommStatus
|
||||
{
|
||||
public DateTime LastRxTime;
|
||||
public bool CommFail;
|
||||
public DeviceCommStatus()
|
||||
{
|
||||
LastRxTime = new DateTime();
|
||||
CommFail = false;
|
||||
}
|
||||
}
|
||||
|
||||
public class DeviceParamData
|
||||
{
|
||||
public short CellOverVoltageTrip;
|
||||
public short CellOverVoltageWarning;
|
||||
public short CellOverVoltageRelease;
|
||||
public short CellUnderVoltageTrip;
|
||||
public short CellUnderVoltageWarning;
|
||||
public short CellUnderVoltageRelease;
|
||||
|
||||
public short SysOverVoltageTrip;
|
||||
public short SysOverVoltageWarning;
|
||||
public short SysOverVoltageRelease;
|
||||
public short SysUnderVoltageTrip;
|
||||
public short SysUnderVoltageWarning;
|
||||
public short SysUnderVoltageRelease;
|
||||
|
||||
public short ChaHighTempTrip;
|
||||
public short ChaHighTempWarning;
|
||||
public short ChaHighTempRelease;
|
||||
public short ChaLowTempTrip;
|
||||
public short ChaLowTempWarning;
|
||||
public short ChaLowTempRelease;
|
||||
public short DchHighTempTrip;
|
||||
public short DchHighTempWarning;
|
||||
public short DchHighTempRelease;
|
||||
public short DchLowTempTrip;
|
||||
public short DchLowTempWarning;
|
||||
public short DchLowTempRelease;
|
||||
|
||||
public short ChaOverCurrentTrip;
|
||||
public short ChaOverCurrentWarning;
|
||||
public short ChaOverCurrentRelease;
|
||||
public short DchOverCurrentTrip;
|
||||
public short DchOverCurrentWarning;
|
||||
public short DchOverCurrentRelease;
|
||||
|
||||
public short LowSocTrip;
|
||||
public short LowSocWarning;
|
||||
public short LowSocRelease;
|
||||
|
||||
public short CellVoltageDifferenceTrip;
|
||||
public short CellVoltageDifferenceWarning;
|
||||
public short CellVoltageDifferenceRelease;
|
||||
public short CellVoltageDifferenceTime;
|
||||
|
||||
public short DefalutParamOption;
|
||||
public short DefalutParamAll;
|
||||
public DeviceParamData()
|
||||
{
|
||||
CellOverVoltageTrip = 0;
|
||||
CellOverVoltageWarning = 0;
|
||||
CellOverVoltageRelease = 0;
|
||||
CellUnderVoltageTrip = 0;
|
||||
CellUnderVoltageWarning = 0;
|
||||
CellUnderVoltageRelease = 0;
|
||||
|
||||
SysOverVoltageTrip = 0;
|
||||
SysOverVoltageWarning = 0;
|
||||
SysOverVoltageRelease = 0;
|
||||
SysUnderVoltageTrip = 0;
|
||||
SysUnderVoltageWarning = 0;
|
||||
SysUnderVoltageRelease = 0;
|
||||
|
||||
ChaHighTempTrip = 0;
|
||||
ChaHighTempWarning = 0;
|
||||
ChaHighTempRelease = 0;
|
||||
ChaLowTempTrip = 0;
|
||||
ChaLowTempWarning = 0;
|
||||
ChaLowTempRelease = 0;
|
||||
DchHighTempTrip = 0;
|
||||
DchHighTempWarning = 0;
|
||||
DchHighTempRelease = 0;
|
||||
DchLowTempTrip = 0;
|
||||
DchLowTempWarning = 0;
|
||||
DchLowTempRelease = 0;
|
||||
|
||||
ChaOverCurrentTrip = 0;
|
||||
ChaOverCurrentWarning = 0;
|
||||
ChaOverCurrentRelease = 0;
|
||||
DchOverCurrentTrip = 0;
|
||||
DchOverCurrentWarning = 0;
|
||||
DchOverCurrentRelease = 0;
|
||||
|
||||
LowSocTrip = 0;
|
||||
LowSocWarning = 0;
|
||||
LowSocRelease = 0;
|
||||
|
||||
CellVoltageDifferenceTrip = 0;
|
||||
CellVoltageDifferenceWarning = 0;
|
||||
CellVoltageDifferenceRelease = 0;
|
||||
CellVoltageDifferenceTime = 0;
|
||||
|
||||
DefalutParamOption = 0;
|
||||
DefalutParamAll = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class DeviceCalibration
|
||||
{
|
||||
public CellVoltageCalib CellVoltge;
|
||||
public SystemVoltageCalib SystemVoltage;
|
||||
public ForcedBalControl ForcedBalancing;
|
||||
public ForcedBalControl2 ForcedBalancing2; // For PR-57150
|
||||
public BatteryParameter Battery;
|
||||
public CurrentCalib Current;
|
||||
public SystemInfor SystemInfo;
|
||||
public SocCalibration SocCalib;
|
||||
public TCbParam CbParam;
|
||||
|
||||
public DeviceInforation InvData;
|
||||
|
||||
public short CellBalancingVoltage;
|
||||
public short CellBalancingVoltageInterval;
|
||||
public short CellBalancingVoltageEndGap;
|
||||
|
||||
public DeviceCalibration()
|
||||
{
|
||||
CellVoltge = new CellVoltageCalib();
|
||||
SystemVoltage = new SystemVoltageCalib();
|
||||
ForcedBalancing = new ForcedBalControl();
|
||||
ForcedBalancing2 = new ForcedBalControl2(); // For PR-57150
|
||||
Battery = new BatteryParameter();
|
||||
Current = new CurrentCalib();
|
||||
SystemInfo = new SystemInfor();
|
||||
SocCalib = new SocCalibration();
|
||||
CbParam = new TCbParam();
|
||||
|
||||
InvData = new DeviceInforation();
|
||||
|
||||
CellBalancingVoltage = 0;
|
||||
CellBalancingVoltageInterval = 0;
|
||||
CellBalancingVoltageEndGap = 0;
|
||||
}
|
||||
public DeviceCalibration DeepCopy()
|
||||
{
|
||||
DeviceCalibration newCopy = new DeviceCalibration
|
||||
{
|
||||
CellVoltge = CellVoltge,
|
||||
SystemVoltage = SystemVoltage,
|
||||
ForcedBalancing = ForcedBalancing.DeepCopy(),
|
||||
Battery = Battery,
|
||||
Current = Current,
|
||||
SystemInfo = SystemInfo,
|
||||
SocCalib = SocCalib,
|
||||
CbParam = CbParam.DeepCopy(),
|
||||
|
||||
InvData = InvData,
|
||||
|
||||
CellBalancingVoltage = CellBalancingVoltage,
|
||||
CellBalancingVoltageInterval = CellBalancingVoltageInterval,
|
||||
CellBalancingVoltageEndGap = CellBalancingVoltageEndGap,
|
||||
};
|
||||
return newCopy;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class DeviceInforation
|
||||
{
|
||||
public UInt32 ManufactureDate;
|
||||
public byte[] pcb_sn;
|
||||
public byte[] module_sn;
|
||||
public DeviceInforation()
|
||||
{
|
||||
ManufactureDate = 0;
|
||||
pcb_sn = new byte[16];
|
||||
module_sn = new byte[32];
|
||||
}
|
||||
}
|
||||
|
||||
public class CellVoltageCalib
|
||||
{
|
||||
public short CvOffsetLow;
|
||||
public short CvOffsetHigh;
|
||||
public CellVoltageCalib()
|
||||
{
|
||||
CvOffsetLow = 0;
|
||||
CvOffsetHigh = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class SystemVoltageCalib
|
||||
{
|
||||
public short Calibration_K;
|
||||
public short Calibration_B;
|
||||
public SystemVoltageCalib()
|
||||
{
|
||||
Calibration_K = 0;
|
||||
Calibration_B = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class ForcedBalControl
|
||||
{
|
||||
public short Control;
|
||||
public short CellNo;
|
||||
public bool AutoB;
|
||||
public bool DCP;
|
||||
public ForcedBalControl()
|
||||
{
|
||||
Control = 0;
|
||||
CellNo = 0;
|
||||
AutoB = false;
|
||||
DCP = false;
|
||||
}
|
||||
public ForcedBalControl DeepCopy()
|
||||
{
|
||||
ForcedBalControl newCopy = new ForcedBalControl()
|
||||
{
|
||||
Control = Control,
|
||||
CellNo = CellNo,
|
||||
AutoB = AutoB,
|
||||
DCP = DCP
|
||||
};
|
||||
return newCopy;
|
||||
}
|
||||
}
|
||||
|
||||
public class ForcedBalControl2
|
||||
{
|
||||
public int Control;
|
||||
public int CellNo;
|
||||
public int Mode;
|
||||
public int Enable;
|
||||
public ForcedBalControl2()
|
||||
{
|
||||
Control = 0;
|
||||
CellNo = 0;
|
||||
Mode = 0;
|
||||
Enable = 0;
|
||||
}
|
||||
public ForcedBalControl2 DeepCopy()
|
||||
{
|
||||
ForcedBalControl2 newCopy = new ForcedBalControl2()
|
||||
{
|
||||
Control = Control,
|
||||
CellNo = CellNo,
|
||||
Mode = Mode,
|
||||
Enable = Enable
|
||||
};
|
||||
return newCopy;
|
||||
}
|
||||
}
|
||||
|
||||
public class BatteryParameter
|
||||
{
|
||||
public short CellQty;
|
||||
public short TempQty;
|
||||
public UInt32 Capacity;
|
||||
public BatteryParameter()
|
||||
{
|
||||
CellQty = 0;
|
||||
TempQty = 0;
|
||||
Capacity = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class CurrentCalib
|
||||
{
|
||||
public short SelectSubItem;
|
||||
public short ShuntRange;
|
||||
public short CurrentZero;
|
||||
public short VoltageZero;
|
||||
public Int32 Calibration_K;
|
||||
public short ChaAndDchSelect;
|
||||
public short ChargeOption;
|
||||
public CurrentCalib()
|
||||
{
|
||||
SelectSubItem = 0;
|
||||
ShuntRange = 0;
|
||||
CurrentZero = 0;
|
||||
VoltageZero = 0;
|
||||
Calibration_K = 0;
|
||||
ChaAndDchSelect = 0;
|
||||
ChargeOption = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class SystemInfor
|
||||
{
|
||||
//public short Id;
|
||||
public DateTime devTime;
|
||||
public UInt16 devAddr;
|
||||
public SystemInfor()
|
||||
{
|
||||
devTime = new DateTime();
|
||||
devAddr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class SocCalibration
|
||||
{
|
||||
public short CellNo;
|
||||
public short SocValue;
|
||||
public SocCalibration()
|
||||
{
|
||||
CellNo = 0;
|
||||
SocValue = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class TCbParam
|
||||
{
|
||||
public short Threadhold;
|
||||
public short Window;
|
||||
public short Min;
|
||||
public short Interval;
|
||||
public TCbParam()
|
||||
{
|
||||
Threadhold = 0;
|
||||
Window = 0;
|
||||
Min = 0;
|
||||
Interval = 0;
|
||||
}
|
||||
public TCbParam DeepCopy()
|
||||
{
|
||||
TCbParam newCopy = new TCbParam
|
||||
{
|
||||
Threadhold = Threadhold,
|
||||
Window = Window,
|
||||
Min = Min,
|
||||
Interval = Interval
|
||||
};
|
||||
return newCopy;
|
||||
}
|
||||
}
|
||||
|
||||
public class DataFunction
|
||||
{
|
||||
public static void DataInit(ref DeviceSystemData sData, ref CommConfig sConfig)
|
||||
{
|
||||
sData.ShelfCommFail = true;
|
||||
|
||||
switch (sConfig.TargetModelIndex)
|
||||
{
|
||||
case 0: // PR-57150
|
||||
sData.cellQty = 18;
|
||||
sData.tempQty = 6;
|
||||
break;
|
||||
case 1: // PR-64150
|
||||
sData.cellQty = 20;
|
||||
sData.tempQty = 8;
|
||||
break;
|
||||
case 2: // LFPM-57080
|
||||
sData.cellQty = 18;
|
||||
sData.tempQty = 6;
|
||||
break;
|
||||
case 3: // PR-102150
|
||||
sData.cellQty = 32;
|
||||
sData.tempQty = 8;
|
||||
break;
|
||||
case 4: // PR-115300
|
||||
sData.cellQty = 36;
|
||||
sData.tempQty = 16;
|
||||
break;
|
||||
case 5: // PR-67150
|
||||
sData.cellQty = 21;
|
||||
sData.tempQty = 8;
|
||||
break;
|
||||
default:
|
||||
sData.cellQty = 18;
|
||||
sData.tempQty = 6;
|
||||
break;
|
||||
}
|
||||
|
||||
for (int j = 0; j < csConstData.SystemInfo.MAX_MODULE_CELL_SIZE; j++)
|
||||
{
|
||||
sData.ValueData.CellVoltage[j] = 0;
|
||||
}
|
||||
for (int j = 0; j < csConstData.SystemInfo.MAX_MODULE_TEMP_SIZE; j++)
|
||||
{
|
||||
sData.ValueData.CellTemperature[j] = 0;
|
||||
}
|
||||
sData.ValueData.voltageOfPack = 0;
|
||||
sData.ValueData.current = 0;
|
||||
sData.ValueData.rSOC = 0;
|
||||
sData.AvgData.maxCellVoltage = 0;
|
||||
sData.AvgData.minCellVoltage = 0;
|
||||
sData.AvgData.avgCellVoltage = 0;
|
||||
sData.AvgData.maxTemp = 0;
|
||||
sData.AvgData.minTemp = 0;
|
||||
sData.AvgData.avgTemp = 0;
|
||||
sData.heatbeat = 0;
|
||||
sData.StatusData.warning = 0;
|
||||
sData.StatusData.protect = 0;
|
||||
}
|
||||
}
|
||||
public class TCanTxBuff
|
||||
{
|
||||
private const int BuffMax = 4096;
|
||||
public int InPos;
|
||||
public int OutPos;
|
||||
public TCanTRxData[] Buf;
|
||||
public TCanTxBuff()
|
||||
{
|
||||
InPos = 0;
|
||||
OutPos = 0;
|
||||
Buf = new TCanTRxData[BuffMax];
|
||||
for (int i = 0; i < BuffMax; i++)
|
||||
{
|
||||
Buf[i] = new TCanTRxData();
|
||||
}
|
||||
}
|
||||
|
||||
public void PutBuff(TCanTRxData CanTxData)
|
||||
{
|
||||
if (CanTxData != null)
|
||||
{
|
||||
Buf[InPos++] = CanTxData.DeepCopy();
|
||||
InPos %= BuffMax;
|
||||
}
|
||||
}
|
||||
public TCanTRxData GetBuff()
|
||||
{
|
||||
TCanTRxData result = null;
|
||||
|
||||
if (InPos != OutPos)
|
||||
{
|
||||
result = Buf[OutPos++].DeepCopy();
|
||||
OutPos %= BuffMax;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
public class TCanTRxData
|
||||
{
|
||||
public int type;
|
||||
public UInt32 exid;
|
||||
public byte[] data;
|
||||
|
||||
public TCanTRxData()
|
||||
{
|
||||
type = 0;
|
||||
exid = 0;
|
||||
data = new byte[8];
|
||||
}
|
||||
public TCanTRxData DeepCopy()
|
||||
{
|
||||
TCanTRxData newCopy = new TCanTRxData
|
||||
{
|
||||
exid = exid
|
||||
};
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
newCopy.data[i] = data[i];
|
||||
}
|
||||
return newCopy;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
67
LFP_Manager_PRM/DataStructure/csDbConstData.cs
Normal file
67
LFP_Manager_PRM/DataStructure/csDbConstData.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace LFP_Manager.DataStructure
|
||||
{
|
||||
class csDbConstData
|
||||
{
|
||||
public class DataBase
|
||||
{
|
||||
public static string FileName = @"\db\AlamrHistory.db";
|
||||
public static string TableName = "History";
|
||||
public static string CreateTable =
|
||||
"CREATE TABLE " + TableName + " ("
|
||||
+ "HTime DateTime NOT NULL, "
|
||||
+ "model varchar(10), "
|
||||
+ "sno int, "
|
||||
+ "alarm_name varchar(20), "
|
||||
+ "alarm_code int, "
|
||||
+ "flag_name varchar(20), "
|
||||
+ "flag int, "
|
||||
+ "param1 float, "
|
||||
+ "param2 float, "
|
||||
+ ");";
|
||||
}
|
||||
|
||||
public static readonly int ALARM_NAME_SIZE = 9;
|
||||
|
||||
public class DB_ALARM
|
||||
{
|
||||
public static int CELL_UNDER_VOLTAGE = 0;
|
||||
public static int CELL_OVER_VOLTAGE = 1;
|
||||
public static int SYSTEM_UNDER_VOLTAGE = 2;
|
||||
public static int SYSTEM_OVER_VOLTAGAE = 3;
|
||||
public static int HIGH_TEMPERATURE = 4;
|
||||
public static int LOW_TEMPERATURE = 5;
|
||||
public static int CHARGE_OVER_CURRENT = 6;
|
||||
public static int DISCHARGE_OVER_CURRENT = 7;
|
||||
public static int LOW_SOC = 8;
|
||||
|
||||
public static readonly string[] ALARM_NAME =
|
||||
{
|
||||
"CELL UNDER VOLTAGE",
|
||||
"CELL OVER VOLTAGE",
|
||||
"SYSTEM UNDER VOLTAGE",
|
||||
"SYSTEM OVER VOLTAGAE",
|
||||
"HIGH TEMPERATURE",
|
||||
"LOW TEMPERATURE",
|
||||
"CHARGE OVER CURRENT",
|
||||
"DISCHARGE OVER CURRENT",
|
||||
"LOW SOC",
|
||||
};
|
||||
|
||||
public static int FLAG_RELEASE = 0;
|
||||
public static int FLAG_WARNING = 1;
|
||||
public static int FLAG_TRIP = 2;
|
||||
|
||||
public static readonly string[] FLAG_NAME =
|
||||
{
|
||||
"RELEASE",
|
||||
"WARNING",
|
||||
"FAULT",
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
203
LFP_Manager_PRM/DataStructure/csSbCanLibConstData.cs
Normal file
203
LFP_Manager_PRM/DataStructure/csSbCanLibConstData.cs
Normal file
@@ -0,0 +1,203 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace LFP_Manager.DataStructure
|
||||
{
|
||||
/*************************************
|
||||
Serial Info Struct
|
||||
**************************************/
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct SerialConfigInfo
|
||||
{
|
||||
public UInt32 Baudrate;
|
||||
public byte data;
|
||||
public byte parity;
|
||||
public byte stop;
|
||||
public byte flow;
|
||||
}
|
||||
|
||||
enum DataBits
|
||||
{
|
||||
Data8 = 8,
|
||||
};
|
||||
|
||||
enum Parity
|
||||
{
|
||||
NoParity = 0,
|
||||
EvenParity = 2,
|
||||
OddParity = 3,
|
||||
SpaceParity = 4,
|
||||
MarkParity = 5
|
||||
};
|
||||
|
||||
enum StopBits
|
||||
{
|
||||
OneStop = 1,
|
||||
TwoStop = 2
|
||||
};
|
||||
|
||||
enum FlowControl
|
||||
{
|
||||
NoFlowControl,
|
||||
HardwareControl
|
||||
};
|
||||
|
||||
enum SerialBaudRate
|
||||
{
|
||||
SerialBaud300 = 300,
|
||||
SerialBaud600 = 600,
|
||||
SerialBaud1200 = 1200,
|
||||
SerialBaud2400 = 2400,
|
||||
SerialBaud3600 = 3600,
|
||||
SerialBaud4800 = 4800,
|
||||
SerialBaud7200 = 7200,
|
||||
SerialBaud9600 = 9600,
|
||||
SerialBaud19200 = 19200,
|
||||
SerialBaud38400 = 38400,
|
||||
SerialBaud57600 = 57600,
|
||||
SerialBaud115200 = 115200,
|
||||
SerialBaud230400 = 230400,
|
||||
SerialBaud460800 = 460800,
|
||||
SerialBaud921600 = 921600,
|
||||
SerialUnknownBaud = -1
|
||||
};
|
||||
|
||||
enum CANBaudRate
|
||||
{
|
||||
CANBaud20 = 20,
|
||||
CANBaud50 = 50,
|
||||
CANBaud100 = 100,
|
||||
CANBaud125 = 125,
|
||||
CANBaud200 = 200,
|
||||
CANBaud250 = 250,
|
||||
CANBaud300 = 300,
|
||||
CANBaud500 = 500,
|
||||
CANBaud800 = 800,
|
||||
CANBaud1000 = 1000,
|
||||
CANUnknownBaud = -1
|
||||
};
|
||||
|
||||
//public class csSbCanLibConstData
|
||||
//{
|
||||
/*************************************
|
||||
define
|
||||
**************************************/
|
||||
//public bool ISDAR(byte x)
|
||||
// {
|
||||
// return (x & 0x01) != 0x00;
|
||||
// }
|
||||
|
||||
//public bool ISABOR(byte x)
|
||||
// {
|
||||
// return (x & 0x02) != 0x00;
|
||||
//}
|
||||
|
||||
//public void SETDAR(ref byte x)
|
||||
// {
|
||||
// x |= 0x01;
|
||||
// }
|
||||
//public void SETABOR(ref byte x)
|
||||
//{
|
||||
// x |= 0x02;
|
||||
//}
|
||||
|
||||
//public const byte CR = 0x0D;
|
||||
|
||||
////Error Code
|
||||
//public const byte Invalid_Arg = 0x01;
|
||||
//public const byte No_Error = 0x00;
|
||||
|
||||
enum CAN_StructFormat
|
||||
{
|
||||
TX_STD_DATA = 0x14,
|
||||
TX_STD_REMOTE = 0x15,
|
||||
TX_EXT_DATA = 0x16,
|
||||
TX_EXT_REMOTE = 0x17,
|
||||
RX_STD_DATA = 0x04,
|
||||
RX_STD_REMOTE = 0x05,
|
||||
RX_EXT_DATA = 0x06,
|
||||
RX_EXT_REMOTE = 0x07
|
||||
};
|
||||
|
||||
/*************************************
|
||||
CAN Serial Struct
|
||||
**************************************/
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Sequential, Pack=1)]
|
||||
public struct CAN_Struct
|
||||
{
|
||||
public byte Format;
|
||||
public UInt32 ID;
|
||||
public byte DLC;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||
public byte[] DATA;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
CAN Info Struct
|
||||
**************************************/
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Sequential, Pack=1)]
|
||||
public struct CANConfigInfo
|
||||
{
|
||||
public UInt32 Baudrate;
|
||||
public UInt32 ID;
|
||||
public UInt32 Mask;
|
||||
public byte Spec;
|
||||
public bool DAR;
|
||||
public bool ABOR;
|
||||
}
|
||||
enum CANSpec
|
||||
{
|
||||
CAN_A = 3, //Max Standard CAN ID Length for ascii (0~7FF)
|
||||
CAN_B = 8 //Max Extended CAN ID Length for ascii (0~1FFFFFFF)
|
||||
};
|
||||
|
||||
/*************************************
|
||||
Option Info Struct
|
||||
**************************************/
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct OptionInfo
|
||||
{
|
||||
public byte mode;
|
||||
public byte delay;
|
||||
public byte STD_D_Command_Header;
|
||||
public byte STD_R_Command_Header;
|
||||
public byte EXT_D_Command_Header;
|
||||
public byte EXT_R_Command_Header;
|
||||
}
|
||||
public static class CAN_SerialCommandHeader
|
||||
{
|
||||
public static readonly char STD_DATA = 't';
|
||||
public static readonly char STD_REMOTE = 'T';
|
||||
public static readonly char EXT_DATA = 'e';
|
||||
public static readonly char EXT_REMOTE = 'E';
|
||||
}; //CS-CAN Default Serial Command Header
|
||||
|
||||
/*************************************
|
||||
CAN Error Info Struct
|
||||
**************************************/
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct CANErorrInfo
|
||||
{
|
||||
public byte TEC; // Transmit Error Count
|
||||
public byte REC; // Receive Error Count
|
||||
public byte LEC; // Last Error Count
|
||||
public UInt32 StuffCount; // Stuff Error Count
|
||||
public UInt32 FormCount; // Form Error Count
|
||||
public UInt32 AckECount; // Ack Error Count
|
||||
public UInt32 BitCount; // Bit Error Count
|
||||
public UInt32 CRCCount; // CRC Error Count
|
||||
|
||||
public byte errorInfo; // Erroe Status
|
||||
}
|
||||
//}
|
||||
}
|
||||
47
LFP_Manager_PRM/Form1.Designer.cs
generated
Normal file
47
LFP_Manager_PRM/Form1.Designer.cs
generated
Normal file
@@ -0,0 +1,47 @@
|
||||
namespace snmp_sim
|
||||
{
|
||||
partial class fmMain
|
||||
{
|
||||
/// <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.SuspendLayout();
|
||||
//
|
||||
// fmMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 262);
|
||||
this.Name = "fmMain";
|
||||
this.Text = "Form1";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
19
LFP_Manager_PRM/Form1.cs
Normal file
19
LFP_Manager_PRM/Form1.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
|
||||
namespace snmp_sim
|
||||
{
|
||||
public partial class fmMain : Form
|
||||
{
|
||||
public fmMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
LFP_Manager_PRM/Form1.resx
Normal file
120
LFP_Manager_PRM/Form1.resx
Normal 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=2.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>
|
||||
</resheader>
|
||||
</root>
|
||||
152
LFP_Manager_PRM/Forms/fmCalibration.Designer.cs
generated
Normal file
152
LFP_Manager_PRM/Forms/fmCalibration.Designer.cs
generated
Normal file
@@ -0,0 +1,152 @@
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
partial class fmxCalibration
|
||||
{
|
||||
/// <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();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fmxCalibration));
|
||||
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.ucCalibration1 = new LFP_Manager.Controls.ucCalibration();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.btnClose = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.tmrDisplay = new System.Windows.Forms.Timer(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.btnClose);
|
||||
this.layoutControl1.Controls.Add(this.ucCalibration1);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(668, 306, 250, 350);
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(612, 485);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1,
|
||||
this.layoutControlItem2});
|
||||
this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlGroup1.Name = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(612, 485);
|
||||
this.layoutControlGroup1.Text = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// ucCalibration1
|
||||
//
|
||||
this.ucCalibration1.Location = new System.Drawing.Point(12, 12);
|
||||
this.ucCalibration1.Name = "ucCalibration1";
|
||||
this.ucCalibration1.Size = new System.Drawing.Size(588, 423);
|
||||
this.ucCalibration1.TabIndex = 4;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.ucCalibration1;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(104, 24);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(592, 427);
|
||||
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem1.Text = "layoutControlItem1";
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextToControlDistance = 0;
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Location = new System.Drawing.Point(12, 439);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(588, 34);
|
||||
this.btnClose.StyleController = this.layoutControl1;
|
||||
this.btnClose.TabIndex = 5;
|
||||
this.btnClose.Text = "Close";
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.btnClose;
|
||||
this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(0, 427);
|
||||
this.layoutControlItem2.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(592, 38);
|
||||
this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem2.Text = "layoutControlItem2";
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextToControlDistance = 0;
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// tmrDisplay
|
||||
//
|
||||
this.tmrDisplay.Interval = 500;
|
||||
this.tmrDisplay.Tick += new System.EventHandler(this.tmrDisplay_Tick);
|
||||
//
|
||||
// fmxCalibration
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(612, 485);
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "fmxCalibration";
|
||||
this.Text = "Calibration";
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnClose;
|
||||
private Controls.ucCalibration ucCalibration1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private System.Windows.Forms.Timer tmrDisplay;
|
||||
}
|
||||
}
|
||||
79
LFP_Manager_PRM/Forms/fmCalibration.cs
Normal file
79
LFP_Manager_PRM/Forms/fmCalibration.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Function;
|
||||
using LFP_Manager.Controls;
|
||||
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
public delegate void CalibUpdateEvent(object sendor);
|
||||
public delegate void CalibCmdEvent(int sId, int mode, int flag, DeviceParamData aParam, DeviceCalibration aCalib);
|
||||
|
||||
public partial class fmxCalibration : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
#region VARIABLES
|
||||
|
||||
int SystemId = 0;
|
||||
DeviceParamData Param;
|
||||
DeviceCalibration Calib;
|
||||
|
||||
public event CalibUpdateEvent OnUpdate = null;
|
||||
public event CalibCmdEvent OnCommand = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public fmxCalibration()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public fmxCalibration(int sId, DeviceCalibration aCalib)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
SystemId = sId;
|
||||
Calib = aCalib;
|
||||
|
||||
tmrDisplay.Enabled = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
#region TIMER EVENT
|
||||
|
||||
private void tmrDisplay_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (OnUpdate != null)
|
||||
{
|
||||
OnUpdate(this);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PUBLIC FUCTIONS
|
||||
|
||||
public void UpdateData(DeviceParamData aParam, DeviceCalibration aCalib)
|
||||
{
|
||||
Param = aParam;
|
||||
Calib = aCalib;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
4574
LFP_Manager_PRM/Forms/fmCalibration.resx
Normal file
4574
LFP_Manager_PRM/Forms/fmCalibration.resx
Normal file
File diff suppressed because it is too large
Load Diff
192
LFP_Manager_PRM/Forms/fmxCalibration.Designer.cs
generated
Normal file
192
LFP_Manager_PRM/Forms/fmxCalibration.Designer.cs
generated
Normal file
@@ -0,0 +1,192 @@
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
partial class fmxCalibration
|
||||
{
|
||||
/// <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();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fmxCalibration));
|
||||
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.btnResetAll = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnClose = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.ucCalibrationConfig = new LFP_Manager.Controls.ucCalibration();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.tmrDisplay = new System.Windows.Forms.Timer(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.btnResetAll);
|
||||
this.layoutControl1.Controls.Add(this.btnClose);
|
||||
this.layoutControl1.Controls.Add(this.ucCalibrationConfig);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1265, 291, 250, 350);
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(806, 599);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// btnResetAll
|
||||
//
|
||||
this.btnResetAll.Location = new System.Drawing.Point(4, 559);
|
||||
this.btnResetAll.Name = "btnResetAll";
|
||||
this.btnResetAll.Size = new System.Drawing.Size(110, 36);
|
||||
this.btnResetAll.StyleController = this.layoutControl1;
|
||||
this.btnResetAll.TabIndex = 6;
|
||||
this.btnResetAll.Text = "Reset";
|
||||
this.btnResetAll.Click += new System.EventHandler(this.btnResetAll_Click);
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Location = new System.Drawing.Point(702, 559);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(100, 36);
|
||||
this.btnClose.StyleController = this.layoutControl1;
|
||||
this.btnClose.TabIndex = 5;
|
||||
this.btnClose.Text = "Close";
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// ucCalibrationConfig
|
||||
//
|
||||
this.ucCalibrationConfig.Location = new System.Drawing.Point(4, 4);
|
||||
this.ucCalibrationConfig.Name = "ucCalibrationConfig";
|
||||
this.ucCalibrationConfig.Size = new System.Drawing.Size(798, 551);
|
||||
this.ucCalibrationConfig.TabIndex = 4;
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1,
|
||||
this.layoutControlItem2,
|
||||
this.emptySpaceItem1,
|
||||
this.layoutControlItem3});
|
||||
this.layoutControlGroup1.Name = "Root";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(806, 599);
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.ucCalibrationConfig;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(104, 24);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(802, 555);
|
||||
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.btnClose;
|
||||
this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(698, 555);
|
||||
this.layoutControlItem2.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(104, 40);
|
||||
this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// emptySpaceItem1
|
||||
//
|
||||
this.emptySpaceItem1.AllowHotTrack = false;
|
||||
this.emptySpaceItem1.CustomizationFormText = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Location = new System.Drawing.Point(114, 555);
|
||||
this.emptySpaceItem1.Name = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Size = new System.Drawing.Size(584, 40);
|
||||
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.btnResetAll;
|
||||
this.layoutControlItem3.CustomizationFormText = "layoutControlItem3";
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(0, 555);
|
||||
this.layoutControlItem3.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(114, 40);
|
||||
this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem3.TextVisible = false;
|
||||
//
|
||||
// tmrDisplay
|
||||
//
|
||||
this.tmrDisplay.Interval = 500;
|
||||
this.tmrDisplay.Tick += new System.EventHandler(this.tmrDisplay_Tick);
|
||||
//
|
||||
// fmxCalibration
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(806, 599);
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.IconOptions.Icon = ((System.Drawing.Icon)(resources.GetObject("fmxCalibration.IconOptions.Icon")));
|
||||
this.Name = "fmxCalibration";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Calibration";
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnClose;
|
||||
private Controls.ucCalibration ucCalibrationConfig;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private System.Windows.Forms.Timer tmrDisplay;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnResetAll;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
|
||||
}
|
||||
}
|
||||
137
LFP_Manager_PRM/Forms/fmxCalibration.cs
Normal file
137
LFP_Manager_PRM/Forms/fmxCalibration.cs
Normal file
@@ -0,0 +1,137 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Function;
|
||||
using LFP_Manager.Controls;
|
||||
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
public delegate void CalibUpdateEvent(object sendor);
|
||||
public delegate void CalibCmdEvent(int sId, int mode, int flag, ref DeviceParamData aParam, ref DeviceCalibration aCalib);
|
||||
|
||||
public partial class fmxCalibration : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
#region VARIABLES
|
||||
|
||||
int SystemId = 0;
|
||||
DeviceSystemData SystemData;
|
||||
DeviceParamData Param;
|
||||
DeviceCalibration Calib;
|
||||
|
||||
public event CalibUpdateEvent OnUpdate = null;
|
||||
public event CalibCmdEvent OnCommand = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public fmxCalibration()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public fmxCalibration(int sId, DeviceCalibration aCalib)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
InitComponent();
|
||||
|
||||
SystemId = sId;
|
||||
Calib = aCalib;
|
||||
|
||||
tmrDisplay.Enabled = true;
|
||||
}
|
||||
|
||||
public void InitComponent()
|
||||
{
|
||||
// Cell Voltage Calibration
|
||||
ucCalibrationConfig.OnCommand += OnCmdEvent;
|
||||
ucCalibrationConfig.OnGetBattData += OnGetCellDataEvent;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region COMMAND EVENT
|
||||
|
||||
private void OnCmdEvent(int mode, int flag, ref DeviceCalibration aCalib, ref DeviceSystemTotalData aTotal)
|
||||
{
|
||||
OnCommand?.Invoke(SystemId, mode, flag, ref Param, ref aCalib);
|
||||
}
|
||||
|
||||
private Int32 OnGetCellDataEvent(int item, int cno)
|
||||
{
|
||||
Int32 result = 0;
|
||||
|
||||
switch (item)
|
||||
{
|
||||
case 0: // Cell Voltagae Value
|
||||
if ((cno > 0) && (cno <= csConstData.SystemInfo.MAX_MODULE_CELL_SIZE)) result = (Int32)SystemData.ValueData.CellVoltage[cno - 1];
|
||||
break;
|
||||
case 1:
|
||||
result = (Int32)SystemData.ValueData.voltageOfPack;
|
||||
break;
|
||||
case 2:
|
||||
result = (Int32)SystemData.ValueData.current;
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BUTTON EVENT
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
private void btnResetAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnCommand?.Invoke(0xFF, 25, 1, ref Param, ref Calib);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region TIMER EVENT
|
||||
|
||||
private void tmrDisplay_Tick(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
DisplayValue();
|
||||
OnUpdate?.Invoke(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region DISPLAY DATA
|
||||
|
||||
private void DisplayValue()
|
||||
{
|
||||
// Cell Voltage Parameter
|
||||
ucCalibrationConfig.UpdateData(Calib);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PUBLIC FUCTIONS
|
||||
|
||||
public void UpdateData(DeviceParamData aParam, DeviceCalibration aCalib, DeviceSystemData aSystemData)
|
||||
{
|
||||
SystemData = aSystemData;
|
||||
Param = aParam;
|
||||
Calib = aCalib;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
4574
LFP_Manager_PRM/Forms/fmxCalibration.resx
Normal file
4574
LFP_Manager_PRM/Forms/fmxCalibration.resx
Normal file
File diff suppressed because it is too large
Load Diff
108
LFP_Manager_PRM/Forms/fmxCommConfig.Designer.cs
generated
Normal file
108
LFP_Manager_PRM/Forms/fmxCommConfig.Designer.cs
generated
Normal file
@@ -0,0 +1,108 @@
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
partial class fmxCommConfig
|
||||
{
|
||||
/// <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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fmxCommConfig));
|
||||
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.ucCommConfig1 = new LFP_Manager.Controls.ucCommConfig();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.ucCommConfig1);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(404, 507);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1});
|
||||
this.layoutControlGroup1.Name = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(404, 507);
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// ucCommConfig1
|
||||
//
|
||||
this.ucCommConfig1.Location = new System.Drawing.Point(3, 3);
|
||||
this.ucCommConfig1.Name = "ucCommConfig1";
|
||||
this.ucCommConfig1.Size = new System.Drawing.Size(398, 501);
|
||||
this.ucCommConfig1.TabIndex = 4;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.ucCommConfig1;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(402, 505);
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// fmxCommConfig
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(404, 507);
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.IconOptions.Icon = ((System.Drawing.Icon)(resources.GetObject("fmxCommConfig.IconOptions.Icon")));
|
||||
this.Name = "fmxCommConfig";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Communication Config";
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private Controls.ucCommConfig ucCommConfig1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
|
||||
}
|
||||
}
|
||||
36
LFP_Manager_PRM/Forms/fmxCommConfig.cs
Normal file
36
LFP_Manager_PRM/Forms/fmxCommConfig.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
public delegate void UpdateEvent(object aConfig);
|
||||
|
||||
public partial class fmxCommConfig : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
public event UpdateEvent OnUpdate = null;
|
||||
|
||||
public fmxCommConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
ucCommConfig1.OnClose += FormClose;
|
||||
}
|
||||
|
||||
private void FormClose(object Config)
|
||||
{
|
||||
if (OnUpdate != null)
|
||||
{
|
||||
OnUpdate(Config);
|
||||
}
|
||||
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
4571
LFP_Manager_PRM/Forms/fmxCommConfig.resx
Normal file
4571
LFP_Manager_PRM/Forms/fmxCommConfig.resx
Normal file
File diff suppressed because it is too large
Load Diff
741
LFP_Manager_PRM/Forms/fmxExcelFile.Designer.cs
generated
Normal file
741
LFP_Manager_PRM/Forms/fmxExcelFile.Designer.cs
generated
Normal file
@@ -0,0 +1,741 @@
|
||||
namespace LFP_Manager
|
||||
{
|
||||
partial class fmxExcelFile
|
||||
{
|
||||
/// <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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fmxExcelFile));
|
||||
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.tbPcbSn = new DevExpress.XtraEditors.TextEdit();
|
||||
this.btnOpenDbFolder = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.edResultCount = new DevExpress.XtraEditors.TextEdit();
|
||||
this.btnResultListClear = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnSearchPcbSn = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnOutputAll = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnCheckMeasData = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnCheckDimData = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnCheckGroupData = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.cbResultList = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.cbLotNo = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.btnExcuteTCell = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.gbDbCommnad = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl2 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.btnOpenSchema = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnBmsDuplicateCheck = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnQueryExcute = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.tbSchema = new System.Windows.Forms.TextBox();
|
||||
this.gridCell = new System.Windows.Forms.DataGridView();
|
||||
this.btnFindFile = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.edFileName = new DevExpress.XtraEditors.TextEdit();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lcitemLot = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem19 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tbPcbSn.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edResultCount.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbResultList.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbLotNo.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbDbCommnad)).BeginInit();
|
||||
this.gbDbCommnad.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).BeginInit();
|
||||
this.layoutControl2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridCell)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edFileName.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcitemLot)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.tbPcbSn);
|
||||
this.layoutControl1.Controls.Add(this.btnOpenDbFolder);
|
||||
this.layoutControl1.Controls.Add(this.edResultCount);
|
||||
this.layoutControl1.Controls.Add(this.btnResultListClear);
|
||||
this.layoutControl1.Controls.Add(this.btnSearchPcbSn);
|
||||
this.layoutControl1.Controls.Add(this.btnOutputAll);
|
||||
this.layoutControl1.Controls.Add(this.btnCheckMeasData);
|
||||
this.layoutControl1.Controls.Add(this.btnCheckDimData);
|
||||
this.layoutControl1.Controls.Add(this.btnCheckGroupData);
|
||||
this.layoutControl1.Controls.Add(this.cbResultList);
|
||||
this.layoutControl1.Controls.Add(this.cbLotNo);
|
||||
this.layoutControl1.Controls.Add(this.btnExcuteTCell);
|
||||
this.layoutControl1.Controls.Add(this.gbDbCommnad);
|
||||
this.layoutControl1.Controls.Add(this.tbSchema);
|
||||
this.layoutControl1.Controls.Add(this.gridCell);
|
||||
this.layoutControl1.Controls.Add(this.btnFindFile);
|
||||
this.layoutControl1.Controls.Add(this.edFileName);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1347, 290, 250, 350);
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(999, 578);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// tbPcbSn
|
||||
//
|
||||
this.tbPcbSn.Location = new System.Drawing.Point(681, 265);
|
||||
this.tbPcbSn.Name = "tbPcbSn";
|
||||
this.tbPcbSn.Size = new System.Drawing.Size(163, 20);
|
||||
this.tbPcbSn.StyleController = this.layoutControl1;
|
||||
this.tbPcbSn.TabIndex = 23;
|
||||
//
|
||||
// btnOpenDbFolder
|
||||
//
|
||||
this.btnOpenDbFolder.Location = new System.Drawing.Point(876, 12);
|
||||
this.btnOpenDbFolder.Name = "btnOpenDbFolder";
|
||||
this.btnOpenDbFolder.Size = new System.Drawing.Size(111, 22);
|
||||
this.btnOpenDbFolder.StyleController = this.layoutControl1;
|
||||
this.btnOpenDbFolder.TabIndex = 22;
|
||||
this.btnOpenDbFolder.Text = "Open DB Folder";
|
||||
this.btnOpenDbFolder.Click += new System.EventHandler(this.btnOpenDbFolder_Click);
|
||||
//
|
||||
// edResultCount
|
||||
//
|
||||
this.edResultCount.Location = new System.Drawing.Point(89, 265);
|
||||
this.edResultCount.Name = "edResultCount";
|
||||
this.edResultCount.Size = new System.Drawing.Size(59, 20);
|
||||
this.edResultCount.StyleController = this.layoutControl1;
|
||||
this.edResultCount.TabIndex = 21;
|
||||
//
|
||||
// btnResultListClear
|
||||
//
|
||||
this.btnResultListClear.Location = new System.Drawing.Point(402, 265);
|
||||
this.btnResultListClear.Name = "btnResultListClear";
|
||||
this.btnResultListClear.Size = new System.Drawing.Size(89, 22);
|
||||
this.btnResultListClear.StyleController = this.layoutControl1;
|
||||
this.btnResultListClear.TabIndex = 20;
|
||||
this.btnResultListClear.Text = "Clear";
|
||||
this.btnResultListClear.Click += new System.EventHandler(this.btnResultListClear_Click);
|
||||
//
|
||||
// btnSearchPcbSn
|
||||
//
|
||||
this.btnSearchPcbSn.Location = new System.Drawing.Point(848, 265);
|
||||
this.btnSearchPcbSn.Name = "btnSearchPcbSn";
|
||||
this.btnSearchPcbSn.Size = new System.Drawing.Size(139, 22);
|
||||
this.btnSearchPcbSn.StyleController = this.layoutControl1;
|
||||
this.btnSearchPcbSn.TabIndex = 19;
|
||||
this.btnSearchPcbSn.Text = "Search PCB SN";
|
||||
this.btnSearchPcbSn.Click += new System.EventHandler(this.btnModuleResult_Click);
|
||||
//
|
||||
// btnOutputAll
|
||||
//
|
||||
this.btnOutputAll.Location = new System.Drawing.Point(897, 229);
|
||||
this.btnOutputAll.Name = "btnOutputAll";
|
||||
this.btnOutputAll.Size = new System.Drawing.Size(90, 32);
|
||||
this.btnOutputAll.StyleController = this.layoutControl1;
|
||||
this.btnOutputAll.TabIndex = 18;
|
||||
this.btnOutputAll.Text = "Output All";
|
||||
this.btnOutputAll.Click += new System.EventHandler(this.btnOutputAll_Click);
|
||||
//
|
||||
// btnCheckMeasData
|
||||
//
|
||||
this.btnCheckMeasData.Location = new System.Drawing.Point(740, 229);
|
||||
this.btnCheckMeasData.Name = "btnCheckMeasData";
|
||||
this.btnCheckMeasData.Size = new System.Drawing.Size(123, 32);
|
||||
this.btnCheckMeasData.StyleController = this.layoutControl1;
|
||||
this.btnCheckMeasData.TabIndex = 17;
|
||||
this.btnCheckMeasData.Text = "Check Measure";
|
||||
this.btnCheckMeasData.Click += new System.EventHandler(this.btnCheckMeasData_Click);
|
||||
//
|
||||
// btnCheckDimData
|
||||
//
|
||||
this.btnCheckDimData.Location = new System.Drawing.Point(867, 197);
|
||||
this.btnCheckDimData.Name = "btnCheckDimData";
|
||||
this.btnCheckDimData.Size = new System.Drawing.Size(120, 28);
|
||||
this.btnCheckDimData.StyleController = this.layoutControl1;
|
||||
this.btnCheckDimData.TabIndex = 16;
|
||||
this.btnCheckDimData.Text = "Module Value";
|
||||
this.btnCheckDimData.Click += new System.EventHandler(this.btnCheckDimData_Click);
|
||||
//
|
||||
// btnCheckGroupData
|
||||
//
|
||||
this.btnCheckGroupData.Location = new System.Drawing.Point(740, 197);
|
||||
this.btnCheckGroupData.Name = "btnCheckGroupData";
|
||||
this.btnCheckGroupData.Size = new System.Drawing.Size(123, 28);
|
||||
this.btnCheckGroupData.StyleController = this.layoutControl1;
|
||||
this.btnCheckGroupData.TabIndex = 15;
|
||||
this.btnCheckGroupData.Text = "Inventory Value";
|
||||
this.btnCheckGroupData.Click += new System.EventHandler(this.btnCheckGroupData_Click);
|
||||
//
|
||||
// cbResultList
|
||||
//
|
||||
this.cbResultList.Location = new System.Drawing.Point(237, 265);
|
||||
this.cbResultList.Name = "cbResultList";
|
||||
this.cbResultList.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
|
||||
this.cbResultList.Properties.Appearance.Options.UseFont = true;
|
||||
this.cbResultList.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.cbResultList.Size = new System.Drawing.Size(161, 22);
|
||||
this.cbResultList.StyleController = this.layoutControl1;
|
||||
this.cbResultList.TabIndex = 14;
|
||||
this.cbResultList.SelectedIndexChanged += new System.EventHandler(this.cbResultList_SelectedIndexChanged);
|
||||
//
|
||||
// cbLotNo
|
||||
//
|
||||
this.cbLotNo.Location = new System.Drawing.Point(805, 147);
|
||||
this.cbLotNo.Name = "cbLotNo";
|
||||
this.cbLotNo.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.cbLotNo.Size = new System.Drawing.Size(182, 20);
|
||||
this.cbLotNo.StyleController = this.layoutControl1;
|
||||
this.cbLotNo.TabIndex = 13;
|
||||
//
|
||||
// btnExcuteTCell
|
||||
//
|
||||
this.btnExcuteTCell.Location = new System.Drawing.Point(740, 171);
|
||||
this.btnExcuteTCell.Name = "btnExcuteTCell";
|
||||
this.btnExcuteTCell.Size = new System.Drawing.Size(247, 22);
|
||||
this.btnExcuteTCell.StyleController = this.layoutControl1;
|
||||
this.btnExcuteTCell.TabIndex = 12;
|
||||
this.btnExcuteTCell.Text = "SQL Excute";
|
||||
this.btnExcuteTCell.Click += new System.EventHandler(this.btnExcuteTCell_Click);
|
||||
//
|
||||
// gbDbCommnad
|
||||
//
|
||||
this.gbDbCommnad.Controls.Add(this.layoutControl2);
|
||||
this.gbDbCommnad.Location = new System.Drawing.Point(740, 38);
|
||||
this.gbDbCommnad.Name = "gbDbCommnad";
|
||||
this.gbDbCommnad.Size = new System.Drawing.Size(247, 105);
|
||||
this.gbDbCommnad.TabIndex = 11;
|
||||
this.gbDbCommnad.Text = "Management DB";
|
||||
//
|
||||
// layoutControl2
|
||||
//
|
||||
this.layoutControl2.Controls.Add(this.btnOpenSchema);
|
||||
this.layoutControl2.Controls.Add(this.btnBmsDuplicateCheck);
|
||||
this.layoutControl2.Controls.Add(this.btnQueryExcute);
|
||||
this.layoutControl2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl2.Location = new System.Drawing.Point(2, 23);
|
||||
this.layoutControl2.Name = "layoutControl2";
|
||||
this.layoutControl2.Root = this.layoutControlGroup2;
|
||||
this.layoutControl2.Size = new System.Drawing.Size(243, 80);
|
||||
this.layoutControl2.TabIndex = 0;
|
||||
this.layoutControl2.Text = "layoutControl2";
|
||||
//
|
||||
// btnOpenSchema
|
||||
//
|
||||
this.btnOpenSchema.Location = new System.Drawing.Point(3, 3);
|
||||
this.btnOpenSchema.Name = "btnOpenSchema";
|
||||
this.btnOpenSchema.Size = new System.Drawing.Size(237, 22);
|
||||
this.btnOpenSchema.StyleController = this.layoutControl2;
|
||||
this.btnOpenSchema.TabIndex = 8;
|
||||
this.btnOpenSchema.Text = "Open Schema";
|
||||
this.btnOpenSchema.Click += new System.EventHandler(this.btnOpenSchema_Click);
|
||||
//
|
||||
// btnBmsDuplicateCheck
|
||||
//
|
||||
this.btnBmsDuplicateCheck.Location = new System.Drawing.Point(3, 55);
|
||||
this.btnBmsDuplicateCheck.Name = "btnBmsDuplicateCheck";
|
||||
this.btnBmsDuplicateCheck.Size = new System.Drawing.Size(237, 22);
|
||||
this.btnBmsDuplicateCheck.StyleController = this.layoutControl2;
|
||||
this.btnBmsDuplicateCheck.TabIndex = 10;
|
||||
this.btnBmsDuplicateCheck.Text = "BMS Duplicate Check";
|
||||
this.btnBmsDuplicateCheck.Click += new System.EventHandler(this.btnBmsDuplicateCheck_Click);
|
||||
//
|
||||
// btnQueryExcute
|
||||
//
|
||||
this.btnQueryExcute.Location = new System.Drawing.Point(3, 29);
|
||||
this.btnQueryExcute.Name = "btnQueryExcute";
|
||||
this.btnQueryExcute.Size = new System.Drawing.Size(237, 22);
|
||||
this.btnQueryExcute.StyleController = this.layoutControl2;
|
||||
this.btnQueryExcute.TabIndex = 9;
|
||||
this.btnQueryExcute.Text = "Query Excute";
|
||||
this.btnQueryExcute.Click += new System.EventHandler(this.btnQueryExcute_Click);
|
||||
//
|
||||
// layoutControlGroup2
|
||||
//
|
||||
this.layoutControlGroup2.CustomizationFormText = "layoutControlGroup2";
|
||||
this.layoutControlGroup2.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup2.GroupBordersVisible = false;
|
||||
this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem5,
|
||||
this.layoutControlItem6,
|
||||
this.layoutControlItem7});
|
||||
this.layoutControlGroup2.Name = "layoutControlGroup2";
|
||||
this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup2.Size = new System.Drawing.Size(243, 80);
|
||||
this.layoutControlGroup2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem5
|
||||
//
|
||||
this.layoutControlItem5.Control = this.btnOpenSchema;
|
||||
this.layoutControlItem5.CustomizationFormText = "layoutControlItem5";
|
||||
this.layoutControlItem5.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem5.Name = "layoutControlItem5";
|
||||
this.layoutControlItem5.Size = new System.Drawing.Size(241, 26);
|
||||
this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem5.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem6
|
||||
//
|
||||
this.layoutControlItem6.Control = this.btnQueryExcute;
|
||||
this.layoutControlItem6.CustomizationFormText = "layoutControlItem6";
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(0, 26);
|
||||
this.layoutControlItem6.Name = "layoutControlItem6";
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(241, 26);
|
||||
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem6.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem7
|
||||
//
|
||||
this.layoutControlItem7.Control = this.btnBmsDuplicateCheck;
|
||||
this.layoutControlItem7.CustomizationFormText = "layoutControlItem7";
|
||||
this.layoutControlItem7.Location = new System.Drawing.Point(0, 52);
|
||||
this.layoutControlItem7.Name = "layoutControlItem7";
|
||||
this.layoutControlItem7.Size = new System.Drawing.Size(241, 26);
|
||||
this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem7.TextVisible = false;
|
||||
//
|
||||
// tbSchema
|
||||
//
|
||||
this.tbSchema.Location = new System.Drawing.Point(12, 38);
|
||||
this.tbSchema.Multiline = true;
|
||||
this.tbSchema.Name = "tbSchema";
|
||||
this.tbSchema.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.tbSchema.Size = new System.Drawing.Size(724, 223);
|
||||
this.tbSchema.TabIndex = 7;
|
||||
//
|
||||
// gridCell
|
||||
//
|
||||
this.gridCell.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.gridCell.Location = new System.Drawing.Point(12, 291);
|
||||
this.gridCell.Name = "gridCell";
|
||||
this.gridCell.RowTemplate.Height = 23;
|
||||
this.gridCell.Size = new System.Drawing.Size(975, 275);
|
||||
this.gridCell.TabIndex = 6;
|
||||
//
|
||||
// btnFindFile
|
||||
//
|
||||
this.btnFindFile.Location = new System.Drawing.Point(740, 12);
|
||||
this.btnFindFile.Name = "btnFindFile";
|
||||
this.btnFindFile.Size = new System.Drawing.Size(132, 22);
|
||||
this.btnFindFile.StyleController = this.layoutControl1;
|
||||
this.btnFindFile.TabIndex = 5;
|
||||
this.btnFindFile.Text = "Find File ....";
|
||||
this.btnFindFile.Click += new System.EventHandler(this.btnFindFile_Click);
|
||||
//
|
||||
// edFileName
|
||||
//
|
||||
this.edFileName.Location = new System.Drawing.Point(89, 12);
|
||||
this.edFileName.Name = "edFileName";
|
||||
this.edFileName.Size = new System.Drawing.Size(647, 20);
|
||||
this.edFileName.StyleController = this.layoutControl1;
|
||||
this.edFileName.TabIndex = 4;
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1,
|
||||
this.layoutControlItem2,
|
||||
this.emptySpaceItem1,
|
||||
this.layoutControlItem3,
|
||||
this.layoutControlItem4,
|
||||
this.layoutControlItem8,
|
||||
this.layoutControlItem9,
|
||||
this.lcitemLot,
|
||||
this.layoutControlItem10,
|
||||
this.emptySpaceItem2,
|
||||
this.layoutControlItem11,
|
||||
this.layoutControlItem12,
|
||||
this.layoutControlItem13,
|
||||
this.layoutControlItem14,
|
||||
this.layoutControlItem15,
|
||||
this.layoutControlItem16,
|
||||
this.layoutControlItem18,
|
||||
this.layoutControlItem17,
|
||||
this.layoutControlItem19});
|
||||
this.layoutControlGroup1.Name = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(999, 578);
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.edFileName;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(162, 24);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(728, 26);
|
||||
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem1.Text = "File Name: ";
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(74, 14);
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.btnFindFile;
|
||||
this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(728, 0);
|
||||
this.layoutControlItem2.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(136, 26);
|
||||
this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// emptySpaceItem1
|
||||
//
|
||||
this.emptySpaceItem1.AllowHotTrack = false;
|
||||
this.emptySpaceItem1.CustomizationFormText = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Location = new System.Drawing.Point(855, 217);
|
||||
this.emptySpaceItem1.Name = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Size = new System.Drawing.Size(30, 36);
|
||||
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.gridCell;
|
||||
this.layoutControlItem3.CustomizationFormText = "layoutControlItem3";
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(0, 279);
|
||||
this.layoutControlItem3.MinSize = new System.Drawing.Size(104, 24);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(979, 279);
|
||||
this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem3.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.tbSchema;
|
||||
this.layoutControlItem4.CustomizationFormText = "layoutControlItem4";
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(0, 26);
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(132, 24);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(728, 227);
|
||||
this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem4.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem8
|
||||
//
|
||||
this.layoutControlItem8.Control = this.gbDbCommnad;
|
||||
this.layoutControlItem8.CustomizationFormText = "layoutControlItem8";
|
||||
this.layoutControlItem8.Location = new System.Drawing.Point(728, 26);
|
||||
this.layoutControlItem8.Name = "layoutControlItem8";
|
||||
this.layoutControlItem8.Size = new System.Drawing.Size(251, 109);
|
||||
this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem8.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem9
|
||||
//
|
||||
this.layoutControlItem9.Control = this.btnExcuteTCell;
|
||||
this.layoutControlItem9.CustomizationFormText = "layoutControlItem9";
|
||||
this.layoutControlItem9.Location = new System.Drawing.Point(728, 159);
|
||||
this.layoutControlItem9.Name = "layoutControlItem9";
|
||||
this.layoutControlItem9.Size = new System.Drawing.Size(251, 26);
|
||||
this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem9.TextVisible = false;
|
||||
//
|
||||
// lcitemLot
|
||||
//
|
||||
this.lcitemLot.Control = this.cbLotNo;
|
||||
this.lcitemLot.CustomizationFormText = " Lot No";
|
||||
this.lcitemLot.Location = new System.Drawing.Point(728, 135);
|
||||
this.lcitemLot.Name = "lcitemLot";
|
||||
this.lcitemLot.Size = new System.Drawing.Size(251, 24);
|
||||
this.lcitemLot.Text = " Lot No";
|
||||
this.lcitemLot.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
|
||||
this.lcitemLot.TextSize = new System.Drawing.Size(60, 14);
|
||||
this.lcitemLot.TextToControlDistance = 5;
|
||||
//
|
||||
// layoutControlItem10
|
||||
//
|
||||
this.layoutControlItem10.Control = this.cbResultList;
|
||||
this.layoutControlItem10.CustomizationFormText = " Result List";
|
||||
this.layoutControlItem10.Location = new System.Drawing.Point(140, 253);
|
||||
this.layoutControlItem10.MaxSize = new System.Drawing.Size(0, 26);
|
||||
this.layoutControlItem10.MinSize = new System.Drawing.Size(187, 26);
|
||||
this.layoutControlItem10.Name = "layoutControlItem10";
|
||||
this.layoutControlItem10.Size = new System.Drawing.Size(250, 26);
|
||||
this.layoutControlItem10.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem10.Text = " Result List";
|
||||
this.layoutControlItem10.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
|
||||
this.layoutControlItem10.TextSize = new System.Drawing.Size(80, 14);
|
||||
this.layoutControlItem10.TextToControlDistance = 5;
|
||||
//
|
||||
// emptySpaceItem2
|
||||
//
|
||||
this.emptySpaceItem2.AllowHotTrack = false;
|
||||
this.emptySpaceItem2.CustomizationFormText = "emptySpaceItem2";
|
||||
this.emptySpaceItem2.Location = new System.Drawing.Point(483, 253);
|
||||
this.emptySpaceItem2.Name = "emptySpaceItem2";
|
||||
this.emptySpaceItem2.Size = new System.Drawing.Size(109, 26);
|
||||
this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// layoutControlItem11
|
||||
//
|
||||
this.layoutControlItem11.Control = this.btnCheckGroupData;
|
||||
this.layoutControlItem11.CustomizationFormText = "layoutControlItem11";
|
||||
this.layoutControlItem11.Location = new System.Drawing.Point(728, 185);
|
||||
this.layoutControlItem11.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem11.Name = "layoutControlItem11";
|
||||
this.layoutControlItem11.Size = new System.Drawing.Size(127, 32);
|
||||
this.layoutControlItem11.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem11.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem12
|
||||
//
|
||||
this.layoutControlItem12.Control = this.btnCheckDimData;
|
||||
this.layoutControlItem12.CustomizationFormText = "layoutControlItem12";
|
||||
this.layoutControlItem12.Location = new System.Drawing.Point(855, 185);
|
||||
this.layoutControlItem12.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem12.Name = "layoutControlItem12";
|
||||
this.layoutControlItem12.Size = new System.Drawing.Size(124, 32);
|
||||
this.layoutControlItem12.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem12.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem13
|
||||
//
|
||||
this.layoutControlItem13.Control = this.btnCheckMeasData;
|
||||
this.layoutControlItem13.CustomizationFormText = "layoutControlItem13";
|
||||
this.layoutControlItem13.Location = new System.Drawing.Point(728, 217);
|
||||
this.layoutControlItem13.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem13.Name = "layoutControlItem13";
|
||||
this.layoutControlItem13.Size = new System.Drawing.Size(127, 36);
|
||||
this.layoutControlItem13.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem13.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem13.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem14
|
||||
//
|
||||
this.layoutControlItem14.Control = this.btnOutputAll;
|
||||
this.layoutControlItem14.CustomizationFormText = "layoutControlItem14";
|
||||
this.layoutControlItem14.Location = new System.Drawing.Point(885, 217);
|
||||
this.layoutControlItem14.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem14.Name = "layoutControlItem14";
|
||||
this.layoutControlItem14.Size = new System.Drawing.Size(94, 36);
|
||||
this.layoutControlItem14.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem14.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem14.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem15
|
||||
//
|
||||
this.layoutControlItem15.Control = this.btnSearchPcbSn;
|
||||
this.layoutControlItem15.CustomizationFormText = "layoutControlItem15";
|
||||
this.layoutControlItem15.Location = new System.Drawing.Point(836, 253);
|
||||
this.layoutControlItem15.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem15.Name = "layoutControlItem15";
|
||||
this.layoutControlItem15.Size = new System.Drawing.Size(143, 26);
|
||||
this.layoutControlItem15.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem15.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem15.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem16
|
||||
//
|
||||
this.layoutControlItem16.Control = this.btnResultListClear;
|
||||
this.layoutControlItem16.CustomizationFormText = "layoutControlItem16";
|
||||
this.layoutControlItem16.Location = new System.Drawing.Point(390, 253);
|
||||
this.layoutControlItem16.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem16.Name = "layoutControlItem16";
|
||||
this.layoutControlItem16.Size = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem16.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem16.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem16.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem18
|
||||
//
|
||||
this.layoutControlItem18.Control = this.btnOpenDbFolder;
|
||||
this.layoutControlItem18.Location = new System.Drawing.Point(864, 0);
|
||||
this.layoutControlItem18.Name = "layoutControlItem18";
|
||||
this.layoutControlItem18.Size = new System.Drawing.Size(115, 26);
|
||||
this.layoutControlItem18.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem18.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem17
|
||||
//
|
||||
this.layoutControlItem17.Control = this.edResultCount;
|
||||
this.layoutControlItem17.CustomizationFormText = "layoutControlItem17";
|
||||
this.layoutControlItem17.Location = new System.Drawing.Point(0, 253);
|
||||
this.layoutControlItem17.MinSize = new System.Drawing.Size(54, 24);
|
||||
this.layoutControlItem17.Name = "layoutControlItem17";
|
||||
this.layoutControlItem17.Size = new System.Drawing.Size(140, 26);
|
||||
this.layoutControlItem17.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem17.Text = "Result Count ";
|
||||
this.layoutControlItem17.TextSize = new System.Drawing.Size(74, 14);
|
||||
//
|
||||
// layoutControlItem19
|
||||
//
|
||||
this.layoutControlItem19.Control = this.tbPcbSn;
|
||||
this.layoutControlItem19.Location = new System.Drawing.Point(592, 253);
|
||||
this.layoutControlItem19.MinSize = new System.Drawing.Size(131, 24);
|
||||
this.layoutControlItem19.Name = "layoutControlItem19";
|
||||
this.layoutControlItem19.Size = new System.Drawing.Size(244, 26);
|
||||
this.layoutControlItem19.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem19.Text = "PCB SN";
|
||||
this.layoutControlItem19.TextSize = new System.Drawing.Size(74, 14);
|
||||
//
|
||||
// fmxExcelFile
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(999, 578);
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.IconOptions.Icon = ((System.Drawing.Icon)(resources.GetObject("fmxExcelFile.IconOptions.Icon")));
|
||||
this.Name = "fmxExcelFile";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Database Control";
|
||||
this.Load += new System.EventHandler(this.fmxExcelFile_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.tbPcbSn.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edResultCount.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbResultList.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbLotNo.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbDbCommnad)).EndInit();
|
||||
this.gbDbCommnad.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).EndInit();
|
||||
this.layoutControl2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridCell)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edFileName.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcitemLot)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem19)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnFindFile;
|
||||
private DevExpress.XtraEditors.TextEdit edFileName;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
|
||||
private System.Windows.Forms.DataGridView gridCell;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
|
||||
private System.Windows.Forms.TextBox tbSchema;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
|
||||
private DevExpress.XtraEditors.SimpleButton btnOpenSchema;
|
||||
private DevExpress.XtraEditors.SimpleButton btnQueryExcute;
|
||||
private DevExpress.XtraEditors.SimpleButton btnBmsDuplicateCheck;
|
||||
private DevExpress.XtraEditors.GroupControl gbDbCommnad;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl2;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
|
||||
private DevExpress.XtraEditors.SimpleButton btnExcuteTCell;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
|
||||
private DevExpress.XtraEditors.ComboBoxEdit cbLotNo;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcitemLot;
|
||||
private DevExpress.XtraEditors.ComboBoxEdit cbResultList;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
|
||||
private DevExpress.XtraEditors.SimpleButton btnCheckGroupData;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11;
|
||||
private DevExpress.XtraEditors.SimpleButton btnCheckDimData;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
|
||||
private DevExpress.XtraEditors.SimpleButton btnCheckMeasData;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13;
|
||||
private DevExpress.XtraEditors.SimpleButton btnOutputAll;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14;
|
||||
private DevExpress.XtraEditors.SimpleButton btnSearchPcbSn;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15;
|
||||
private DevExpress.XtraEditors.SimpleButton btnResultListClear;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16;
|
||||
private DevExpress.XtraEditors.TextEdit edResultCount;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17;
|
||||
private DevExpress.XtraEditors.SimpleButton btnOpenDbFolder;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem18;
|
||||
private DevExpress.XtraEditors.TextEdit tbPcbSn;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem19;
|
||||
}
|
||||
}
|
||||
391
LFP_Manager_PRM/Forms/fmxExcelFile.cs
Normal file
391
LFP_Manager_PRM/Forms/fmxExcelFile.cs
Normal file
@@ -0,0 +1,391 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
using System.Data.SQLite;
|
||||
|
||||
using System.IO;
|
||||
|
||||
using System.Data.OleDb;
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Function;
|
||||
using LFP_Manager.Utils;
|
||||
using DevExpress.Utils.FormShadow;
|
||||
|
||||
namespace LFP_Manager
|
||||
{
|
||||
public partial class fmxExcelFile : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
#region VARIABLES
|
||||
|
||||
CommConfig Config;
|
||||
string[] dbFiles;
|
||||
//private string Excel03ConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties='Excel 8.0;HDR={1}'";
|
||||
//private string Excel07ConString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 8.0;HDR={1}'";
|
||||
//Workbook workbook;
|
||||
DataSet dsCell;
|
||||
DataTable dtCell;
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public fmxExcelFile(CommConfig aConfig)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Config = aConfig;
|
||||
|
||||
//tbSchema.Text = "select * from TInventoryData" + "\r\n" + "where pcb_sn like 'BMU18SA20120169%'";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region FORM EVENT
|
||||
private void fmxExcelFile_Load(object sender, EventArgs e)
|
||||
{
|
||||
string dbfilePath = Path.GetDirectoryName(Application.ExecutablePath) + @"\db";
|
||||
dbFiles = Directory.GetFiles(dbfilePath, "*.db", SearchOption.AllDirectories);
|
||||
|
||||
if (dbFiles.Length > 0)
|
||||
{
|
||||
for (int i = 0; i < dbFiles.Length; i++)
|
||||
{
|
||||
cbLotNo.Properties.Items.Add(Path.GetFileName(dbFiles[i]));
|
||||
}
|
||||
cbLotNo.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
// Copy Table Value
|
||||
// INSERT INTO TModuleResultBak SELECT * FROM TModuleResult
|
||||
// INSERT INTO [TModuleBmsBak] (sn, result, module_ocv_b) SELECT sn, result, module_ocv_b FROM TModuleBms
|
||||
|
||||
#region BUTTON EVENT
|
||||
private void btnFindFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog oDialog = new OpenFileDialog();
|
||||
oDialog.DefaultExt = "*.*";
|
||||
oDialog.Filter = "excel files 2003 (*.xls)|*.xls|excel files 2007 (*.xlsx)|*.xlsx|All files (*.*)|*.*";
|
||||
|
||||
if (oDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
edFileName.Text = oDialog.FileName;
|
||||
|
||||
try
|
||||
{
|
||||
dsCell = csExcelControl.OpenExcelDB(edFileName.Text);
|
||||
|
||||
cbResultList.Properties.Items.Clear();
|
||||
for (int i = 0; i < dsCell.Tables.Count; i++)
|
||||
{
|
||||
cbResultList.Properties.Items.Add(dsCell.Tables[i].TableName);
|
||||
}
|
||||
cbResultList.SelectedIndex = 0;
|
||||
|
||||
dtCell = dsCell.Tables[0];
|
||||
|
||||
gridCell.DataSource = dtCell;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void btnExcuteTCell_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (tbSchema.Text != string.Empty)
|
||||
{
|
||||
try
|
||||
{
|
||||
//string path = cbLotNo.Text.Substring(0, 9);
|
||||
//string path = cbLotNo.Text;
|
||||
string path = dbFiles[cbLotNo.SelectedIndex];
|
||||
DataTable aaa = csDbUtils.DbSqlExcuteA3(path, tbSchema.Text);
|
||||
if (aaa != null)
|
||||
{
|
||||
gridCell.DataSource = aaa;
|
||||
edResultCount.Text = String.Format("{0}", aaa.Rows.Count);
|
||||
|
||||
if (aaa.Rows.Count > 0)
|
||||
{
|
||||
var ddd = aaa.Rows[0]["pcb_sn"];
|
||||
byte[] ccc = Encoding.UTF8.GetBytes(ddd.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void btnOpenSchema_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog oDialog = new OpenFileDialog();
|
||||
oDialog.DefaultExt = "*.*";
|
||||
oDialog.Filter = "sql files (*.sql)|*.sql|All files (*.*)|*.*";
|
||||
|
||||
if (oDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
string text = System.IO.File.ReadAllText(oDialog.FileName);
|
||||
tbSchema.Text = text;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnQueryExcute_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (tbSchema.Text != string.Empty)
|
||||
{
|
||||
gridCell.DataSource = csDbUtils.DbSqlExcuteA(Config, Application.ExecutablePath, tbSchema.Text);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnInsertDbByTable_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void btnCheckGroupData_Click(object sender, EventArgs e)
|
||||
{
|
||||
tbSchema.Text = "select * from TInventoryData";
|
||||
}
|
||||
|
||||
private void btnCheckDimData_Click(object sender, EventArgs e)
|
||||
{
|
||||
tbSchema.Text = "select * from TModuleValue";
|
||||
}
|
||||
|
||||
private void btnCheckMeasData_Click(object sender, EventArgs e)
|
||||
{
|
||||
tbSchema.Text = "select * from TModuleMeasurement";
|
||||
}
|
||||
private void btnOutputAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (cbResultList.Properties.Items.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < cbResultList.Properties.Items.Count; i++)
|
||||
{
|
||||
string sn = cbResultList.Properties.Items[i].ToString();
|
||||
MakeOutpuDataExcel(sn, cbLotNo.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void btnModuleResult_Click(object sender, EventArgs e)
|
||||
{
|
||||
//
|
||||
try
|
||||
{
|
||||
string dbFilePath = dbFiles[cbLotNo.SelectedIndex];
|
||||
string sql = String.Format("SELECT * FROM TInventoryData")
|
||||
+ String.Format(" where pcb_sn like '{0}%'", tbPcbSn.Text)
|
||||
;
|
||||
DataTable dtBmsData = csDbUtils.DbSqlExcuteA3(dbFilePath, sql);
|
||||
dtBmsData.TableName = "TInventoryData";
|
||||
|
||||
if ((dtBmsData != null) && (dtBmsData.Rows.Count > 0))
|
||||
{
|
||||
cbResultList.Properties.Items.Clear();
|
||||
|
||||
for (int i = 0; i < dtBmsData.Rows.Count; i++)
|
||||
{
|
||||
cbResultList.Properties.Items.Add(String.Format("{0}", dtBmsData.Rows[i]["pcb_sn"]));
|
||||
}
|
||||
gridCell.DataSource = dtBmsData;
|
||||
edResultCount.Text = dtBmsData.Rows.Count.ToString();
|
||||
cbResultList.SelectedIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(String.Format("No TModuleResult data - {0}", dbFilePath));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
}
|
||||
}
|
||||
private void btnResultListClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
cbResultList.Properties.Items.Clear();
|
||||
}
|
||||
|
||||
private void btnBmsDuplicateCheck_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<string> result = new List<string>();
|
||||
DateTime aDate = DateTime.Now;
|
||||
|
||||
DataTable dtBattPropValue = new DataTable();
|
||||
DataTable dtBmsMatch = new DataTable();
|
||||
DataTable dtErrorLog = new DataTable();
|
||||
|
||||
string dbFilePath = dbFiles[cbLotNo.SelectedIndex]; ;
|
||||
string sql;
|
||||
|
||||
sql = String.Format("SELECT * FROM TBattPropValue");
|
||||
dtBattPropValue = csDbUtils.DbSqlExcuteA3(dbFilePath, sql);
|
||||
dtBattPropValue.TableName = "TBattPropValue";
|
||||
|
||||
if (dtBattPropValue.Rows.Count == 0)
|
||||
{
|
||||
MessageBox.Show("No Battery Property Vaule data", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
Forms.fmxWait WaitForm = new Forms.fmxWait
|
||||
{
|
||||
StartPosition = FormStartPosition.CenterScreen
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
WaitForm.Show();
|
||||
|
||||
sql = String.Format("SELECT * FROM TBmsPcbMatchTable");
|
||||
dtBmsMatch = csDbUtils.DbSqlExcuteA3(dbFilePath, sql);
|
||||
dtBmsMatch.TableName = "TBmsPcbMatchTable";
|
||||
|
||||
for (int i = 0; i < dtBattPropValue.Rows.Count; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
csDbUtils.BmsPcbMatchDataInsert(dbFilePath, dtBattPropValue.Rows[i]);
|
||||
}
|
||||
catch (SQLiteException sqle)
|
||||
{
|
||||
// Handle DB exception
|
||||
string eMsg = String.Format("[{0}]{1} - [{2:##0}] - {3}", sqle.ErrorCode, sqle.Message, i, dtBattPropValue.Rows[i]["PCB1_SERIAL_NUMBER"]);
|
||||
result.Add(eMsg);
|
||||
csDbUtils.ErrorLogInsert(dbFilePath, dtBattPropValue.Rows[i], "DUPLICATION CHECK", "SQLiteException", eMsg);
|
||||
}
|
||||
catch (IndexOutOfRangeException ie)
|
||||
{
|
||||
// If you think there might be a problem with index range in the loop, for example
|
||||
string eMsg = String.Format("{0} - [{1:##0}] - {2}", ie.Message, i, dtBattPropValue.Rows[i]["PCB1_SERIAL_NUMBER"]);
|
||||
result.Add(eMsg);
|
||||
csDbUtils.ErrorLogInsert(dbFilePath, dtBattPropValue.Rows[i], "DUPLICATION CHECK", "IndexOutOfRangeException", eMsg);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string eMsg = String.Format("{0} - [{1:##0}] - {2}", ex.Message, i, dtBattPropValue.Rows[i]["PCB1_SERIAL_NUMBER"]);
|
||||
result.Add(eMsg);
|
||||
csDbUtils.ErrorLogInsert(dbFilePath, dtBattPropValue.Rows[i], "DUPLICATION CHECK", "Exception", eMsg);
|
||||
}
|
||||
WaitForm.SetDescription(String.Format("{0}//{1}", i + 1, dtBattPropValue.Rows.Count));
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
sql = String.Format("SELECT * FROM TErrorLogTable");
|
||||
dtErrorLog = csDbUtils.DbSqlExcuteA3(dbFilePath, sql);
|
||||
dtErrorLog.TableName = "TErrorLogTable";
|
||||
|
||||
gridCell.DataSource = dtErrorLog;
|
||||
|
||||
if (WaitForm != null)
|
||||
WaitForm.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void btnOpenDbFolder_Click(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process ps = new System.Diagnostics.Process();
|
||||
ps.StartInfo.FileName = "explorer.exe";
|
||||
ps.StartInfo.Arguments = csDbUtils.GetDbFolder(Application.ExecutablePath);
|
||||
ps.StartInfo.WorkingDirectory = csDbUtils.GetDbFolder(Application.ExecutablePath);
|
||||
ps.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
|
||||
|
||||
ps.Start();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region COMPONENT EVETNT
|
||||
private void cbResultList_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
string tbName = "";
|
||||
tbName = cbResultList.Text;
|
||||
|
||||
if ((dtCell != null) && (dtCell.Rows.Count > 0))
|
||||
{
|
||||
if (tbName != "")
|
||||
{
|
||||
int index = cbResultList.SelectedIndex;
|
||||
dtCell = dsCell.Tables[index];
|
||||
gridCell.DataSource = dtCell;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region MAKE OUTPUT FUNCTION
|
||||
private void MakeOutpuDataExcel(string mSN, string dbFile)
|
||||
{
|
||||
DateTime aDate = DateTime.Now;
|
||||
string filename = String.Format("{0}_PR_57150.xls", mSN);
|
||||
string filepath =
|
||||
Path.GetDirectoryName(Application.ExecutablePath)
|
||||
+ String.Format(@"\output\{0}\", csDbUtils.MakeMdSnLotNumber(mSN))
|
||||
+ filename;
|
||||
|
||||
DataTable dtModuleResult = new DataTable();
|
||||
DataTable dtCellResult = new DataTable();
|
||||
|
||||
string sql;
|
||||
sql = String.Format("SELECT * FROM TModuleResult where m_sn = {0}", mSN);
|
||||
dtModuleResult = csDbUtils.GetDataTableBySelectFromDbName(dbFile, sql, "TModuleResult");
|
||||
dtModuleResult.TableName = "TModuleResult";
|
||||
dtModuleResult.AcceptChanges();
|
||||
|
||||
sql = String.Format("SELECT * FROM TCellResult where m_sn = {0}", mSN);
|
||||
dtCellResult = csDbUtils.GetDataTableBySelectFromDbName(dbFile, sql, "TCellResult");
|
||||
dtCellResult.TableName = "TCellResult";
|
||||
dtCellResult.AcceptChanges();
|
||||
|
||||
if (dtModuleResult.Rows.Count == 0) throw new Exception(String.Format("No ModuleResult data ({0})", mSN));
|
||||
if (dtCellResult.Rows.Count == 0) throw new Exception(String.Format("No CellResult data ({0})", mSN));
|
||||
|
||||
csExcelExport.ExportToExcel(dtModuleResult, filepath);
|
||||
csExcelExport.ExportToExcel(dtCellResult, filepath, false);
|
||||
}
|
||||
|
||||
private DataTable GetModuleResultTable(string dbFileName)
|
||||
{
|
||||
DateTime aDate = DateTime.Now;
|
||||
|
||||
DataTable dtModuleResult = new DataTable();
|
||||
|
||||
string sql;
|
||||
sql = String.Format("SELECT * FROM TModuleResult");
|
||||
dtModuleResult = csDbUtils.GetDataTableBySelectFromDbName(dbFileName, sql, "TModuleResult");
|
||||
dtModuleResult.TableName = "TModuleResult";
|
||||
dtModuleResult.AcceptChanges();
|
||||
|
||||
if (dtModuleResult.Rows.Count == 0) throw new Exception(String.Format("No ModuleResult data ({0})", dbFileName));
|
||||
|
||||
return dtModuleResult;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
private void MakeBattPropValue()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
4571
LFP_Manager_PRM/Forms/fmxExcelFile.resx
Normal file
4571
LFP_Manager_PRM/Forms/fmxExcelFile.resx
Normal file
File diff suppressed because it is too large
Load Diff
291
LFP_Manager_PRM/Forms/fmxFwImageConverter.Designer.cs
generated
Normal file
291
LFP_Manager_PRM/Forms/fmxFwImageConverter.Designer.cs
generated
Normal file
@@ -0,0 +1,291 @@
|
||||
namespace LFP_Manager
|
||||
{
|
||||
partial class fmxFwImageConverter
|
||||
{
|
||||
/// <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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fmxFwImageConverter));
|
||||
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.lbFileInfo = new System.Windows.Forms.Label();
|
||||
this.btnClose = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnConvert = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnFileFind = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.teFileName = new DevExpress.XtraEditors.TextEdit();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.lcItemFileName = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lbFileName = new DevExpress.XtraLayout.SimpleLabelItem();
|
||||
this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.teFileName.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcItemFileName)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbFileName)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.lbFileInfo);
|
||||
this.layoutControl1.Controls.Add(this.btnClose);
|
||||
this.layoutControl1.Controls.Add(this.btnConvert);
|
||||
this.layoutControl1.Controls.Add(this.btnFileFind);
|
||||
this.layoutControl1.Controls.Add(this.teFileName);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(995, 203, 250, 350);
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(503, 333);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// lbFileInfo
|
||||
//
|
||||
this.lbFileInfo.Location = new System.Drawing.Point(12, 70);
|
||||
this.lbFileInfo.Name = "lbFileInfo";
|
||||
this.lbFileInfo.Size = new System.Drawing.Size(295, 214);
|
||||
this.lbFileInfo.TabIndex = 12;
|
||||
this.lbFileInfo.Text = "File Information";
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Location = new System.Drawing.Point(254, 288);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(237, 33);
|
||||
this.btnClose.StyleController = this.layoutControl1;
|
||||
this.btnClose.TabIndex = 11;
|
||||
this.btnClose.Text = "Close";
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// btnConvert
|
||||
//
|
||||
this.btnConvert.Location = new System.Drawing.Point(12, 288);
|
||||
this.btnConvert.Name = "btnConvert";
|
||||
this.btnConvert.Size = new System.Drawing.Size(238, 33);
|
||||
this.btnConvert.StyleController = this.layoutControl1;
|
||||
this.btnConvert.TabIndex = 10;
|
||||
this.btnConvert.Text = "Image Convert";
|
||||
this.btnConvert.Click += new System.EventHandler(this.btnConvert_Click);
|
||||
//
|
||||
// btnFileFind
|
||||
//
|
||||
this.btnFileFind.Location = new System.Drawing.Point(402, 12);
|
||||
this.btnFileFind.Name = "btnFileFind";
|
||||
this.btnFileFind.Size = new System.Drawing.Size(89, 25);
|
||||
this.btnFileFind.StyleController = this.layoutControl1;
|
||||
this.btnFileFind.TabIndex = 5;
|
||||
this.btnFileFind.Text = "Find ...";
|
||||
this.btnFileFind.Click += new System.EventHandler(this.btnFileFind_Click);
|
||||
//
|
||||
// teFileName
|
||||
//
|
||||
this.teFileName.Location = new System.Drawing.Point(92, 12);
|
||||
this.teFileName.Name = "teFileName";
|
||||
this.teFileName.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 11F);
|
||||
this.teFileName.Properties.Appearance.Options.UseFont = true;
|
||||
this.teFileName.Size = new System.Drawing.Size(306, 24);
|
||||
this.teFileName.StyleController = this.layoutControl1;
|
||||
this.teFileName.TabIndex = 4;
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "Root";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.lcItemFileName,
|
||||
this.emptySpaceItem1,
|
||||
this.layoutControlItem1,
|
||||
this.lbFileName,
|
||||
this.emptySpaceItem2,
|
||||
this.layoutControlItem6,
|
||||
this.layoutControlItem7,
|
||||
this.layoutControlItem8});
|
||||
this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlGroup1.Name = "Root";
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(503, 333);
|
||||
this.layoutControlGroup1.Text = "Root";
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// lcItemFileName
|
||||
//
|
||||
this.lcItemFileName.Control = this.teFileName;
|
||||
this.lcItemFileName.CustomizationFormText = "File Name : ";
|
||||
this.lcItemFileName.Location = new System.Drawing.Point(80, 0);
|
||||
this.lcItemFileName.MaxSize = new System.Drawing.Size(0, 29);
|
||||
this.lcItemFileName.MinSize = new System.Drawing.Size(163, 29);
|
||||
this.lcItemFileName.Name = "lcItemFileName";
|
||||
this.lcItemFileName.Size = new System.Drawing.Size(310, 29);
|
||||
this.lcItemFileName.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lcItemFileName.Text = "File Name : ";
|
||||
this.lcItemFileName.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.lcItemFileName.TextToControlDistance = 0;
|
||||
this.lcItemFileName.TextVisible = false;
|
||||
//
|
||||
// emptySpaceItem1
|
||||
//
|
||||
this.emptySpaceItem1.AllowHotTrack = false;
|
||||
this.emptySpaceItem1.CustomizationFormText = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Location = new System.Drawing.Point(299, 58);
|
||||
this.emptySpaceItem1.Name = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Size = new System.Drawing.Size(184, 218);
|
||||
this.emptySpaceItem1.Text = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.btnFileFind;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(390, 0);
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(93, 29);
|
||||
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem1.Text = "layoutControlItem1";
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextToControlDistance = 0;
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// lbFileName
|
||||
//
|
||||
this.lbFileName.AllowHotTrack = false;
|
||||
this.lbFileName.CustomizationFormText = "File Name";
|
||||
this.lbFileName.Location = new System.Drawing.Point(0, 0);
|
||||
this.lbFileName.MaxSize = new System.Drawing.Size(0, 29);
|
||||
this.lbFileName.MinSize = new System.Drawing.Size(80, 29);
|
||||
this.lbFileName.Name = "lbFileName";
|
||||
this.lbFileName.Size = new System.Drawing.Size(80, 29);
|
||||
this.lbFileName.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lbFileName.Text = "File Name";
|
||||
this.lbFileName.TextSize = new System.Drawing.Size(52, 14);
|
||||
//
|
||||
// emptySpaceItem2
|
||||
//
|
||||
this.emptySpaceItem2.AllowHotTrack = false;
|
||||
this.emptySpaceItem2.CustomizationFormText = "emptySpaceItem2";
|
||||
this.emptySpaceItem2.Location = new System.Drawing.Point(0, 29);
|
||||
this.emptySpaceItem2.Name = "emptySpaceItem2";
|
||||
this.emptySpaceItem2.Size = new System.Drawing.Size(483, 29);
|
||||
this.emptySpaceItem2.Text = "emptySpaceItem2";
|
||||
this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// layoutControlItem6
|
||||
//
|
||||
this.layoutControlItem6.Control = this.btnConvert;
|
||||
this.layoutControlItem6.CustomizationFormText = "layoutControlItem6";
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(0, 276);
|
||||
this.layoutControlItem6.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem6.Name = "layoutControlItem6";
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(242, 37);
|
||||
this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem6.Text = "layoutControlItem6";
|
||||
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem6.TextToControlDistance = 0;
|
||||
this.layoutControlItem6.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem7
|
||||
//
|
||||
this.layoutControlItem7.Control = this.btnClose;
|
||||
this.layoutControlItem7.CustomizationFormText = "layoutControlItem7";
|
||||
this.layoutControlItem7.Location = new System.Drawing.Point(242, 276);
|
||||
this.layoutControlItem7.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem7.Name = "layoutControlItem7";
|
||||
this.layoutControlItem7.Size = new System.Drawing.Size(241, 37);
|
||||
this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem7.Text = "layoutControlItem7";
|
||||
this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem7.TextToControlDistance = 0;
|
||||
this.layoutControlItem7.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem8
|
||||
//
|
||||
this.layoutControlItem8.Control = this.lbFileInfo;
|
||||
this.layoutControlItem8.CustomizationFormText = "layoutControlItem8";
|
||||
this.layoutControlItem8.Location = new System.Drawing.Point(0, 58);
|
||||
this.layoutControlItem8.Name = "layoutControlItem8";
|
||||
this.layoutControlItem8.Size = new System.Drawing.Size(299, 218);
|
||||
this.layoutControlItem8.Text = "layoutControlItem8";
|
||||
this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem8.TextToControlDistance = 0;
|
||||
this.layoutControlItem8.TextVisible = false;
|
||||
//
|
||||
// fmxFwImageConverter
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(503, 333);
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "fmxFwImageConverter";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Firmware Image Converter";
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.teFileName.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcItemFileName)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lbFileName)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.TextEdit teFileName;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcItemFileName;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnFileFind;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraLayout.SimpleLabelItem lbFileName;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
|
||||
private DevExpress.XtraEditors.SimpleButton btnClose;
|
||||
private DevExpress.XtraEditors.SimpleButton btnConvert;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
|
||||
private System.Windows.Forms.Label lbFileInfo;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
|
||||
}
|
||||
}
|
||||
259
LFP_Manager_PRM/Forms/fmxFwImageConverter.cs
Normal file
259
LFP_Manager_PRM/Forms/fmxFwImageConverter.cs
Normal file
@@ -0,0 +1,259 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using System.IO;
|
||||
|
||||
using LFP_Manager.Utils;
|
||||
|
||||
namespace LFP_Manager
|
||||
{
|
||||
public partial class fmxFwImageConverter : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
#region CONST
|
||||
|
||||
//const
|
||||
// mFileMaxSize : DWORD = 262144; // 256KByte
|
||||
// sFileMaxSize : DWORD = 131072; // 128KByte
|
||||
|
||||
// ImageCode : DWORD = $53454355;
|
||||
// ImageEmpty : DWORD = $00000000;
|
||||
// MasterOnly : DWORD = $00000001;
|
||||
// SlaveOnly : DWORD = $00000002;
|
||||
// MasterSlave : DWORD = $00000003;
|
||||
const UInt32 mFileMaxSize = 262144; // 256KBytes
|
||||
const UInt32 ImageCode = 0x6D424D53; // mBMS
|
||||
const UInt32 ImageEmpty = 0x00000000; //
|
||||
|
||||
const UInt32 POLYNOMIAL = 0x04C11DB7;
|
||||
|
||||
#endregion
|
||||
|
||||
#region STRUCTURE
|
||||
//TImageHeaderStructure = packed record
|
||||
// ImageCode : DWORD;
|
||||
// ImageType : DWORD;
|
||||
// mImageSize : DWORD;
|
||||
// mImageName : array[0..31]of Byte;
|
||||
// mImageVersion : TImageVersionStructure;
|
||||
// mImageCRC : DWORD;
|
||||
// sImageSize : DWORD;
|
||||
// sImageName : array[0..31]of Byte;
|
||||
// sImageVersion : TImageVersionStructure;
|
||||
// sImageCRC : DWORD;
|
||||
// reserved : array[0..927]of Byte;
|
||||
//end;
|
||||
struct TImageHeaderStructure // Total 64bytes
|
||||
{
|
||||
public UInt32 ImageCode; // 4
|
||||
public UInt32 ImageType; // 4
|
||||
public UInt32 ImageSize; // 4
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
||||
public byte[] ImageName; // 32
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
|
||||
public byte[] ImageVersion; // 4
|
||||
public UInt32 ImageCRC; // 4
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
|
||||
public byte[] reserved; // 12
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region VARIABLES
|
||||
|
||||
TImageHeaderStructure fwHeader;
|
||||
byte[] fwdata;
|
||||
|
||||
UInt32[] crc_table;
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public fmxFwImageConverter()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
crc_table = new UInt32[256];
|
||||
|
||||
gen_crc_table();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/* generate the table of CRC remainders for all possible bytes */
|
||||
void gen_crc_table()
|
||||
{
|
||||
int i, j;
|
||||
UInt32 crc_accum;
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
crc_accum = ((UInt32)i << 24);
|
||||
|
||||
for (j = 0; j < 8; j++) {
|
||||
if ((crc_accum & 0x80000000) != 0)
|
||||
crc_accum = (crc_accum << 1) ^ POLYNOMIAL;
|
||||
else
|
||||
crc_accum = (crc_accum << 1);
|
||||
crc_table[i] = crc_accum;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* update the CRC on the data block one byte at a time */
|
||||
UInt32 update_crc(UInt32 crc_accum, byte[] data_blk_ptr, UInt32 data_blk_size)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
for (j = 0; j < data_blk_size; j++)
|
||||
{
|
||||
i = ((int)(crc_accum >> 24) ^ data_blk_ptr[j]) & 0xff;
|
||||
crc_accum = (crc_accum << 8) ^ crc_table[i];
|
||||
}
|
||||
return crc_accum;
|
||||
}
|
||||
|
||||
byte[] getBytes(TImageHeaderStructure header)
|
||||
{
|
||||
int size = Marshal.SizeOf(header);
|
||||
byte[] arr = new byte[size];
|
||||
|
||||
IntPtr ptr = Marshal.AllocHGlobal(size);
|
||||
Marshal.StructureToPtr(header, ptr, true);
|
||||
Marshal.Copy(ptr, arr, 0, size);
|
||||
Marshal.FreeHGlobal(ptr);
|
||||
return arr;
|
||||
}
|
||||
|
||||
bool MakeFwImageFile(byte[] fData, string AppPath, string FileName)
|
||||
{
|
||||
FileStream aFile = null;
|
||||
string path = System.IO.Path.GetDirectoryName(AppPath);
|
||||
string aFileName = String.Format("{0}\\{1}", path, FileName);
|
||||
|
||||
bool result = false;
|
||||
|
||||
if (File.Exists(aFileName) == false)
|
||||
{
|
||||
try
|
||||
{
|
||||
aFile = new FileStream(aFileName, FileMode.CreateNew, FileAccess.ReadWrite);
|
||||
aFile.Write(fData, 0, fData.Length);
|
||||
aFile.Close();
|
||||
|
||||
result = true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#region BUNTTON EVENT
|
||||
|
||||
private void btnFileFind_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog oDialog;
|
||||
|
||||
oDialog = new OpenFileDialog();
|
||||
oDialog.DefaultExt = "*.*";
|
||||
oDialog.Filter = "bin files (*.bin)|*.bin|All files (*.*)|*.*";
|
||||
|
||||
if (oDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
teFileName.Text = oDialog.FileName;
|
||||
|
||||
FileStream fwFile = new FileStream(teFileName.Text, FileMode.Open, FileAccess.Read);
|
||||
long fsize = fwFile.Length;
|
||||
|
||||
if (fsize > 0)
|
||||
{
|
||||
fwdata = new byte[fsize];
|
||||
fwFile.Seek(0, SeekOrigin.Begin);
|
||||
fwFile.Read(fwdata, 0, (int)fsize);
|
||||
}
|
||||
fwFile.Close();
|
||||
|
||||
byte[] bName = csUtils.StringToByte(Path.GetFileName(teFileName.Text));
|
||||
|
||||
fwHeader = new TImageHeaderStructure();
|
||||
fwHeader.ImageCode = ImageCode;
|
||||
fwHeader.ImageType = 0x00000001;
|
||||
fwHeader.ImageSize = (UInt32)fsize;
|
||||
fwHeader.ImageName = new byte[32];
|
||||
Buffer.BlockCopy(bName, 0, fwHeader.ImageName, 0, bName.Length);
|
||||
fwHeader.ImageCRC = update_crc(fwHeader.ImageCRC, fwdata, fwHeader.ImageSize);
|
||||
fwHeader.reserved = new byte[12];
|
||||
|
||||
if (bName.Length > 8)
|
||||
{
|
||||
fwHeader.ImageVersion = new byte[4];
|
||||
|
||||
UInt32 nPC = (UInt32)((fwdata[0] << 0) | (fwdata[1] << 8) | (fwdata[2] << 16) | (fwdata[3] << 24));
|
||||
UInt32 nSP = (UInt32)((fwdata[4] << 0) | (fwdata[5] << 8) | (fwdata[6] << 16) | (fwdata[7] << 24));
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
fwHeader.ImageVersion[i] = (byte)(bName[bName.Length - 1 - 3 - 4 + i] - 0x30);
|
||||
|
||||
lbFileInfo.Text = String.Format("File Information");
|
||||
lbFileInfo.Text += String.Format("\r\n - Filename: {0}", Encoding.UTF8.GetString(fwHeader.ImageName).Trim('\0'));
|
||||
lbFileInfo.Text += String.Format("\r\n - File Version: V{0}.{1}.{2}.{3}", fwHeader.ImageVersion[0], fwHeader.ImageVersion[1], fwHeader.ImageVersion[2], fwHeader.ImageVersion[3]);
|
||||
lbFileInfo.Text += String.Format("\r\n - File Size: {0:#,##0} bytes", fwHeader.ImageSize);
|
||||
lbFileInfo.Text += String.Format("\r\n - File CRC32: 0x{0:X8}", fwHeader.ImageCRC);
|
||||
lbFileInfo.Text += String.Format("\r\n - Packet Size: {0:#,##0} packets", fwHeader.ImageSize / 2048);
|
||||
lbFileInfo.Text += String.Format("\r\n - Last packet: {0:#,##0}", fwHeader.ImageSize % 2048);
|
||||
|
||||
lbFileInfo.Text += String.Format("\r\n - PC: 0x{0:X8}", nPC);
|
||||
lbFileInfo.Text += String.Format("\r\n - SP: 0x{0:X8}", nSP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void btnConvert_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (fwHeader.ImageSize > 0)
|
||||
{
|
||||
byte[] bHeader = getBytes(fwHeader);
|
||||
byte[] cFwData = new byte[bHeader.Length + fwdata.Length];
|
||||
|
||||
Buffer.BlockCopy(bHeader, 0, cFwData, 0, 64);
|
||||
Buffer.BlockCopy(fwdata, 0, cFwData, 64, fwdata.Length);
|
||||
|
||||
string nFileName = String.Format("mBMS_APP_DL_V{0}{1}{2}{3}.bin"
|
||||
, fwHeader.ImageVersion[0]
|
||||
, fwHeader.ImageVersion[1]
|
||||
, fwHeader.ImageVersion[2]
|
||||
, fwHeader.ImageVersion[3]
|
||||
);
|
||||
|
||||
if (MakeFwImageFile(cFwData, teFileName.Text, nFileName))
|
||||
{
|
||||
MessageBox.Show("Firmware Image Convert Success !!", "FwUpdate", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Firmware Image Convert Fail !!", "FwUpdate", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please select firmware file !!", "FwUpdate", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
4571
LFP_Manager_PRM/Forms/fmxFwImageConverter.resx
Normal file
4571
LFP_Manager_PRM/Forms/fmxFwImageConverter.resx
Normal file
File diff suppressed because it is too large
Load Diff
534
LFP_Manager_PRM/Forms/fmxFwUpdate.Designer.cs
generated
Normal file
534
LFP_Manager_PRM/Forms/fmxFwUpdate.Designer.cs
generated
Normal file
@@ -0,0 +1,534 @@
|
||||
namespace LFP_Manager
|
||||
{
|
||||
partial class fmxFwUpdate
|
||||
{
|
||||
/// <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();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fmxFwUpdate));
|
||||
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.teModuleNo = new DevExpress.XtraEditors.TextEdit();
|
||||
this.btnRestart = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.lbUpdateStatus = new DevExpress.XtraEditors.LabelControl();
|
||||
this.lbUpdateProgress = new DevExpress.XtraEditors.LabelControl();
|
||||
this.pgUpdate = new DevExpress.XtraEditors.ProgressBarControl();
|
||||
this.lbUpdateTime = new DevExpress.XtraEditors.LabelControl();
|
||||
this.lbFileInfo = new DevExpress.XtraEditors.LabelControl();
|
||||
this.btnFwUpdate = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnClose = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnFind = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.edFilename = new DevExpress.XtraEditors.TextEdit();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem3 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.emptySpaceItem4 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.tmrFirmwareUpdate = new System.Windows.Forms.Timer(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.teModuleNo.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pgUpdate.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edFilename.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.teModuleNo);
|
||||
this.layoutControl1.Controls.Add(this.btnRestart);
|
||||
this.layoutControl1.Controls.Add(this.lbUpdateStatus);
|
||||
this.layoutControl1.Controls.Add(this.lbUpdateProgress);
|
||||
this.layoutControl1.Controls.Add(this.pgUpdate);
|
||||
this.layoutControl1.Controls.Add(this.lbUpdateTime);
|
||||
this.layoutControl1.Controls.Add(this.lbFileInfo);
|
||||
this.layoutControl1.Controls.Add(this.btnFwUpdate);
|
||||
this.layoutControl1.Controls.Add(this.btnClose);
|
||||
this.layoutControl1.Controls.Add(this.btnFind);
|
||||
this.layoutControl1.Controls.Add(this.edFilename);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1092, 323, 626, 350);
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(736, 500);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// teModuleNo
|
||||
//
|
||||
this.teModuleNo.EditValue = "1";
|
||||
this.teModuleNo.Location = new System.Drawing.Point(473, 55);
|
||||
this.teModuleNo.Name = "teModuleNo";
|
||||
this.teModuleNo.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.teModuleNo.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.teModuleNo.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
|
||||
this.teModuleNo.Size = new System.Drawing.Size(60, 20);
|
||||
this.teModuleNo.StyleController = this.layoutControl1;
|
||||
this.teModuleNo.TabIndex = 18;
|
||||
this.teModuleNo.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextBox_KeyPress);
|
||||
//
|
||||
// btnRestart
|
||||
//
|
||||
this.btnRestart.Location = new System.Drawing.Point(535, 290);
|
||||
this.btnRestart.Name = "btnRestart";
|
||||
this.btnRestart.Size = new System.Drawing.Size(189, 26);
|
||||
this.btnRestart.StyleController = this.layoutControl1;
|
||||
this.btnRestart.TabIndex = 17;
|
||||
this.btnRestart.Text = "Restart";
|
||||
this.btnRestart.Click += new System.EventHandler(this.btnRestart_Click);
|
||||
//
|
||||
// lbUpdateStatus
|
||||
//
|
||||
this.lbUpdateStatus.Location = new System.Drawing.Point(8, 353);
|
||||
this.lbUpdateStatus.Name = "lbUpdateStatus";
|
||||
this.lbUpdateStatus.Size = new System.Drawing.Size(525, 30);
|
||||
this.lbUpdateStatus.StyleController = this.layoutControl1;
|
||||
this.lbUpdateStatus.TabIndex = 16;
|
||||
this.lbUpdateStatus.Text = "Update Status : ";
|
||||
//
|
||||
// lbUpdateProgress
|
||||
//
|
||||
this.lbUpdateProgress.Appearance.Options.UseTextOptions = true;
|
||||
this.lbUpdateProgress.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.lbUpdateProgress.Location = new System.Drawing.Point(537, 387);
|
||||
this.lbUpdateProgress.Name = "lbUpdateProgress";
|
||||
this.lbUpdateProgress.Size = new System.Drawing.Size(191, 27);
|
||||
this.lbUpdateProgress.StyleController = this.layoutControl1;
|
||||
this.lbUpdateProgress.TabIndex = 15;
|
||||
this.lbUpdateProgress.Text = "0/0 bytes";
|
||||
//
|
||||
// pgUpdate
|
||||
//
|
||||
this.pgUpdate.Location = new System.Drawing.Point(8, 418);
|
||||
this.pgUpdate.Name = "pgUpdate";
|
||||
this.pgUpdate.Size = new System.Drawing.Size(720, 37);
|
||||
this.pgUpdate.StyleController = this.layoutControl1;
|
||||
this.pgUpdate.TabIndex = 14;
|
||||
//
|
||||
// lbUpdateTime
|
||||
//
|
||||
this.lbUpdateTime.Location = new System.Drawing.Point(8, 387);
|
||||
this.lbUpdateTime.Name = "lbUpdateTime";
|
||||
this.lbUpdateTime.Size = new System.Drawing.Size(525, 27);
|
||||
this.lbUpdateTime.StyleController = this.layoutControl1;
|
||||
this.lbUpdateTime.TabIndex = 13;
|
||||
this.lbUpdateTime.Text = "00:00";
|
||||
//
|
||||
// lbFileInfo
|
||||
//
|
||||
this.lbFileInfo.Appearance.Options.UseTextOptions = true;
|
||||
this.lbFileInfo.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Top;
|
||||
this.lbFileInfo.Location = new System.Drawing.Point(12, 106);
|
||||
this.lbFileInfo.Name = "lbFileInfo";
|
||||
this.lbFileInfo.Size = new System.Drawing.Size(519, 151);
|
||||
this.lbFileInfo.StyleController = this.layoutControl1;
|
||||
this.lbFileInfo.TabIndex = 12;
|
||||
this.lbFileInfo.Text = "File Information";
|
||||
//
|
||||
// btnFwUpdate
|
||||
//
|
||||
this.btnFwUpdate.Location = new System.Drawing.Point(537, 55);
|
||||
this.btnFwUpdate.Name = "btnFwUpdate";
|
||||
this.btnFwUpdate.Size = new System.Drawing.Size(191, 22);
|
||||
this.btnFwUpdate.StyleController = this.layoutControl1;
|
||||
this.btnFwUpdate.TabIndex = 8;
|
||||
this.btnFwUpdate.Text = "Firmware Update";
|
||||
this.btnFwUpdate.Click += new System.EventHandler(this.btnFwUpdate_Click);
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Location = new System.Drawing.Point(4, 463);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(728, 33);
|
||||
this.btnClose.StyleController = this.layoutControl1;
|
||||
this.btnClose.TabIndex = 6;
|
||||
this.btnClose.Text = "CLOSE";
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// btnFind
|
||||
//
|
||||
this.btnFind.Location = new System.Drawing.Point(537, 29);
|
||||
this.btnFind.Name = "btnFind";
|
||||
this.btnFind.Size = new System.Drawing.Size(191, 22);
|
||||
this.btnFind.StyleController = this.layoutControl1;
|
||||
this.btnFind.TabIndex = 5;
|
||||
this.btnFind.Text = "Find File...";
|
||||
this.btnFind.Click += new System.EventHandler(this.btnFind_Click);
|
||||
//
|
||||
// edFilename
|
||||
//
|
||||
this.edFilename.Location = new System.Drawing.Point(88, 29);
|
||||
this.edFilename.Name = "edFilename";
|
||||
this.edFilename.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
|
||||
this.edFilename.Properties.Appearance.Options.UseFont = true;
|
||||
this.edFilename.Size = new System.Drawing.Size(445, 22);
|
||||
this.edFilename.StyleController = this.layoutControl1;
|
||||
this.edFilename.TabIndex = 4;
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem3,
|
||||
this.layoutControlGroup2,
|
||||
this.layoutControlGroup3});
|
||||
this.layoutControlGroup1.Name = "Root";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(736, 500);
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.btnClose;
|
||||
this.layoutControlItem3.CustomizationFormText = "layoutControlItem3";
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(0, 459);
|
||||
this.layoutControlItem3.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(732, 37);
|
||||
this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem3.TextVisible = false;
|
||||
//
|
||||
// layoutControlGroup2
|
||||
//
|
||||
this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem10,
|
||||
this.layoutControlItem11,
|
||||
this.layoutControlItem9,
|
||||
this.emptySpaceItem2,
|
||||
this.layoutControlItem12});
|
||||
this.layoutControlGroup2.Location = new System.Drawing.Point(0, 324);
|
||||
this.layoutControlGroup2.Name = "layoutControlGroup2";
|
||||
this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup2.Size = new System.Drawing.Size(732, 135);
|
||||
this.layoutControlGroup2.Text = "Update Status";
|
||||
//
|
||||
// layoutControlItem10
|
||||
//
|
||||
this.layoutControlItem10.Control = this.pgUpdate;
|
||||
this.layoutControlItem10.CustomizationFormText = "layoutControlItem10";
|
||||
this.layoutControlItem10.Location = new System.Drawing.Point(0, 65);
|
||||
this.layoutControlItem10.MinSize = new System.Drawing.Size(54, 16);
|
||||
this.layoutControlItem10.Name = "layoutControlItem10";
|
||||
this.layoutControlItem10.Size = new System.Drawing.Size(724, 41);
|
||||
this.layoutControlItem10.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem10.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem10.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem11
|
||||
//
|
||||
this.layoutControlItem11.Control = this.lbUpdateProgress;
|
||||
this.layoutControlItem11.CustomizationFormText = "layoutControlItem11";
|
||||
this.layoutControlItem11.Location = new System.Drawing.Point(529, 34);
|
||||
this.layoutControlItem11.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem11.Name = "layoutControlItem11";
|
||||
this.layoutControlItem11.Size = new System.Drawing.Size(195, 31);
|
||||
this.layoutControlItem11.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem11.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem9
|
||||
//
|
||||
this.layoutControlItem9.Control = this.lbUpdateTime;
|
||||
this.layoutControlItem9.CustomizationFormText = "layoutControlItem9";
|
||||
this.layoutControlItem9.Location = new System.Drawing.Point(0, 34);
|
||||
this.layoutControlItem9.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem9.Name = "layoutControlItem9";
|
||||
this.layoutControlItem9.Size = new System.Drawing.Size(529, 31);
|
||||
this.layoutControlItem9.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem9.TextVisible = false;
|
||||
//
|
||||
// emptySpaceItem2
|
||||
//
|
||||
this.emptySpaceItem2.AllowHotTrack = false;
|
||||
this.emptySpaceItem2.CustomizationFormText = "emptySpaceItem2";
|
||||
this.emptySpaceItem2.Location = new System.Drawing.Point(529, 0);
|
||||
this.emptySpaceItem2.Name = "emptySpaceItem2";
|
||||
this.emptySpaceItem2.Size = new System.Drawing.Size(195, 34);
|
||||
this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// layoutControlItem12
|
||||
//
|
||||
this.layoutControlItem12.Control = this.lbUpdateStatus;
|
||||
this.layoutControlItem12.CustomizationFormText = "layoutControlItem12";
|
||||
this.layoutControlItem12.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem12.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem12.Name = "layoutControlItem12";
|
||||
this.layoutControlItem12.Size = new System.Drawing.Size(529, 34);
|
||||
this.layoutControlItem12.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem12.TextVisible = false;
|
||||
//
|
||||
// layoutControlGroup3
|
||||
//
|
||||
this.layoutControlGroup3.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem5,
|
||||
this.layoutControlItem6,
|
||||
this.emptySpaceItem3,
|
||||
this.layoutControlItem2,
|
||||
this.layoutControlItem1,
|
||||
this.layoutControlGroup4,
|
||||
this.layoutControlGroup5});
|
||||
this.layoutControlGroup3.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlGroup3.Name = "layoutControlGroup3";
|
||||
this.layoutControlGroup3.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup3.Size = new System.Drawing.Size(732, 324);
|
||||
this.layoutControlGroup3.Text = "Update Command";
|
||||
//
|
||||
// layoutControlItem5
|
||||
//
|
||||
this.layoutControlItem5.Control = this.btnFwUpdate;
|
||||
this.layoutControlItem5.CustomizationFormText = "layoutControlItem5";
|
||||
this.layoutControlItem5.Location = new System.Drawing.Point(529, 26);
|
||||
this.layoutControlItem5.MinSize = new System.Drawing.Size(108, 26);
|
||||
this.layoutControlItem5.Name = "layoutControlItem5";
|
||||
this.layoutControlItem5.Size = new System.Drawing.Size(195, 26);
|
||||
this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem5.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem6
|
||||
//
|
||||
this.layoutControlItem6.Control = this.teModuleNo;
|
||||
this.layoutControlItem6.CustomizationFormText = "Module No";
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(385, 26);
|
||||
this.layoutControlItem6.Name = "layoutControlItem6";
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(144, 26);
|
||||
this.layoutControlItem6.Text = "Module No";
|
||||
this.layoutControlItem6.TextSize = new System.Drawing.Size(68, 14);
|
||||
//
|
||||
// emptySpaceItem3
|
||||
//
|
||||
this.emptySpaceItem3.AllowHotTrack = false;
|
||||
this.emptySpaceItem3.CustomizationFormText = "emptySpaceItem3";
|
||||
this.emptySpaceItem3.Location = new System.Drawing.Point(0, 26);
|
||||
this.emptySpaceItem3.Name = "emptySpaceItem3";
|
||||
this.emptySpaceItem3.Size = new System.Drawing.Size(385, 26);
|
||||
this.emptySpaceItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.btnFind;
|
||||
this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(529, 0);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(195, 26);
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.edFilename;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(529, 26);
|
||||
this.layoutControlItem1.Text = "File Name : ";
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(68, 14);
|
||||
//
|
||||
// layoutControlGroup4
|
||||
//
|
||||
this.layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem8,
|
||||
this.emptySpaceItem1});
|
||||
this.layoutControlGroup4.Location = new System.Drawing.Point(0, 52);
|
||||
this.layoutControlGroup4.Name = "layoutControlGroup4";
|
||||
this.layoutControlGroup4.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup4.Size = new System.Drawing.Size(724, 184);
|
||||
this.layoutControlGroup4.Text = "File Information";
|
||||
//
|
||||
// layoutControlItem8
|
||||
//
|
||||
this.layoutControlItem8.Control = this.lbFileInfo;
|
||||
this.layoutControlItem8.CustomizationFormText = "layoutControlItem8";
|
||||
this.layoutControlItem8.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem8.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem8.Name = "layoutControlItem8";
|
||||
this.layoutControlItem8.Size = new System.Drawing.Size(523, 155);
|
||||
this.layoutControlItem8.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem8.TextVisible = false;
|
||||
//
|
||||
// emptySpaceItem1
|
||||
//
|
||||
this.emptySpaceItem1.AllowHotTrack = false;
|
||||
this.emptySpaceItem1.CustomizationFormText = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Location = new System.Drawing.Point(523, 0);
|
||||
this.emptySpaceItem1.Name = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Size = new System.Drawing.Size(193, 155);
|
||||
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// layoutControlGroup5
|
||||
//
|
||||
this.layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.emptySpaceItem4,
|
||||
this.layoutControlItem4});
|
||||
this.layoutControlGroup5.Location = new System.Drawing.Point(0, 236);
|
||||
this.layoutControlGroup5.Name = "layoutControlGroup5";
|
||||
this.layoutControlGroup5.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup5.Size = new System.Drawing.Size(724, 59);
|
||||
this.layoutControlGroup5.Text = "Extra Command";
|
||||
//
|
||||
// emptySpaceItem4
|
||||
//
|
||||
this.emptySpaceItem4.AllowHotTrack = false;
|
||||
this.emptySpaceItem4.CustomizationFormText = "emptySpaceItem4";
|
||||
this.emptySpaceItem4.Location = new System.Drawing.Point(0, 0);
|
||||
this.emptySpaceItem4.Name = "emptySpaceItem4";
|
||||
this.emptySpaceItem4.Size = new System.Drawing.Size(523, 30);
|
||||
this.emptySpaceItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.btnRestart;
|
||||
this.layoutControlItem4.CustomizationFormText = "layoutControlItem4";
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(523, 0);
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(93, 26);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(193, 30);
|
||||
this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem4.TextVisible = false;
|
||||
//
|
||||
// tmrFirmwareUpdate
|
||||
//
|
||||
this.tmrFirmwareUpdate.Tick += new System.EventHandler(this.tmrFirmwareUpdate_Tick);
|
||||
//
|
||||
// fmxFwUpdate
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(736, 500);
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.IconOptions.Image = ((System.Drawing.Image)(resources.GetObject("fmxFwUpdate.IconOptions.Image")));
|
||||
this.Name = "fmxFwUpdate";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "fmFwUpdate";
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.fmxFwUpdate_FormClosed);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.teModuleNo.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pgUpdate.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edFilename.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnFind;
|
||||
private DevExpress.XtraEditors.TextEdit edFilename;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnClose;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
|
||||
private DevExpress.XtraEditors.SimpleButton btnFwUpdate;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem3;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem4;
|
||||
private DevExpress.XtraEditors.LabelControl lbFileInfo;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
|
||||
private DevExpress.XtraEditors.LabelControl lbUpdateTime;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
|
||||
private DevExpress.XtraEditors.ProgressBarControl pgUpdate;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10;
|
||||
private DevExpress.XtraEditors.LabelControl lbUpdateProgress;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11;
|
||||
private DevExpress.XtraEditors.LabelControl lbUpdateStatus;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
|
||||
private DevExpress.XtraEditors.SimpleButton btnRestart;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
|
||||
private DevExpress.XtraEditors.TextEdit teModuleNo;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
|
||||
private System.Windows.Forms.Timer tmrFirmwareUpdate;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5;
|
||||
}
|
||||
}
|
||||
576
LFP_Manager_PRM/Forms/fmxFwUpdate.cs
Normal file
576
LFP_Manager_PRM/Forms/fmxFwUpdate.cs
Normal file
@@ -0,0 +1,576 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using System.Threading;
|
||||
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Function;
|
||||
using LFP_Manager.Utils;
|
||||
using static System.Data.Entity.Infrastructure.Design.Executor;
|
||||
|
||||
namespace LFP_Manager
|
||||
{
|
||||
public delegate void AutoTxCanSetEnvent(bool autoTx);
|
||||
public delegate void SendDataCanEvent(uint header, byte[] data);
|
||||
|
||||
public partial class fmxFwUpdate : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
#region DEFINES
|
||||
|
||||
const int FW_UPDATE_START_ADDR = 0x8012000;
|
||||
const int FW_UPDATE_END_ADDR = 0x801FFFF;
|
||||
const int FW_UPDATE_SECTOR_SIZE = 0x20000;
|
||||
const int FW_UPDATE_PACKET_SIZE = 0x800;
|
||||
|
||||
#endregion
|
||||
|
||||
#region VARIABLES
|
||||
|
||||
private uint SystemId = 0;
|
||||
|
||||
private byte[] fwdata;
|
||||
private byte[] fwver;
|
||||
|
||||
private bool StopUpdate = true;
|
||||
|
||||
private uint SectorEraseAddr = 0;
|
||||
private uint SetAddr = 0;
|
||||
private uint SetLength = 0;
|
||||
|
||||
private int WR_PACKET_DELAY = 1;
|
||||
|
||||
private DateTime UpdateStartTime;
|
||||
private TimeSpan UpdateTime;
|
||||
|
||||
private CommConfig Config;
|
||||
|
||||
public event AutoTxCanSetEnvent OnAutoTxCanSet = null;
|
||||
public event SendDataCanEvent OnSendDataCan = null;
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public fmxFwUpdate(uint MdID, CommConfig aConfig)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
SystemId = MdID;
|
||||
teModuleNo.Text = string.Format("{0}", SystemId);
|
||||
|
||||
fwdata = null;
|
||||
fwver = null;
|
||||
btnFwUpdate.Enabled = false;
|
||||
|
||||
Config = aConfig;
|
||||
|
||||
if (csCanConstData.CanDeviceInfo.DeviceIds[Config.CanDevice] == csCanConstData.CanDeviceInfo.VCI_VALUE_CAN4_1)
|
||||
WR_PACKET_DELAY = 10;
|
||||
else
|
||||
WR_PACKET_DELAY = 1;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region KEY EVENT FUNCTION
|
||||
private void TextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
csUtils.TypingOnlyNumber(sender, e, true, true);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region BUTTON EVENTS
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void btnFwUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (teModuleNo.Text == "")
|
||||
{
|
||||
MessageBox.Show("Please check module no", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
uint sId = Convert.ToUInt32(teModuleNo.Text);
|
||||
if ((sId == 0) || (sId > 18))
|
||||
{
|
||||
MessageBox.Show("Please check module no", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
SystemId = sId;
|
||||
|
||||
if (StopUpdate)
|
||||
{
|
||||
teModuleNo.Enabled = false;
|
||||
if (OnSendDataCan != null)
|
||||
{
|
||||
if (OnAutoTxCanSet != null)
|
||||
{
|
||||
OnAutoTxCanSet(false);
|
||||
}
|
||||
|
||||
if ((fwdata != null) && (fwdata.Length > 0))
|
||||
{
|
||||
UpdateStartTime = DateTime.Now;
|
||||
PACKET_DN packet = csCanFwUpdateFunction.FwUpdateStartPacket(SystemId, fwver, (UInt32)fwdata.Length);
|
||||
OnSendDataCan(packet.hdr, packet.data);
|
||||
}
|
||||
StopUpdate = false;
|
||||
btnFwUpdate.Text = "Cancel Update";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
teModuleNo.Enabled = true;
|
||||
|
||||
StopUpdate = true;
|
||||
SectorEraseAddr = 0;
|
||||
SetAddr = 0;
|
||||
SetLength = 0;
|
||||
FirmwareUpdateTimeoutClear();
|
||||
|
||||
pgUpdate.Position = 0;
|
||||
lbUpdateStatus.Text = "Update Status : Cancel By User";
|
||||
btnFwUpdate.Text = "Firmware Update";
|
||||
|
||||
if (OnAutoTxCanSet != null)
|
||||
{
|
||||
OnAutoTxCanSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void btnFind_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog oDialog;
|
||||
|
||||
oDialog = new OpenFileDialog();
|
||||
oDialog.DefaultExt = "*.*";
|
||||
oDialog.Filter = "bin files (*.bin)|*.bin|All files (*.*)|*.*";
|
||||
|
||||
if (oDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
edFilename.Text = oDialog.FileName;
|
||||
|
||||
FileStream fwFile = new FileStream(edFilename.Text, FileMode.Open, FileAccess.Read);
|
||||
long fsize = fwFile.Length;
|
||||
|
||||
if (fsize > 0)
|
||||
{
|
||||
fwdata = new byte[fsize];
|
||||
fwFile.Seek(0, SeekOrigin.Begin);
|
||||
fwFile.Read(fwdata, 0, (int)fsize);
|
||||
}
|
||||
fwFile.Close();
|
||||
|
||||
byte[] bName = csUtils.StringToByte(Path.GetFileName(edFilename.Text));
|
||||
|
||||
if (bName.Length > 8)
|
||||
{
|
||||
fwver = new byte[4];
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
fwver[i] = (byte)(bName[bName.Length - 1 - 3 - 4 + i] - 0x30);
|
||||
|
||||
UInt32 nPC = (UInt32)((fwdata[0] << 0) | (fwdata[1] << 8) | (fwdata[2] << 16) | (fwdata[3] << 24));
|
||||
UInt32 nSP = (UInt32)((fwdata[4] << 0) | (fwdata[5] << 8) | (fwdata[6] << 16) | (fwdata[7] << 24));
|
||||
|
||||
if ((nPC >= 0x20000000) && (nPC <= 0x20100000)
|
||||
&& (nSP >= 0x08000000) && (nSP <= 0x08100000))
|
||||
{
|
||||
btnFwUpdate.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
nPC = (UInt32)((fwdata[0 + 64] << 0) | (fwdata[1 + 64] << 8) | (fwdata[2 + 64] << 16) | (fwdata[3 + 64] << 24));
|
||||
nSP = (UInt32)((fwdata[4 + 64] << 0) | (fwdata[5 + 64] << 8) | (fwdata[6 + 64] << 16) | (fwdata[7 + 64] << 24));
|
||||
|
||||
if ((nPC >= 0x20000000) && (nPC <= 0x20100000)
|
||||
&& (nSP >= 0x08000000) && (nSP <= 0x08100000))
|
||||
{
|
||||
fsize -= 64;
|
||||
byte[] fwdataB = new byte[fsize];
|
||||
|
||||
for (int i = 0; i < fsize; i++)
|
||||
{
|
||||
fwdataB[i] = fwdata[i + 64];
|
||||
}
|
||||
fwdata = new byte[fsize];
|
||||
for (int i = 0; i < fsize; i++)
|
||||
{
|
||||
fwdata[i] = fwdataB[i];
|
||||
}
|
||||
btnFwUpdate.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
btnFwUpdate.Enabled = false;
|
||||
}
|
||||
}
|
||||
lbFileInfo.Text = String.Format("File Information");
|
||||
lbFileInfo.Text += String.Format("\r\n - Filename: {0}", Path.GetFileName(edFilename.Text));
|
||||
lbFileInfo.Text += String.Format("\r\n - File Version: V{0}.{1}.{2}.{3}", fwver[0], fwver[1], fwver[2], fwver[3]);
|
||||
lbFileInfo.Text += String.Format("\r\n - File Size: {0:#,##0} bytes", fsize);
|
||||
lbFileInfo.Text += String.Format("\r\n - File Size: {0:#,##0} bytes", fsize);
|
||||
lbFileInfo.Text += String.Format("\r\n - Packet Size: {0:#,##0} packets", fsize / 2048);
|
||||
lbFileInfo.Text += String.Format("\r\n - Last packet: {0:#,##0}", fsize % 2048);
|
||||
|
||||
lbFileInfo.Text += String.Format("\r\n - PC: 0x{0:X8}", nPC);
|
||||
lbFileInfo.Text += String.Format("\r\n - SP: 0x{0:X8}", nSP);
|
||||
|
||||
lbUpdateProgress.Text = String.Format("{0:#,##0}/{1:#,##0} bytes", 0, fsize);
|
||||
pgUpdate.Properties.Maximum = (int)fsize;
|
||||
}
|
||||
}
|
||||
}
|
||||
private void btnRestart_Click(object sender, EventArgs e)
|
||||
{
|
||||
PACKET_DN packet = csCanFwUpdateFunction.UpdateRestartPacket(SystemId, 1);
|
||||
OnSendDataCan?.Invoke(packet.hdr, packet.data);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region FORM EVENT
|
||||
|
||||
private void fmxFwUpdate_Activated(object sender, EventArgs e)
|
||||
{
|
||||
if (OnAutoTxCanSet != null)
|
||||
{
|
||||
OnAutoTxCanSet(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void fmxFwUpdate_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
if (OnAutoTxCanSet != null)
|
||||
{
|
||||
OnAutoTxCanSet(true);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PUBLIC FUNCTION
|
||||
|
||||
public void RecvData(UInt32 rhdr, byte[] rdata)
|
||||
{
|
||||
PACKET_HEADER_DN dnHdr = csCanFwUpdateFunction.CovertPtoH(rhdr);
|
||||
|
||||
lbUpdateStatus.Text = String.Format("Recv Data: 0x{0:X8} {1:X2} {2:X2} {3:X2} {4:X2} {5:X2} {6:X2} {7:X2} {8:X2}"
|
||||
, rhdr, rdata[0], rdata[1], rdata[2], rdata[3], rdata[4], rdata[5], rdata[6], rdata[7]);
|
||||
|
||||
if (StopUpdate == false)
|
||||
{
|
||||
if (dnHdr.SID == SystemId)
|
||||
{
|
||||
FirmwareUpdateTimeoutClear();
|
||||
switch (dnHdr.FC)
|
||||
{
|
||||
case csCanFwUpdateFunction.DL_START_CODE:
|
||||
FwUpdateStartProcess(dnHdr, rdata);
|
||||
break;
|
||||
case csCanFwUpdateFunction.DL_SECTOR_ERASE_CODE:
|
||||
SectorEraseProcess(dnHdr, rdata);
|
||||
break;
|
||||
case csCanFwUpdateFunction.DL_SET_ADDRESS_CODE:
|
||||
SeAddrProcess(dnHdr, rdata);
|
||||
break;
|
||||
case csCanFwUpdateFunction.DL_WRITE_DATA_CSUM_CODE:
|
||||
WritedataChkSumProcess(dnHdr, rdata);
|
||||
break;
|
||||
case csCanFwUpdateFunction.DL_IMAGE_CSUM_CODE:
|
||||
FwImageChkSumProcess(dnHdr, rdata);
|
||||
break;
|
||||
case csCanFwUpdateFunction.DL_RESTART_CODE:
|
||||
FirmwareUpdateStop();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region FW UPDATE PROCESS FUNCTIONS
|
||||
private void FwUpdateStartProcess(PACKET_HEADER_DN hdr, byte[] data)
|
||||
{
|
||||
byte rResult = data[7];
|
||||
|
||||
if (rResult == 0)
|
||||
{
|
||||
if (OnSendDataCan != null)
|
||||
{
|
||||
if ((fwdata != null) && (fwdata.Length > 0))
|
||||
{
|
||||
UpdateStartTime = DateTime.Now;
|
||||
|
||||
SectorEraseAddr = FW_UPDATE_START_ADDR;
|
||||
PACKET_DN packet = csCanFwUpdateFunction.SectorErasePacket(SystemId, FW_UPDATE_START_ADDR);
|
||||
|
||||
OnSendDataCan?.Invoke(packet.hdr, packet.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(String.Format("FwUpdateStartProcess Fail - {0}", rResult));
|
||||
}
|
||||
}
|
||||
|
||||
private void SectorEraseProcess(PACKET_HEADER_DN hdr, byte[] data)
|
||||
{
|
||||
UInt32 rAddr = (UInt32)((data[0] << 24)
|
||||
| (data[1] << 16)
|
||||
| (data[2] << 8)
|
||||
| (data[3] << 0));
|
||||
byte rResult = data[7];
|
||||
UInt32 eSize = rAddr - FW_UPDATE_START_ADDR + FW_UPDATE_SECTOR_SIZE;
|
||||
|
||||
if (rResult == 0)
|
||||
{
|
||||
if (eSize < fwdata.Length)
|
||||
{
|
||||
SectorEraseAddr += FW_UPDATE_SECTOR_SIZE;
|
||||
PACKET_DN packet = csCanFwUpdateFunction.SectorErasePacket(SystemId, SectorEraseAddr);
|
||||
|
||||
OnSendDataCan?.Invoke(packet.hdr, packet.data);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetAddr = FW_UPDATE_START_ADDR;
|
||||
SetLength = 2048 / 8;
|
||||
PACKET_DN packet = csCanFwUpdateFunction.SetAddrPacket(SystemId, SetAddr, SetLength);
|
||||
|
||||
OnSendDataCan?.Invoke(packet.hdr, packet.data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(String.Format("SectorEraseProcess Fail - {0}", rResult));
|
||||
}
|
||||
}
|
||||
|
||||
private void SeAddrProcess(PACKET_HEADER_DN hdr, byte[] data)
|
||||
{
|
||||
byte rResult = data[7];
|
||||
|
||||
if (rResult == 0)
|
||||
{
|
||||
UInt32 csum32 = 0;
|
||||
UInt32 CurrentAddr = SetAddr - FW_UPDATE_START_ADDR;
|
||||
UInt32 CurrentLen = SetLength;
|
||||
byte[][] pData;
|
||||
PACKET_DN packet;
|
||||
|
||||
pData = new byte[CurrentLen][];
|
||||
|
||||
for (int i = 0; i < CurrentLen; i++)
|
||||
{
|
||||
pData[i] = new byte[8];
|
||||
for (int j = 0; j < 8; j++)
|
||||
{
|
||||
if ((CurrentAddr + (i * 8) + j) < fwdata.Length)
|
||||
pData[i][j] = fwdata[CurrentAddr + (i * 8) + j];
|
||||
else
|
||||
pData[i][j] = 0x00;
|
||||
csum32 += (UInt32)pData[i][j];
|
||||
}
|
||||
packet = csCanFwUpdateFunction.WritePacket(SystemId, (byte)i, pData[i]);
|
||||
OnSendDataCan?.Invoke(packet.hdr, packet.data);
|
||||
|
||||
pgUpdate.Position += 8;
|
||||
UpdateTime = DateTime.Now - UpdateStartTime;
|
||||
lbUpdateTime.Text = String.Format("{0:mm}:{1:ss}", UpdateTime, UpdateTime);
|
||||
lbUpdateProgress.Text = String.Format("{0:#,##0}/{1:#,##0} bytes", pgUpdate.Position, fwdata.Length);
|
||||
Thread.Sleep(WR_PACKET_DELAY);
|
||||
|
||||
Application.DoEvents();
|
||||
if (StopUpdate) { return; }
|
||||
}
|
||||
packet = csCanFwUpdateFunction.WriteChkSumPacket(SystemId, SetAddr, csum32);
|
||||
|
||||
OnSendDataCan?.Invoke(packet.hdr, packet.data);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(String.Format("SeAddrProcess Fail - {0}", rResult));
|
||||
}
|
||||
}
|
||||
|
||||
//private void WritedataChkSumProcess(PACKET_HEADER_DN hdr, byte[] data)
|
||||
//{
|
||||
// byte rResult = data[7];
|
||||
|
||||
// if (rResult == 0)
|
||||
// {
|
||||
// UInt32 csum32 = 0;
|
||||
// CurrentAddr += 1;
|
||||
// byte[][] pData;
|
||||
// PACKET_DN packet;
|
||||
// int plen = 256;
|
||||
|
||||
// int blen = (int)(fwdata.Length - (CurrentAddr * 2048));
|
||||
|
||||
// if (blen < 2048)
|
||||
// plen = ((blen % 8) > 0) ? (blen / 8) + 1 : blen / 8;
|
||||
|
||||
// pData = new byte[plen][];
|
||||
|
||||
// for (int i = 0; i < plen; i++)
|
||||
// {
|
||||
// pData[i] = new byte[8];
|
||||
// for (int j = 0; j < 8; j++)
|
||||
// {
|
||||
// pData[i][j] = fwdata[(CurrentAddr * 2048) + (i * 8) + j];
|
||||
// csum32 += (UInt32)pData[i][j];
|
||||
// }
|
||||
// packet = csCanFwUpdateFunction.WritePacket(1, (byte)i, pData[i]);
|
||||
// OnSendDataCan?.Invoke(packet.hdr, packet.data);
|
||||
|
||||
// Thread.Sleep(1);
|
||||
// }
|
||||
// packet = csCanFwUpdateFunction.WriteChkSumPacket(1, csum32);
|
||||
|
||||
// OnSendDataCan?.Invoke(packet.hdr, packet.data);
|
||||
// }
|
||||
//}
|
||||
|
||||
private void WritedataChkSumProcess(PACKET_HEADER_DN hdr, byte[] data)
|
||||
{
|
||||
byte rResult = data[7];
|
||||
|
||||
if (rResult == 0)
|
||||
{
|
||||
UInt32 rAddr;
|
||||
UInt32 rlen, tlen;
|
||||
|
||||
rAddr = (UInt32)((data[0] << 24)
|
||||
| (data[1] << 16)
|
||||
| (data[2] << 8)
|
||||
| (data[3] << 0)
|
||||
);
|
||||
rlen = rAddr - SetAddr;
|
||||
tlen = rAddr - FW_UPDATE_START_ADDR;
|
||||
|
||||
UpdateTime = DateTime.Now - UpdateStartTime;
|
||||
lbUpdateTime.Text = String.Format("{0:mm}:{0:ss}", UpdateTime);
|
||||
lbUpdateProgress.Text = String.Format("{0:#,##0}/{1:#,##0} bytes", tlen, fwdata.Length);
|
||||
pgUpdate.Position = (int)tlen;
|
||||
|
||||
if (tlen < fwdata.Length)
|
||||
{
|
||||
// remain write data
|
||||
if (rlen == FW_UPDATE_PACKET_SIZE)
|
||||
{
|
||||
SetAddr = rAddr;
|
||||
UInt32 alen = (UInt32)(fwdata.Length - tlen);
|
||||
if (alen > FW_UPDATE_PACKET_SIZE)
|
||||
{
|
||||
SetLength = FW_UPDATE_PACKET_SIZE / 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((alen % 8) > 0)
|
||||
SetLength = alen / 8 + 1;
|
||||
else
|
||||
SetLength = alen / 8;
|
||||
}
|
||||
PACKET_DN packet = csCanFwUpdateFunction.SetAddrPacket(SystemId, SetAddr, SetLength);
|
||||
|
||||
OnSendDataCan?.Invoke(packet.hdr, packet.data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// finished write data
|
||||
//string text = String.Format("Finished Write data - {0};{1}", tlen, fwdata.Length);
|
||||
//MessageBox.Show(text);
|
||||
UInt32 fwChkSum = 0;
|
||||
|
||||
for (int i = 0; i < fwdata.Length; i++)
|
||||
{
|
||||
fwChkSum += (UInt32)(fwdata[i]);
|
||||
}
|
||||
PACKET_DN packet = csCanFwUpdateFunction.FwImageChkSumPacket(SystemId, (UInt32)fwdata.Length, fwChkSum);
|
||||
|
||||
OnSendDataCan?.Invoke(packet.hdr, packet.data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(String.Format("WritedataChkSumProcess Fail - {0}", rResult));
|
||||
}
|
||||
}
|
||||
|
||||
private void FwImageChkSumProcess(PACKET_HEADER_DN hdr, byte[] data)
|
||||
{
|
||||
byte rResult = data[7];
|
||||
|
||||
if (rResult == 0)
|
||||
{
|
||||
PACKET_DN packet = csCanFwUpdateFunction.UpdateRestartPacket(SystemId, 3);
|
||||
|
||||
OnSendDataCan?.Invoke(packet.hdr, packet.data);
|
||||
|
||||
MessageBox.Show("Firmware Update Complete !!", "FwUpdate", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
lbUpdateStatus.Text = "Update Status : Complete";
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(String.Format("FwImageChkSumProcess Fail - {0}", rResult));
|
||||
lbUpdateStatus.Text = "Update Status : Update failure (Image Checksum fail)";
|
||||
}
|
||||
btnFwUpdate.Text = "Firmware Update";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region UPDATE FUNCTIONS
|
||||
private const int FirmwareUpdateTimeoutMax = 30; // 3 Sec
|
||||
private int FirmwareUpdateTimeout = 0; // 10 ms
|
||||
|
||||
private void FirmwareUpdateStop()
|
||||
{
|
||||
StopUpdate = true;
|
||||
FirmwareUpdateTimeoutClear();
|
||||
teModuleNo.Enabled = true;
|
||||
|
||||
lbUpdateStatus.Text = "Update Status : Restart";
|
||||
if (OnAutoTxCanSet != null)
|
||||
{
|
||||
OnAutoTxCanSet(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void FirmwareUpdateTimeoutClear()
|
||||
{
|
||||
FirmwareUpdateTimeout = 0;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region TIMER EVENT
|
||||
private void tmrFirmwareUpdate_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (StopUpdate == false)
|
||||
{
|
||||
FirmwareUpdateTimeout++;
|
||||
if (FirmwareUpdateTimeout > FirmwareUpdateTimeoutMax)
|
||||
{
|
||||
FirmwareUpdateStop();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
151
LFP_Manager_PRM/Forms/fmxFwUpdate.resx
Normal file
151
LFP_Manager_PRM/Forms/fmxFwUpdate.resx
Normal file
@@ -0,0 +1,151 @@
|
||||
<?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="tmrFirmwareUpdate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="fmxFwUpdate.IconOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wgAADsIBFShKgAAABMxJREFUWEflVWtsFVUQPrdtSvilMRIVY8T4h1/aoDGKqIWCIBXR+IgaAmriD/CR
|
||||
SIyVYjSSPmhLrVVTBa6tQNGIBSqYCEEera34KCqFEmgLNa34qPRaeqHv23G+2Z3tXrp3u/iHGCeZnN09
|
||||
M2e++WbOrKFLLP8dACMjI87qp2oTVAIBcB8Y8zncvRcUxEUxoIdGon3UdbbX0TPdvdR9vl/23HZBZFwA
|
||||
euDQcEzedze00aSF79Ckx9+nKx8rc3Tyo2V0+GSn2AyzbVAgvgD0gFgsRsOsfQNDNPXZCjLpq8nc9xaZ
|
||||
ucWW4vmuPJqZ9Rm8xDZIcEggBjT7VR8fJHNnLiUveNsKOr/EUn5Ovp+/MYhNe5vEFj5BWEgIQJ1BJ5qr
|
||||
5dcITcwsoZBmzIFDeBcA9jq7iK554gOK9PQJC8KEfVYiGbcEmv0Db1aTuTufkjKt7CXgvWu4BKw2C0lg
|
||||
YUYevbTugPgM2iz4iScAzX5waFjePz/YSmZWgUWzBuJSLF+7nx7J3SlB5Rv2GMwEXrUhxyvFGABqiMaD
|
||||
87neAbrxqTCF5hRx9hbVoTlr6CrufDRly+kIpc4rpiQO6oCbWUDpWVvsJPxZGAsAyg5KffZHdXGNJ+s9
|
||||
+bRhz1HZh7xa8bU0oGMDEPxeufeY7PuxEAdAjfQeH2/vsrJj9coOB6PRengITVmyXpjRxgzZDfk3Dy3Y
|
||||
gFGN4RbPEgAAZP7r26zGc+rL2fEt+Kn1TweA9smWmuNim8pDCgxgxfsKZgeiLFwoDgBs6qGQ7fUtdtcn
|
||||
6HAOjMxgj17AikFk0t7gkuWRmZ5L5o4cMrfnUE1jB9uOMusGIgD0g0w8NoqeH6Api9eTySi06LQpvW7R
|
||||
Ojp7rl8Cs5P4uAX/hWwGmF1RJ5mv3FBHr5Tto+pvWmXfi4U4BpTOrPLa+KuFldn4lGmGACSGTUPzH7Tn
|
||||
0C9UsfsIlWxtoPCXjfTF96dox7etcnWhO787SZ981UT1TactXwbvZsHoi9JztO0vuceotwTH4OGun51d
|
||||
JVmrHcB2MxsdnT104HA7vcYZX79orVUCph2ApRQzuBTTc+jyh96l385ExzQkA7AecDAkY0UVB1w9mj0r
|
||||
bsKRtk4ZyQrAS/C9fFcjXc1/RsNzI3VhKaXwORMetBpycfEusXOXgksw2nib9x3j+5vvTDy511wK3HMI
|
||||
slZHrKrICnua2YmOCE19+kOrh7SJsc4qpP0/t4uNgjB4wAGo6bVPMoUZRaONx1ncsCRMUZ6GsIFCFARE
|
||||
QejzwOCQPDfzz+syvopJ87SUDCC9gG5etpFt+AZxXAA2vf2Ww3LuXtTMoR4OXPtt9c2yr9m7g7tF9uy1
|
||||
3wZRWv3j2Gbm95Lth2Qf11duQeOpTmm8FM4agVMWlErN5q7cKoZe18dL1AaZwQd609KNMj1RTpydzP10
|
||||
xcPv0e9dUbbjEuBeT3u+0upcrhmMETyFJ96Jjq64xgsKAmqBJqrlISQ3gumXs3memNtWUSZPWYjJCtdS
|
||||
2nObaNoLlQLk1hc3Uxo3UGHVD2Lg1/V+Ah/tmZfDNZT2TLmcjRi3sCLmDvzmUYdEguw1+MWAcPv4+aH/
|
||||
nFGMYKryzvVR8TskkaiPnuUVA+JMQi+F6Ppv5MLzvNT5F1wq+b8DIPoHjJf5qaq9hPwAAAAASUVORK5C
|
||||
YII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
139
LFP_Manager_PRM/Forms/fmxHistory.Designer.cs
generated
Normal file
139
LFP_Manager_PRM/Forms/fmxHistory.Designer.cs
generated
Normal file
@@ -0,0 +1,139 @@
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
partial class fmxHistory
|
||||
{
|
||||
/// <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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fmxHistory));
|
||||
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.btnClose = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.ucHistroy1 = new LFP_Manager.Controls.ucHistroy();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.btnClose);
|
||||
this.layoutControl1.Controls.Add(this.ucHistroy1);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1215, 341, 650, 400);
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(911, 602);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Location = new System.Drawing.Point(3, 562);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(905, 37);
|
||||
this.btnClose.StyleController = this.layoutControl1;
|
||||
this.btnClose.TabIndex = 5;
|
||||
this.btnClose.Text = "Close";
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1,
|
||||
this.layoutControlItem2});
|
||||
this.layoutControlGroup1.Name = "Root";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(911, 602);
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.btnClose;
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(0, 559);
|
||||
this.layoutControlItem2.MinSize = new System.Drawing.Size(89, 26);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(909, 41);
|
||||
this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// ucHistroy1
|
||||
//
|
||||
this.ucHistroy1.Location = new System.Drawing.Point(3, 3);
|
||||
this.ucHistroy1.Name = "ucHistroy1";
|
||||
this.ucHistroy1.Size = new System.Drawing.Size(905, 555);
|
||||
this.ucHistroy1.TabIndex = 4;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.ucHistroy1;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(276, 117);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(909, 559);
|
||||
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// fmxHistory
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(911, 602);
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.IconOptions.Image = ((System.Drawing.Image)(resources.GetObject("fmxHistory.IconOptions.Image")));
|
||||
this.Name = "fmxHistory";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "History";
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private Controls.ucHistroy ucHistroy1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnClose;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
}
|
||||
}
|
||||
42
LFP_Manager_PRM/Forms/fmxHistory.cs
Normal file
42
LFP_Manager_PRM/Forms/fmxHistory.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
using LFP_Manager.DataStructure;
|
||||
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
public partial class fmxHistory : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
#region VARIABLES
|
||||
|
||||
#endregion
|
||||
|
||||
//public fmxHistory()
|
||||
//{
|
||||
// InitializeComponent();
|
||||
//}
|
||||
|
||||
public fmxHistory(CommConfig aConfig)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
ucHistroy1.SetCommCofig(aConfig);
|
||||
}
|
||||
|
||||
#region BUTTON EVENT
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
148
LFP_Manager_PRM/Forms/fmxHistory.resx
Normal file
148
LFP_Manager_PRM/Forms/fmxHistory.resx
Normal file
@@ -0,0 +1,148 @@
|
||||
<?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.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="fmxHistory.IconOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAABMxJREFUWEflVWtsFVUQPrdtSvilMRIVY8T4h1/aoDGKqIWCIBXR+IgaAmriD/CR
|
||||
SIyVYjSSPmhLrVVTBa6tQNGIBSqYCEEera34KCqFEmgLNa34qPRaeqHv23G+2Z3tXrp3u/iHGCeZnN09
|
||||
M2e++WbOrKFLLP8dACMjI87qp2oTVAIBcB8Y8zncvRcUxEUxoIdGon3UdbbX0TPdvdR9vl/23HZBZFwA
|
||||
euDQcEzedze00aSF79Ckx9+nKx8rc3Tyo2V0+GSn2AyzbVAgvgD0gFgsRsOsfQNDNPXZCjLpq8nc9xaZ
|
||||
ucWW4vmuPJqZ9Rm8xDZIcEggBjT7VR8fJHNnLiUveNsKOr/EUn5Ovp+/MYhNe5vEFj5BWEgIQJ1BJ5qr
|
||||
5dcITcwsoZBmzIFDeBcA9jq7iK554gOK9PQJC8KEfVYiGbcEmv0Db1aTuTufkjKt7CXgvWu4BKw2C0lg
|
||||
YUYevbTugPgM2iz4iScAzX5waFjePz/YSmZWgUWzBuJSLF+7nx7J3SlB5Rv2GMwEXrUhxyvFGABqiMaD
|
||||
87neAbrxqTCF5hRx9hbVoTlr6CrufDRly+kIpc4rpiQO6oCbWUDpWVvsJPxZGAsAyg5KffZHdXGNJ+s9
|
||||
+bRhz1HZh7xa8bU0oGMDEPxeufeY7PuxEAdAjfQeH2/vsrJj9coOB6PRengITVmyXpjRxgzZDfk3Dy3Y
|
||||
gFGN4RbPEgAAZP7r26zGc+rL2fEt+Kn1TweA9smWmuNim8pDCgxgxfsKZgeiLFwoDgBs6qGQ7fUtdtcn
|
||||
6HAOjMxgj17AikFk0t7gkuWRmZ5L5o4cMrfnUE1jB9uOMusGIgD0g0w8NoqeH6Api9eTySi06LQpvW7R
|
||||
Ojp7rl8Cs5P4uAX/hWwGmF1RJ5mv3FBHr5Tto+pvWmXfi4U4BpTOrPLa+KuFldn4lGmGACSGTUPzH7Tn
|
||||
0C9UsfsIlWxtoPCXjfTF96dox7etcnWhO787SZ981UT1TactXwbvZsHoi9JztO0vuceotwTH4OGun51d
|
||||
JVmrHcB2MxsdnT104HA7vcYZX79orVUCph2ApRQzuBTTc+jyh96l385ExzQkA7AecDAkY0UVB1w9mj0r
|
||||
bsKRtk4ZyQrAS/C9fFcjXc1/RsNzI3VhKaXwORMetBpycfEusXOXgksw2nib9x3j+5vvTDy511wK3HMI
|
||||
slZHrKrICnua2YmOCE19+kOrh7SJsc4qpP0/t4uNgjB4wAGo6bVPMoUZRaONx1ncsCRMUZ6GsIFCFARE
|
||||
QejzwOCQPDfzz+syvopJ87SUDCC9gG5etpFt+AZxXAA2vf2Ww3LuXtTMoR4OXPtt9c2yr9m7g7tF9uy1
|
||||
3wZRWv3j2Gbm95Lth2Qf11duQeOpTmm8FM4agVMWlErN5q7cKoZe18dL1AaZwQd609KNMj1RTpydzP10
|
||||
xcPv0e9dUbbjEuBeT3u+0upcrhmMETyFJ96Jjq64xgsKAmqBJqrlISQ3gumXs3memNtWUSZPWYjJCtdS
|
||||
2nObaNoLlQLk1hc3Uxo3UGHVD2Lg1/V+Ah/tmZfDNZT2TLmcjRi3sCLmDvzmUYdEguw1+MWAcPv4+aH/
|
||||
nFGMYKryzvVR8TskkaiPnuUVA+JMQi+F6Ppv5MLzvNT5F1wq+b8DIPoHjJf5qaq9hPwAAAAASUVORK5C
|
||||
YII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
103
LFP_Manager_PRM/Forms/fmxHistorycs.Designer.cs
generated
Normal file
103
LFP_Manager_PRM/Forms/fmxHistorycs.Designer.cs
generated
Normal file
@@ -0,0 +1,103 @@
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
partial class fmxHistorycs
|
||||
{
|
||||
/// <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.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.ucHistroy1 = new LFP_Manager.Controls.ucHistroy();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.ucHistroy1);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.Root = this.layoutControlGroup1;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(911, 602);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1});
|
||||
this.layoutControlGroup1.Name = "layoutControlGroup1";
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(911, 602);
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// ucHistroy1
|
||||
//
|
||||
this.ucHistroy1.Location = new System.Drawing.Point(12, 12);
|
||||
this.ucHistroy1.Name = "ucHistroy1";
|
||||
this.ucHistroy1.Size = new System.Drawing.Size(887, 578);
|
||||
this.ucHistroy1.TabIndex = 4;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.ucHistroy1;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(891, 582);
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// fmxHistorycs
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(911, 602);
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Name = "fmxHistorycs";
|
||||
this.Text = "fmxHistorycs";
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private Controls.ucHistroy ucHistroy1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
}
|
||||
}
|
||||
20
LFP_Manager_PRM/Forms/fmxHistorycs.cs
Normal file
20
LFP_Manager_PRM/Forms/fmxHistorycs.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
public partial class fmxHistorycs : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
public fmxHistorycs()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
LFP_Manager_PRM/Forms/fmxHistorycs.resx
Normal file
120
LFP_Manager_PRM/Forms/fmxHistorycs.resx
Normal 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>
|
||||
388
LFP_Manager_PRM/Forms/fmxInventoryConfig.Designer.cs
generated
Normal file
388
LFP_Manager_PRM/Forms/fmxInventoryConfig.Designer.cs
generated
Normal file
@@ -0,0 +1,388 @@
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
partial class fmxInventoryConfig
|
||||
{
|
||||
/// <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();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fmxInventoryConfig));
|
||||
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.btnClose = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnInvWrite = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.gbSerialNo = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl2 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.nSerialNo = new DevExpress.XtraEditors.TextEdit();
|
||||
this.lbSerialNo = new DevExpress.XtraEditors.LabelControl();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.gbMDate = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl3 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.lbMDate = new DevExpress.XtraEditors.LabelControl();
|
||||
this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.tmrDisplay = new System.Windows.Forms.Timer(this.components);
|
||||
this.tmrCmd = new System.Windows.Forms.Timer(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbSerialNo)).BeginInit();
|
||||
this.gbSerialNo.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).BeginInit();
|
||||
this.layoutControl2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nSerialNo.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbMDate)).BeginInit();
|
||||
this.gbMDate.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).BeginInit();
|
||||
this.layoutControl3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.btnClose);
|
||||
this.layoutControl1.Controls.Add(this.btnInvWrite);
|
||||
this.layoutControl1.Controls.Add(this.gbSerialNo);
|
||||
this.layoutControl1.Controls.Add(this.gbMDate);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(999, 164, 650, 400);
|
||||
this.layoutControl1.Root = this.Root;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(720, 425);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Appearance.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnClose.Appearance.Options.UseFont = true;
|
||||
this.btnClose.Location = new System.Drawing.Point(362, 373);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(354, 48);
|
||||
this.btnClose.StyleController = this.layoutControl1;
|
||||
this.btnClose.TabIndex = 7;
|
||||
this.btnClose.Text = "Close";
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// btnInvWrite
|
||||
//
|
||||
this.btnInvWrite.Appearance.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnInvWrite.Appearance.Options.UseFont = true;
|
||||
this.btnInvWrite.Location = new System.Drawing.Point(4, 373);
|
||||
this.btnInvWrite.Name = "btnInvWrite";
|
||||
this.btnInvWrite.Size = new System.Drawing.Size(354, 48);
|
||||
this.btnInvWrite.StyleController = this.layoutControl1;
|
||||
this.btnInvWrite.TabIndex = 6;
|
||||
this.btnInvWrite.Text = "Apply";
|
||||
this.btnInvWrite.Click += new System.EventHandler(this.btnInvWrite_Click);
|
||||
//
|
||||
// gbSerialNo
|
||||
//
|
||||
this.gbSerialNo.Controls.Add(this.layoutControl2);
|
||||
this.gbSerialNo.Location = new System.Drawing.Point(4, 139);
|
||||
this.gbSerialNo.Name = "gbSerialNo";
|
||||
this.gbSerialNo.Size = new System.Drawing.Size(712, 200);
|
||||
this.gbSerialNo.TabIndex = 5;
|
||||
this.gbSerialNo.Text = "Serial Number";
|
||||
//
|
||||
// layoutControl2
|
||||
//
|
||||
this.layoutControl2.Controls.Add(this.nSerialNo);
|
||||
this.layoutControl2.Controls.Add(this.lbSerialNo);
|
||||
this.layoutControl2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl2.Location = new System.Drawing.Point(2, 23);
|
||||
this.layoutControl2.Name = "layoutControl2";
|
||||
this.layoutControl2.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(993, 64, 650, 400);
|
||||
this.layoutControl2.Root = this.layoutControlGroup1;
|
||||
this.layoutControl2.Size = new System.Drawing.Size(708, 175);
|
||||
this.layoutControl2.TabIndex = 0;
|
||||
this.layoutControl2.Text = "layoutControl2";
|
||||
//
|
||||
// nSerialNo
|
||||
//
|
||||
this.nSerialNo.Location = new System.Drawing.Point(7, 105);
|
||||
this.nSerialNo.Name = "nSerialNo";
|
||||
this.nSerialNo.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 36F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.nSerialNo.Properties.Appearance.Options.UseFont = true;
|
||||
this.nSerialNo.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.nSerialNo.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.nSerialNo.Size = new System.Drawing.Size(694, 64);
|
||||
this.nSerialNo.StyleController = this.layoutControl2;
|
||||
this.nSerialNo.TabIndex = 5;
|
||||
//
|
||||
// lbSerialNo
|
||||
//
|
||||
this.lbSerialNo.Appearance.Font = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbSerialNo.Appearance.Options.UseFont = true;
|
||||
this.lbSerialNo.Location = new System.Drawing.Point(7, 7);
|
||||
this.lbSerialNo.Name = "lbSerialNo";
|
||||
this.lbSerialNo.Size = new System.Drawing.Size(694, 94);
|
||||
this.lbSerialNo.StyleController = this.layoutControl2;
|
||||
this.lbSerialNo.TabIndex = 4;
|
||||
this.lbSerialNo.Text = "Serial No:";
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem3,
|
||||
this.layoutControlItem4});
|
||||
this.layoutControlGroup1.Name = "Root";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(708, 175);
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.lbSerialNo;
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem3.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(698, 98);
|
||||
this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem3.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.nSerialNo;
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(0, 98);
|
||||
this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 67);
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(171, 67);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(698, 67);
|
||||
this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem4.TextVisible = false;
|
||||
//
|
||||
// gbMDate
|
||||
//
|
||||
this.gbMDate.Controls.Add(this.layoutControl3);
|
||||
this.gbMDate.Location = new System.Drawing.Point(4, 4);
|
||||
this.gbMDate.Name = "gbMDate";
|
||||
this.gbMDate.Size = new System.Drawing.Size(712, 131);
|
||||
this.gbMDate.TabIndex = 4;
|
||||
this.gbMDate.Text = "Manufacture Date";
|
||||
//
|
||||
// layoutControl3
|
||||
//
|
||||
this.layoutControl3.Controls.Add(this.lbMDate);
|
||||
this.layoutControl3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl3.Location = new System.Drawing.Point(2, 23);
|
||||
this.layoutControl3.Name = "layoutControl3";
|
||||
this.layoutControl3.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(993, 0, 650, 400);
|
||||
this.layoutControl3.Root = this.layoutControlGroup2;
|
||||
this.layoutControl3.Size = new System.Drawing.Size(708, 106);
|
||||
this.layoutControl3.TabIndex = 0;
|
||||
this.layoutControl3.Text = "layoutControl3";
|
||||
//
|
||||
// lbMDate
|
||||
//
|
||||
this.lbMDate.Appearance.Font = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbMDate.Appearance.Options.UseFont = true;
|
||||
this.lbMDate.Location = new System.Drawing.Point(7, 7);
|
||||
this.lbMDate.Name = "lbMDate";
|
||||
this.lbMDate.Size = new System.Drawing.Size(694, 92);
|
||||
this.lbMDate.StyleController = this.layoutControl3;
|
||||
this.lbMDate.TabIndex = 6;
|
||||
this.lbMDate.Text = "Manufacture Date:";
|
||||
//
|
||||
// layoutControlGroup2
|
||||
//
|
||||
this.layoutControlGroup2.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup2.GroupBordersVisible = false;
|
||||
this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem9});
|
||||
this.layoutControlGroup2.Name = "Root";
|
||||
this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5);
|
||||
this.layoutControlGroup2.Size = new System.Drawing.Size(708, 106);
|
||||
this.layoutControlGroup2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem9
|
||||
//
|
||||
this.layoutControlItem9.Control = this.lbMDate;
|
||||
this.layoutControlItem9.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem9.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem9.Name = "layoutControlItem9";
|
||||
this.layoutControlItem9.Size = new System.Drawing.Size(698, 96);
|
||||
this.layoutControlItem9.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem9.TextVisible = false;
|
||||
//
|
||||
// Root
|
||||
//
|
||||
this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.Root.GroupBordersVisible = false;
|
||||
this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1,
|
||||
this.layoutControlItem2,
|
||||
this.layoutControlItem5,
|
||||
this.layoutControlItem6,
|
||||
this.emptySpaceItem1});
|
||||
this.Root.Name = "Root";
|
||||
this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2);
|
||||
this.Root.Size = new System.Drawing.Size(720, 425);
|
||||
this.Root.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.gbMDate;
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(716, 135);
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.gbSerialNo;
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(0, 135);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(716, 204);
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem5
|
||||
//
|
||||
this.layoutControlItem5.Control = this.btnInvWrite;
|
||||
this.layoutControlItem5.Location = new System.Drawing.Point(0, 369);
|
||||
this.layoutControlItem5.MinSize = new System.Drawing.Size(89, 26);
|
||||
this.layoutControlItem5.Name = "layoutControlItem5";
|
||||
this.layoutControlItem5.Size = new System.Drawing.Size(358, 52);
|
||||
this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem5.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem6
|
||||
//
|
||||
this.layoutControlItem6.Control = this.btnClose;
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(358, 369);
|
||||
this.layoutControlItem6.MinSize = new System.Drawing.Size(89, 26);
|
||||
this.layoutControlItem6.Name = "layoutControlItem6";
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(358, 52);
|
||||
this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem6.TextVisible = false;
|
||||
//
|
||||
// emptySpaceItem1
|
||||
//
|
||||
this.emptySpaceItem1.AllowHotTrack = false;
|
||||
this.emptySpaceItem1.Location = new System.Drawing.Point(0, 339);
|
||||
this.emptySpaceItem1.Name = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Size = new System.Drawing.Size(716, 30);
|
||||
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// tmrDisplay
|
||||
//
|
||||
this.tmrDisplay.Tick += new System.EventHandler(this.tmrDisplay_Tick);
|
||||
//
|
||||
// tmrCmd
|
||||
//
|
||||
this.tmrCmd.Interval = 500;
|
||||
this.tmrCmd.Tick += new System.EventHandler(this.tmrCmd_Tick);
|
||||
//
|
||||
// fmxInventoryConfig
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(720, 425);
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.IconOptions.Image = ((System.Drawing.Image)(resources.GetObject("fmxInventoryConfig.IconOptions.Image")));
|
||||
this.IconOptions.SvgImageColorizationMode = DevExpress.Utils.SvgImageColorizationMode.Full;
|
||||
this.Name = "fmxInventoryConfig";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Inventory Config";
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbSerialNo)).EndInit();
|
||||
this.gbSerialNo.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).EndInit();
|
||||
this.layoutControl2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.nSerialNo.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbMDate)).EndInit();
|
||||
this.gbMDate.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).EndInit();
|
||||
this.layoutControl3.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup Root;
|
||||
private DevExpress.XtraEditors.GroupControl gbMDate;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraEditors.GroupControl gbSerialNo;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl2;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraEditors.TextEdit nSerialNo;
|
||||
private DevExpress.XtraEditors.LabelControl lbSerialNo;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
|
||||
private DevExpress.XtraEditors.SimpleButton btnClose;
|
||||
private DevExpress.XtraEditors.SimpleButton btnInvWrite;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
|
||||
private System.Windows.Forms.Timer tmrDisplay;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl3;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2;
|
||||
private DevExpress.XtraEditors.LabelControl lbMDate;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
|
||||
private System.Windows.Forms.Timer tmrCmd;
|
||||
}
|
||||
}
|
||||
245
LFP_Manager_PRM/Forms/fmxInventoryConfig.cs
Normal file
245
LFP_Manager_PRM/Forms/fmxInventoryConfig.cs
Normal file
@@ -0,0 +1,245 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Function;
|
||||
using LFP_Manager.Controls;
|
||||
using LFP_Manager.Utils;
|
||||
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
public delegate void InvDataUpdateEvent(object sendor);
|
||||
public delegate void InvDateCmdEvent(int sId, int mode, int flag, ref DeviceInforation wData);
|
||||
|
||||
public partial class fmxInventoryConfig : XtraForm
|
||||
{
|
||||
#region VARIABLES
|
||||
|
||||
CommConfig Config;
|
||||
|
||||
int SystemId = 0;
|
||||
int CmdResult = 0;
|
||||
DeviceSystemData SystemData;
|
||||
DeviceInforation wInvDate;
|
||||
|
||||
public event InvDataUpdateEvent OnUpdate = null;
|
||||
public event InvDateCmdEvent OnCommand = null;
|
||||
|
||||
#endregion
|
||||
public fmxInventoryConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public fmxInventoryConfig(CommConfig aConfig, int sId, ref DeviceSystemData aSystemData)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
InitData();
|
||||
|
||||
Config = aConfig;
|
||||
SystemId = sId;
|
||||
SystemData = aSystemData;
|
||||
|
||||
tmrDisplay.Enabled = true;
|
||||
tmrCmd.Enabled = true;
|
||||
}
|
||||
|
||||
void InitData()
|
||||
{
|
||||
wInvDate = new DeviceInforation
|
||||
{
|
||||
pcb_sn = new byte[16]
|
||||
};
|
||||
}
|
||||
|
||||
#region DISPLAY DATA
|
||||
|
||||
private void DisplayValue()
|
||||
{
|
||||
// Manufacture Date
|
||||
lbMDate.Text = String.Format("Manufacture Date: {0} ({0:X8})", SystemData.Information.ManufactureDate)
|
||||
+ "\r\n"
|
||||
+ DisplayManufactureDate(SystemData.Information.ManufactureDate)
|
||||
;
|
||||
|
||||
// Device Serial Number
|
||||
byte[] tmp = new byte[SystemData.Information.pcb_sn.Length + 1];
|
||||
for (int i = 0; i < SystemData.Information.pcb_sn.Length; i++)
|
||||
tmp[i] = SystemData.Information.pcb_sn[i];
|
||||
tmp[SystemData.Information.pcb_sn.Length] = 0;
|
||||
|
||||
string strSerial = Encoding.Default.GetString(tmp).Trim('\0');
|
||||
lbSerialNo.Text = String.Format("Serial No: {0}", strSerial);
|
||||
}
|
||||
|
||||
private string DisplayManufactureDate(UInt32 mDate)
|
||||
{
|
||||
DateTime dtDate = csUtils.ConvertTimeStampToDateTime(mDate);
|
||||
|
||||
return String.Format("{0:yyyy-MM-dd hh:mm:ss}", dtDate);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region TIMER ENVENT
|
||||
private void tmrDisplay_Tick(object sender, EventArgs e)
|
||||
{
|
||||
DisplayValue();
|
||||
OnUpdate?.Invoke(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PUBLIC FUCTIONS
|
||||
public void UpdateData(ref DeviceSystemData aSystemData)
|
||||
{
|
||||
SystemData = aSystemData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BUTTON EVENT
|
||||
private void btnMDateRead_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnCommand?.Invoke(SystemId, 900, 0, ref wInvDate);
|
||||
OnCommand?.Invoke(SystemId, 901, 0, ref wInvDate);
|
||||
OnCommand?.Invoke(SystemId, 902, 0, ref wInvDate);
|
||||
}
|
||||
|
||||
private void btnWrite_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
private void btnInvWrite_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (nSerialNo.Text.Length == 15)
|
||||
{
|
||||
csDbUtils.MdDbCreate(Config, nSerialNo.Text);
|
||||
|
||||
if (CheckBmsSerialNo(nSerialNo.Text) == false)
|
||||
{
|
||||
byte[] bSN = Encoding.UTF8.GetBytes(nSerialNo.Text);
|
||||
|
||||
if (wInvDate.pcb_sn == null) wInvDate.pcb_sn = new byte[16];
|
||||
for (int i = 0; i < 16; i++) wInvDate.pcb_sn[i] = 0;
|
||||
for (int i = 0; i < bSN.Length; i++)
|
||||
{
|
||||
wInvDate.pcb_sn[i] = bSN[i];
|
||||
}
|
||||
OnCommand?.Invoke(SystemId, 901, 1, ref wInvDate);
|
||||
OnCommand?.Invoke(SystemId, 902, 1, ref wInvDate);
|
||||
|
||||
CmdMDateWrite();
|
||||
|
||||
CmdResult = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(String.Format("Already used BMS serial number - [{0}]", nSerialNo.Text)
|
||||
, "Warning"
|
||||
, MessageBoxButtons.OK
|
||||
, MessageBoxIcon.Warning
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PROCESSING DATA
|
||||
|
||||
private bool CheckBmsSerialNo(string bSN)
|
||||
{
|
||||
bool result = false;
|
||||
DataTable dtBmsData = new DataTable();
|
||||
DataTable dtBmsMatch = new DataTable();
|
||||
DataTable dtErrorLog = new DataTable();
|
||||
|
||||
//string sql = String.Format("SELECT * FROM TInventoryData WHERE pcb_sn = {0}", bSN);
|
||||
string sql = String.Format("SELECT * FROM TInventoryData");
|
||||
dtBmsData = csDbUtils.GetDataTableBySelect(Config, bSN, sql, "TInventoryData");
|
||||
|
||||
if (dtBmsData != null)
|
||||
{
|
||||
if (dtBmsData.Rows.Count > 1)
|
||||
{
|
||||
DataRow[] arrRows = null;
|
||||
arrRows = dtBmsData.Select(String.Format("pcb_sn = '{0}'", bSN));
|
||||
if (arrRows.Length > 0)
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
private void CmdMDateWrite()
|
||||
{
|
||||
UInt32 mTimeStamp = csUtils.CalcKKTimeStamp(DateTime.Now);
|
||||
wInvDate.ManufactureDate = mTimeStamp;
|
||||
|
||||
OnCommand?.Invoke(SystemId, 900, 1, ref wInvDate);
|
||||
}
|
||||
|
||||
private void CheckResult()
|
||||
{
|
||||
if (CmdResult == 1)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
byte[] a = Encoding.UTF8.GetBytes(nSerialNo.Text);
|
||||
byte[] b = SystemData.Information.pcb_sn;
|
||||
|
||||
for (int i = 0; i < a.Length; i++)
|
||||
{
|
||||
if (a[i] == b[i]) continue;
|
||||
result = true;
|
||||
}
|
||||
|
||||
if ((result == false) && (wInvDate.ManufactureDate == SystemData.Information.ManufactureDate))
|
||||
{
|
||||
CmdResult = 0;
|
||||
|
||||
try
|
||||
{
|
||||
csDbUtils.BmsDataInsert(Config, SystemData, nSerialNo.Text);
|
||||
|
||||
MessageBox.Show(String.Format("BMS data insert complete - [{0}]", nSerialNo.Text)
|
||||
, "Information"
|
||||
, MessageBoxButtons.OK
|
||||
, MessageBoxIcon.Information
|
||||
);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(String.Format("BMS data insert fail - [{0}] \r\n{1}", nSerialNo.Text, ex.Message)
|
||||
, "Warning"
|
||||
, MessageBoxButtons.OK
|
||||
, MessageBoxIcon.Warning
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void tmrCmd_Tick(object sender, EventArgs e)
|
||||
{
|
||||
OnCommand?.Invoke(SystemId, 900, 0, ref wInvDate);
|
||||
OnCommand?.Invoke(SystemId, 901, 0, ref wInvDate);
|
||||
OnCommand?.Invoke(SystemId, 902, 0, ref wInvDate);
|
||||
|
||||
CheckResult();
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
154
LFP_Manager_PRM/Forms/fmxInventoryConfig.resx
Normal file
154
LFP_Manager_PRM/Forms/fmxInventoryConfig.resx
Normal file
@@ -0,0 +1,154 @@
|
||||
<?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="tmrDisplay.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tmrCmd.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>128, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="fmxInventoryConfig.IconOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAABMxJREFUWEflVWtsFVUQPrdtSvilMRIVY8T4h1/aoDGKqIWCIBXR+IgaAmriD/CR
|
||||
SIyVYjSSPmhLrVVTBa6tQNGIBSqYCEEera34KCqFEmgLNa34qPRaeqHv23G+2Z3tXrp3u/iHGCeZnN09
|
||||
M2e++WbOrKFLLP8dACMjI87qp2oTVAIBcB8Y8zncvRcUxEUxoIdGon3UdbbX0TPdvdR9vl/23HZBZFwA
|
||||
euDQcEzedze00aSF79Ckx9+nKx8rc3Tyo2V0+GSn2AyzbVAgvgD0gFgsRsOsfQNDNPXZCjLpq8nc9xaZ
|
||||
ucWW4vmuPJqZ9Rm8xDZIcEggBjT7VR8fJHNnLiUveNsKOr/EUn5Ovp+/MYhNe5vEFj5BWEgIQJ1BJ5qr
|
||||
5dcITcwsoZBmzIFDeBcA9jq7iK554gOK9PQJC8KEfVYiGbcEmv0Db1aTuTufkjKt7CXgvWu4BKw2C0lg
|
||||
YUYevbTugPgM2iz4iScAzX5waFjePz/YSmZWgUWzBuJSLF+7nx7J3SlB5Rv2GMwEXrUhxyvFGABqiMaD
|
||||
87neAbrxqTCF5hRx9hbVoTlr6CrufDRly+kIpc4rpiQO6oCbWUDpWVvsJPxZGAsAyg5KffZHdXGNJ+s9
|
||||
+bRhz1HZh7xa8bU0oGMDEPxeufeY7PuxEAdAjfQeH2/vsrJj9coOB6PRengITVmyXpjRxgzZDfk3Dy3Y
|
||||
gFGN4RbPEgAAZP7r26zGc+rL2fEt+Kn1TweA9smWmuNim8pDCgxgxfsKZgeiLFwoDgBs6qGQ7fUtdtcn
|
||||
6HAOjMxgj17AikFk0t7gkuWRmZ5L5o4cMrfnUE1jB9uOMusGIgD0g0w8NoqeH6Api9eTySi06LQpvW7R
|
||||
Ojp7rl8Cs5P4uAX/hWwGmF1RJ5mv3FBHr5Tto+pvWmXfi4U4BpTOrPLa+KuFldn4lGmGACSGTUPzH7Tn
|
||||
0C9UsfsIlWxtoPCXjfTF96dox7etcnWhO787SZ981UT1TactXwbvZsHoi9JztO0vuceotwTH4OGun51d
|
||||
JVmrHcB2MxsdnT104HA7vcYZX79orVUCph2ApRQzuBTTc+jyh96l385ExzQkA7AecDAkY0UVB1w9mj0r
|
||||
bsKRtk4ZyQrAS/C9fFcjXc1/RsNzI3VhKaXwORMetBpycfEusXOXgksw2nib9x3j+5vvTDy511wK3HMI
|
||||
slZHrKrICnua2YmOCE19+kOrh7SJsc4qpP0/t4uNgjB4wAGo6bVPMoUZRaONx1ncsCRMUZ6GsIFCFARE
|
||||
QejzwOCQPDfzz+syvopJ87SUDCC9gG5etpFt+AZxXAA2vf2Ww3LuXtTMoR4OXPtt9c2yr9m7g7tF9uy1
|
||||
3wZRWv3j2Gbm95Lth2Qf11duQeOpTmm8FM4agVMWlErN5q7cKoZe18dL1AaZwQd609KNMj1RTpydzP10
|
||||
xcPv0e9dUbbjEuBeT3u+0upcrhmMETyFJ96Jjq64xgsKAmqBJqrlISQ3gumXs3memNtWUSZPWYjJCtdS
|
||||
2nObaNoLlQLk1hc3Uxo3UGHVD2Lg1/V+Ah/tmZfDNZT2TLmcjRi3sCLmDvzmUYdEguw1+MWAcPv4+aH/
|
||||
nFGMYKryzvVR8TskkaiPnuUVA+JMQi+F6Ppv5MLzvNT5F1wq+b8DIPoHjJf5qaq9hPwAAAAASUVORK5C
|
||||
YII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
591
LFP_Manager_PRM/Forms/fmxInventoryConfig2.Designer.cs
generated
Normal file
591
LFP_Manager_PRM/Forms/fmxInventoryConfig2.Designer.cs
generated
Normal file
@@ -0,0 +1,591 @@
|
||||
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
partial class fmxInventoryConfig2
|
||||
{
|
||||
/// <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();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fmxInventoryConfig2));
|
||||
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.btnRefresh = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnExportExcel = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.mnView = new System.Windows.Forms.DataGridView();
|
||||
this.groupControl2 = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl4 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.lbResult = new DevExpress.XtraEditors.LabelControl();
|
||||
this.layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.groupControl1 = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl3 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.lbPcbSerial = new DevExpress.XtraEditors.LabelControl();
|
||||
this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.btnClose = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.btnInvWrite = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.gbSerialNo = new DevExpress.XtraEditors.GroupControl();
|
||||
this.layoutControl2 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.nMdNo = new DevExpress.XtraEditors.TextEdit();
|
||||
this.lbMdSerial = new DevExpress.XtraEditors.LabelControl();
|
||||
this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.gbDvResult = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
|
||||
this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.tmrDisplay = new System.Windows.Forms.Timer(this.components);
|
||||
this.tmrCmd = new System.Windows.Forms.Timer(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.mnView)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.groupControl2)).BeginInit();
|
||||
this.groupControl2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl4)).BeginInit();
|
||||
this.layoutControl4.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.groupControl1)).BeginInit();
|
||||
this.groupControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).BeginInit();
|
||||
this.layoutControl3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbSerialNo)).BeginInit();
|
||||
this.gbSerialNo.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).BeginInit();
|
||||
this.layoutControl2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nMdNo.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbDvResult)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.btnRefresh);
|
||||
this.layoutControl1.Controls.Add(this.btnExportExcel);
|
||||
this.layoutControl1.Controls.Add(this.mnView);
|
||||
this.layoutControl1.Controls.Add(this.groupControl2);
|
||||
this.layoutControl1.Controls.Add(this.groupControl1);
|
||||
this.layoutControl1.Controls.Add(this.btnClose);
|
||||
this.layoutControl1.Controls.Add(this.btnInvWrite);
|
||||
this.layoutControl1.Controls.Add(this.gbSerialNo);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(999, 164, 650, 400);
|
||||
this.layoutControl1.Root = this.Root;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(798, 538);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// btnRefresh
|
||||
//
|
||||
this.btnRefresh.Location = new System.Drawing.Point(8, 472);
|
||||
this.btnRefresh.Name = "btnRefresh";
|
||||
this.btnRefresh.Size = new System.Drawing.Size(98, 22);
|
||||
this.btnRefresh.StyleController = this.layoutControl1;
|
||||
this.btnRefresh.TabIndex = 13;
|
||||
this.btnRefresh.Text = "Refresh";
|
||||
this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
|
||||
//
|
||||
// btnExportExcel
|
||||
//
|
||||
this.btnExportExcel.Location = new System.Drawing.Point(703, 472);
|
||||
this.btnExportExcel.Name = "btnExportExcel";
|
||||
this.btnExportExcel.Size = new System.Drawing.Size(87, 22);
|
||||
this.btnExportExcel.StyleController = this.layoutControl1;
|
||||
this.btnExportExcel.TabIndex = 12;
|
||||
this.btnExportExcel.Text = "Export";
|
||||
this.btnExportExcel.Click += new System.EventHandler(this.btnExportExcel_Click);
|
||||
//
|
||||
// mnView
|
||||
//
|
||||
this.mnView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.mnView.Location = new System.Drawing.Point(8, 344);
|
||||
this.mnView.Name = "mnView";
|
||||
this.mnView.ReadOnly = true;
|
||||
this.mnView.RowTemplate.Height = 23;
|
||||
this.mnView.Size = new System.Drawing.Size(782, 124);
|
||||
this.mnView.TabIndex = 11;
|
||||
//
|
||||
// groupControl2
|
||||
//
|
||||
this.groupControl2.Controls.Add(this.layoutControl4);
|
||||
this.groupControl2.Location = new System.Drawing.Point(4, 234);
|
||||
this.groupControl2.Name = "groupControl2";
|
||||
this.groupControl2.Size = new System.Drawing.Size(790, 81);
|
||||
this.groupControl2.TabIndex = 10;
|
||||
this.groupControl2.Text = "Status";
|
||||
//
|
||||
// layoutControl4
|
||||
//
|
||||
this.layoutControl4.Controls.Add(this.lbResult);
|
||||
this.layoutControl4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl4.Location = new System.Drawing.Point(2, 23);
|
||||
this.layoutControl4.Name = "layoutControl4";
|
||||
this.layoutControl4.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(993, 64, 650, 400);
|
||||
this.layoutControl4.Root = this.layoutControlGroup3;
|
||||
this.layoutControl4.Size = new System.Drawing.Size(786, 56);
|
||||
this.layoutControl4.TabIndex = 0;
|
||||
this.layoutControl4.Text = "layoutControl4";
|
||||
//
|
||||
// lbResult
|
||||
//
|
||||
this.lbResult.Appearance.Font = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbResult.Appearance.Options.UseFont = true;
|
||||
this.lbResult.Appearance.Options.UseTextOptions = true;
|
||||
this.lbResult.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.lbResult.Location = new System.Drawing.Point(7, 7);
|
||||
this.lbResult.Name = "lbResult";
|
||||
this.lbResult.Size = new System.Drawing.Size(772, 42);
|
||||
this.lbResult.StyleController = this.layoutControl4;
|
||||
this.lbResult.TabIndex = 4;
|
||||
this.lbResult.Text = "Ready";
|
||||
//
|
||||
// layoutControlGroup3
|
||||
//
|
||||
this.layoutControlGroup3.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup3.GroupBordersVisible = false;
|
||||
this.layoutControlGroup3.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem7});
|
||||
this.layoutControlGroup3.Name = "Root";
|
||||
this.layoutControlGroup3.Padding = new DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5);
|
||||
this.layoutControlGroup3.Size = new System.Drawing.Size(786, 56);
|
||||
this.layoutControlGroup3.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem7
|
||||
//
|
||||
this.layoutControlItem7.Control = this.lbResult;
|
||||
this.layoutControlItem7.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem7.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem7.Name = "layoutControlItem3";
|
||||
this.layoutControlItem7.Size = new System.Drawing.Size(776, 46);
|
||||
this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem7.TextVisible = false;
|
||||
//
|
||||
// groupControl1
|
||||
//
|
||||
this.groupControl1.Controls.Add(this.layoutControl3);
|
||||
this.groupControl1.Location = new System.Drawing.Point(4, 4);
|
||||
this.groupControl1.Name = "groupControl1";
|
||||
this.groupControl1.Size = new System.Drawing.Size(790, 77);
|
||||
this.groupControl1.TabIndex = 7;
|
||||
this.groupControl1.Text = "BMS Serial Number";
|
||||
//
|
||||
// layoutControl3
|
||||
//
|
||||
this.layoutControl3.Controls.Add(this.lbPcbSerial);
|
||||
this.layoutControl3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl3.Location = new System.Drawing.Point(2, 23);
|
||||
this.layoutControl3.Name = "layoutControl3";
|
||||
this.layoutControl3.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(993, 64, 650, 400);
|
||||
this.layoutControl3.Root = this.layoutControlGroup2;
|
||||
this.layoutControl3.Size = new System.Drawing.Size(786, 52);
|
||||
this.layoutControl3.TabIndex = 0;
|
||||
this.layoutControl3.Text = "layoutControl3";
|
||||
//
|
||||
// lbPcbSerial
|
||||
//
|
||||
this.lbPcbSerial.Appearance.Font = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbPcbSerial.Appearance.Options.UseFont = true;
|
||||
this.lbPcbSerial.Location = new System.Drawing.Point(7, 7);
|
||||
this.lbPcbSerial.Name = "lbPcbSerial";
|
||||
this.lbPcbSerial.Size = new System.Drawing.Size(772, 38);
|
||||
this.lbPcbSerial.StyleController = this.layoutControl3;
|
||||
this.lbPcbSerial.TabIndex = 4;
|
||||
this.lbPcbSerial.Text = "BMS S/N:";
|
||||
//
|
||||
// layoutControlGroup2
|
||||
//
|
||||
this.layoutControlGroup2.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup2.GroupBordersVisible = false;
|
||||
this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem6});
|
||||
this.layoutControlGroup2.Name = "Root";
|
||||
this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5);
|
||||
this.layoutControlGroup2.Size = new System.Drawing.Size(786, 52);
|
||||
this.layoutControlGroup2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem6
|
||||
//
|
||||
this.layoutControlItem6.Control = this.lbPcbSerial;
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem6.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem6.Name = "layoutControlItem3";
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(776, 42);
|
||||
this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem6.TextVisible = false;
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Appearance.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnClose.Appearance.Options.UseFont = true;
|
||||
this.btnClose.Location = new System.Drawing.Point(401, 502);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(393, 32);
|
||||
this.btnClose.StyleController = this.layoutControl1;
|
||||
this.btnClose.TabIndex = 9;
|
||||
this.btnClose.Text = "Close";
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// btnInvWrite
|
||||
//
|
||||
this.btnInvWrite.Appearance.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnInvWrite.Appearance.Options.UseFont = true;
|
||||
this.btnInvWrite.Location = new System.Drawing.Point(4, 502);
|
||||
this.btnInvWrite.Name = "btnInvWrite";
|
||||
this.btnInvWrite.Size = new System.Drawing.Size(393, 32);
|
||||
this.btnInvWrite.StyleController = this.layoutControl1;
|
||||
this.btnInvWrite.TabIndex = 8;
|
||||
this.btnInvWrite.Text = "Apply";
|
||||
//
|
||||
// gbSerialNo
|
||||
//
|
||||
this.gbSerialNo.Controls.Add(this.layoutControl2);
|
||||
this.gbSerialNo.Location = new System.Drawing.Point(4, 85);
|
||||
this.gbSerialNo.Name = "gbSerialNo";
|
||||
this.gbSerialNo.Size = new System.Drawing.Size(790, 145);
|
||||
this.gbSerialNo.TabIndex = 6;
|
||||
this.gbSerialNo.Text = "Module Number";
|
||||
//
|
||||
// layoutControl2
|
||||
//
|
||||
this.layoutControl2.Controls.Add(this.nMdNo);
|
||||
this.layoutControl2.Controls.Add(this.lbMdSerial);
|
||||
this.layoutControl2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl2.Location = new System.Drawing.Point(2, 23);
|
||||
this.layoutControl2.Name = "layoutControl2";
|
||||
this.layoutControl2.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(993, 64, 650, 400);
|
||||
this.layoutControl2.Root = this.layoutControlGroup1;
|
||||
this.layoutControl2.Size = new System.Drawing.Size(786, 120);
|
||||
this.layoutControl2.TabIndex = 0;
|
||||
this.layoutControl2.Text = "layoutControl2";
|
||||
//
|
||||
// nMdNo
|
||||
//
|
||||
this.nMdNo.Location = new System.Drawing.Point(7, 50);
|
||||
this.nMdNo.Name = "nMdNo";
|
||||
this.nMdNo.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 36F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.nMdNo.Properties.Appearance.Options.UseFont = true;
|
||||
this.nMdNo.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.nMdNo.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.nMdNo.Properties.ReadOnly = true;
|
||||
this.nMdNo.Size = new System.Drawing.Size(772, 64);
|
||||
this.nMdNo.StyleController = this.layoutControl2;
|
||||
this.nMdNo.TabIndex = 5;
|
||||
//
|
||||
// lbMdSerial
|
||||
//
|
||||
this.lbMdSerial.Appearance.Font = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lbMdSerial.Appearance.Options.UseFont = true;
|
||||
this.lbMdSerial.Location = new System.Drawing.Point(7, 7);
|
||||
this.lbMdSerial.Name = "lbMdSerial";
|
||||
this.lbMdSerial.Size = new System.Drawing.Size(772, 39);
|
||||
this.lbMdSerial.StyleController = this.layoutControl2;
|
||||
this.lbMdSerial.TabIndex = 4;
|
||||
this.lbMdSerial.Text = "Module S/N:";
|
||||
//
|
||||
// layoutControlGroup1
|
||||
//
|
||||
this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup1.GroupBordersVisible = false;
|
||||
this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem3,
|
||||
this.layoutControlItem4});
|
||||
this.layoutControlGroup1.Name = "Root";
|
||||
this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5);
|
||||
this.layoutControlGroup1.Size = new System.Drawing.Size(786, 120);
|
||||
this.layoutControlGroup1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.lbMdSerial;
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem3.MinSize = new System.Drawing.Size(74, 18);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(776, 43);
|
||||
this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem3.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.nMdNo;
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(0, 43);
|
||||
this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 67);
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(171, 67);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(776, 67);
|
||||
this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem4.TextVisible = false;
|
||||
//
|
||||
// Root
|
||||
//
|
||||
this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.Root.GroupBordersVisible = false;
|
||||
this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem1,
|
||||
this.layoutControlItem5,
|
||||
this.layoutControlItem2,
|
||||
this.layoutControlItem8,
|
||||
this.layoutControlItem10,
|
||||
this.gbDvResult});
|
||||
this.Root.Name = "Root";
|
||||
this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 2, 2);
|
||||
this.Root.Size = new System.Drawing.Size(798, 538);
|
||||
this.Root.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.gbSerialNo;
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 81);
|
||||
this.layoutControlItem1.MaxSize = new System.Drawing.Size(0, 149);
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(189, 149);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(794, 149);
|
||||
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem5
|
||||
//
|
||||
this.layoutControlItem5.Control = this.btnInvWrite;
|
||||
this.layoutControlItem5.Location = new System.Drawing.Point(0, 498);
|
||||
this.layoutControlItem5.MaxSize = new System.Drawing.Size(0, 36);
|
||||
this.layoutControlItem5.MinSize = new System.Drawing.Size(57, 36);
|
||||
this.layoutControlItem5.Name = "layoutControlItem5";
|
||||
this.layoutControlItem5.Size = new System.Drawing.Size(397, 36);
|
||||
this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem5.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.btnClose;
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(397, 498);
|
||||
this.layoutControlItem2.MaxSize = new System.Drawing.Size(0, 36);
|
||||
this.layoutControlItem2.MinSize = new System.Drawing.Size(55, 36);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(397, 36);
|
||||
this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem8
|
||||
//
|
||||
this.layoutControlItem8.Control = this.groupControl1;
|
||||
this.layoutControlItem8.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem8.MaxSize = new System.Drawing.Size(0, 81);
|
||||
this.layoutControlItem8.MinSize = new System.Drawing.Size(92, 81);
|
||||
this.layoutControlItem8.Name = "layoutControlItem8";
|
||||
this.layoutControlItem8.Size = new System.Drawing.Size(794, 81);
|
||||
this.layoutControlItem8.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem8.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem10
|
||||
//
|
||||
this.layoutControlItem10.Control = this.groupControl2;
|
||||
this.layoutControlItem10.Location = new System.Drawing.Point(0, 230);
|
||||
this.layoutControlItem10.MaxSize = new System.Drawing.Size(0, 85);
|
||||
this.layoutControlItem10.MinSize = new System.Drawing.Size(92, 85);
|
||||
this.layoutControlItem10.Name = "layoutControlItem10";
|
||||
this.layoutControlItem10.Size = new System.Drawing.Size(794, 85);
|
||||
this.layoutControlItem10.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem10.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem10.TextVisible = false;
|
||||
//
|
||||
// gbDvResult
|
||||
//
|
||||
this.gbDvResult.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem11,
|
||||
this.emptySpaceItem1,
|
||||
this.layoutControlItem9,
|
||||
this.layoutControlItem12});
|
||||
this.gbDvResult.Location = new System.Drawing.Point(0, 315);
|
||||
this.gbDvResult.Name = "gbDvResult";
|
||||
this.gbDvResult.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.gbDvResult.Size = new System.Drawing.Size(794, 183);
|
||||
this.gbDvResult.Text = "Module Number List";
|
||||
//
|
||||
// layoutControlItem11
|
||||
//
|
||||
this.layoutControlItem11.Control = this.btnExportExcel;
|
||||
this.layoutControlItem11.Location = new System.Drawing.Point(695, 128);
|
||||
this.layoutControlItem11.MinSize = new System.Drawing.Size(89, 26);
|
||||
this.layoutControlItem11.Name = "layoutControlItem11";
|
||||
this.layoutControlItem11.Size = new System.Drawing.Size(91, 26);
|
||||
this.layoutControlItem11.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem11.TextVisible = false;
|
||||
//
|
||||
// emptySpaceItem1
|
||||
//
|
||||
this.emptySpaceItem1.AllowHotTrack = false;
|
||||
this.emptySpaceItem1.Location = new System.Drawing.Point(102, 128);
|
||||
this.emptySpaceItem1.MinSize = new System.Drawing.Size(104, 24);
|
||||
this.emptySpaceItem1.Name = "emptySpaceItem1";
|
||||
this.emptySpaceItem1.Size = new System.Drawing.Size(593, 26);
|
||||
this.emptySpaceItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
//
|
||||
// layoutControlItem9
|
||||
//
|
||||
this.layoutControlItem9.Control = this.mnView;
|
||||
this.layoutControlItem9.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem9.Name = "layoutControlItem9";
|
||||
this.layoutControlItem9.Size = new System.Drawing.Size(786, 128);
|
||||
this.layoutControlItem9.Text = "Module Number List";
|
||||
this.layoutControlItem9.TextLocation = DevExpress.Utils.Locations.Top;
|
||||
this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem9.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem12
|
||||
//
|
||||
this.layoutControlItem12.Control = this.btnRefresh;
|
||||
this.layoutControlItem12.Location = new System.Drawing.Point(0, 128);
|
||||
this.layoutControlItem12.Name = "layoutControlItem12";
|
||||
this.layoutControlItem12.Size = new System.Drawing.Size(102, 26);
|
||||
this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem12.TextVisible = false;
|
||||
//
|
||||
// tmrDisplay
|
||||
//
|
||||
this.tmrDisplay.Tick += new System.EventHandler(this.tmrDisplay_Tick);
|
||||
//
|
||||
// fmxInventoryConfig2
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(798, 538);
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.IconOptions.Image = ((System.Drawing.Image)(resources.GetObject("fmxInventoryConfig2.IconOptions.Image")));
|
||||
this.Name = "fmxInventoryConfig2";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Module Number Config";
|
||||
this.Load += new System.EventHandler(this.fmxInventoryConfig2_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.mnView)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.groupControl2)).EndInit();
|
||||
this.groupControl2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl4)).EndInit();
|
||||
this.layoutControl4.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.groupControl1)).EndInit();
|
||||
this.groupControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl3)).EndInit();
|
||||
this.layoutControl3.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbSerialNo)).EndInit();
|
||||
this.gbSerialNo.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).EndInit();
|
||||
this.layoutControl2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.nMdNo.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gbDvResult)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup Root;
|
||||
private DevExpress.XtraEditors.GroupControl gbSerialNo;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl2;
|
||||
private DevExpress.XtraEditors.TextEdit nMdNo;
|
||||
private DevExpress.XtraEditors.LabelControl lbMdSerial;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnClose;
|
||||
private DevExpress.XtraEditors.SimpleButton btnInvWrite;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
|
||||
private System.Windows.Forms.Timer tmrDisplay;
|
||||
private System.Windows.Forms.Timer tmrCmd;
|
||||
private DevExpress.XtraEditors.GroupControl groupControl1;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl3;
|
||||
private DevExpress.XtraEditors.LabelControl lbPcbSerial;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
|
||||
private DevExpress.XtraEditors.GroupControl groupControl2;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl4;
|
||||
private DevExpress.XtraEditors.LabelControl lbResult;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10;
|
||||
private DevExpress.XtraEditors.SimpleButton btnExportExcel;
|
||||
private System.Windows.Forms.DataGridView mnView;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup gbDvResult;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
|
||||
private DevExpress.XtraEditors.SimpleButton btnRefresh;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
|
||||
}
|
||||
}
|
||||
406
LFP_Manager_PRM/Forms/fmxInventoryConfig2.cs
Normal file
406
LFP_Manager_PRM/Forms/fmxInventoryConfig2.cs
Normal file
@@ -0,0 +1,406 @@
|
||||
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 LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Function;
|
||||
using LFP_Manager.Controls;
|
||||
using LFP_Manager.Utils;
|
||||
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
public partial class fmxInventoryConfig2 : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
#region VARIABLES
|
||||
|
||||
private bool fBarCode = false;
|
||||
private bool ctrlKey = false;
|
||||
|
||||
private CommConfig Config;
|
||||
private int SystemId = 0;
|
||||
private int CmdResult = 0;
|
||||
private int CellDivUnit = 0;
|
||||
private DeviceSystemData SystemData;
|
||||
private DeviceInforation wInvDate;
|
||||
|
||||
private string oldMdSn;
|
||||
|
||||
public event InvDataUpdateEvent OnUpdate = null;
|
||||
public event InvDateCmdEvent OnCommand = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
public fmxInventoryConfig2()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public fmxInventoryConfig2(CommConfig aConfig, int sId, ref DeviceSystemData aSystemData, int aCellDivUnit)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
oldMdSn = "";
|
||||
Config = aConfig;
|
||||
SystemId = sId;
|
||||
SystemData = aSystemData;
|
||||
SystemData.mNo = SystemId;
|
||||
|
||||
CellDivUnit = aCellDivUnit;
|
||||
|
||||
tmrDisplay.Enabled = true;
|
||||
tmrCmd.Enabled = true;
|
||||
|
||||
KeyPreview = true;
|
||||
KeyDown += new KeyEventHandler(teBarCode_KeyDown);
|
||||
KeyPress += new KeyPressEventHandler(teBarCode_KeyPress);
|
||||
}
|
||||
#endregion
|
||||
|
||||
void InitData()
|
||||
{
|
||||
wInvDate = new DeviceInforation
|
||||
{
|
||||
module_sn = new byte[32]
|
||||
};
|
||||
}
|
||||
|
||||
#region TIMER ENVENT
|
||||
|
||||
private void tmrDisplay_Tick(object sender, EventArgs e)
|
||||
{
|
||||
DisplayValue();
|
||||
OnUpdate?.Invoke(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PUBLIC FUCTIONS
|
||||
public void UpdateData(ref DeviceSystemData aSystemData)
|
||||
{
|
||||
SystemData = aSystemData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PROCESSING DATA
|
||||
|
||||
private bool CheckMdSerialNo(string mSN)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
csDbUtils.MdDbCreate(Config, mSN);
|
||||
|
||||
DataTable dtMdData = new DataTable();
|
||||
DataTable dtMdMatch = new DataTable();
|
||||
DataTable dtErrorLog = new DataTable();
|
||||
|
||||
//string sql = String.Format("SELECT * FROM TInventoryData WHERE pcb_sn = {0}", bSN);
|
||||
string sql = String.Format("SELECT * FROM TInventoryData");
|
||||
dtMdData = csDbUtils.GetDataTableBySelect(Config, mSN, sql, "TInventoryData");
|
||||
|
||||
if (dtMdData != null)
|
||||
{
|
||||
if (dtMdData.Rows.Count > 1)
|
||||
{
|
||||
DataRow[] arrRows = null;
|
||||
arrRows = dtMdData.Select(String.Format("module_sn = '{0}'", mSN));
|
||||
if (arrRows.Length > 0) { result = true; }
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
private void CmdMDateWrite()
|
||||
{
|
||||
UInt32 mTimeStamp = csUtils.CalcKKTimeStamp(DateTime.Now);
|
||||
wInvDate.ManufactureDate = mTimeStamp;
|
||||
|
||||
OnCommand?.Invoke(SystemId, 999, 1, ref wInvDate);
|
||||
}
|
||||
|
||||
private void CheckResult()
|
||||
{
|
||||
byte[] a = Encoding.UTF8.GetBytes(nMdNo.Text);
|
||||
byte[] b = SystemData.Information.pcb_sn;
|
||||
|
||||
try
|
||||
{
|
||||
csDbUtils.MdLogDataInsert(ref Config, nMdNo.Text, ref SystemData, DateTime.Now, CellDivUnit);
|
||||
csDbUtils.MdSnDataInsert(Config, SystemData, nMdNo.Text);
|
||||
|
||||
oldMdSn = nMdNo.Text;
|
||||
|
||||
//MessageBox.Show(String.Format("Module data insert complete - [{0}]", nMdNo.Text)
|
||||
// , "Information"
|
||||
// , MessageBoxButtons.OK
|
||||
// , MessageBoxIcon.Information
|
||||
// );
|
||||
lbResult.Text = String.Format("PASS: {0}", String.Format("Module data insert complete - [{0}]", nMdNo.Text));
|
||||
lbResult.ForeColor = Color.Blue;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception(String.Format("Module data insert fail - [{0}] \r\n{1}", nMdNo.Text, ex.Message));
|
||||
//MessageBox.Show(String.Format("Module data insert fail - [{0}] \r\n{1}", nMdNo.Text, ex.Message)
|
||||
// , "Warning"
|
||||
// , MessageBoxButtons.OK
|
||||
// , MessageBoxIcon.Warning
|
||||
// );
|
||||
}
|
||||
}
|
||||
|
||||
private bool SelectModuleSN(string mSN)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
//string sql = String.Format("SELECT * FROM TInventoryData WHERE pcb_sn = {0}", bSN);
|
||||
string sql = String.Format("SELECT * FROM TModuleValue");
|
||||
DataTable dtMdData = csDbUtils.GetDataTableBySelect(Config, mSN, sql, "TModuleValue");
|
||||
|
||||
if (dtMdData != null)
|
||||
{
|
||||
if (dtMdData.Rows.Count > 0)
|
||||
{
|
||||
mnView.DataSource = dtMdData;
|
||||
//DataRow[] arrRows = null;
|
||||
//arrRows = dtMdData.Select(String.Format("module_sn = '{0}'", mSN));
|
||||
//if (arrRows.Length > 0) { result = true; }
|
||||
}
|
||||
gbDvResult.Text = string.Format("Module Number List ({0})", dtMdData.Rows.Count);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BUTTON EVENT
|
||||
|
||||
private void btnInvWrite_Click(object sender, EventArgs e)
|
||||
{
|
||||
string result = "";
|
||||
try
|
||||
{
|
||||
if (nMdNo.Text.Length == 24)
|
||||
{
|
||||
csDbUtils.MdDbCreate(Config, nMdNo.Text);
|
||||
if ((SystemData.Information.pcb_sn == null) || (SystemData.Information.pcb_sn == null) || (SystemData.Information.pcb_sn[0] == 0))
|
||||
{
|
||||
result = "No BMS Serial Number - Please check CAN communication";
|
||||
return;
|
||||
}
|
||||
|
||||
if (CheckMdSerialNo(nMdNo.Text) == false)
|
||||
{
|
||||
CheckResult();
|
||||
|
||||
//byte[] mSN = Encoding.UTF8.GetBytes(nMdNo.Text);
|
||||
|
||||
//if (wInvDate.module_sn == null) wInvDate.module_sn = new byte[32];
|
||||
//for (int i = 0; i < wInvDate.module_sn.Length; i++)
|
||||
//{
|
||||
// wInvDate.module_sn[i] = 0;
|
||||
//}
|
||||
//for (int i = 0; i < mSN.Length; i++)
|
||||
//{
|
||||
// wInvDate.module_sn[i] = mSN[i];
|
||||
//}
|
||||
//CmdMDateWrite();
|
||||
|
||||
//CmdResult = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = "Already used Module serial number";
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result = ex.Message;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (result != "")
|
||||
{
|
||||
//_ = MessageBox.Show(string.Format("{0} - [{1}]", result, nMdNo.Text)
|
||||
// , "Warning"
|
||||
// , MessageBoxButtons.OK
|
||||
// , MessageBoxIcon.Warning
|
||||
// );
|
||||
lbResult.Text = String.Format("Fail: {0}", result);
|
||||
lbResult.ForeColor = Color.Red;
|
||||
|
||||
csLog.SystemErrorLog(Config, result, DateTime.Now, Application.ExecutablePath);
|
||||
}
|
||||
oldMdSn = nMdNo.Text;
|
||||
nMdNo.Text = "";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DISPLAY DATA
|
||||
|
||||
private void DisplayValue()
|
||||
{
|
||||
// Device PCB S/N
|
||||
byte[] tmpPcbNo = new byte[SystemData.Information.pcb_sn.Length + 1];
|
||||
for (int i = 0; i < SystemData.Information.pcb_sn.Length; i++)
|
||||
{
|
||||
tmpPcbNo[i] = SystemData.Information.pcb_sn[i];
|
||||
}
|
||||
tmpPcbNo[SystemData.Information.pcb_sn.Length] = 0;
|
||||
|
||||
string strPcbSerial = Encoding.Default.GetString(tmpPcbNo).Trim('\0');
|
||||
lbPcbSerial.Text = String.Format("BMS S/N: {0}", strPcbSerial);
|
||||
|
||||
// Device Module S/N
|
||||
byte[] tmpMdNo = new byte[SystemData.Information.module_sn.Length + 1];
|
||||
for (int i = 0; i < SystemData.Information.module_sn.Length; i++)
|
||||
{
|
||||
tmpMdNo[i] = SystemData.Information.module_sn[i];
|
||||
}
|
||||
tmpMdNo[SystemData.Information.module_sn.Length] = 0;
|
||||
|
||||
string strMdSerial = Encoding.Default.GetString(tmpMdNo).Trim('\0');
|
||||
lbMdSerial.Text = String.Format("Module S/N: {0}", strMdSerial);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GLOBAL KEYBOARD HOOK
|
||||
private void fmxInventoryConfig2_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void teBarCode_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (fBarCode == false)
|
||||
{
|
||||
if (e.KeyChar == 0x0D)
|
||||
{
|
||||
fBarCode = true;
|
||||
|
||||
btnInvWrite_Click(sender, e);
|
||||
//checkBarCode1(nMdNo.Text);
|
||||
}
|
||||
else if (e.KeyChar == 22)
|
||||
{
|
||||
//ctrlKey = true;
|
||||
IDataObject ido = Clipboard.GetDataObject();
|
||||
if (ido.GetDataPresent(typeof(string)))
|
||||
{
|
||||
nMdNo.Text = (string)ido.GetData(typeof(string));
|
||||
}
|
||||
}
|
||||
else if (e.KeyChar > 0x20)
|
||||
{
|
||||
if (e.KeyChar == 'v')
|
||||
{
|
||||
if (ctrlKey)
|
||||
{
|
||||
IDataObject ido = Clipboard.GetDataObject();
|
||||
if (ido.GetDataPresent(typeof(string)))
|
||||
{
|
||||
nMdNo.Text = (string)ido.GetData(typeof(string));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nMdNo.Text += e.KeyChar;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void teBarCode_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (fBarCode)
|
||||
{
|
||||
nMdNo.Text = "";
|
||||
fBarCode = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void checkBarCode1(string code)
|
||||
{
|
||||
if (CheckMdSerialNo(code))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//if (dt.Rows.Count > 0)
|
||||
//{
|
||||
// DataRow aRow = dt.Rows[0];
|
||||
|
||||
// MakeCellInformation(aRow);
|
||||
// MakeCellAssyNo(aRow);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// MakeBarCodeForm("The data could" + Environment.NewLine + "not be found." + Environment.NewLine + "(无数据)", 1);
|
||||
//}
|
||||
}
|
||||
|
||||
private void MakeBarCodeForm(string result, int flag)
|
||||
{
|
||||
lbResult.Text = result;
|
||||
switch (flag)
|
||||
{
|
||||
case 0:
|
||||
lbResult.ForeColor = Color.Blue;
|
||||
break;
|
||||
case 1:
|
||||
lbResult.ForeColor = Color.Red;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BUTTON EVENT
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void btnRefresh_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string lotNo;
|
||||
if (oldMdSn == "")
|
||||
{
|
||||
lotNo = "01PPBCNA013006CAW0000019";
|
||||
}
|
||||
else
|
||||
{
|
||||
lotNo = oldMdSn;
|
||||
}
|
||||
SelectModuleSN(lotNo);
|
||||
mnView.AutoResizeColumns();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnExportExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
//
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
154
LFP_Manager_PRM/Forms/fmxInventoryConfig2.resx
Normal file
154
LFP_Manager_PRM/Forms/fmxInventoryConfig2.resx
Normal file
@@ -0,0 +1,154 @@
|
||||
<?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="tmrDisplay.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tmrCmd.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>128, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="fmxInventoryConfig2.IconOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAABMxJREFUWEflVWtsFVUQPrdtSvilMRIVY8T4h1/aoDGKqIWCIBXR+IgaAmriD/CR
|
||||
SIyVYjSSPmhLrVVTBa6tQNGIBSqYCEEera34KCqFEmgLNa34qPRaeqHv23G+2Z3tXrp3u/iHGCeZnN09
|
||||
M2e++WbOrKFLLP8dACMjI87qp2oTVAIBcB8Y8zncvRcUxEUxoIdGon3UdbbX0TPdvdR9vl/23HZBZFwA
|
||||
euDQcEzedze00aSF79Ckx9+nKx8rc3Tyo2V0+GSn2AyzbVAgvgD0gFgsRsOsfQNDNPXZCjLpq8nc9xaZ
|
||||
ucWW4vmuPJqZ9Rm8xDZIcEggBjT7VR8fJHNnLiUveNsKOr/EUn5Ovp+/MYhNe5vEFj5BWEgIQJ1BJ5qr
|
||||
5dcITcwsoZBmzIFDeBcA9jq7iK554gOK9PQJC8KEfVYiGbcEmv0Db1aTuTufkjKt7CXgvWu4BKw2C0lg
|
||||
YUYevbTugPgM2iz4iScAzX5waFjePz/YSmZWgUWzBuJSLF+7nx7J3SlB5Rv2GMwEXrUhxyvFGABqiMaD
|
||||
87neAbrxqTCF5hRx9hbVoTlr6CrufDRly+kIpc4rpiQO6oCbWUDpWVvsJPxZGAsAyg5KffZHdXGNJ+s9
|
||||
+bRhz1HZh7xa8bU0oGMDEPxeufeY7PuxEAdAjfQeH2/vsrJj9coOB6PRengITVmyXpjRxgzZDfk3Dy3Y
|
||||
gFGN4RbPEgAAZP7r26zGc+rL2fEt+Kn1TweA9smWmuNim8pDCgxgxfsKZgeiLFwoDgBs6qGQ7fUtdtcn
|
||||
6HAOjMxgj17AikFk0t7gkuWRmZ5L5o4cMrfnUE1jB9uOMusGIgD0g0w8NoqeH6Api9eTySi06LQpvW7R
|
||||
Ojp7rl8Cs5P4uAX/hWwGmF1RJ5mv3FBHr5Tto+pvWmXfi4U4BpTOrPLa+KuFldn4lGmGACSGTUPzH7Tn
|
||||
0C9UsfsIlWxtoPCXjfTF96dox7etcnWhO787SZ981UT1TactXwbvZsHoi9JztO0vuceotwTH4OGun51d
|
||||
JVmrHcB2MxsdnT104HA7vcYZX79orVUCph2ApRQzuBTTc+jyh96l385ExzQkA7AecDAkY0UVB1w9mj0r
|
||||
bsKRtk4ZyQrAS/C9fFcjXc1/RsNzI3VhKaXwORMetBpycfEusXOXgksw2nib9x3j+5vvTDy511wK3HMI
|
||||
slZHrKrICnua2YmOCE19+kOrh7SJsc4qpP0/t4uNgjB4wAGo6bVPMoUZRaONx1ncsCRMUZ6GsIFCFARE
|
||||
QejzwOCQPDfzz+syvopJ87SUDCC9gG5etpFt+AZxXAA2vf2Ww3LuXtTMoR4OXPtt9c2yr9m7g7tF9uy1
|
||||
3wZRWv3j2Gbm95Lth2Qf11duQeOpTmm8FM4agVMWlErN5q7cKoZe18dL1AaZwQd609KNMj1RTpydzP10
|
||||
xcPv0e9dUbbjEuBeT3u+0upcrhmMETyFJ96Jjq64xgsKAmqBJqrlISQ3gumXs3memNtWUSZPWYjJCtdS
|
||||
2nObaNoLlQLk1hc3Uxo3UGHVD2Lg1/V+Ah/tmZfDNZT2TLmcjRi3sCLmDvzmUYdEguw1+MWAcPv4+aH/
|
||||
nFGMYKryzvVR8TskkaiPnuUVA+JMQi+F6Ppv5MLzvNT5F1wq+b8DIPoHjJf5qaq9hPwAAAAASUVORK5C
|
||||
YII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
696
LFP_Manager_PRM/Forms/fmxMain.Designer.cs
generated
Normal file
696
LFP_Manager_PRM/Forms/fmxMain.Designer.cs
generated
Normal file
@@ -0,0 +1,696 @@
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
partial class fmxMain
|
||||
{
|
||||
/// <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();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fmxMain));
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.configToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.commConfigToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.updateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.firmwareUpdateCANToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.firmwareImageConveterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.historyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.historyViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.databaseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.checkDBToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.edMaxModule = new DevExpress.XtraEditors.TextEdit();
|
||||
this.btnPrevID = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.ModuleIdSet = new LFP_Manager.Controls.ucModuleIdSet();
|
||||
this.btnNextID = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.ucCommConfig = new LFP_Manager.Controls.ucCommConfig2();
|
||||
this.chbPolling = new DevExpress.XtraEditors.CheckEdit();
|
||||
this.edSystemId = new DevExpress.XtraEditors.TextEdit();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.CommStausBar = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.HeatBeatStatusBar = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.LogStatusBar = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.uDataLog = new LFP_Manager.Controls.ucDataLog();
|
||||
this.uEventLog = new LFP_Manager.Controls.ucEventLog();
|
||||
this.tabStatus = new DevExpress.XtraTab.XtraTabControl();
|
||||
this.pgSystem = new DevExpress.XtraTab.XtraTabPage();
|
||||
this.layoutControl2 = new DevExpress.XtraLayout.LayoutControl();
|
||||
this.ucSystem = new LFP_Manager.Controls.ucShelfStatus();
|
||||
this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlMain = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||
this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.lcitemSystemId = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.tmrCheckThreadMsg = new System.Windows.Forms.Timer(this.components);
|
||||
this.tmrTest = new System.Windows.Forms.Timer(this.components);
|
||||
this.chkDcp = new DevExpress.XtraEditors.CheckEdit();
|
||||
this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edMaxModule.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chbPolling.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edSystemId.Properties)).BeginInit();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tabStatus)).BeginInit();
|
||||
this.tabStatus.SuspendLayout();
|
||||
this.pgSystem.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).BeginInit();
|
||||
this.layoutControl2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlMain)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcitemSystemId)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chkDcp.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.configToolStripMenuItem,
|
||||
this.updateToolStripMenuItem,
|
||||
this.historyToolStripMenuItem,
|
||||
this.databaseToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(1334, 24);
|
||||
this.menuStrip1.TabIndex = 0;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "File";
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(93, 22);
|
||||
this.exitToolStripMenuItem.Text = "Exit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// configToolStripMenuItem
|
||||
//
|
||||
this.configToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.commConfigToolStripMenuItem});
|
||||
this.configToolStripMenuItem.Name = "configToolStripMenuItem";
|
||||
this.configToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
|
||||
this.configToolStripMenuItem.Text = "Config";
|
||||
//
|
||||
// commConfigToolStripMenuItem
|
||||
//
|
||||
this.commConfigToolStripMenuItem.Name = "commConfigToolStripMenuItem";
|
||||
this.commConfigToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
|
||||
this.commConfigToolStripMenuItem.Text = "Comm.Config";
|
||||
this.commConfigToolStripMenuItem.Click += new System.EventHandler(this.commConfigToolStripMenuItem_Click);
|
||||
//
|
||||
// updateToolStripMenuItem
|
||||
//
|
||||
this.updateToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.firmwareUpdateCANToolStripMenuItem1,
|
||||
this.firmwareImageConveterToolStripMenuItem});
|
||||
this.updateToolStripMenuItem.Name = "updateToolStripMenuItem";
|
||||
this.updateToolStripMenuItem.Size = new System.Drawing.Size(57, 20);
|
||||
this.updateToolStripMenuItem.Text = "Update";
|
||||
//
|
||||
// firmwareUpdateCANToolStripMenuItem1
|
||||
//
|
||||
this.firmwareUpdateCANToolStripMenuItem1.Name = "firmwareUpdateCANToolStripMenuItem1";
|
||||
this.firmwareUpdateCANToolStripMenuItem1.Size = new System.Drawing.Size(212, 22);
|
||||
this.firmwareUpdateCANToolStripMenuItem1.Text = "Firmware Update (CAN)";
|
||||
this.firmwareUpdateCANToolStripMenuItem1.Click += new System.EventHandler(this.firmwareUpdateCANToolStripMenuItem_Click);
|
||||
//
|
||||
// firmwareImageConveterToolStripMenuItem
|
||||
//
|
||||
this.firmwareImageConveterToolStripMenuItem.Name = "firmwareImageConveterToolStripMenuItem";
|
||||
this.firmwareImageConveterToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||
this.firmwareImageConveterToolStripMenuItem.Text = "Firmware Image Conveter";
|
||||
this.firmwareImageConveterToolStripMenuItem.Click += new System.EventHandler(this.firmwareImageConveterToolStripMenuItem_Click);
|
||||
//
|
||||
// historyToolStripMenuItem
|
||||
//
|
||||
this.historyToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.historyViewToolStripMenuItem});
|
||||
this.historyToolStripMenuItem.Name = "historyToolStripMenuItem";
|
||||
this.historyToolStripMenuItem.Size = new System.Drawing.Size(57, 20);
|
||||
this.historyToolStripMenuItem.Text = "History";
|
||||
//
|
||||
// historyViewToolStripMenuItem
|
||||
//
|
||||
this.historyViewToolStripMenuItem.Name = "historyViewToolStripMenuItem";
|
||||
this.historyViewToolStripMenuItem.Size = new System.Drawing.Size(142, 22);
|
||||
this.historyViewToolStripMenuItem.Text = "History View";
|
||||
this.historyViewToolStripMenuItem.Click += new System.EventHandler(this.historyViewToolStripMenuItem_Click);
|
||||
//
|
||||
// databaseToolStripMenuItem
|
||||
//
|
||||
this.databaseToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.checkDBToolStripMenuItem});
|
||||
this.databaseToolStripMenuItem.Name = "databaseToolStripMenuItem";
|
||||
this.databaseToolStripMenuItem.Size = new System.Drawing.Size(68, 20);
|
||||
this.databaseToolStripMenuItem.Text = "Database";
|
||||
//
|
||||
// checkDBToolStripMenuItem
|
||||
//
|
||||
this.checkDBToolStripMenuItem.Name = "checkDBToolStripMenuItem";
|
||||
this.checkDBToolStripMenuItem.Size = new System.Drawing.Size(127, 22);
|
||||
this.checkDBToolStripMenuItem.Text = "Check DB";
|
||||
this.checkDBToolStripMenuItem.Click += new System.EventHandler(this.checkDBToolStripMenuItem_Click);
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.Controls.Add(this.chkDcp);
|
||||
this.layoutControl1.Controls.Add(this.edMaxModule);
|
||||
this.layoutControl1.Controls.Add(this.btnPrevID);
|
||||
this.layoutControl1.Controls.Add(this.ModuleIdSet);
|
||||
this.layoutControl1.Controls.Add(this.btnNextID);
|
||||
this.layoutControl1.Controls.Add(this.ucCommConfig);
|
||||
this.layoutControl1.Controls.Add(this.chbPolling);
|
||||
this.layoutControl1.Controls.Add(this.edSystemId);
|
||||
this.layoutControl1.Controls.Add(this.statusStrip1);
|
||||
this.layoutControl1.Controls.Add(this.uDataLog);
|
||||
this.layoutControl1.Controls.Add(this.uEventLog);
|
||||
this.layoutControl1.Controls.Add(this.tabStatus);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 24);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(305, 211, 613, 350);
|
||||
this.layoutControl1.Root = this.layoutControlMain;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(1334, 744);
|
||||
this.layoutControl1.TabIndex = 1;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// edMaxModule
|
||||
//
|
||||
this.edMaxModule.EditValue = "1";
|
||||
this.edMaxModule.Location = new System.Drawing.Point(961, 555);
|
||||
this.edMaxModule.Name = "edMaxModule";
|
||||
this.edMaxModule.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
|
||||
this.edMaxModule.Properties.Appearance.Options.UseFont = true;
|
||||
this.edMaxModule.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.edMaxModule.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.edMaxModule.Size = new System.Drawing.Size(82, 22);
|
||||
this.edMaxModule.StyleController = this.layoutControl1;
|
||||
this.edMaxModule.TabIndex = 10;
|
||||
this.edMaxModule.EditValueChanged += new System.EventHandler(this.edMaxModule_EditValueChanged);
|
||||
//
|
||||
// btnPrevID
|
||||
//
|
||||
this.btnPrevID.Location = new System.Drawing.Point(1213, 555);
|
||||
this.btnPrevID.Name = "btnPrevID";
|
||||
this.btnPrevID.Size = new System.Drawing.Size(57, 22);
|
||||
this.btnPrevID.StyleController = this.layoutControl1;
|
||||
this.btnPrevID.TabIndex = 9;
|
||||
this.btnPrevID.Text = "Prev";
|
||||
this.btnPrevID.Click += new System.EventHandler(this.btnPrevID_Click);
|
||||
//
|
||||
// ModuleIdSet
|
||||
//
|
||||
this.ModuleIdSet.Location = new System.Drawing.Point(823, 581);
|
||||
this.ModuleIdSet.Name = "ModuleIdSet";
|
||||
this.ModuleIdSet.Size = new System.Drawing.Size(220, 136);
|
||||
this.ModuleIdSet.TabIndex = 8;
|
||||
//
|
||||
// btnNextID
|
||||
//
|
||||
this.btnNextID.Location = new System.Drawing.Point(1274, 555);
|
||||
this.btnNextID.Name = "btnNextID";
|
||||
this.btnNextID.Size = new System.Drawing.Size(57, 22);
|
||||
this.btnNextID.StyleController = this.layoutControl1;
|
||||
this.btnNextID.TabIndex = 7;
|
||||
this.btnNextID.Text = "Next";
|
||||
this.btnNextID.Click += new System.EventHandler(this.btnNextID_Click);
|
||||
//
|
||||
// ucCommConfig
|
||||
//
|
||||
this.ucCommConfig.Location = new System.Drawing.Point(1213, 605);
|
||||
this.ucCommConfig.Name = "ucCommConfig";
|
||||
this.ucCommConfig.Size = new System.Drawing.Size(118, 112);
|
||||
this.ucCommConfig.TabIndex = 6;
|
||||
//
|
||||
// chbPolling
|
||||
//
|
||||
this.chbPolling.Location = new System.Drawing.Point(1140, 555);
|
||||
this.chbPolling.Name = "chbPolling";
|
||||
this.chbPolling.Properties.Caption = "Polling";
|
||||
this.chbPolling.Size = new System.Drawing.Size(69, 20);
|
||||
this.chbPolling.StyleController = this.layoutControl1;
|
||||
this.chbPolling.TabIndex = 4;
|
||||
this.chbPolling.CheckedChanged += new System.EventHandler(this.chbPolling_CheckedChanged);
|
||||
//
|
||||
// edSystemId
|
||||
//
|
||||
this.edSystemId.EditValue = "1";
|
||||
this.edSystemId.Location = new System.Drawing.Point(1082, 555);
|
||||
this.edSystemId.Name = "edSystemId";
|
||||
this.edSystemId.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
|
||||
this.edSystemId.Properties.Appearance.Options.UseFont = true;
|
||||
this.edSystemId.Properties.Appearance.Options.UseTextOptions = true;
|
||||
this.edSystemId.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
|
||||
this.edSystemId.Size = new System.Drawing.Size(54, 22);
|
||||
this.edSystemId.StyleController = this.layoutControl1;
|
||||
this.edSystemId.TabIndex = 3;
|
||||
this.edSystemId.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.edSystemId_KeyPress);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.AutoSize = false;
|
||||
this.statusStrip1.Dock = System.Windows.Forms.DockStyle.None;
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.CommStausBar,
|
||||
this.HeatBeatStatusBar,
|
||||
this.LogStatusBar});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(3, 721);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(1328, 20);
|
||||
this.statusStrip1.TabIndex = 1;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// CommStausBar
|
||||
//
|
||||
this.CommStausBar.AutoSize = false;
|
||||
this.CommStausBar.ForeColor = System.Drawing.Color.Black;
|
||||
this.CommStausBar.Name = "CommStausBar";
|
||||
this.CommStausBar.Size = new System.Drawing.Size(200, 15);
|
||||
this.CommStausBar.Text = "Comm: OFF";
|
||||
this.CommStausBar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// HeatBeatStatusBar
|
||||
//
|
||||
this.HeatBeatStatusBar.AutoSize = false;
|
||||
this.HeatBeatStatusBar.ForeColor = System.Drawing.Color.Black;
|
||||
this.HeatBeatStatusBar.Name = "HeatBeatStatusBar";
|
||||
this.HeatBeatStatusBar.Size = new System.Drawing.Size(200, 15);
|
||||
this.HeatBeatStatusBar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// LogStatusBar
|
||||
//
|
||||
this.LogStatusBar.AutoSize = false;
|
||||
this.LogStatusBar.Name = "LogStatusBar";
|
||||
this.LogStatusBar.Size = new System.Drawing.Size(650, 15);
|
||||
this.LogStatusBar.Text = "Log Stop";
|
||||
this.LogStatusBar.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// uDataLog
|
||||
//
|
||||
this.uDataLog.Location = new System.Drawing.Point(1047, 581);
|
||||
this.uDataLog.Name = "uDataLog";
|
||||
this.uDataLog.Size = new System.Drawing.Size(162, 136);
|
||||
this.uDataLog.TabIndex = 5;
|
||||
//
|
||||
// uEventLog
|
||||
//
|
||||
this.uEventLog.Location = new System.Drawing.Point(3, 555);
|
||||
this.uEventLog.Name = "uEventLog";
|
||||
this.uEventLog.Size = new System.Drawing.Size(816, 162);
|
||||
this.uEventLog.TabIndex = 2;
|
||||
//
|
||||
// tabStatus
|
||||
//
|
||||
this.tabStatus.Location = new System.Drawing.Point(3, 3);
|
||||
this.tabStatus.Name = "tabStatus";
|
||||
this.tabStatus.SelectedTabPage = this.pgSystem;
|
||||
this.tabStatus.Size = new System.Drawing.Size(1328, 548);
|
||||
this.tabStatus.TabIndex = 0;
|
||||
this.tabStatus.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
|
||||
this.pgSystem});
|
||||
//
|
||||
// pgSystem
|
||||
//
|
||||
this.pgSystem.Controls.Add(this.layoutControl2);
|
||||
this.pgSystem.Name = "pgSystem";
|
||||
this.pgSystem.Size = new System.Drawing.Size(1326, 522);
|
||||
this.pgSystem.Text = "SYSTEM";
|
||||
//
|
||||
// layoutControl2
|
||||
//
|
||||
this.layoutControl2.Controls.Add(this.ucSystem);
|
||||
this.layoutControl2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl2.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl2.Name = "layoutControl2";
|
||||
this.layoutControl2.Root = this.layoutControlGroup2;
|
||||
this.layoutControl2.Size = new System.Drawing.Size(1326, 522);
|
||||
this.layoutControl2.TabIndex = 0;
|
||||
this.layoutControl2.Text = "layoutControl2";
|
||||
//
|
||||
// ucSystem
|
||||
//
|
||||
this.ucSystem.Location = new System.Drawing.Point(3, 3);
|
||||
this.ucSystem.Name = "ucSystem";
|
||||
this.ucSystem.Size = new System.Drawing.Size(1320, 516);
|
||||
this.ucSystem.TabIndex = 4;
|
||||
//
|
||||
// layoutControlGroup2
|
||||
//
|
||||
this.layoutControlGroup2.CustomizationFormText = "layoutControlGroup2";
|
||||
this.layoutControlGroup2.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlGroup2.GroupBordersVisible = false;
|
||||
this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem3});
|
||||
this.layoutControlGroup2.Name = "layoutControlGroup2";
|
||||
this.layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlGroup2.Size = new System.Drawing.Size(1326, 522);
|
||||
this.layoutControlGroup2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.ucSystem;
|
||||
this.layoutControlItem3.CustomizationFormText = "layoutControlItem3";
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(1324, 520);
|
||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem3.TextVisible = false;
|
||||
//
|
||||
// layoutControlMain
|
||||
//
|
||||
this.layoutControlMain.CustomizationFormText = "layoutControlGroup1";
|
||||
this.layoutControlMain.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
|
||||
this.layoutControlMain.GroupBordersVisible = false;
|
||||
this.layoutControlMain.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
|
||||
this.layoutControlItem2,
|
||||
this.layoutControlItem6,
|
||||
this.layoutControlItem7,
|
||||
this.layoutControlItem8,
|
||||
this.lcitemSystemId,
|
||||
this.layoutControlItem16,
|
||||
this.layoutControlItem1,
|
||||
this.layoutControlItem4,
|
||||
this.layoutControlItem5,
|
||||
this.layoutControlItem9,
|
||||
this.layoutControlItem10,
|
||||
this.layoutControlItem11});
|
||||
this.layoutControlMain.Name = "Root";
|
||||
this.layoutControlMain.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1);
|
||||
this.layoutControlMain.Size = new System.Drawing.Size(1334, 744);
|
||||
this.layoutControlMain.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.tabStatus;
|
||||
this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(1332, 552);
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem6
|
||||
//
|
||||
this.layoutControlItem6.Control = this.uEventLog;
|
||||
this.layoutControlItem6.CustomizationFormText = "layoutControlItem6";
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(0, 552);
|
||||
this.layoutControlItem6.MaxSize = new System.Drawing.Size(0, 166);
|
||||
this.layoutControlItem6.MinSize = new System.Drawing.Size(209, 166);
|
||||
this.layoutControlItem6.Name = "layoutControlItem6";
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(820, 166);
|
||||
this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem6.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem7
|
||||
//
|
||||
this.layoutControlItem7.Control = this.uDataLog;
|
||||
this.layoutControlItem7.CustomizationFormText = "layoutControlItem7";
|
||||
this.layoutControlItem7.Location = new System.Drawing.Point(1044, 578);
|
||||
this.layoutControlItem7.MaxSize = new System.Drawing.Size(166, 0);
|
||||
this.layoutControlItem7.MinSize = new System.Drawing.Size(166, 24);
|
||||
this.layoutControlItem7.Name = "layoutControlItem7";
|
||||
this.layoutControlItem7.Size = new System.Drawing.Size(166, 140);
|
||||
this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem7.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem8
|
||||
//
|
||||
this.layoutControlItem8.Control = this.statusStrip1;
|
||||
this.layoutControlItem8.CustomizationFormText = "layoutControlItem8";
|
||||
this.layoutControlItem8.Location = new System.Drawing.Point(0, 718);
|
||||
this.layoutControlItem8.MaxSize = new System.Drawing.Size(0, 24);
|
||||
this.layoutControlItem8.MinSize = new System.Drawing.Size(104, 24);
|
||||
this.layoutControlItem8.Name = "layoutControlItem8";
|
||||
this.layoutControlItem8.Size = new System.Drawing.Size(1332, 24);
|
||||
this.layoutControlItem8.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem8.TextVisible = false;
|
||||
//
|
||||
// lcitemSystemId
|
||||
//
|
||||
this.lcitemSystemId.Control = this.edSystemId;
|
||||
this.lcitemSystemId.CustomizationFormText = "System Id";
|
||||
this.lcitemSystemId.Location = new System.Drawing.Point(1044, 552);
|
||||
this.lcitemSystemId.MinSize = new System.Drawing.Size(57, 26);
|
||||
this.lcitemSystemId.Name = "lcitemSystemId";
|
||||
this.lcitemSystemId.Size = new System.Drawing.Size(93, 26);
|
||||
this.lcitemSystemId.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.lcitemSystemId.Text = " ID ";
|
||||
this.lcitemSystemId.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
|
||||
this.lcitemSystemId.TextSize = new System.Drawing.Size(30, 14);
|
||||
this.lcitemSystemId.TextToControlDistance = 5;
|
||||
//
|
||||
// layoutControlItem16
|
||||
//
|
||||
this.layoutControlItem16.Control = this.chbPolling;
|
||||
this.layoutControlItem16.CustomizationFormText = "layoutControlItem16";
|
||||
this.layoutControlItem16.Location = new System.Drawing.Point(1137, 552);
|
||||
this.layoutControlItem16.Name = "layoutControlItem16";
|
||||
this.layoutControlItem16.Size = new System.Drawing.Size(73, 26);
|
||||
this.layoutControlItem16.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem16.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.ucCommConfig;
|
||||
this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(1210, 602);
|
||||
this.layoutControlItem1.MaxSize = new System.Drawing.Size(122, 0);
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(122, 50);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(122, 116);
|
||||
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.btnNextID;
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(1271, 552);
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(60, 26);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(61, 26);
|
||||
this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem4.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem5
|
||||
//
|
||||
this.layoutControlItem5.Control = this.ModuleIdSet;
|
||||
this.layoutControlItem5.Location = new System.Drawing.Point(820, 578);
|
||||
this.layoutControlItem5.MaxSize = new System.Drawing.Size(224, 0);
|
||||
this.layoutControlItem5.MinSize = new System.Drawing.Size(224, 140);
|
||||
this.layoutControlItem5.Name = "layoutControlItem5";
|
||||
this.layoutControlItem5.Size = new System.Drawing.Size(224, 140);
|
||||
this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem5.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem9
|
||||
//
|
||||
this.layoutControlItem9.Control = this.btnPrevID;
|
||||
this.layoutControlItem9.Location = new System.Drawing.Point(1210, 552);
|
||||
this.layoutControlItem9.MinSize = new System.Drawing.Size(40, 26);
|
||||
this.layoutControlItem9.Name = "layoutControlItem9";
|
||||
this.layoutControlItem9.Size = new System.Drawing.Size(61, 26);
|
||||
this.layoutControlItem9.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem9.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem10
|
||||
//
|
||||
this.layoutControlItem10.Control = this.edMaxModule;
|
||||
this.layoutControlItem10.Location = new System.Drawing.Point(820, 552);
|
||||
this.layoutControlItem10.MinSize = new System.Drawing.Size(121, 26);
|
||||
this.layoutControlItem10.Name = "layoutControlItem10";
|
||||
this.layoutControlItem10.Size = new System.Drawing.Size(224, 26);
|
||||
this.layoutControlItem10.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem10.Text = " Max Module per String";
|
||||
this.layoutControlItem10.TextSize = new System.Drawing.Size(126, 14);
|
||||
//
|
||||
// tmrCheckThreadMsg
|
||||
//
|
||||
this.tmrCheckThreadMsg.Tick += new System.EventHandler(this.tmrCheckThreadMsg_Tick);
|
||||
//
|
||||
// tmrTest
|
||||
//
|
||||
this.tmrTest.Enabled = true;
|
||||
this.tmrTest.Interval = 2000;
|
||||
this.tmrTest.Tick += new System.EventHandler(this.tmrTest_Tick);
|
||||
//
|
||||
// chkDcp
|
||||
//
|
||||
this.chkDcp.Location = new System.Drawing.Point(1213, 581);
|
||||
this.chkDcp.Name = "chkDcp";
|
||||
this.chkDcp.Properties.Caption = " DCP";
|
||||
this.chkDcp.Size = new System.Drawing.Size(118, 20);
|
||||
this.chkDcp.StyleController = this.layoutControl1;
|
||||
this.chkDcp.TabIndex = 11;
|
||||
this.chkDcp.CheckedChanged += new System.EventHandler(this.chkDcp_CheckedChanged);
|
||||
//
|
||||
// layoutControlItem11
|
||||
//
|
||||
this.layoutControlItem11.Control = this.chkDcp;
|
||||
this.layoutControlItem11.Location = new System.Drawing.Point(1210, 578);
|
||||
this.layoutControlItem11.Name = "layoutControlItem11";
|
||||
this.layoutControlItem11.Size = new System.Drawing.Size(122, 24);
|
||||
this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem11.TextVisible = false;
|
||||
//
|
||||
// fmxMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1334, 768);
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.IconOptions.Icon = ((System.Drawing.Icon)(resources.GetObject("fmxMain.IconOptions.Icon")));
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "fmxMain";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "LFP SYSTEM";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.fmxMain_FormClosing);
|
||||
this.Load += new System.EventHandler(this.fmxMain_Load);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.edMaxModule.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chbPolling.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.edSystemId.Properties)).EndInit();
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tabStatus)).EndInit();
|
||||
this.tabStatus.ResumeLayout(false);
|
||||
this.pgSystem.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl2)).EndInit();
|
||||
this.layoutControl2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlMain)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.lcitemSystemId)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chkDcp.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem configToolStripMenuItem;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl1;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlMain;
|
||||
private System.Windows.Forms.ToolStripMenuItem commConfigToolStripMenuItem;
|
||||
private DevExpress.XtraTab.XtraTabControl tabStatus;
|
||||
private DevExpress.XtraTab.XtraTabPage pgSystem;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
|
||||
private DevExpress.XtraLayout.LayoutControl layoutControl2;
|
||||
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2;
|
||||
private Controls.ucShelfStatus ucSystem;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
|
||||
private Controls.ucEventLog uEventLog;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
|
||||
private System.Windows.Forms.Timer tmrCheckThreadMsg;
|
||||
private Controls.ucDataLog uDataLog;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripStatusLabel CommStausBar;
|
||||
private System.Windows.Forms.ToolStripStatusLabel LogStatusBar;
|
||||
private System.Windows.Forms.ToolStripStatusLabel HeatBeatStatusBar;
|
||||
private DevExpress.XtraEditors.TextEdit edSystemId;
|
||||
private DevExpress.XtraLayout.LayoutControlItem lcitemSystemId;
|
||||
private DevExpress.XtraEditors.CheckEdit chbPolling;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16;
|
||||
private System.Windows.Forms.ToolStripMenuItem updateToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem firmwareUpdateCANToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem firmwareImageConveterToolStripMenuItem;
|
||||
private Controls.ucCommConfig2 ucCommConfig;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
|
||||
private System.Windows.Forms.Timer tmrTest;
|
||||
private System.Windows.Forms.ToolStripMenuItem databaseToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem checkDBToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem historyToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem historyViewToolStripMenuItem;
|
||||
private DevExpress.XtraEditors.SimpleButton btnNextID;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
|
||||
private Controls.ucModuleIdSet ModuleIdSet;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
|
||||
private DevExpress.XtraEditors.SimpleButton btnPrevID;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
|
||||
private DevExpress.XtraEditors.TextEdit edMaxModule;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10;
|
||||
private DevExpress.XtraEditors.CheckEdit chkDcp;
|
||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11;
|
||||
}
|
||||
}
|
||||
836
LFP_Manager_PRM/Forms/fmxMain.cs
Normal file
836
LFP_Manager_PRM/Forms/fmxMain.cs
Normal file
@@ -0,0 +1,836 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
using LFP_Manager.Forms;
|
||||
using LFP_Manager.Controls;
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Function;
|
||||
using LFP_Manager.Threads;
|
||||
using LFP_Manager.Utils;
|
||||
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
public partial class fmxMain : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
#region VARIABLES
|
||||
|
||||
private fmxFwUpdate FwUpdateForm = null;
|
||||
private fmxExcelFile DbControlFrom = null;
|
||||
|
||||
private CommConfig Config;
|
||||
private DeviceSystemData SystemData;
|
||||
|
||||
private csCanThread canThread = null;
|
||||
private csValueCanThread ValueCanThread = null;
|
||||
|
||||
private csDbThread dbThread = null;
|
||||
|
||||
private ucShelfStatus SystemStatus;
|
||||
|
||||
private bool Active = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public fmxMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
ComponentInit();
|
||||
|
||||
StructDataInit();
|
||||
|
||||
IniLoad();
|
||||
|
||||
DataInit();
|
||||
|
||||
ucCommConfig.OnStart += StartButtonClick;
|
||||
|
||||
uDataLog.OnUpdate += LogStatusUpdate;
|
||||
|
||||
edSystemId.Enabled = false;
|
||||
|
||||
SystemStatus.OnCommand += SetCmdToCan;
|
||||
SystemStatus.OnMsgPrint += TestLogMessage;
|
||||
SystemStatus.Start(0, ref Config, ref SystemData);
|
||||
edSystemId.Enabled = true;
|
||||
|
||||
ModuleIdSet.OnCommand += SetCmdToCan;
|
||||
|
||||
//this.Text = String.Format("LFP SYSTEM [{0}] -- PR-LFP MODULE", Application.ProductVersion);
|
||||
this.Text = String.Format("LFP SYSTEM [{0}] -- PR-LFP MODULE - [{1}]"
|
||||
, Application.ProductVersion
|
||||
, csConstData.CommType.CAN_MODEL[Config.TargetModelIndex]
|
||||
);
|
||||
|
||||
tmrCheckThreadMsg.Start();
|
||||
}
|
||||
|
||||
private void ComponentInit()
|
||||
{
|
||||
SystemStatus = ucSystem;
|
||||
}
|
||||
|
||||
private void IniLoad()
|
||||
{
|
||||
Config = csIniControlFunction.IniLoad(Application.ExecutablePath, Config);
|
||||
ucCommConfig.UpdateConfig(ref Config);
|
||||
TypeChangedUpdate(ref Config);
|
||||
}
|
||||
|
||||
private void StructDataInit()
|
||||
{
|
||||
SystemData = new DeviceSystemData();
|
||||
Config = new CommConfig();
|
||||
}
|
||||
|
||||
private void DataInit()
|
||||
{
|
||||
DataFunction.DataInit(ref SystemData, ref Config);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region BUTTON EVENT
|
||||
|
||||
private void ConfigButtonClick(object sender, EventArgs e)
|
||||
{
|
||||
foreach (Form frm in Application.OpenForms)
|
||||
{
|
||||
if (frm.Name == "fmxCommConfig")
|
||||
{
|
||||
frm.Activate();
|
||||
return;
|
||||
}
|
||||
}
|
||||
fmxCommConfig CommConfigForm = new fmxCommConfig();
|
||||
CommConfigForm.Owner = this;
|
||||
|
||||
CommConfigForm.OnUpdate += UpdateConfig;
|
||||
CommConfigForm.Show();
|
||||
}
|
||||
|
||||
private void StopProcess()
|
||||
{
|
||||
if (canThread != null)
|
||||
{
|
||||
canThread.disposeThread();
|
||||
canThread = null;
|
||||
}
|
||||
|
||||
if (ValueCanThread != null)
|
||||
{
|
||||
ValueCanThread.disposeThread();
|
||||
ValueCanThread = null;
|
||||
}
|
||||
|
||||
if (dbThread != null)
|
||||
{
|
||||
dbThread.Stop();
|
||||
dbThread.disposeThread();
|
||||
dbThread = null;
|
||||
}
|
||||
|
||||
Active = false;
|
||||
|
||||
edSystemId.Enabled = true;
|
||||
chbPolling.Enabled = true;
|
||||
|
||||
DataInit();
|
||||
UpdateData(this, ref SystemData);
|
||||
}
|
||||
|
||||
private void StartProcessCAN()
|
||||
{
|
||||
// CAN MODE
|
||||
int sId = 0;
|
||||
|
||||
if (edSystemId.Text != null)
|
||||
sId = Convert.ToInt16(edSystemId.Text);
|
||||
|
||||
ucSystem.SystemIdSet(sId);
|
||||
|
||||
canThread = new csCanThread(sId, Config, ref SystemData);
|
||||
canThread.OnUpdate += UpdateData;
|
||||
canThread.OnDataRecv += CanRecvData;
|
||||
canThread.OnPrint += PrintLogMessage;
|
||||
|
||||
if (canThread.Start(ref Config, sId, chbPolling.Checked))
|
||||
{
|
||||
Active = true;
|
||||
edSystemId.Enabled = false;
|
||||
chbPolling.Enabled = true;
|
||||
|
||||
if (chbPolling.Checked)
|
||||
edSystemId.Enabled = false;
|
||||
else
|
||||
edSystemId.Enabled = true;
|
||||
|
||||
canThread.SetPolling(chbPolling.Checked, Convert.ToInt32(edSystemId.Text), ref SystemData);
|
||||
SystemStatus.UpdateSystemId(Convert.ToInt32(edSystemId.Text));
|
||||
|
||||
dbThread = new csDbThread(ref Config, ref SystemData);
|
||||
dbThread.Start(Config);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (canThread != null)
|
||||
{
|
||||
canThread.disposeThread();
|
||||
canThread = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void StartProcessValueCAN()
|
||||
{
|
||||
int sId = 0;
|
||||
|
||||
if (edSystemId.Text != null)
|
||||
sId = Convert.ToInt16(edSystemId.Text);
|
||||
|
||||
ucSystem.SystemIdSet(sId);
|
||||
|
||||
ValueCanThread = new csValueCanThread(sId, Config, ref SystemData);
|
||||
ValueCanThread.OnUpdate += UpdateData;
|
||||
ValueCanThread.OnDataRecv += CanRecvData;
|
||||
ValueCanThread.OnPrint += PrintLogMessage;
|
||||
|
||||
if (ValueCanThread.Start(Config, sId, chbPolling.Checked))
|
||||
{
|
||||
Active = true;
|
||||
edSystemId.Enabled = false;
|
||||
chbPolling.Enabled = true;
|
||||
|
||||
if (chbPolling.Checked)
|
||||
edSystemId.Enabled = false;
|
||||
else
|
||||
edSystemId.Enabled = true;
|
||||
|
||||
ValueCanThread.SetPolling(chbPolling.Checked, Convert.ToInt32(edSystemId.Text), ref SystemData);
|
||||
SystemStatus.UpdateSystemId(Convert.ToInt32(edSystemId.Text));
|
||||
|
||||
dbThread = new csDbThread(ref Config, ref SystemData);
|
||||
dbThread.Start(Config);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ValueCanThread != null)
|
||||
{
|
||||
ValueCanThread.disposeThread();
|
||||
ValueCanThread = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void StartButtonClick(object sender, EventArgs e)
|
||||
{
|
||||
if (Active)
|
||||
{
|
||||
StopProcess();
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (Config.CommType)
|
||||
{
|
||||
case csConstData.CommType.COMM_USBCAN:
|
||||
switch (csCanConstData.CanDeviceInfo.DeviceIds[Config.CanDevice])
|
||||
{
|
||||
case csCanConstData.CanDeviceInfo.VCI_VALUE_CAN4_1: // CAN MODE - ValueCAN
|
||||
try
|
||||
{
|
||||
StartProcessValueCAN();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
|
||||
if (ValueCanThread != null)
|
||||
{
|
||||
ValueCanThread.disposeThread();
|
||||
ValueCanThread = null;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default: // CAN MODE - USBCAN
|
||||
try
|
||||
{
|
||||
StartProcessCAN();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
|
||||
if (canThread != null)
|
||||
{
|
||||
canThread.disposeThread();
|
||||
canThread = null;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (canThread != null)
|
||||
{
|
||||
// USBCAN
|
||||
ucCommConfig.UpdateStatus(Active, canThread.GetCommSystemId());
|
||||
}
|
||||
else if (ValueCanThread != null)
|
||||
{
|
||||
// Value CAN
|
||||
ucCommConfig.UpdateStatus(Active, ValueCanThread.GetCommSystemId());
|
||||
}
|
||||
else
|
||||
{ ucCommConfig.UpdateStatus(Active, 0); }
|
||||
|
||||
uDataLog.UpdateActiveStatus(Active, Config, ref SystemData);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region UPDATE FUNCTIONS
|
||||
|
||||
private void UpdateCommConfigStatus()
|
||||
{
|
||||
if (canThread != null)
|
||||
{
|
||||
// USBCAN
|
||||
ucCommConfig.UpdateStatus(Active, canThread.GetCommSystemId());
|
||||
}
|
||||
else if (ValueCanThread != null)
|
||||
{
|
||||
// Value CAN
|
||||
ucCommConfig.UpdateStatus(Active, ValueCanThread.GetCommSystemId());
|
||||
}
|
||||
else
|
||||
{
|
||||
ucCommConfig.UpdateStatus(Active, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void TypeChangedUpdate(ref CommConfig aConfig)
|
||||
{
|
||||
this.Text = String.Format("LFP SYSTEM [{0}] -- PR-LFP MODULE - [{1}]"
|
||||
, Application.ProductVersion
|
||||
, csConstData.CommType.CAN_MODEL[aConfig.TargetModelIndex]
|
||||
);
|
||||
|
||||
switch (Config.TargetModelIndex)
|
||||
{
|
||||
case 0: // PR-57150
|
||||
edMaxModule.Text = "18";
|
||||
break;
|
||||
case 1: // PR-64150
|
||||
edMaxModule.Text = "3";
|
||||
break;
|
||||
case 2: // LFPM-57080
|
||||
edMaxModule.Text = "18";
|
||||
break;
|
||||
case 3: // PR-102150
|
||||
edMaxModule.Text = "11";
|
||||
break;
|
||||
case 4: // PR-115300
|
||||
edMaxModule.Text = "10";
|
||||
break;
|
||||
case 5: // PR-67150
|
||||
edMaxModule.Text = "3";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
DataInit();
|
||||
|
||||
switch (aConfig.CommType)
|
||||
{
|
||||
case csConstData.CommType.COMM_USBCAN:
|
||||
SystemStatus.Start(0, ref Config, ref SystemData);
|
||||
edSystemId.Enabled = true;
|
||||
break;
|
||||
case csConstData.CommType.COMM_UARTCAN:
|
||||
SystemStatus.Start(0, ref Config, ref SystemData);
|
||||
edSystemId.Enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateData(object sender, ref DeviceSystemData rData)
|
||||
{
|
||||
//SystemData = rData;
|
||||
|
||||
//if (SystemStatus != null)
|
||||
// SystemStatus.UpdateData(ref SystemData);
|
||||
//if (uDataLog != null)
|
||||
// uDataLog.UpdateData(ref SystemData);
|
||||
//if (dbThread != null)
|
||||
// dbThread.UpdateData(ref SystemData);
|
||||
|
||||
if (edSystemId.Text != string.Empty)
|
||||
ModuleIdSet.UpdateData(Convert.ToInt32(edSystemId.Text), SystemData.CalibriationData);
|
||||
}
|
||||
|
||||
private void CanRecvData(UInt32 hdr, byte[] data)
|
||||
{
|
||||
if (FwUpdateForm != null)
|
||||
{
|
||||
if (this.InvokeRequired)
|
||||
{
|
||||
this.Invoke(new MethodInvoker(delegate()
|
||||
{
|
||||
FwUpdateForm.RecvData(hdr, data);
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
FwUpdateForm.RecvData(hdr, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateConfig(object aConfig)
|
||||
{
|
||||
Config = (CommConfig)aConfig;
|
||||
|
||||
IniLoad();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region MENU EVENT
|
||||
|
||||
private void commConfigToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
ConfigButtonClick(sender, e);
|
||||
}
|
||||
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void testSendToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
csHistoryFunction.DbCreate(System.IO.Path.GetDirectoryName(Application.ExecutablePath));
|
||||
}
|
||||
|
||||
private void firmwareUpdateCANToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (Form frm in Application.OpenForms)
|
||||
{
|
||||
if (frm.Name == "fmxFwUpdate")
|
||||
{
|
||||
frm.Activate();
|
||||
return;
|
||||
}
|
||||
}
|
||||
FwUpdateForm = new fmxFwUpdate(Convert.ToUInt32(edSystemId.Text), Config);
|
||||
|
||||
FwUpdateForm.OnAutoTxCanSet += SetAutoTxCan;
|
||||
FwUpdateForm.OnSendDataCan += SendDataToCan;
|
||||
FwUpdateForm.Show();
|
||||
}
|
||||
|
||||
private void firmwareImageConveterToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (Form frm in Application.OpenForms)
|
||||
{
|
||||
if (frm.Name == "fmxFwImageConverter")
|
||||
{
|
||||
frm.Activate();
|
||||
return;
|
||||
}
|
||||
}
|
||||
fmxFwImageConverter FwImageConverter = new fmxFwImageConverter();
|
||||
|
||||
FwImageConverter.Show();
|
||||
}
|
||||
|
||||
private void historyViewToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (Form frm in Application.OpenForms)
|
||||
{
|
||||
if (frm.Name == "fmxHistory")
|
||||
{
|
||||
frm.Activate();
|
||||
return;
|
||||
}
|
||||
}
|
||||
fmxHistory HistoryForm = new fmxHistory(Config);
|
||||
|
||||
HistoryForm.Show();
|
||||
}
|
||||
|
||||
private void checkDBToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (Form frm in Application.OpenForms)
|
||||
{
|
||||
if (frm.Name == "fmxExcelFile")
|
||||
{
|
||||
frm.Activate();
|
||||
return;
|
||||
}
|
||||
}
|
||||
DbControlFrom = new fmxExcelFile(Config);
|
||||
|
||||
DbControlFrom.Show();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region FORM EVENT
|
||||
|
||||
private void fmxMain_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void fmxMain_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (canThread != null)
|
||||
{
|
||||
canThread.disposeThread();
|
||||
canThread = null;
|
||||
}
|
||||
|
||||
if (ValueCanThread != null)
|
||||
{
|
||||
ValueCanThread.disposeThread();
|
||||
ValueCanThread = null;
|
||||
}
|
||||
|
||||
if (dbThread != null)
|
||||
{
|
||||
dbThread.disposeThread();
|
||||
dbThread = null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region TIMER EVENT
|
||||
|
||||
private void tmrCheckThreadMsg_Tick(object sender, EventArgs e)
|
||||
{
|
||||
UpdateCommConfigStatus();
|
||||
|
||||
//if (snmpThread != null)
|
||||
//{
|
||||
// string data = snmpThread.GetResult();
|
||||
|
||||
// if (data != "")
|
||||
// {
|
||||
// uEventLog.EventUpdate(data + "\r\n");
|
||||
// }
|
||||
//}
|
||||
|
||||
//if (uartThread != null)
|
||||
//{
|
||||
// string data = uartThread.GetMsg();
|
||||
|
||||
// if (data != "")
|
||||
// {
|
||||
// uEventLog.EventUpdate(data + "\r\n");
|
||||
// }
|
||||
//}
|
||||
|
||||
//if (canThread != null)
|
||||
//{
|
||||
// string data = canThread.GetMsg();
|
||||
|
||||
// if (data != "")
|
||||
// {
|
||||
// uEventLog.EventUpdate(data + "\r\n");
|
||||
// }
|
||||
//}
|
||||
|
||||
//if (dbThread != null)
|
||||
//{
|
||||
// string data = dbThread.GetMsg();
|
||||
|
||||
// if (data != "")
|
||||
// {
|
||||
// uEventLog.EventUpdate(data + "\r\n");
|
||||
// }
|
||||
//}
|
||||
byte[] sn = new byte[17];
|
||||
|
||||
switch (Config.CommType)
|
||||
{
|
||||
case csConstData.CommType.COMM_SNMP:
|
||||
// SNMP MODE
|
||||
break;
|
||||
case csConstData.CommType.COMM_UARTCAN:
|
||||
// UARTCAN MODE
|
||||
for (int i = 0; i < 16; i++)
|
||||
sn[i] = SystemData.Information.pcb_sn[i];
|
||||
sn[16] = 0;
|
||||
if (sn[0] == 0xFF) sn[0] = 0;
|
||||
pgSystem.Text = String.Format("{0} [{1}.{2}.{3}.{4}] - {5}", "LFP SYSTEM"
|
||||
, SystemData.ValueData.fw_ver[0]
|
||||
, SystemData.ValueData.fw_ver[1]
|
||||
, SystemData.ValueData.fw_ver[2]
|
||||
, SystemData.ValueData.fw_ver[3]
|
||||
, Encoding.Default.GetString(sn)
|
||||
);
|
||||
break;
|
||||
case csConstData.CommType.COMM_USBCAN:
|
||||
// USBCAN MODE
|
||||
for (int i = 0; i < 16; i++)
|
||||
sn[i] = SystemData.Information.pcb_sn[i];
|
||||
sn[16] = 0;
|
||||
if (sn[0] == 0xFF) sn[0] = 0;
|
||||
pgSystem.Text = String.Format("{0} [{1}.{2}.{3}.{4}] - {5}", "LFP SYSTEM"
|
||||
, SystemData.ValueData.fw_ver[0]
|
||||
, SystemData.ValueData.fw_ver[1]
|
||||
, SystemData.ValueData.fw_ver[2]
|
||||
, SystemData.ValueData.fw_ver[3]
|
||||
, Encoding.Default.GetString(sn)
|
||||
);
|
||||
break;
|
||||
}
|
||||
DisplayCommStaus();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region STATUS BAR EVENT
|
||||
|
||||
void DisplayCommStaus()
|
||||
{
|
||||
if (Active == true)
|
||||
CommStausBar.Text = "Comm: On";
|
||||
else
|
||||
CommStausBar.Text = "Comm: Off";
|
||||
}
|
||||
|
||||
void LogStatusUpdate(object sender, string msg, bool active, int aLogTime)
|
||||
{
|
||||
LogStatusBar.Text = msg;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region LOG PRINT FUCTION
|
||||
|
||||
private void PrintLogMessage(object sender, string msg)
|
||||
{
|
||||
if (this.InvokeRequired)
|
||||
{
|
||||
this.Invoke(new MethodInvoker(delegate ()
|
||||
{
|
||||
uEventLog.EventUpdate(msg + "\r\n");
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
uEventLog.EventUpdate(msg + "\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
private void TestLogMessage(object sender, string msg)
|
||||
{
|
||||
if (this.InvokeRequired)
|
||||
{
|
||||
this.Invoke(new MethodInvoker(delegate ()
|
||||
{
|
||||
uEventLog.MsgUpdate(msg + "\r\n");
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
uEventLog.MsgUpdate(msg + "\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CAN COMMAND AND SET
|
||||
|
||||
private void SetCmdToCan(int sId, int mode, int flag, ref DeviceParamData aParam, ref DeviceCalibration aCalib)
|
||||
{
|
||||
if (canThread != null)
|
||||
{
|
||||
canThread.SendProcessFromApp(sId, mode, flag, 0, ref aParam, ref aCalib);
|
||||
}
|
||||
else if (ValueCanThread != null)
|
||||
{
|
||||
ValueCanThread.SendProcessFromApp(sId, mode, flag, 0, ref aParam, ref aCalib);
|
||||
}
|
||||
}
|
||||
|
||||
private void chbPolling_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (edSystemId.Text != string.Empty)
|
||||
{
|
||||
if (canThread != null)
|
||||
{
|
||||
canThread.SetPolling(chbPolling.Checked, Convert.ToInt32(edSystemId.Text), ref SystemData);
|
||||
}
|
||||
|
||||
if (ValueCanThread != null)
|
||||
{
|
||||
ValueCanThread.SetPolling(chbPolling.Checked, Convert.ToInt32(edSystemId.Text), ref SystemData);
|
||||
}
|
||||
|
||||
SystemStatus.UpdateSystemId(Convert.ToInt32(edSystemId.Text));
|
||||
|
||||
if (chbPolling.Checked)
|
||||
edSystemId.Enabled = false;
|
||||
else
|
||||
edSystemId.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void chkDcp_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (canThread != null)
|
||||
{
|
||||
if (chkDcp.Checked)
|
||||
canThread.SetDcp(1);
|
||||
else
|
||||
canThread.SetDcp(0);
|
||||
}
|
||||
|
||||
if (ValueCanThread != null)
|
||||
{
|
||||
if (chkDcp.Checked)
|
||||
ValueCanThread.SetDCP(1);
|
||||
else
|
||||
ValueCanThread.SetDCP(0);
|
||||
}
|
||||
}
|
||||
|
||||
private void edSystemId_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
csUtils.TypingOnlyNumber(sender, e, false, false);
|
||||
}
|
||||
|
||||
private void SendDataToCan(UInt32 header, byte[] data)
|
||||
{
|
||||
if (canThread != null)
|
||||
{
|
||||
canThread.SendDataFromApp(header, data, 0);
|
||||
}
|
||||
else if (ValueCanThread != null)
|
||||
{
|
||||
ValueCanThread.SendDataFromApp(header, data);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetAutoTxCan(bool autoTx)
|
||||
{
|
||||
if (canThread != null)
|
||||
{
|
||||
canThread.SetAutoTx(autoTx);
|
||||
}
|
||||
else if (ValueCanThread != null)
|
||||
{
|
||||
ValueCanThread.SetAutoTx(autoTx);
|
||||
}
|
||||
}
|
||||
|
||||
private void tmrTest_Tick(object sender, EventArgs e)
|
||||
{
|
||||
//string data = "";
|
||||
|
||||
//data += String.Format("S[{0}], ", SystemTotalData.AvgData.avgCellVoltage);
|
||||
//data += String.Format("S[{0}], ", SystemTotalData.AvgData.maxCellVoltage);
|
||||
//data += String.Format("S[{0}], ", SystemTotalData.AvgData.minCellVoltage);
|
||||
//data += String.Format("S[{0}], ", SystemTotalData.AvgData.diffCellVoltage);
|
||||
//data += String.Format("S[{0}], ", SystemTotalData.CellBalancingVoltage);
|
||||
//for (int i = 0; i < Config.CanModelIndex + 1; i++)
|
||||
//{
|
||||
// data += String.Format("M-{0:00}[{1}], ", i + 1, SystemData.StatusData.cellBalanceValue);
|
||||
//}
|
||||
|
||||
//if (data != "")
|
||||
//{
|
||||
// uEventLog.EventUpdate(data + "\r\n");
|
||||
//}
|
||||
}
|
||||
|
||||
private void btnNextID_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (edSystemId.Text == "") return;
|
||||
if (edMaxModule.Text == "") return;
|
||||
|
||||
int currID = Convert.ToInt32(edSystemId.Text);
|
||||
int maxModule = Convert.ToInt32(edMaxModule.Text);
|
||||
|
||||
if (currID == maxModule)
|
||||
currID = 1;
|
||||
else
|
||||
currID++;
|
||||
|
||||
edSystemId.Text = currID.ToString();
|
||||
SystemData.mNo = currID;
|
||||
|
||||
if (canThread != null)
|
||||
{
|
||||
DataInit();
|
||||
SystemStatus.UpdateSystemId(Convert.ToInt32(edSystemId.Text));
|
||||
canThread.SetPolling(chbPolling.Checked, Convert.ToInt32(edSystemId.Text), ref SystemData);
|
||||
}
|
||||
else if (ValueCanThread != null)
|
||||
{
|
||||
DataInit();
|
||||
SystemStatus.UpdateSystemId(Convert.ToInt32(edSystemId.Text));
|
||||
ValueCanThread.SetPolling(chbPolling.Checked, Convert.ToInt32(edSystemId.Text), ref SystemData);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnPrevID_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (edSystemId.Text == "") return;
|
||||
if (edMaxModule.Text == "") return;
|
||||
|
||||
int currID = Convert.ToInt32(edSystemId.Text);
|
||||
int maxModule = Convert.ToInt32(edMaxModule.Text);
|
||||
|
||||
if (currID == 1)
|
||||
currID = maxModule;
|
||||
else if (currID > 0)
|
||||
currID--;
|
||||
else
|
||||
currID = 1;
|
||||
|
||||
edSystemId.Text = currID.ToString();
|
||||
SystemData.mNo = currID;
|
||||
|
||||
if (canThread != null)
|
||||
{
|
||||
DataInit();
|
||||
SystemStatus.UpdateSystemId(Convert.ToInt32(edSystemId.Text));
|
||||
canThread.SetPolling(chbPolling.Checked, Convert.ToInt32(edSystemId.Text), ref SystemData);
|
||||
}
|
||||
else if (ValueCanThread != null)
|
||||
{
|
||||
DataInit();
|
||||
SystemStatus.UpdateSystemId(Convert.ToInt32(edSystemId.Text));
|
||||
ValueCanThread.SetPolling(chbPolling.Checked, Convert.ToInt32(edSystemId.Text), ref SystemData);
|
||||
}
|
||||
}
|
||||
|
||||
private void edMaxModule_EditValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
int id = Convert.ToInt32(edMaxModule.Text);
|
||||
ModuleIdSet.SetMaxModule(id);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("EditValue change error: " + ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
4586
LFP_Manager_PRM/Forms/fmxMain.resx
Normal file
4586
LFP_Manager_PRM/Forms/fmxMain.resx
Normal file
File diff suppressed because it is too large
Load Diff
1136
LFP_Manager_PRM/Forms/fmxParamConfig.Designer.cs
generated
Normal file
1136
LFP_Manager_PRM/Forms/fmxParamConfig.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
351
LFP_Manager_PRM/Forms/fmxParamConfig.cs
Normal file
351
LFP_Manager_PRM/Forms/fmxParamConfig.cs
Normal file
@@ -0,0 +1,351 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Function;
|
||||
using LFP_Manager.Controls;
|
||||
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
public delegate void ParamUpdateEvent(object sendor);
|
||||
public delegate void ParamCmdEvent(int sId, int mode, int flag, ref DeviceParamData aParam, ref DeviceCalibration aCalib);
|
||||
|
||||
public partial class fmxParamConfig : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
#region VARIABLES
|
||||
|
||||
int SystemId = 0;
|
||||
DeviceParamData Param;
|
||||
DeviceCalibration Calib;
|
||||
|
||||
public event ParamUpdateEvent OnUpdate = null;
|
||||
public event ParamCmdEvent OnCommand = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public fmxParamConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public fmxParamConfig(int sId, DeviceParamData aParam)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
SystemId = sId;
|
||||
Param = aParam;
|
||||
|
||||
InitComponent();
|
||||
|
||||
tmrDisplay.Enabled = true;
|
||||
}
|
||||
|
||||
public void InitComponent()
|
||||
{
|
||||
// Cell Voltage Parameter
|
||||
ucCOVParam.SetParamName(0, "Cell Over Voltage");
|
||||
ucCOVParam.SetParamName(1, "mV");
|
||||
ucCOVParam.SetId(0);
|
||||
ucCOVParam.OnCommand += OnCmdEvent;
|
||||
|
||||
ucCUVParam.SetParamName(0, "Cell Under Voltage");
|
||||
ucCUVParam.SetParamName(1, "mV");
|
||||
ucCUVParam.SetId(1);
|
||||
ucCUVParam.OnCommand += OnCmdEvent;
|
||||
//ucCUVParam.EnableItem(0, false);
|
||||
|
||||
// System Voltage Parameter
|
||||
ucSOVParam.SetParamName(0, "System Over Voltage");
|
||||
ucSOVParam.SetParamName(1, "V");
|
||||
ucSOVParam.SetId(2);
|
||||
ucSOVParam.OnCommand += OnCmdEvent;
|
||||
|
||||
ucSUVParam.SetParamName(0, "System Under Voltage");
|
||||
ucSUVParam.SetParamName(1, "V");
|
||||
ucSUVParam.SetId(3);
|
||||
ucSUVParam.OnCommand += OnCmdEvent;
|
||||
//ucSUVParam.EnableItem(0, false);
|
||||
|
||||
// Charge Temperature Parameter
|
||||
ucCHTParam.SetParamName(0, "Charge High Temp");
|
||||
ucCHTParam.SetParamName(1, "C");
|
||||
ucCHTParam.SetId(4);
|
||||
ucCHTParam.OnCommand += OnCmdEvent;
|
||||
|
||||
ucCLTParam.SetParamName(0, "Charge Low Temp");
|
||||
ucCLTParam.SetParamName(1, "C");
|
||||
ucCLTParam.SetId(5);
|
||||
ucCLTParam.OnCommand += OnCmdEvent;
|
||||
|
||||
// Discharge Temperature Parameter
|
||||
ucDHTParam.SetParamName(0, "Discharge High Temp");
|
||||
ucDHTParam.SetParamName(1, "C");
|
||||
ucDHTParam.SetId(6);
|
||||
ucDHTParam.OnCommand += OnCmdEvent;
|
||||
//ucDHTParam.EnableItem(0, false);
|
||||
|
||||
ucDLTParam.SetParamName(0, "Discharge Low Temp");
|
||||
ucDLTParam.SetParamName(1, "C");
|
||||
ucDLTParam.SetId(7);
|
||||
ucDLTParam.OnCommand += OnCmdEvent;
|
||||
//ucDLTParam.EnableItem(0, false);
|
||||
|
||||
// Discharge Temperature Parameter
|
||||
ucCOCParam.SetParamName(0, "Charge Over Current");
|
||||
ucCOCParam.SetParamName(1, "A");
|
||||
ucCOCParam.SetId(8);
|
||||
ucCOCParam.OnCommand += OnCmdEvent;
|
||||
|
||||
ucDOCParam.SetParamName(0, "Discharge Over Current");
|
||||
ucDOCParam.SetParamName(1, "A");
|
||||
ucDOCParam.SetId(9);
|
||||
ucDOCParam.OnCommand += OnCmdEvent;
|
||||
//ucDOCParam.EnableItem(0, false);
|
||||
|
||||
// SOC Parameter
|
||||
ucLowSocParam.SetParamName(0, "Low SOC");
|
||||
ucLowSocParam.SetParamName(1, "%");
|
||||
ucLowSocParam.SetId(10);
|
||||
ucLowSocParam.OnCommand += OnCmdEvent;
|
||||
ucLowSocParam.EnableItem(0, false);
|
||||
|
||||
// SOC Parameter
|
||||
ucCvDiffParam.SetParamName(0, "Cell Voltage Diff");
|
||||
ucCvDiffParam.SetParamName(1, "mV");
|
||||
ucCvDiffParam.SetId(11);
|
||||
ucCvDiffParam.OnCommand += OnCmdEvent;
|
||||
//ucCvDiffParam.EnableItem(0, false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region COMMAND EVENT
|
||||
|
||||
private void OnCmdEvent(int mode, int flag, ParamData aParam)
|
||||
{
|
||||
int cmd = 0;
|
||||
DeviceParamData wParam = Param;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case 0: // Cell Over Voltage
|
||||
cmd = 5;
|
||||
wParam.CellOverVoltageTrip = aParam.Fault;
|
||||
wParam.CellOverVoltageWarning = aParam.Warning;
|
||||
wParam.CellOverVoltageRelease = aParam.Release;
|
||||
break;
|
||||
case 1: // Cell Under Voltage
|
||||
cmd = 5;
|
||||
wParam.CellUnderVoltageTrip = aParam.Fault;
|
||||
wParam.CellUnderVoltageWarning = aParam.Warning;
|
||||
wParam.CellUnderVoltageRelease = aParam.Release;
|
||||
break;
|
||||
case 2: // System Over Voltage
|
||||
cmd = 7;
|
||||
wParam.SysOverVoltageTrip = aParam.Fault;
|
||||
wParam.SysOverVoltageWarning = aParam.Warning;
|
||||
wParam.SysOverVoltageRelease = aParam.Release;
|
||||
break;
|
||||
case 3: // System Under Voltage
|
||||
cmd = 7;
|
||||
wParam.SysUnderVoltageTrip = aParam.Fault;
|
||||
wParam.SysUnderVoltageWarning = aParam.Warning;
|
||||
wParam.SysUnderVoltageRelease = aParam.Release;
|
||||
break;
|
||||
case 4: // Charge High Temperature
|
||||
cmd = 6;
|
||||
wParam.ChaHighTempTrip = aParam.Fault;
|
||||
wParam.ChaHighTempWarning = aParam.Warning;
|
||||
wParam.ChaHighTempRelease = aParam.Release;
|
||||
break;
|
||||
case 5: // Charge Low Temperature
|
||||
cmd = 6;
|
||||
wParam.ChaLowTempTrip = aParam.Fault;
|
||||
wParam.ChaLowTempWarning = aParam.Warning;
|
||||
wParam.ChaLowTempRelease = aParam.Release;
|
||||
break;
|
||||
case 6: // Discharge High Temperature
|
||||
cmd = 6;
|
||||
wParam.DchHighTempTrip = aParam.Fault;
|
||||
wParam.DchHighTempWarning = aParam.Warning;
|
||||
wParam.DchHighTempRelease = aParam.Release;
|
||||
break;
|
||||
case 7: // Discharge Low Temperature
|
||||
cmd = 6;
|
||||
wParam.DchLowTempTrip = aParam.Fault;
|
||||
wParam.DchLowTempWarning = aParam.Warning;
|
||||
wParam.DchLowTempRelease = aParam.Release;
|
||||
break;
|
||||
case 8: // Charge Over Current
|
||||
cmd = 22;
|
||||
wParam.ChaOverCurrentTrip = aParam.Fault;
|
||||
wParam.ChaOverCurrentWarning = aParam.Warning;
|
||||
wParam.ChaOverCurrentRelease = aParam.Release;
|
||||
break;
|
||||
case 9: // Discharge Over Current
|
||||
cmd = 22;
|
||||
wParam.DchOverCurrentTrip = aParam.Fault;
|
||||
wParam.DchOverCurrentWarning = aParam.Warning;
|
||||
wParam.DchOverCurrentRelease = aParam.Release;
|
||||
break;
|
||||
case 10: // Low SOC
|
||||
cmd = 14;
|
||||
wParam.LowSocWarning = aParam.Warning;
|
||||
wParam.LowSocRelease = aParam.Release;
|
||||
break;
|
||||
case 11: // Cell Voltage Difference
|
||||
cmd = 2;
|
||||
wParam.CellVoltageDifferenceTrip = aParam.Fault;
|
||||
wParam.CellVoltageDifferenceWarning = aParam.Warning;
|
||||
wParam.CellVoltageDifferenceRelease = aParam.Release;
|
||||
break;
|
||||
case 16: // Default Parameter
|
||||
cmd = 16;
|
||||
wParam.DefalutParamOption = aParam.Fault;
|
||||
wParam.DefalutParamAll = aParam.Release;
|
||||
break;
|
||||
case 99:
|
||||
cmd = 99; // All parameter read
|
||||
break;
|
||||
}
|
||||
OnCommand?.Invoke(SystemId, cmd, flag, ref wParam, ref Calib);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
public void UpdateData(DeviceParamData aParam, DeviceCalibration aCalib)
|
||||
{
|
||||
Param = aParam;
|
||||
Calib = aCalib;
|
||||
}
|
||||
|
||||
private void tmrDisplay_Tick(object sender, EventArgs e)
|
||||
{
|
||||
DisplayValue();
|
||||
|
||||
OnUpdate?.Invoke(this);
|
||||
}
|
||||
|
||||
private void DisplayValue()
|
||||
{
|
||||
ParamData pData = new ParamData();
|
||||
|
||||
// Cell Voltage Parameter
|
||||
pData.Fault = Param.CellOverVoltageTrip;
|
||||
pData.Warning = Param.CellOverVoltageWarning;
|
||||
pData.Release = Param.CellOverVoltageRelease;
|
||||
|
||||
ucCOVParam.UpdateData(pData);
|
||||
|
||||
pData.Fault = Param.CellUnderVoltageTrip;
|
||||
pData.Warning = Param.CellUnderVoltageWarning;
|
||||
pData.Release = Param.CellUnderVoltageRelease;
|
||||
|
||||
ucCUVParam.UpdateData(pData);
|
||||
|
||||
// System Voltage Parameter
|
||||
pData.Fault = Param.SysOverVoltageTrip;
|
||||
pData.Warning = Param.SysOverVoltageWarning;
|
||||
pData.Release = Param.SysOverVoltageRelease;
|
||||
|
||||
ucSOVParam.UpdateData(pData);
|
||||
|
||||
pData.Fault = Param.SysUnderVoltageTrip;
|
||||
pData.Warning = Param.SysUnderVoltageWarning;
|
||||
pData.Release = Param.SysUnderVoltageRelease;
|
||||
|
||||
ucSUVParam.UpdateData(pData);
|
||||
|
||||
// Charge Temp Parameter
|
||||
pData.Fault = Param.ChaHighTempTrip;
|
||||
pData.Warning = Param.ChaHighTempWarning;
|
||||
pData.Release = Param.ChaHighTempRelease;
|
||||
|
||||
ucCHTParam.UpdateData(pData);
|
||||
|
||||
pData.Fault = Param.ChaLowTempTrip;
|
||||
pData.Warning = Param.ChaLowTempWarning;
|
||||
pData.Release = Param.ChaLowTempRelease;
|
||||
|
||||
ucCLTParam.UpdateData(pData);
|
||||
|
||||
// Discharge Temp Parameter
|
||||
pData.Fault = Param.DchHighTempTrip;
|
||||
pData.Warning = Param.DchHighTempWarning;
|
||||
pData.Release = Param.DchHighTempRelease;
|
||||
|
||||
ucDHTParam.UpdateData(pData);
|
||||
|
||||
pData.Fault = Param.DchLowTempTrip;
|
||||
pData.Warning = Param.DchLowTempWarning;
|
||||
pData.Release = Param.DchLowTempRelease;
|
||||
|
||||
ucDLTParam.UpdateData(pData);
|
||||
|
||||
// Charge Over Current
|
||||
pData.Fault = Param.ChaOverCurrentTrip;
|
||||
pData.Warning = Param.ChaOverCurrentWarning;
|
||||
pData.Release = Param.ChaOverCurrentRelease;
|
||||
|
||||
ucCOCParam.UpdateData(pData);
|
||||
|
||||
// Discharge Over Current
|
||||
pData.Fault = Param.DchOverCurrentTrip;
|
||||
pData.Warning = Param.DchOverCurrentWarning;
|
||||
pData.Release = Param.DchOverCurrentRelease;
|
||||
|
||||
ucDOCParam.UpdateData(pData);
|
||||
|
||||
// Low SOC
|
||||
pData.Fault = Param.LowSocTrip;
|
||||
pData.Warning = Param.LowSocWarning;
|
||||
pData.Release = Param.LowSocRelease;
|
||||
|
||||
ucLowSocParam.UpdateData(pData);
|
||||
|
||||
// Cell Votage Difference
|
||||
pData.Fault = Param.CellVoltageDifferenceTrip;
|
||||
pData.Warning = Param.CellVoltageDifferenceWarning;
|
||||
pData.Release = Param.CellVoltageDifferenceRelease;
|
||||
|
||||
ucCvDiffParam.UpdateData(pData);
|
||||
}
|
||||
|
||||
private void btnGetAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
ParamData aa = new ParamData();
|
||||
OnCmdEvent(99, 0, aa);
|
||||
}
|
||||
|
||||
private void btnDefaultSet_Click(object sender, EventArgs e)
|
||||
{
|
||||
ParamData aa = new ParamData();
|
||||
|
||||
if (cbFactoryDefault.Checked)
|
||||
aa.Fault = 1;
|
||||
else
|
||||
aa.Fault = 0;
|
||||
|
||||
if (chbAll.Checked)
|
||||
aa.Release = 1;
|
||||
else
|
||||
aa.Release = 0;
|
||||
|
||||
OnCmdEvent(16, 1, aa);
|
||||
}
|
||||
}
|
||||
}
|
||||
4574
LFP_Manager_PRM/Forms/fmxParamConfig.resx
Normal file
4574
LFP_Manager_PRM/Forms/fmxParamConfig.resx
Normal file
File diff suppressed because it is too large
Load Diff
92
LFP_Manager_PRM/Forms/fmxWait.Designer.cs
generated
Normal file
92
LFP_Manager_PRM/Forms/fmxWait.Designer.cs
generated
Normal file
@@ -0,0 +1,92 @@
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
partial class fmxWait
|
||||
{
|
||||
/// <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.progressPanel1 = new DevExpress.XtraWaitForm.ProgressPanel();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// progressPanel1
|
||||
//
|
||||
this.progressPanel1.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.progressPanel1.Appearance.Options.UseBackColor = true;
|
||||
this.progressPanel1.AppearanceCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
|
||||
this.progressPanel1.AppearanceCaption.Options.UseFont = true;
|
||||
this.progressPanel1.AppearanceDescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
||||
this.progressPanel1.AppearanceDescription.Options.UseFont = true;
|
||||
this.progressPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.progressPanel1.ImageHorzOffset = 20;
|
||||
this.progressPanel1.Location = new System.Drawing.Point(0, 17);
|
||||
this.progressPanel1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.progressPanel1.Name = "progressPanel1";
|
||||
this.progressPanel1.Size = new System.Drawing.Size(246, 39);
|
||||
this.progressPanel1.TabIndex = 0;
|
||||
this.progressPanel1.Text = "progressPanel1";
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.AutoSize = true;
|
||||
this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.tableLayoutPanel1.ColumnCount = 1;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.progressPanel1, 0, 0);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(0, 14, 0, 14);
|
||||
this.tableLayoutPanel1.RowCount = 1;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(246, 73);
|
||||
this.tableLayoutPanel1.TabIndex = 1;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSize = true;
|
||||
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.ClientSize = new System.Drawing.Size(246, 73);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.DoubleBuffered = true;
|
||||
this.Name = "Form1";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
||||
this.Text = "Form1";
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraWaitForm.ProgressPanel progressPanel1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
}
|
||||
}
|
||||
43
LFP_Manager_PRM/Forms/fmxWait.cs
Normal file
43
LFP_Manager_PRM/Forms/fmxWait.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraWaitForm;
|
||||
|
||||
namespace LFP_Manager.Forms
|
||||
{
|
||||
public partial class fmxWait : WaitForm
|
||||
{
|
||||
public fmxWait()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.progressPanel1.AutoHeight = true;
|
||||
}
|
||||
|
||||
#region Overrides
|
||||
|
||||
public override void SetCaption(string caption)
|
||||
{
|
||||
base.SetCaption(caption);
|
||||
this.progressPanel1.Caption = caption;
|
||||
}
|
||||
public override void SetDescription(string description)
|
||||
{
|
||||
base.SetDescription(description);
|
||||
this.progressPanel1.Description = description;
|
||||
}
|
||||
public override void ProcessCommand(Enum cmd, object arg)
|
||||
{
|
||||
base.ProcessCommand(cmd, arg);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public enum WaitFormCommand
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
120
LFP_Manager_PRM/Forms/fmxWait.resx
Normal file
120
LFP_Manager_PRM/Forms/fmxWait.resx
Normal 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=2.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>
|
||||
</resheader>
|
||||
</root>
|
||||
899
LFP_Manager_PRM/Function/csCanCommFunction.cs
Normal file
899
LFP_Manager_PRM/Function/csCanCommFunction.cs
Normal file
@@ -0,0 +1,899 @@
|
||||
using System;
|
||||
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Utils;
|
||||
|
||||
namespace LFP_Manager.Function
|
||||
{
|
||||
// 1. Define the data type
|
||||
public struct PACKET_HEADER
|
||||
{
|
||||
public byte Index; // 3
|
||||
public byte R; // 1
|
||||
public byte DP; // 1
|
||||
public byte PF; // 8
|
||||
public byte PS; // 8
|
||||
public byte SA; // 8
|
||||
}
|
||||
|
||||
class csCanCommFunction
|
||||
{
|
||||
public static void CanRxProcess(ref CommConfig aConfig, int sId, UInt32 ExID, byte[] data, ref DeviceSystemData rSystemData, DateTime rTime)
|
||||
{
|
||||
PACKET_HEADER PacketHeader = CovertPtoH(ExID);
|
||||
|
||||
if (PacketHeader.SA == (200 + sId))
|
||||
{
|
||||
if (data.Length > 0)
|
||||
{
|
||||
int REF = 0;
|
||||
|
||||
rSystemData.CommFail = false;
|
||||
rSystemData.ShelfCommFail = false;
|
||||
rSystemData.LastRxTime = rTime;
|
||||
|
||||
switch (PacketHeader.PF)
|
||||
{
|
||||
case 201: // Device heartbeat
|
||||
rSystemData.heatbeat = (UInt32)((data[0] << 24)
|
||||
| (data[1] << 16)
|
||||
| (data[2] << 8)
|
||||
| (data[3] << 0));
|
||||
rSystemData.OneBuffTime = (data[4] << 8) | data[5];
|
||||
rSystemData.AllBuffTime = (data[6] << 8) | data[7];
|
||||
break;
|
||||
case 1: // Send data 0x01
|
||||
break;
|
||||
case 11: // Module Voltage, Current
|
||||
rSystemData.ValueData.voltageOfPack = (short)((data[0] * 256) + data[1]);
|
||||
//rSystemData.ValueData.rSOC = (short)(data[2]);
|
||||
rSystemData.CalibriationData.ForcedBalancing.AutoB = (data[3] == 0x01) ? true : false;
|
||||
rSystemData.StatusData.warning = (short)((data[4] << 8) | data[5]);
|
||||
rSystemData.StatusData.protect = (short)((data[6] << 8) | data[7]);
|
||||
break;
|
||||
case 12: // Status code 2, Software version
|
||||
rSystemData.StatusData.batteryStatusA = (short)((data[0] << 8) | data[1]);
|
||||
rSystemData.StatusData.status = (short)(data[2]); // Op Status
|
||||
|
||||
rSystemData.ValueData.fw_ver[0] = (byte)((((data[6] * 256) + data[7]) >> 12) & 0xf);
|
||||
rSystemData.ValueData.fw_ver[1] = (byte)((((data[6] * 256) + data[7]) >> 8) & 0xf);
|
||||
rSystemData.ValueData.fw_ver[2] = (byte)((((data[6] * 256) + data[7]) >> 4) & 0xf);
|
||||
rSystemData.ValueData.fw_ver[3] = (byte)((((data[6] * 256) + data[7]) >> 0) & 0xf);
|
||||
break;
|
||||
case 13: // Status code 3
|
||||
rSystemData.StatusData.batteryStatusB = (short)((data[0] << 8) | data[1]); // Battery Status 1
|
||||
rSystemData.StatusData.protect1 = (short)((data[2] << 8) | data[3]); // Protection 1
|
||||
break;
|
||||
|
||||
case 15: // Balancing Status - Active Balancing
|
||||
rSystemData.StatusData.BalanceEnable = (uint)((data[0] << 24) | (data[1] << 16) | (data[2] << 8) | (data[3] << 0));
|
||||
rSystemData.StatusData.BalanceMode = (uint)((data[4] << 24) | (data[5] << 16) | (data[6] << 8) | (data[7] << 0));
|
||||
break;
|
||||
|
||||
case 31: // Cell Temperature #1 ~ #4
|
||||
case 32: // Cell Temperature #5 ~ #8
|
||||
case 33: // Cell Temperature #9 ~ #12
|
||||
case 34: // Cell Temperature #13 ~ #16
|
||||
REF = PacketHeader.PF - 31;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (((REF * 4) + i) < rSystemData.tempQty)
|
||||
rSystemData.ValueData.CellTemperature[(REF * 4) + i] = (short)(((data[(i * 2)] * 256) + data[(i * 2) + 1]) - 800);
|
||||
}
|
||||
MakeMaxAvgMinTemperature(ref rSystemData);
|
||||
break;
|
||||
case 41:
|
||||
rSystemData.ValueData.rSOC = (short)((data[0] << 8) | data[1]);
|
||||
break;
|
||||
case 191: // Cell Voltage 1 ~ 4
|
||||
case 192: // Cell Voltage 5 ~ 8
|
||||
case 193: // Cell Voltage 9 ~ 12
|
||||
case 194: // Cell Voltage 13 ~ 16
|
||||
case 195: // Cell Voltage 17 ~ 20
|
||||
case 196: // Cell Voltage 21 ~ 24
|
||||
case 197: // Cell Voltage 25 ~ 28
|
||||
case 198: // Cell Voltage 29 ~ 32
|
||||
case 199: // Cell Voltage 33 ~ 36
|
||||
REF = PacketHeader.PF - 191;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (((REF * 4) + i) < rSystemData.cellQty)
|
||||
rSystemData.ValueData.CellVoltage[(REF * 4) + i] = (ushort)((data[(i * 2)] * 256) + data[(i * 2) + 1]);
|
||||
}
|
||||
rSystemData = MakeMaxAvgMinCellVoltage(rSystemData);
|
||||
break;
|
||||
case 111: // Cell Balancing Status
|
||||
switch (aConfig.TargetModelIndex)
|
||||
{
|
||||
case 0: // PR-57150
|
||||
rSystemData.StatusData.cellBalanceValue = (ushort)((data[0] << 8) + data[1]);
|
||||
rSystemData.StatusData.cellBalanceEndGap = (short)(data[2]);
|
||||
rSystemData.StatusData.cellBalanceFlag = (short)(data[3]);
|
||||
rSystemData.StatusData.cellBallanceStatusLv = (uint)((data[4] << 0) | (data[5] << 8) | (data[6] << 16));
|
||||
rSystemData.StatusData.cellBalanceInterval = (short)(data[7]);
|
||||
break;
|
||||
case 3: // PR-102150
|
||||
rSystemData.StatusData.cellBalanceValue = (ushort)((data[0] << 8) + data[1]);
|
||||
rSystemData.StatusData.cellBalanceEndGap = (short)(data[2] & 0x7F);
|
||||
rSystemData.StatusData.cellBalanceFlag = (short)((data[2] >> 7) & 0x01);
|
||||
rSystemData.StatusData.cellBalanceInterval = (short)(data[3]);
|
||||
rSystemData.StatusData.cellBallanceStatusLv = (uint)((data[4] << 0) | (data[5] << 8)
|
||||
| (data[6] << 16) | (data[7] << 24));
|
||||
break;
|
||||
case 4: // PR-115300
|
||||
rSystemData.StatusData.cellBalanceValue = (ushort)((data[0] << 8) + data[1]);
|
||||
rSystemData.StatusData.cellBalanceEndGap = (short)(data[2] & 0x7F);
|
||||
rSystemData.StatusData.cellBalanceFlag = (short)((data[2] >> 7) & 0x01);
|
||||
rSystemData.StatusData.cellBalanceInterval = (short)(data[3]);
|
||||
rSystemData.StatusData.cellBallanceStatusLv = (uint)((data[4] << 0) | (data[5] << 8)
|
||||
| (data[6] << 16) | (data[7] << 24));
|
||||
break;
|
||||
case 5: // PR-67150
|
||||
rSystemData.StatusData.cellBalanceValue = (ushort)((data[0] << 8) + data[1]);
|
||||
rSystemData.StatusData.cellBalanceEndGap = (short)(data[2] * 10);
|
||||
rSystemData.StatusData.cellBalanceFlag = (short)((data[3] >> 7) & 0x01);
|
||||
rSystemData.StatusData.cellBallanceStatusLv = (uint)((data[4] << 0) | (data[5] << 8) | (data[6] << 16));
|
||||
rSystemData.StatusData.cellBalanceInterval = (short)(data[7]);
|
||||
break;
|
||||
default:
|
||||
rSystemData.StatusData.cellBalanceValue = (ushort)((data[0] << 8) + data[1]);
|
||||
rSystemData.StatusData.cellBalanceFlag = (short)((data[2] >> 7) & 0x01);
|
||||
rSystemData.StatusData.cellBalanceEndGap = (short)((data[2] & 0x7F) * 10);
|
||||
rSystemData.StatusData.cellBalanceInterval = (short)(data[3]);
|
||||
rSystemData.StatusData.cellBallanceStatusLv = (uint)((data[4] << 0) | (data[5] << 8) | (data[6] << 16) | (data[7] << 24));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 112: // Cell Balancing Status
|
||||
rSystemData.StatusData.cellBallanceStatusHv = (uint)((data[0] << 0) | (data[1] << 8) | (data[2] << 16) | (data[3] << 24));
|
||||
break;
|
||||
case 51: // Cell Voltage Parameter
|
||||
rSystemData.ParamData.CellUnderVoltageWarning = (short)((data[0] * 256) + data[1]);
|
||||
rSystemData.ParamData.CellUnderVoltageTrip = (short)((data[2] * 256) + data[3]);
|
||||
rSystemData.ParamData.CellOverVoltageWarning = (short)((data[4] * 256) + data[5]);
|
||||
rSystemData.ParamData.CellOverVoltageTrip = (short)((data[6] * 256) + data[7]);
|
||||
break;
|
||||
case 71: // System Voltage Parameter
|
||||
rSystemData.ParamData.SysUnderVoltageWarning = (short)((data[0] * 256) + data[1]);
|
||||
rSystemData.ParamData.SysUnderVoltageTrip = (short)((data[2] * 256) + data[3]);
|
||||
rSystemData.ParamData.SysOverVoltageWarning = (short)((data[4] * 256) + data[5]);
|
||||
rSystemData.ParamData.SysOverVoltageTrip = (short)((data[6] * 256) + data[7]);
|
||||
break;
|
||||
case 61: // Temperature Parameter
|
||||
rSystemData.ParamData.ChaLowTempWarning = (short)(data[0] - 80);
|
||||
rSystemData.ParamData.ChaLowTempTrip = (short)(data[1] - 80);
|
||||
rSystemData.ParamData.ChaHighTempWarning = (short)(data[2] - 80);
|
||||
rSystemData.ParamData.ChaHighTempTrip = (short)(data[3] - 80);
|
||||
rSystemData.ParamData.DchLowTempWarning = (short)(data[4] - 80);
|
||||
rSystemData.ParamData.DchLowTempTrip = (short)(data[5] - 80);
|
||||
rSystemData.ParamData.DchHighTempWarning = (short)(data[6] - 80);
|
||||
rSystemData.ParamData.DchHighTempTrip = (short)(data[7] - 80);
|
||||
break;
|
||||
case 141: // Soc Parameter, System Voltage Calibration K, B
|
||||
rSystemData.ParamData.LowSocWarning = (short)(data[0]);
|
||||
rSystemData.ParamData.LowSocRelease = (short)(data[1]);
|
||||
rSystemData.CalibriationData.SystemVoltage.Calibration_K = (short)((data[4] * 256) + data[5]);
|
||||
rSystemData.CalibriationData.SystemVoltage.Calibration_B = (short)((data[6] * 256) + data[7]);
|
||||
break;
|
||||
case 151: // Battery Option Parameter - Cell Voltage Offset
|
||||
rSystemData.CalibriationData.CellVoltge.CvOffsetLow = (short)((data[0] << 8) | data[1]);
|
||||
rSystemData.CalibriationData.CellVoltge.CvOffsetHigh = (short)((data[2] << 8) | data[3]);
|
||||
break;
|
||||
case 221: // Over Current Parameter
|
||||
rSystemData.ParamData.ChaOverCurrentWarning = (short)((data[0] * 256) + data[1] - 30000);
|
||||
rSystemData.ParamData.ChaOverCurrentTrip = (short)((data[2] * 256) + data[3] - 30000);
|
||||
rSystemData.ParamData.DchOverCurrentWarning = (short)((data[4] * 256) + data[5] - 30000);
|
||||
rSystemData.ParamData.DchOverCurrentTrip = (short)((data[6] * 256) + data[7] - 30000);
|
||||
break;
|
||||
case 231: // Voltage release Parameter
|
||||
rSystemData.ParamData.CellUnderVoltageRelease = (short)((data[0] * 256) + data[1]);
|
||||
rSystemData.ParamData.CellOverVoltageRelease = (short)((data[2] * 256) + data[3]);
|
||||
rSystemData.ParamData.SysUnderVoltageRelease = (short)((data[4] * 256) + data[5]);
|
||||
rSystemData.ParamData.SysOverVoltageRelease = (short)((data[6] * 256) + data[7]);
|
||||
break;
|
||||
case 241: // Temperature, Current release Parameter
|
||||
rSystemData.ParamData.ChaLowTempRelease = (short)(data[0] - 80);
|
||||
rSystemData.ParamData.ChaHighTempRelease = (short)(data[1] - 80);
|
||||
rSystemData.ParamData.DchLowTempRelease = (short)(data[2] - 80);
|
||||
rSystemData.ParamData.DchHighTempRelease = (short)(data[3] - 80);
|
||||
|
||||
rSystemData.ParamData.ChaOverCurrentRelease = (short)((data[4] * 256) + data[5] - 30000);
|
||||
rSystemData.ParamData.DchOverCurrentRelease = (short)((data[6] * 256) + data[7] - 30000);
|
||||
break;
|
||||
|
||||
case 81: // Battery Parameter
|
||||
rSystemData.CalibriationData.Battery.CellQty = (short)(data[0]);
|
||||
rSystemData.CalibriationData.Battery.TempQty = (short)(data[1]);
|
||||
rSystemData.CalibriationData.Battery.Capacity = (UInt32)((data[2] * 256) + data[3]);
|
||||
break;
|
||||
case 91: // Device Address Setting
|
||||
rSystemData.CalibriationData.SystemInfo.devAddr = (ushort)((data[0] * 256) + data[1]);
|
||||
break;
|
||||
case 171: // Cell Balancing Paramwter
|
||||
rSystemData.CalibriationData.CbParam.Threadhold = (short)((data[0] * 256) + data[1]);
|
||||
rSystemData.CalibriationData.CbParam.Window = (short)((data[2] * 256) + data[3]);
|
||||
rSystemData.CalibriationData.CbParam.Min = (short)(data[4]);
|
||||
rSystemData.CalibriationData.CbParam.Interval = (short)(data[5]);
|
||||
break;
|
||||
case 211:
|
||||
DateTime dev = new DateTime(data[0] + 1970
|
||||
, data[1]
|
||||
, data[2]
|
||||
, data[3]
|
||||
, data[4]
|
||||
, data[5]
|
||||
);
|
||||
rSystemData.CalibriationData.SystemInfo.devTime = dev;
|
||||
break;
|
||||
case 21: // Cell Voltage Difference Parameter
|
||||
rSystemData.ParamData.CellVoltageDifferenceTrip = (short)((data[0] * 256) + data[1]);
|
||||
rSystemData.ParamData.CellVoltageDifferenceWarning = (short)((data[2] * 256) + data[3]);
|
||||
rSystemData.ParamData.CellVoltageDifferenceRelease = (short)((data[4] * 256) + data[5]);
|
||||
rSystemData.ParamData.CellVoltageDifferenceTime = (short)((data[6] * 256) + data[7]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (rSystemData.StatusData.protect != 0)
|
||||
rSystemData.StatusData.alarm = 2;
|
||||
else if (rSystemData.StatusData.warning != 0)
|
||||
rSystemData.StatusData.alarm = 1;
|
||||
else
|
||||
rSystemData.StatusData.alarm = 0;
|
||||
}
|
||||
}
|
||||
public static void CanInvRxProcess(int sId, UInt32 exID, byte[] rData, ref DeviceSystemData aSystemData, DateTime rTime)
|
||||
{
|
||||
PACKET_HEADER PacketHeader = CovertPtoH(exID);
|
||||
|
||||
if (PacketHeader.SA == (200 + sId))
|
||||
{
|
||||
if (rData.Length > 0)
|
||||
{
|
||||
aSystemData.CommFail = false;
|
||||
aSystemData.ShelfCommFail = false;
|
||||
aSystemData.LastRxTime = rTime;
|
||||
|
||||
switch (PacketHeader.PF)
|
||||
{
|
||||
case 11: // Device ManufactureDate
|
||||
aSystemData.Information.ManufactureDate = (UInt32)((rData[0] << 24)
|
||||
| (rData[1] << 16)
|
||||
| (rData[2] << 8)
|
||||
| (rData[3] << 0));
|
||||
break;
|
||||
case 21: // Device Serial Number MSB
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
aSystemData.Information.pcb_sn[i] = rData[i];
|
||||
}
|
||||
break;
|
||||
case 31: // Device Serial Number LSB
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
aSystemData.Information.pcb_sn[i + 8] = rData[i];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static PACKET_HEADER CovertPtoH(UInt32 id)
|
||||
{
|
||||
PACKET_HEADER hdr = new PACKET_HEADER();
|
||||
|
||||
hdr.Index = (byte)((id >> 26) & 0x07);
|
||||
hdr.R = (byte)((id >> 25) & 0x01);
|
||||
hdr.DP = (byte)((id >> 24) & 0x01);
|
||||
hdr.PF = (byte)((id >> 16) & 0xFF);
|
||||
hdr.PS = (byte)((id >> 8) & 0xFF);
|
||||
hdr.SA = (byte)((id >> 0) & 0xFF);
|
||||
|
||||
return hdr;
|
||||
}
|
||||
|
||||
public static UInt32 CovertHtoP(PACKET_HEADER hdr)
|
||||
{
|
||||
UInt32 Packet = 0;
|
||||
|
||||
Packet = (((UInt32)hdr.Index << 26)
|
||||
| ((UInt32)hdr.R << 25)
|
||||
| ((UInt32)hdr.DP << 24)
|
||||
| ((UInt32)hdr.PF << 16)
|
||||
| ((UInt32)hdr.PS << 8)
|
||||
| ((UInt32)hdr.SA << 0)
|
||||
);
|
||||
return Packet;
|
||||
}
|
||||
|
||||
public static byte[] MakeSocRecoveryCanData(byte nSoc)
|
||||
{
|
||||
byte[] result = new byte[8];
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
result[i] = 0xFF;
|
||||
|
||||
result[0] = 0;
|
||||
result[1] = nSoc;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static byte[] MakeCanData(int mode, int flag, int dcp, ref DeviceParamData aParam, ref DeviceCalibration aCalib)
|
||||
{
|
||||
byte[] result = new byte[8];
|
||||
short temp = 0;
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{ result[i] = 0xFF; }
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case 1: // Status Req
|
||||
result[6] = (byte)dcp;
|
||||
break;
|
||||
//case 10: // Cell Balancing set
|
||||
// aCalib.CellBalancingVoltage = 3600;
|
||||
// aCalib.CellBalancingVoltageEndGap = 100;
|
||||
// aCalib.CellBalancingVoltageInterval = 5;
|
||||
// result[0] = (byte)(aCalib.CellBalancingVoltage >> 8);
|
||||
// result[1] = (byte)(aCalib.CellBalancingVoltage >> 0);
|
||||
// result[2] = (byte)(aCalib.CellBalancingVoltageEndGap / 10);
|
||||
// result[3] = (byte)(aCalib.CellBalancingVoltageInterval << 1);
|
||||
|
||||
// int ss = Convert.ToInt32(String.Format("{0:ss}", DateTime.Now));
|
||||
// if (ss == 0)
|
||||
// {
|
||||
// result[3] |= 1;
|
||||
// UInt32 nTime = (UInt32)csUtils.UnixTimeNow();
|
||||
// result[4] = (byte)(nTime >> 24);
|
||||
// result[5] = (byte)(nTime >> 16);
|
||||
// result[6] = (byte)(nTime >> 8);
|
||||
// result[7] = (byte)(nTime >> 0);
|
||||
// }
|
||||
// break;
|
||||
//case 17:
|
||||
// if (aCalib.Current.SelectSubItem != 2)
|
||||
// result[7] = (byte)aCalib.Current.ChaAndDchSelect;
|
||||
// break;
|
||||
}
|
||||
|
||||
// Parameter Set
|
||||
if (flag == 1)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case 25:
|
||||
result[0] = (byte)1;
|
||||
break;
|
||||
case 10: // Cell Balancing set
|
||||
result[0] = (byte)(aCalib.CellBalancingVoltage >> 8);
|
||||
result[1] = (byte)(aCalib.CellBalancingVoltage >> 0);
|
||||
result[2] = (byte)(aCalib.CellBalancingVoltageEndGap / 10);
|
||||
result[3] = (byte)(aCalib.CellBalancingVoltageInterval << 1);
|
||||
|
||||
int ss = Convert.ToInt32(String.Format("{0:ss}", DateTime.Now));
|
||||
if (ss == 0)
|
||||
{
|
||||
result[3] = 1;
|
||||
UInt32 nTime = (UInt32)csUtils.UnixTimeNow();
|
||||
result[4] = (byte)(nTime >> 24);
|
||||
result[5] = (byte)(nTime >> 16);
|
||||
result[6] = (byte)(nTime >> 8);
|
||||
result[7] = (byte)(nTime >> 0);
|
||||
}
|
||||
break;
|
||||
case 5: // Cell Voltage Warning and Fault Parameter
|
||||
result[0] = (byte)(aParam.CellUnderVoltageWarning >> 8);
|
||||
result[1] = (byte)(aParam.CellUnderVoltageWarning >> 0);
|
||||
|
||||
result[2] = (byte)(aParam.CellUnderVoltageTrip >> 8);
|
||||
result[3] = (byte)(aParam.CellUnderVoltageTrip >> 0);
|
||||
|
||||
result[4] = (byte)(aParam.CellOverVoltageWarning >> 8);
|
||||
result[5] = (byte)(aParam.CellOverVoltageWarning >> 0);
|
||||
|
||||
result[6] = (byte)(aParam.CellOverVoltageTrip >> 8);
|
||||
result[7] = (byte)(aParam.CellOverVoltageTrip >> 0);
|
||||
break;
|
||||
case 6: // Temperature Warning and Fault Parameter
|
||||
result[0] = (byte)(aParam.ChaLowTempWarning + 80);
|
||||
result[1] = (byte)(aParam.ChaLowTempTrip + 80);
|
||||
|
||||
result[2] = (byte)(aParam.ChaHighTempWarning + 80);
|
||||
result[3] = (byte)(aParam.ChaHighTempTrip + 80);
|
||||
|
||||
result[4] = (byte)(aParam.DchLowTempWarning + 80);
|
||||
result[5] = (byte)(aParam.DchLowTempTrip + 80);
|
||||
|
||||
result[6] = (byte)(aParam.DchHighTempWarning + 80);
|
||||
result[7] = (byte)(aParam.DchHighTempTrip + 80);
|
||||
break;
|
||||
case 7: // System Voltage Warning and Fault Parameter
|
||||
result[0] = (byte)(aParam.SysUnderVoltageWarning >> 8);
|
||||
result[1] = (byte)(aParam.SysUnderVoltageWarning >> 0);
|
||||
|
||||
result[2] = (byte)(aParam.SysUnderVoltageTrip >> 8);
|
||||
result[3] = (byte)(aParam.SysUnderVoltageTrip >> 0);
|
||||
|
||||
result[4] = (byte)(aParam.SysOverVoltageWarning >> 8);
|
||||
result[5] = (byte)(aParam.SysOverVoltageWarning >> 0);
|
||||
|
||||
result[6] = (byte)(aParam.SysOverVoltageTrip >> 8);
|
||||
result[7] = (byte)(aParam.SysOverVoltageTrip >> 0);
|
||||
break;
|
||||
case 14: // SOC Warning and System Voltage Calibration K, B Parameter
|
||||
result[0] = (byte)(aParam.LowSocWarning);
|
||||
result[1] = (byte)(aParam.LowSocRelease);
|
||||
result[2] = 0;
|
||||
result[3] = 0;
|
||||
result[4] = (byte)(aCalib.SystemVoltage.Calibration_K >> 8);
|
||||
result[5] = (byte)(aCalib.SystemVoltage.Calibration_K >> 0);
|
||||
result[6] = (byte)(aCalib.SystemVoltage.Calibration_B >> 8);
|
||||
result[7] = (byte)(aCalib.SystemVoltage.Calibration_K >> 0);
|
||||
break;
|
||||
case 22: // Current Warning and Fault Parameter
|
||||
temp = (short)(aParam.ChaOverCurrentWarning + 30000);
|
||||
result[0] = (byte)(temp >> 8);
|
||||
result[1] = (byte)(temp >> 0);
|
||||
|
||||
temp = (short)(aParam.ChaOverCurrentTrip + 30000);
|
||||
result[2] = (byte)(temp >> 8);
|
||||
result[3] = (byte)(temp >> 0);
|
||||
|
||||
temp = (short)(aParam.DchOverCurrentWarning + 30000);
|
||||
result[4] = (byte)(temp >> 8);
|
||||
result[5] = (byte)(temp >> 0);
|
||||
|
||||
temp = (short)(aParam.DchOverCurrentTrip + 30000);
|
||||
result[6] = (byte)(temp >> 8);
|
||||
result[7] = (byte)(temp >> 0);
|
||||
break;
|
||||
case 23: // Cell and System Voltage Release Parameter
|
||||
result[0] = (byte)(aParam.CellUnderVoltageRelease >> 8);
|
||||
result[1] = (byte)(aParam.CellUnderVoltageRelease >> 0);
|
||||
|
||||
result[2] = (byte)(aParam.CellOverVoltageRelease >> 8);
|
||||
result[3] = (byte)(aParam.CellOverVoltageRelease >> 0);
|
||||
|
||||
result[4] = (byte)(aParam.SysUnderVoltageRelease >> 8);
|
||||
result[5] = (byte)(aParam.SysUnderVoltageRelease >> 0);
|
||||
|
||||
result[6] = (byte)(aParam.SysOverVoltageRelease >> 8);
|
||||
result[7] = (byte)(aParam.SysOverVoltageRelease >> 0);
|
||||
break;
|
||||
case 24: // Cell and System Voltage Release Parameter
|
||||
result[0] = (byte)(aParam.ChaLowTempRelease + 80);
|
||||
result[1] = (byte)(aParam.ChaHighTempRelease + 80);
|
||||
|
||||
result[2] = (byte)(aParam.DchLowTempRelease + 80);
|
||||
result[3] = (byte)(aParam.DchHighTempRelease + 80);
|
||||
|
||||
temp = (short)(aParam.ChaOverCurrentRelease + 30000);
|
||||
result[4] = (byte)(temp >> 8);
|
||||
result[5] = (byte)(temp >> 0);
|
||||
|
||||
temp = (short)(aParam.DchOverCurrentRelease + 30000);
|
||||
result[6] = (byte)(temp >> 8);
|
||||
result[7] = (byte)(temp >> 0);
|
||||
break;
|
||||
case 9:
|
||||
result[0] = (byte)(aCalib.SystemInfo.devAddr >> 8);
|
||||
result[1] = (byte)(aCalib.SystemInfo.devAddr >> 0);
|
||||
break;
|
||||
case 1: // Auto Cell Balancing Set Data (0: Off. 1: On)
|
||||
//result[6] = (byte)((aCalib.ForcedBalancing.DCP) ? 0x01 : 0x00);
|
||||
result[7] = (byte)((aCalib.ForcedBalancing.AutoB) ? 0x01 : 0x00);
|
||||
break;
|
||||
case 12: // Forced Cell Balancing
|
||||
result[0] = (byte)(aCalib.ForcedBalancing2.Control);
|
||||
result[1] = (byte)(aCalib.ForcedBalancing2.CellNo);
|
||||
result[2] = (byte)(aCalib.ForcedBalancing2.Mode);
|
||||
result[3] = (byte)(aCalib.ForcedBalancing2.Enable);
|
||||
break;
|
||||
case 8: // Battery Paramter
|
||||
result[0] = (byte)(aCalib.Battery.CellQty);
|
||||
result[1] = (byte)(aCalib.Battery.TempQty);
|
||||
result[2] = (byte)(aCalib.Battery.Capacity >> 8);
|
||||
result[3] = (byte)(aCalib.Battery.Capacity >> 0);
|
||||
break;
|
||||
case 17: // Cell Balancing Parameter
|
||||
result[0] = (byte)(aCalib.CbParam.Threadhold >> 8);
|
||||
result[1] = (byte)(aCalib.CbParam.Threadhold >> 0);
|
||||
result[2] = (byte)(aCalib.CbParam.Window >> 8);
|
||||
result[3] = (byte)(aCalib.CbParam.Window >> 0);
|
||||
result[4] = (byte)(aCalib.CbParam.Min >> 0);
|
||||
result[5] = (byte)(aCalib.CbParam.Interval >> 0);
|
||||
break;
|
||||
case 21: // System Information (Device Address)
|
||||
result[0] = (byte)(aCalib.SystemInfo.devAddr >> 8);
|
||||
result[1] = (byte)(aCalib.SystemInfo.devAddr >> 0);
|
||||
break;
|
||||
case 13: // Soc Calibration
|
||||
result[0] = (byte)(aCalib.SocCalib.CellNo);
|
||||
result[1] = (byte)(aCalib.SocCalib.SocValue);
|
||||
break;
|
||||
case 15: // Parameter Option
|
||||
result[0] = (byte)(aCalib.CellVoltge.CvOffsetLow >> 8);
|
||||
result[1] = (byte)(aCalib.CellVoltge.CvOffsetLow >> 0);
|
||||
result[2] = (byte)(aCalib.CellVoltge.CvOffsetHigh >> 8);
|
||||
result[3] = (byte)(aCalib.CellVoltge.CvOffsetHigh >> 0);
|
||||
|
||||
result[7] = (byte)(0x01);
|
||||
break;
|
||||
case 16: // Default Parameter
|
||||
result[0] = (byte)(aParam.DefalutParamOption);
|
||||
break;
|
||||
case 2: // Default Parameter
|
||||
result[0] = (byte)(aParam.CellVoltageDifferenceTrip >> 8);
|
||||
result[1] = (byte)(aParam.CellVoltageDifferenceTrip >> 0);
|
||||
result[2] = (byte)(aParam.CellVoltageDifferenceWarning >> 8);
|
||||
result[3] = (byte)(aParam.CellVoltageDifferenceWarning >> 0);
|
||||
result[4] = (byte)(aParam.CellVoltageDifferenceRelease >> 8);
|
||||
result[5] = (byte)(aParam.CellVoltageDifferenceRelease >> 0);
|
||||
result[6] = (byte)(aParam.CellVoltageDifferenceTime >> 8);
|
||||
result[7] = (byte)(aParam.CellVoltageDifferenceTime >> 0);
|
||||
break;
|
||||
case 900:
|
||||
result[0] = (byte)(aCalib.InvData.ManufactureDate >> 24);
|
||||
result[1] = (byte)(aCalib.InvData.ManufactureDate >> 16);
|
||||
result[2] = (byte)(aCalib.InvData.ManufactureDate >> 8);
|
||||
result[3] = (byte)(aCalib.InvData.ManufactureDate >> 0);
|
||||
|
||||
result[7] = (byte)(1);
|
||||
break;
|
||||
case 901:
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
result[i] = (byte)(aCalib.InvData.pcb_sn[i]);
|
||||
}
|
||||
break;
|
||||
case 902:
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
result[i] = (byte)(aCalib.InvData.pcb_sn[i + 8]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static DeviceSystemData MakeMaxAvgMinCellVoltage(DeviceSystemData rSystemData)
|
||||
{
|
||||
DeviceSystemData result = rSystemData;
|
||||
int Max, Avg, Min, Sum;
|
||||
int MaxNo, MinNo;
|
||||
|
||||
Max = Avg = Min = Sum = 0;
|
||||
MaxNo = MinNo = 0;
|
||||
for (int i = 0; i < rSystemData.cellQty; i++)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
Max = Min = rSystemData.ValueData.CellVoltage[i];
|
||||
}
|
||||
Sum += rSystemData.ValueData.CellVoltage[i];
|
||||
|
||||
if (Max < rSystemData.ValueData.CellVoltage[i])
|
||||
{
|
||||
Max = rSystemData.ValueData.CellVoltage[i];
|
||||
MaxNo = i;
|
||||
}
|
||||
if (Min > rSystemData.ValueData.CellVoltage[i])
|
||||
{
|
||||
Min = rSystemData.ValueData.CellVoltage[i];
|
||||
MinNo = i;
|
||||
}
|
||||
}
|
||||
if (rSystemData.cellQty > 0)
|
||||
Avg = Sum / rSystemData.cellQty;
|
||||
|
||||
result.AvgData.avgCellVoltage = (ushort)Avg;
|
||||
result.AvgData.maxCellVoltage = (ushort)Max;
|
||||
result.AvgData.maxCellNum = (short)(MaxNo + 1);
|
||||
result.AvgData.minCellVoltage = (ushort)Min;
|
||||
result.AvgData.minCellNum = (short)(MinNo + 1);
|
||||
result.AvgData.diffCellVoltage = (ushort)(Max - Min);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void MakeMaxAvgMinTemperature(ref DeviceSystemData rSystemData)
|
||||
{
|
||||
int Max, Avg, Min, Sum;
|
||||
int MaxNo, MinNo;
|
||||
|
||||
Max = Avg = Min = Sum = 0;
|
||||
MaxNo = MinNo = 0;
|
||||
for (int i = 0; i < rSystemData.tempQty; i++)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
Max = Min = rSystemData.ValueData.CellTemperature[i];
|
||||
}
|
||||
Sum += rSystemData.ValueData.CellTemperature[i];
|
||||
|
||||
if (Max < rSystemData.ValueData.CellTemperature[i])
|
||||
{
|
||||
Max = rSystemData.ValueData.CellTemperature[i];
|
||||
MaxNo = i;
|
||||
}
|
||||
if (Min > rSystemData.ValueData.CellTemperature[i])
|
||||
{
|
||||
Min = rSystemData.ValueData.CellTemperature[i];
|
||||
MinNo = i;
|
||||
}
|
||||
}
|
||||
if (rSystemData.tempQty > 0)
|
||||
Avg = Sum / rSystemData.tempQty;
|
||||
|
||||
rSystemData.AvgData.avgTemp = (short)Avg;
|
||||
rSystemData.AvgData.maxTemp = (short)Max;
|
||||
rSystemData.AvgData.maxTempNum = (short)(MaxNo + 1);
|
||||
rSystemData.AvgData.minTemp = (short)Min;
|
||||
rSystemData.AvgData.minTempNum = (short)(MinNo + 1);
|
||||
rSystemData.AvgData.diffTemp = (short)(Max - Min);
|
||||
}
|
||||
|
||||
private static DeviceSystemData MakeAlarmTripData(int id, short ndata, DeviceSystemData rSystemData)
|
||||
{
|
||||
bool[] aData = csUtils.Int16ToBitArray(ndata);
|
||||
short bFault = rSystemData.StatusData.protect;
|
||||
short bWarning = rSystemData.StatusData.warning;
|
||||
int i = 0;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case 0: // Status Code 1
|
||||
if (aData[i++]) bWarning |= (1 << 4); // 00 Cell Over Voltage Warning
|
||||
else bWarning &= ~(1 << 4);
|
||||
if (aData[i++]) bWarning |= (1 << 5); // 01 Cell Under Voltage Warning
|
||||
else bWarning &= ~(1 << 5);
|
||||
if (aData[i++]) bWarning |= (1 << 0); // 02 High Temperature Warning
|
||||
else bWarning &= ~(1 << 0);
|
||||
if (aData[i++]) bWarning |= (1 << 1); // 03 Low Temperature Warning
|
||||
else bWarning &= ~(1 << 1);
|
||||
if (aData[i++]) bWarning |= (1 << 2); // 04 Module Over Voltage Warning
|
||||
else bWarning &= ~(1 << 2);
|
||||
if (aData[i++]) bWarning |= (1 << 3); // 05 Module Under Voltage Warning
|
||||
else bWarning &= ~(1 << 3);
|
||||
if (aData[i++]) bWarning |= (1 << 9); // 06 Cell Voltage Difference Warning
|
||||
else bWarning &= ~(1 << 9);
|
||||
i++; // 07 Reserved
|
||||
|
||||
if (aData[i++]) bFault |= (1 << 4); // 08 Cell Over Voltage Fault
|
||||
else bFault &= ~(1 << 4);
|
||||
if (aData[i++]) bFault |= (1 << 5); // 09 Cell Under Voltage Fault
|
||||
else bFault &= ~(1 << 5);
|
||||
if (aData[i++]) bFault |= (1 << 0); // 10 High Temperature Warning
|
||||
else bFault &= ~(1 << 0);
|
||||
if (aData[i++]) bFault |= (1 << 1); // 11 Low Temperature Warning
|
||||
else bFault &= ~(1 << 1);
|
||||
if (aData[i++]) bFault |= (1 << 2); // 12 Module Over Voltage Warning
|
||||
else bFault &= ~(1 << 2);
|
||||
if (aData[i++]) bFault |= (1 << 3); // 13 Module Under Voltage Warning
|
||||
else bFault &= ~(1 << 3);
|
||||
if (aData[i++]) bFault |= (1 << 9); // 14 Cell Voltage Difference Fault
|
||||
else bFault &= ~(1 << 9);
|
||||
|
||||
break;
|
||||
case 1: // Status Code 2
|
||||
i++; // 00 High SOC Warning
|
||||
i++; // 01 High SOC Fault
|
||||
if (aData[i++]) bWarning |= (1 << 11); // 02 Low SOC Warning
|
||||
else bWarning &= ~(1 << 11);
|
||||
i++; // 03 Low SOC Fault
|
||||
i++; // 04 Reserved
|
||||
i++; // 05 Reserved
|
||||
i++; // 06 Reserved
|
||||
i++; // 07 Reserved
|
||||
if (aData[i++]) bWarning |= (1 << 6); // 08 Charge Over Current Warning
|
||||
else bWarning &= ~(1 << 6);
|
||||
if (aData[i++]) bFault |= (1 << 6); // 09 Charge Over Current Fault
|
||||
else bFault &= ~(1 << 6);
|
||||
if (aData[i++]) bWarning |= (1 << 7); // 10 Discharge Over Current Warning
|
||||
else bWarning &= ~(1 << 7);
|
||||
if (aData[i++]) bFault |= (1 << 7); // 11 Discharge Over Current Fault
|
||||
else bFault &= ~(1 << 7);
|
||||
break;
|
||||
}
|
||||
|
||||
rSystemData.StatusData.protect = bFault;
|
||||
rSystemData.StatusData.warning = bWarning;
|
||||
|
||||
return rSystemData;
|
||||
}
|
||||
|
||||
private static DeviceSystemData MakeWarningAlarmData(int id, short ndata, DeviceSystemData rSystemData)
|
||||
{
|
||||
bool[] aData = csUtils.Int16ToBitArray(ndata);
|
||||
short bFault = rSystemData.StatusData.protect;
|
||||
short bWarning = rSystemData.StatusData.warning;
|
||||
int i = 0;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case 0: // Status Code 1
|
||||
if (aData[i++]) bWarning |= (1 << 4); // 00 Cell Over Voltage Warning
|
||||
else bWarning &= ~(1 << 4);
|
||||
if (aData[i++]) bWarning |= (1 << 5); // 01 Cell Under Voltage Warning
|
||||
else bWarning &= ~(1 << 5);
|
||||
if (aData[i++]) bWarning |= (1 << 0); // 02 High Temperature Warning
|
||||
else bWarning &= ~(1 << 0);
|
||||
if (aData[i++]) bWarning |= (1 << 1); // 03 Low Temperature Warning
|
||||
else bWarning &= ~(1 << 1);
|
||||
if (aData[i++]) bWarning |= (1 << 2); // 04 Module Over Voltage Warning
|
||||
else bWarning &= ~(1 << 2);
|
||||
if (aData[i++]) bWarning |= (1 << 3); // 05 Module Under Voltage Warning
|
||||
else bWarning &= ~(1 << 3);
|
||||
if (aData[i++]) bWarning |= (1 << 9); // 06 Cell Voltage Difference Warning
|
||||
else bWarning &= ~(1 << 9);
|
||||
i++; // 07 Reserved
|
||||
|
||||
if (aData[i++]) bFault |= (1 << 4); // 08 Cell Over Voltage Fault
|
||||
else bFault &= ~(1 << 4);
|
||||
if (aData[i++]) bFault |= (1 << 5); // 09 Cell Under Voltage Fault
|
||||
else bFault &= ~(1 << 5);
|
||||
if (aData[i++]) bFault |= (1 << 0); // 10 High Temperature Warning
|
||||
else bFault &= ~(1 << 0);
|
||||
if (aData[i++]) bFault |= (1 << 1); // 11 Low Temperature Warning
|
||||
else bFault &= ~(1 << 1);
|
||||
if (aData[i++]) bFault |= (1 << 2); // 12 Module Over Voltage Warning
|
||||
else bFault &= ~(1 << 2);
|
||||
if (aData[i++]) bFault |= (1 << 3); // 13 Module Under Voltage Warning
|
||||
else bFault &= ~(1 << 3);
|
||||
if (aData[i++]) bFault |= (1 << 9); // 14 Cell Voltage Difference Fault
|
||||
else bFault &= ~(1 << 9);
|
||||
|
||||
break;
|
||||
case 1: // Status Code 2
|
||||
i++; // 00 High SOC Warning
|
||||
i++; // 01 High SOC Fault
|
||||
if (aData[i++]) bWarning |= (1 << 11); // 02 Low SOC Warning
|
||||
else bWarning &= ~(1 << 11);
|
||||
i++; // 03 Low SOC Fault
|
||||
i++; // 04 Reserved
|
||||
i++; // 05 Reserved
|
||||
i++; // 06 Reserved
|
||||
i++; // 07 Reserved
|
||||
if (aData[i++]) bWarning |= (1 << 6); // 08 Charge Over Current Warning
|
||||
else bWarning &= ~(1 << 6);
|
||||
if (aData[i++]) bFault |= (1 << 6); // 09 Charge Over Current Fault
|
||||
else bFault &= ~(1 << 6);
|
||||
if (aData[i++]) bWarning |= (1 << 7); // 10 Discharge Over Current Warning
|
||||
else bWarning &= ~(1 << 7);
|
||||
if (aData[i++]) bFault |= (1 << 7); // 11 Discharge Over Current Fault
|
||||
else bFault &= ~(1 << 7);
|
||||
break;
|
||||
}
|
||||
|
||||
rSystemData.StatusData.protect = bFault;
|
||||
rSystemData.StatusData.warning = bWarning;
|
||||
|
||||
return rSystemData;
|
||||
}
|
||||
|
||||
public static string PacketToMsg(UInt32 exID, byte[] rData, int flag)
|
||||
{
|
||||
string result = "";
|
||||
PACKET_HEADER PacketHeader = CovertPtoH(exID);
|
||||
|
||||
if (flag == 0) result = "RD: ";
|
||||
else result = "TD: ";
|
||||
result += String.Format(" ID:0x{0:X4}", exID);
|
||||
result += String.Format("[PF({3:000}) PS({4:000}) SA({5:000})]"
|
||||
, PacketHeader.Index
|
||||
, PacketHeader.R
|
||||
, PacketHeader.DP
|
||||
, PacketHeader.PF
|
||||
, PacketHeader.PS
|
||||
, PacketHeader.SA
|
||||
);
|
||||
|
||||
result += String.Format("Data({0}): ", rData.Length);
|
||||
|
||||
for (int i = 0; i < rData.Length; i++)
|
||||
{
|
||||
result += String.Format("{0:X2} ", rData[i]);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
unsafe public static string PacketToMsg(VCI_CAN_OBJ obj, int flag)
|
||||
{
|
||||
PACKET_HEADER PacketHeader = CovertPtoH(obj.ID);
|
||||
string str;
|
||||
|
||||
if (flag == 0) str = "RD: ";
|
||||
else str = "TD: ";
|
||||
str += String.Format(" ID:0x{0}", obj.ID.ToString("X4"));
|
||||
//str += String.Format("[I({0}) R({1}) DP({2}) PF({3}) PS({4}) SA({5})]"
|
||||
// , PacketHeader.Index
|
||||
// , PacketHeader.R
|
||||
// , PacketHeader.DP
|
||||
// , PacketHeader.PF
|
||||
// , PacketHeader.PS
|
||||
// , PacketHeader.SA
|
||||
// );
|
||||
str += String.Format("[PF({3:000}) PS({4:000}) SA({5:000})]"
|
||||
, PacketHeader.Index
|
||||
, PacketHeader.R
|
||||
, PacketHeader.DP
|
||||
, PacketHeader.PF
|
||||
, PacketHeader.PS
|
||||
, PacketHeader.SA
|
||||
);
|
||||
|
||||
str += " Frame:";
|
||||
if (obj.RemoteFlag == 0)
|
||||
str += "D-Frame ";
|
||||
else
|
||||
str += "R-Frame ";
|
||||
//if (obj.ExternFlag == 0)
|
||||
// str += "Std-Frame ";
|
||||
//else
|
||||
// str += "Ext-Frame ";
|
||||
|
||||
//////////////////////////////////////////
|
||||
if (obj.RemoteFlag == 0)
|
||||
{
|
||||
byte len = (byte)(obj.DataLen % 9);
|
||||
|
||||
str += String.Format("Data({0}): ", len);
|
||||
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
str += String.Format("{0} ", obj.Data[i].ToString("X2"));
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
unsafe public static string PacketToMsg1(VCI_CAN_OBJ obj)
|
||||
{
|
||||
string str;
|
||||
|
||||
str = "Received data: ";
|
||||
str += " Frame ID:0x" + System.Convert.ToString((Int32)obj.ID, 16);
|
||||
str += " Frame format:";
|
||||
if (obj.RemoteFlag == 0)
|
||||
str += "Data Frame ";
|
||||
else
|
||||
str += "Remote frame ";
|
||||
if (obj.ExternFlag == 0)
|
||||
str += "Standard frame ";
|
||||
else
|
||||
str += "Extended frame ";
|
||||
|
||||
//////////////////////////////////////////
|
||||
if (obj.RemoteFlag == 0)
|
||||
{
|
||||
str += "Data: ";
|
||||
byte len = (byte)(obj.DataLen % 9);
|
||||
byte j = 0;
|
||||
if (j++ < len)
|
||||
str += " " + System.Convert.ToString(obj.Data[0], 16);
|
||||
if (j++ < len)
|
||||
str += " " + System.Convert.ToString(obj.Data[1], 16);
|
||||
if (j++ < len)
|
||||
str += " " + System.Convert.ToString(obj.Data[2], 16);
|
||||
if (j++ < len)
|
||||
str += " " + System.Convert.ToString(obj.Data[3], 16);
|
||||
if (j++ < len)
|
||||
str += " " + System.Convert.ToString(obj.Data[4], 16);
|
||||
if (j++ < len)
|
||||
str += " " + System.Convert.ToString(obj.Data[5], 16);
|
||||
if (j++ < len)
|
||||
str += " " + System.Convert.ToString(obj.Data[6], 16);
|
||||
if (j++ < len)
|
||||
str += " " + System.Convert.ToString(obj.Data[7], 16);
|
||||
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
||||
}
|
||||
275
LFP_Manager_PRM/Function/csCanFwUpdateFunction.cs
Normal file
275
LFP_Manager_PRM/Function/csCanFwUpdateFunction.cs
Normal file
@@ -0,0 +1,275 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace LFP_Manager.Function
|
||||
{
|
||||
// 1. Define the data type
|
||||
public struct PACKET_HEADER_DN
|
||||
{
|
||||
public byte Rsvd; // 3
|
||||
public byte PR; // 3 Priority
|
||||
public byte FC; // 4 Function Code
|
||||
public byte NO; // 8 Number
|
||||
public byte SID; // 7 Source ID
|
||||
public byte DID; // 7 Destination ID
|
||||
}
|
||||
|
||||
public struct PACKET_DN
|
||||
{
|
||||
public UInt32 hdr; // Header
|
||||
public byte[] data; // Data
|
||||
}
|
||||
|
||||
class csCanFwUpdateFunction
|
||||
{
|
||||
// Function Code Define
|
||||
public const int DL_START_CODE = 0; // Start Fw Update
|
||||
public const int DL_SECTOR_ERASE_CODE = 1; // Sector Erase Code
|
||||
public const int DL_SET_ADDRESS_CODE = 2; // Flash Address Set Code
|
||||
public const int DL_READ_DATA_CODE = 3; // Flash Data Read Code
|
||||
public const int DL_WRITE_DATA_CODE = 4; // Flash Data Write Code
|
||||
public const int DL_WRITE_DATA_CSUM_CODE = 5; // Flash Data Write Checksum Code
|
||||
public const int DL_IMAGE_CSUM_CODE = 6; // Fw Image Checksum Code
|
||||
public const int DL_RESTART_CODE = 7; // Restart
|
||||
|
||||
public static PACKET_HEADER_DN CovertPtoH(UInt32 id)
|
||||
{
|
||||
PACKET_HEADER_DN hdr = new PACKET_HEADER_DN();
|
||||
|
||||
hdr.PR = (byte)((id >> 26) & 0x07);
|
||||
hdr.FC = (byte)((id >> 22) & 0x07);
|
||||
hdr.NO = (byte)((id >> 14) & 0xFF);
|
||||
hdr.SID = (byte)((id >> 7) & 0x7F);
|
||||
hdr.DID = (byte)((id >> 0) & 0x7F);
|
||||
|
||||
return hdr;
|
||||
}
|
||||
|
||||
public static UInt32 CovertHtoP(PACKET_HEADER_DN hdr)
|
||||
{
|
||||
UInt32 Packet = 0;
|
||||
|
||||
Packet = (((UInt32)hdr.PR << 26)
|
||||
| ((UInt32)hdr.FC << 22)
|
||||
| ((UInt32)hdr.NO << 14)
|
||||
| ((UInt32)hdr.SID << 7)
|
||||
| ((UInt32)hdr.DID << 0)
|
||||
);
|
||||
return Packet;
|
||||
}
|
||||
|
||||
unsafe public static PACKET_DN FwUpdateStartPacket(UInt32 dev_id, byte[] fwver, UInt32 fwlen)
|
||||
{
|
||||
PACKET_DN result;
|
||||
PACKET_HEADER_DN hdr;
|
||||
|
||||
result = new PACKET_DN();
|
||||
result.data = new byte[8];
|
||||
|
||||
hdr = new PACKET_HEADER_DN();
|
||||
|
||||
hdr.PR = 4;
|
||||
hdr.FC = DL_START_CODE;
|
||||
hdr.NO = 0;
|
||||
hdr.SID = 0;
|
||||
hdr.DID = (byte)dev_id;
|
||||
|
||||
result.hdr = CovertHtoP(hdr);
|
||||
|
||||
result.data[0] = fwver[0];
|
||||
result.data[1] = fwver[1];
|
||||
result.data[2] = fwver[2];
|
||||
result.data[3] = fwver[3];
|
||||
|
||||
result.data[4] = (byte)(fwlen >> 24);
|
||||
result.data[5] = (byte)(fwlen >> 16);
|
||||
result.data[6] = (byte)(fwlen >> 8);
|
||||
result.data[7] = (byte)(fwlen >> 0);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
unsafe public static PACKET_DN SectorErasePacket(UInt32 dev_id, UInt32 fAddr)
|
||||
{
|
||||
PACKET_DN result;
|
||||
PACKET_HEADER_DN hdr;
|
||||
|
||||
result = new PACKET_DN();
|
||||
result.data = new byte[8];
|
||||
|
||||
hdr = new PACKET_HEADER_DN();
|
||||
|
||||
hdr.PR = 4;
|
||||
hdr.FC = DL_SECTOR_ERASE_CODE;
|
||||
hdr.NO = 0;
|
||||
hdr.SID = 0;
|
||||
hdr.DID = (byte)dev_id;
|
||||
|
||||
result.hdr = CovertHtoP(hdr);
|
||||
|
||||
result.data[0] = (byte)(fAddr >> 24);
|
||||
result.data[1] = (byte)(fAddr >> 16);
|
||||
result.data[2] = (byte)(fAddr >> 8);
|
||||
result.data[3] = (byte)(fAddr >> 0);
|
||||
|
||||
result.data[4] = 0;
|
||||
result.data[5] = 0;
|
||||
result.data[6] = 0;
|
||||
result.data[7] = 0;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
unsafe public static PACKET_DN SetAddrPacket(UInt32 dev_id, UInt32 sAddr, UInt32 sLen)
|
||||
{
|
||||
PACKET_DN result;
|
||||
PACKET_HEADER_DN hdr;
|
||||
|
||||
result = new PACKET_DN();
|
||||
result.data = new byte[8];
|
||||
|
||||
hdr = new PACKET_HEADER_DN();
|
||||
|
||||
hdr.PR = 4;
|
||||
hdr.FC = DL_SET_ADDRESS_CODE;
|
||||
hdr.NO = 0;
|
||||
hdr.SID = 0;
|
||||
hdr.DID = (byte)dev_id;
|
||||
|
||||
result.hdr = CovertHtoP(hdr);
|
||||
|
||||
result.data[0] = (byte)(sAddr >> 24);
|
||||
result.data[1] = (byte)(sAddr >> 16);
|
||||
result.data[2] = (byte)(sAddr >> 8);
|
||||
result.data[3] = (byte)(sAddr >> 0);
|
||||
|
||||
result.data[4] = (byte)(sLen >> 24);
|
||||
result.data[5] = (byte)(sLen >> 16);
|
||||
result.data[6] = (byte)(sLen >> 8);
|
||||
result.data[7] = (byte)(sLen >> 0);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
unsafe public static PACKET_DN WritePacket(UInt32 dev_id, byte dno, byte[] data)
|
||||
{
|
||||
PACKET_DN result;
|
||||
PACKET_HEADER_DN hdr;
|
||||
|
||||
result = new PACKET_DN();
|
||||
result.data = new byte[8];
|
||||
|
||||
hdr = new PACKET_HEADER_DN();
|
||||
|
||||
hdr.PR = 4;
|
||||
hdr.FC = DL_WRITE_DATA_CODE;
|
||||
hdr.NO = dno;
|
||||
hdr.SID = 0;
|
||||
hdr.DID = (byte)dev_id;
|
||||
|
||||
result.hdr = CovertHtoP(hdr);
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
result.data[i] = data[i];
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
unsafe public static PACKET_DN WriteChkSumPacket(UInt32 dev_id, UInt32 waddr, UInt32 csum)
|
||||
{
|
||||
PACKET_DN result;
|
||||
PACKET_HEADER_DN hdr;
|
||||
|
||||
result = new PACKET_DN();
|
||||
result.data = new byte[8];
|
||||
|
||||
hdr = new PACKET_HEADER_DN();
|
||||
|
||||
hdr.PR = 4;
|
||||
hdr.FC = DL_WRITE_DATA_CSUM_CODE;
|
||||
hdr.NO = 0;
|
||||
hdr.SID = 0;
|
||||
hdr.DID = (byte)dev_id;
|
||||
|
||||
result.hdr = CovertHtoP(hdr);
|
||||
|
||||
result.data[0] = (byte)(waddr >> 24);
|
||||
result.data[1] = (byte)(waddr >> 16);
|
||||
result.data[2] = (byte)(waddr >> 8);
|
||||
result.data[3] = (byte)(waddr >> 0);
|
||||
|
||||
result.data[4] = (byte)(csum >> 24);
|
||||
result.data[5] = (byte)(csum >> 16);
|
||||
result.data[6] = (byte)(csum >> 8);
|
||||
result.data[7] = (byte)(csum >> 0);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
unsafe public static PACKET_DN FwImageChkSumPacket(UInt32 dev_id, UInt32 fwlen, UInt32 csum)
|
||||
{
|
||||
PACKET_DN result;
|
||||
PACKET_HEADER_DN hdr;
|
||||
|
||||
result = new PACKET_DN();
|
||||
result.data = new byte[8];
|
||||
|
||||
hdr = new PACKET_HEADER_DN();
|
||||
|
||||
hdr.PR = 4;
|
||||
hdr.FC = DL_IMAGE_CSUM_CODE;
|
||||
hdr.NO = 0;
|
||||
hdr.SID = 0;
|
||||
hdr.DID = (byte)dev_id;
|
||||
|
||||
result.hdr = CovertHtoP(hdr);
|
||||
|
||||
result.data[0] = (byte)(fwlen >> 24);
|
||||
result.data[1] = (byte)(fwlen >> 16);
|
||||
result.data[2] = (byte)(fwlen >> 8);
|
||||
result.data[3] = (byte)(fwlen >> 0);
|
||||
|
||||
result.data[4] = (byte)(csum >> 24);
|
||||
result.data[5] = (byte)(csum >> 16);
|
||||
result.data[6] = (byte)(csum >> 8);
|
||||
result.data[7] = (byte)(csum >> 0);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
unsafe public static PACKET_DN UpdateRestartPacket(UInt32 dev_id, byte option)
|
||||
{
|
||||
PACKET_DN result;
|
||||
PACKET_HEADER_DN hdr;
|
||||
|
||||
result = new PACKET_DN();
|
||||
result.data = new byte[8];
|
||||
|
||||
hdr = new PACKET_HEADER_DN();
|
||||
|
||||
hdr.PR = 4;
|
||||
hdr.FC = DL_RESTART_CODE;
|
||||
hdr.NO = 0;
|
||||
hdr.SID = 0;
|
||||
hdr.DID = (byte)dev_id;
|
||||
|
||||
result.hdr = CovertHtoP(hdr);
|
||||
|
||||
result.data[0] = option;
|
||||
result.data[1] = 0x00;
|
||||
result.data[2] = 0x00;
|
||||
result.data[3] = 0x00;
|
||||
|
||||
result.data[4] = 0x00;
|
||||
result.data[5] = 0x00;
|
||||
result.data[6] = 0x00;
|
||||
result.data[7] = 0x00;
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
84
LFP_Manager_PRM/Function/csExcelExport.cs
Normal file
84
LFP_Manager_PRM/Function/csExcelExport.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Data.OleDb;
|
||||
|
||||
namespace LFP_Manager.Function
|
||||
{
|
||||
public static class csExcelExport
|
||||
{
|
||||
public static void ExportToExcel(this DataTable dataTable, String filePath, bool overwiteFile = true)
|
||||
{
|
||||
if (Directory.Exists(Path.GetDirectoryName(filePath)) == false)
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(filePath));
|
||||
if (File.Exists(filePath) && overwiteFile)
|
||||
File.Delete(filePath);
|
||||
|
||||
//var conn = String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties='Excel 8.0;HDR=Yes;IMEX=0';", filePath);
|
||||
var conn = "";
|
||||
|
||||
if (filePath.IndexOf(".xlsx") > -1) // 확장자에 따라서 provider 주의
|
||||
conn = String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0;HDR=Yes;IMEX=3';", filePath);
|
||||
else
|
||||
conn = String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties='Excel 8.0;HDR=Yes;IMEX=3';", filePath);
|
||||
|
||||
using (OleDbConnection connection = new OleDbConnection(conn))
|
||||
{
|
||||
connection.Open();
|
||||
using (OleDbCommand command = new OleDbCommand())
|
||||
{
|
||||
command.Connection = connection;
|
||||
List<String> columnNames = new List<string>();
|
||||
List<String> columnTypes = new List<string>();
|
||||
foreach (DataColumn dataColumn in dataTable.Columns)
|
||||
{
|
||||
columnNames.Add(dataColumn.ColumnName);
|
||||
string tName = "VARCHAR";
|
||||
switch (dataColumn.DataType.Name)
|
||||
{
|
||||
case "Int16": tName = "INTEGER"; break;
|
||||
case "Int32": tName = "INTEGER"; break;
|
||||
case "Int64": tName = "INTEGER"; break;
|
||||
case "Double": tName = "DOUBLE"; break;
|
||||
case "String": tName = "VARCHAR"; break;
|
||||
default: tName = dataColumn.DataType.Name; break;
|
||||
}
|
||||
columnTypes.Add(tName);
|
||||
}
|
||||
String tableName = !String.IsNullOrWhiteSpace(dataTable.TableName) ? dataTable.TableName : Guid.NewGuid().ToString();
|
||||
//command.CommandText = @"CREATE TABLE [{tableName}] ({String.Join(",", columnNames.Select(c => $"[{c}] VARCHAR").ToArray())});";
|
||||
//string join = String.Join(",", columnNames.Select(c => String.Format("[{0}] VARCHAR", c)).ToArray());
|
||||
string join = "";
|
||||
for (int i = 0; i < columnNames.Count; i++)
|
||||
{
|
||||
join += String.Format("[{0}] {1}", columnNames[i], columnTypes[i]);
|
||||
if (i < (columnNames.Count - 1)) join += ",";
|
||||
}
|
||||
command.CommandText = String.Format("CREATE TABLE [{0}] ({1});",
|
||||
tableName,
|
||||
join
|
||||
);
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
foreach (DataRow row in dataTable.Rows)
|
||||
{
|
||||
List<String> rowValues = new List<string>();
|
||||
foreach (DataColumn column in dataTable.Columns)
|
||||
{
|
||||
rowValues.Add((row[column] != null && row[column] != DBNull.Value) ? row[column].ToString() : String.Empty);
|
||||
}
|
||||
//command.CommandText = $"INSERT INTO [{tableName}]({String.Join(",", columnNames.Select(c => $"[{c}]"))}) VALUES ({String.Join(",", rowValues.Select(r => $"'{r}'").ToArray())});";
|
||||
string a = String.Join(",", columnNames.Select(c => String.Format("[{0}]", c)));
|
||||
string b = String.Join(",", rowValues.Select(r => String.Format("'{0}'", (r == "") ? "0": r)).ToArray());
|
||||
command.CommandText = String.Format("INSERT INTO [{0}]({1}) VALUES ({2});", tableName, a, b);
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
|
||||
connection.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
145
LFP_Manager_PRM/Function/csExcelFunction.cs
Normal file
145
LFP_Manager_PRM/Function/csExcelFunction.cs
Normal file
@@ -0,0 +1,145 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Data;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using System.Data.OleDb;
|
||||
|
||||
namespace LFP_Manager.Function
|
||||
{
|
||||
public class csExcelFunction
|
||||
{
|
||||
public static DataTable[] ExcelImport(string Ps_FileName, string[] sheetName)
|
||||
{
|
||||
DataTable[] result = null;
|
||||
|
||||
try
|
||||
{
|
||||
string ExcelConn = string.Empty;
|
||||
|
||||
if (Ps_FileName.IndexOf(".xlsx") > -1) // 확장자에 따라서 provider 주의
|
||||
{
|
||||
ExcelConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Ps_FileName
|
||||
+ ";Extended Properties='Excel 12.0;HDR=YES'";
|
||||
}
|
||||
else
|
||||
{
|
||||
ExcelConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Ps_FileName
|
||||
+ ";Extended Properties='Excel 8.0;HDR=YES'";
|
||||
}
|
||||
|
||||
// 첫 번째 시트의 이름을 가져옮
|
||||
using (OleDbConnection con = new OleDbConnection(ExcelConn))
|
||||
{
|
||||
using (OleDbCommand cmd = new OleDbCommand())
|
||||
{
|
||||
cmd.Connection = con;
|
||||
con.Open();
|
||||
|
||||
DataTable dtExcelSchema = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (dtExcelSchema.Rows.Count > 0)
|
||||
{
|
||||
sheetName = new string[dtExcelSchema.Rows.Count];
|
||||
|
||||
for (int i = 0; i < dtExcelSchema.Rows.Count; i++)
|
||||
sheetName[i] = dtExcelSchema.Rows[i]["TABLE_NAME"].ToString();
|
||||
}
|
||||
con.Close();
|
||||
}
|
||||
}
|
||||
string msg = string.Empty;
|
||||
for (int i = 0; i < sheetName.Length; i++)
|
||||
msg += sheetName[i] + "\r\n";
|
||||
//MessageBox.Show("sheetName = " + msg);
|
||||
|
||||
// 첫 번째 쉬트의 데이타를 읽어서 datagridview 에 보이게 함.
|
||||
using (OleDbConnection con = new OleDbConnection(ExcelConn))
|
||||
{
|
||||
using (OleDbCommand cmd = new OleDbCommand())
|
||||
{
|
||||
using (OleDbDataAdapter oda = new OleDbDataAdapter())
|
||||
{
|
||||
result = new DataTable[sheetName.Length];
|
||||
|
||||
for (int i = 0; i < sheetName.Length; i++)
|
||||
{
|
||||
result[i] = new DataTable();
|
||||
result[i].TableName = sheetName[i];
|
||||
cmd.CommandText = "SELECT * From [" + sheetName[i] + "]";
|
||||
cmd.Connection = con;
|
||||
con.Open();
|
||||
oda.SelectCommand = cmd;
|
||||
try
|
||||
{
|
||||
oda.Fill(result[i]);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//MessageBox.Show(e1.Message);
|
||||
}
|
||||
con.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show(e.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void ExcelExport(string Ps_FileName, string[] sheetName)
|
||||
{
|
||||
string ExcelConn = string.Empty;
|
||||
|
||||
if (Ps_FileName.IndexOf(".xlsx") > -1) // 확장자에 따라서 provider 주의
|
||||
{
|
||||
ExcelConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Ps_FileName
|
||||
+ ";Extended Properties='Excel 12.0;HDR=YES;IMEX=3;READONLY=FALSE'";
|
||||
}
|
||||
else
|
||||
{
|
||||
ExcelConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Ps_FileName
|
||||
+ ";Extended Properties='Excel 8.0;HDR=YES;IMEX=3;READONLY=FALSE'";
|
||||
}
|
||||
|
||||
// 첫 번째 시트의 이름을 가져옮
|
||||
using (OleDbConnection con = new OleDbConnection(ExcelConn))
|
||||
{
|
||||
using (OleDbCommand cmd = new OleDbCommand())
|
||||
{
|
||||
cmd.Connection = con;
|
||||
con.Open();
|
||||
|
||||
DataTable dtExcelSchema = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (dtExcelSchema.Rows.Count > 0)
|
||||
{
|
||||
sheetName = new string[dtExcelSchema.Rows.Count];
|
||||
|
||||
for (int i = 0; i < dtExcelSchema.Rows.Count; i++)
|
||||
sheetName[i] = dtExcelSchema.Rows[i]["TABLE_NAME"].ToString();
|
||||
}
|
||||
con.Close();
|
||||
}
|
||||
}
|
||||
using (OleDbConnection connection =
|
||||
new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + @"C:\Users\[...]\Classeur.xls"
|
||||
+ ";Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1;READONLY=FALSE\""))
|
||||
{
|
||||
connection.Open();
|
||||
OleDbCommand commande = new OleDbCommand(
|
||||
"INSERT INTO [Feuil1$](F1,F2,F3) VALUES ('A3','B3','C3');", connection);
|
||||
commande.ExecuteNonQuery();
|
||||
|
||||
connection.Close();
|
||||
connection.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
167
LFP_Manager_PRM/Function/csExtCANControlFunction.cs
Normal file
167
LFP_Manager_PRM/Function/csExtCANControlFunction.cs
Normal file
@@ -0,0 +1,167 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace LFP_Manager.Function
|
||||
{
|
||||
// 1. The type of the ZLGCAN series interface card information.
|
||||
public struct VCI_BOARD_INFO
|
||||
{
|
||||
public UInt16 hw_Version;
|
||||
public UInt16 fw_Version;
|
||||
public UInt16 dr_Version;
|
||||
public UInt16 in_Version;
|
||||
public UInt16 irq_Num;
|
||||
public byte can_Num;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
||||
public byte[] str_Serial_Num;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
|
||||
public byte[] str_hw_Type;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||
public byte[] Reserved;
|
||||
}
|
||||
|
||||
// 2. Define the data type of the CAN message frame.
|
||||
unsafe public struct VCI_CAN_OBJ //Use unsafe code
|
||||
{
|
||||
public uint ID;
|
||||
public uint TimeStamp;
|
||||
public byte TimeFlag;
|
||||
public byte SendType;
|
||||
public byte RemoteFlag; //Whether it is a remore frame
|
||||
public byte ExternFlag; //Whether it is a extended frame
|
||||
public byte DataLen;
|
||||
|
||||
public fixed byte Data[8];
|
||||
|
||||
public fixed byte Reserved[3];
|
||||
}
|
||||
//2. Define the data type of the CAN message frame.
|
||||
//public struct VCI_CAN_OBJ
|
||||
//{
|
||||
// public UInt32 ID;
|
||||
// public UInt32 TimeStamp;
|
||||
// public byte TimeFlag;
|
||||
// public byte SendType;
|
||||
// public byte RemoteFlag;//Whether it is a remore frame
|
||||
// public byte ExternFlag;//Whether it is a extended frame
|
||||
// public byte DataLen;
|
||||
// [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||
// public byte[] Data;
|
||||
// [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||
// public byte[] Reserved;
|
||||
|
||||
// public void Init()
|
||||
// {
|
||||
// Data = new byte[8];
|
||||
// Reserved = new byte[3];
|
||||
// }
|
||||
//}
|
||||
|
||||
// 3. Define the data type of the CAN controller status.
|
||||
public struct VCI_CAN_STATUS
|
||||
{
|
||||
public byte ErrInterrupt;
|
||||
public byte regMode;
|
||||
public byte regStatus;
|
||||
public byte regALCapture;
|
||||
public byte regECCapture;
|
||||
public byte regEWLimit;
|
||||
public byte regRECounter;
|
||||
public byte regTECounter;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
|
||||
public byte[] Reserved;
|
||||
}
|
||||
|
||||
// 4. Define the data type of the error message.
|
||||
public struct VCI_ERR_INFO
|
||||
{
|
||||
public UInt32 ErrCode;
|
||||
public byte Passive_ErrData1;
|
||||
public byte Passive_ErrData2;
|
||||
public byte Passive_ErrData3;
|
||||
public byte ArLost_ErrData;
|
||||
}
|
||||
|
||||
// 5. Define the data type for initializing CAN
|
||||
public struct VCI_INIT_CONFIG
|
||||
{
|
||||
public UInt32 AccCode;
|
||||
public UInt32 AccMask;
|
||||
public UInt32 Reserved;
|
||||
public byte Filter;
|
||||
public byte Timing0;
|
||||
public byte Timing1;
|
||||
public byte Mode;
|
||||
}
|
||||
|
||||
public struct CHGDESIPANDPORT
|
||||
{
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
|
||||
public byte[] szpwd;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
||||
public byte[] szdesip;
|
||||
public Int32 desport;
|
||||
|
||||
public void Init()
|
||||
{
|
||||
szpwd = new byte[10];
|
||||
szdesip = new byte[20];
|
||||
}
|
||||
}
|
||||
|
||||
///////// new add struct for filter /////////
|
||||
//typedef struct _VCI_FILTER_RECORD{
|
||||
// DWORD ExtFrame; //Whether it is an extended frame
|
||||
// DWORD Start;
|
||||
// DWORD End;
|
||||
//}VCI_FILTER_RECORD,*PVCI_FILTER_RECORD;
|
||||
public struct VCI_FILTER_RECORD
|
||||
{
|
||||
public UInt32 ExtFrame;
|
||||
public UInt32 Start;
|
||||
public UInt32 End;
|
||||
}
|
||||
|
||||
class csExtCANControlFunction
|
||||
{
|
||||
[DllImport("controlcan.dll")]
|
||||
static extern UInt32 VCI_OpenDevice(UInt32 DeviceType, UInt32 DeviceInd, UInt32 Reserved);
|
||||
[DllImport("controlcan.dll")]
|
||||
static extern UInt32 VCI_CloseDevice(UInt32 DeviceType, UInt32 DeviceInd);
|
||||
[DllImport("controlcan.dll")]
|
||||
static extern UInt32 VCI_InitCAN(UInt32 DeviceType, UInt32 DeviceInd, UInt32 CANInd, ref VCI_INIT_CONFIG pInitConfig);
|
||||
[DllImport("controlcan.dll")]
|
||||
static extern UInt32 VCI_ReadBoardInfo(UInt32 DeviceType, UInt32 DeviceInd, ref VCI_BOARD_INFO pInfo);
|
||||
[DllImport("controlcan.dll")]
|
||||
static extern UInt32 VCI_ReadErrInfo(UInt32 DeviceType, UInt32 DeviceInd, UInt32 CANInd, ref VCI_ERR_INFO pErrInfo);
|
||||
[DllImport("controlcan.dll")]
|
||||
static extern UInt32 VCI_ReadCANStatus(UInt32 DeviceType, UInt32 DeviceInd, UInt32 CANInd, ref VCI_CAN_STATUS pCANStatus);
|
||||
|
||||
[DllImport("controlcan.dll")]
|
||||
static extern UInt32 VCI_GetReference(UInt32 DeviceType, UInt32 DeviceInd, UInt32 CANInd, UInt32 RefType, ref byte pData);
|
||||
[DllImport("controlcan.dll")]
|
||||
static extern UInt32 VCI_SetReference(UInt32 DeviceType, UInt32 DeviceInd, UInt32 CANInd, UInt32 RefType, ref byte pData);
|
||||
//unsafe static extern UInt32 VCI_SetReference(UInt32 DeviceType, UInt32 DeviceInd, UInt32 CANInd, UInt32 RefType, byte* pData);
|
||||
|
||||
[DllImport("controlcan.dll")]
|
||||
static extern UInt32 VCI_GetReceiveNum(UInt32 DeviceType, UInt32 DeviceInd, UInt32 CANInd);
|
||||
[DllImport("controlcan.dll")]
|
||||
static extern UInt32 VCI_ClearBuffer(UInt32 DeviceType, UInt32 DeviceInd, UInt32 CANInd);
|
||||
|
||||
[DllImport("controlcan.dll")]
|
||||
static extern UInt32 VCI_StartCAN(UInt32 DeviceType, UInt32 DeviceInd, UInt32 CANInd);
|
||||
[DllImport("controlcan.dll")]
|
||||
static extern UInt32 VCI_ResetCAN(UInt32 DeviceType, UInt32 DeviceInd, UInt32 CANInd);
|
||||
|
||||
[DllImport("controlcan.dll")]
|
||||
static extern UInt32 VCI_Transmit(UInt32 DeviceType, UInt32 DeviceInd, UInt32 CANInd, ref VCI_CAN_OBJ pSend, UInt32 Len);
|
||||
|
||||
//[DllImport("controlcan.dll")]
|
||||
//static extern UInt32 VCI_Receive(UInt32 DeviceType, UInt32 DeviceInd, UInt32 CANInd, ref VCI_CAN_OBJ pReceive, UInt32 Len, Int32 WaitTime);
|
||||
[DllImport("controlcan.dll", CharSet = CharSet.Ansi)]
|
||||
static extern UInt32 VCI_Receive(UInt32 DeviceType, UInt32 DeviceInd, UInt32 CANInd, IntPtr pReceive, UInt32 Len, Int32 WaitTime);
|
||||
}
|
||||
}
|
||||
114
LFP_Manager_PRM/Function/csHistoryFunction.cs
Normal file
114
LFP_Manager_PRM/Function/csHistoryFunction.cs
Normal file
@@ -0,0 +1,114 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Data;
|
||||
|
||||
using System.Data.SQLite;
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Utils;
|
||||
|
||||
namespace LFP_Manager.Function
|
||||
{
|
||||
class csHistoryFunction
|
||||
{
|
||||
#region DB CREATE
|
||||
|
||||
public static void DbCreate(string mPath)
|
||||
{
|
||||
string dbFilename = mPath + csDbConstData.DataBase.FileName;
|
||||
|
||||
if (Directory.Exists(System.IO.Path.GetDirectoryName(dbFilename)) == false)
|
||||
Directory.CreateDirectory(System.IO.Path.GetDirectoryName(dbFilename));
|
||||
|
||||
if (File.Exists(dbFilename) == false)
|
||||
// Create database
|
||||
SQLiteConnection.CreateFile(dbFilename);
|
||||
|
||||
// Open database
|
||||
string strConn = @"Data Source=" + dbFilename;
|
||||
using (var connection = new SQLiteConnection(strConn))
|
||||
{
|
||||
connection.Open();
|
||||
try
|
||||
{
|
||||
// Create table
|
||||
using (SQLiteCommand command = connection.CreateCommand())
|
||||
{
|
||||
command.CommandText = csDbConstData.DataBase.CreateTable;
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
connection.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region DB INSERT DATA
|
||||
private void IDInsert(DataTable aData, string mPath, string Quary)
|
||||
{
|
||||
string dbFilename = mPath + csDbConstData.DataBase.FileName;
|
||||
|
||||
// Open database
|
||||
string strConn = @"Data Source=" + dbFilename;
|
||||
using (var connection = new SQLiteConnection(strConn))
|
||||
{
|
||||
connection.Open();
|
||||
try
|
||||
{
|
||||
// Insert data
|
||||
using (SQLiteCommand command = connection.CreateCommand())
|
||||
{
|
||||
command.CommandText = "BEGIN;"; //명시적 트렌젝션 시작
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
//sSQL = "insert into TrendTable ( TrendStamp, TagName, TagValue) Values ( " + IntToStr(stamp) + "," + name + "," + value + ");";
|
||||
//command.CommandText = "INSERT INTO " + csDbConstData.DataBase.TableName + "(id) " + " Values (@id);";
|
||||
command.CommandText = Quary;
|
||||
SQLiteParameter p = new SQLiteParameter("@id", DbType.String);
|
||||
|
||||
command.Parameters.Add(p);
|
||||
|
||||
for (int i = 0; i < aData.Rows.Count; i++)
|
||||
{
|
||||
p.Value = String.Format("{0}", aData.Rows[i][0].ToString()); // id
|
||||
|
||||
try
|
||||
{
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//MessageBox.Show(e1.ToString() + ":" + i.ToString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
}
|
||||
command.CommandText = "COMMIT;"; //명시적 트렌젝션 시작
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//MessageBox.Show(e.ToString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
connection.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
204
LFP_Manager_PRM/Function/csIniControlFunction.cs
Normal file
204
LFP_Manager_PRM/Function/csIniControlFunction.cs
Normal file
@@ -0,0 +1,204 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using System.IO;
|
||||
|
||||
using LFP_Manager.DataStructure;
|
||||
|
||||
namespace LFP_Manager.Function
|
||||
{
|
||||
class csIniControlFunction
|
||||
{
|
||||
#region [Function] INI File Read Function(Section Setting)
|
||||
public static string[] GetIniValue(string Section, string path)
|
||||
{
|
||||
byte[] ba = new byte[5000];
|
||||
uint Flag = GetPrivateProfileSection(Section, ba, 5000, path);
|
||||
return Encoding.Default.GetString(ba).Split(new char[1] { '\0' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region [Function] INI File Read Function(Section and Key Setting)
|
||||
public static string GetIniValue(string Section, string key, string path)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(500);
|
||||
int Flag = GetPrivateProfileString(Section, key, "", sb, 500, path);
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region [Function] INI File Read Function(Section, Key, Value, Address Setting)
|
||||
public bool SetIniValue(string Section, string Key, string Value, string path)
|
||||
{
|
||||
return (WritePrivateProfileString(Section, Key, Value, path));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region [DLL Function] INI DLL Load
|
||||
[DllImport("kernel32")]
|
||||
public static extern int GetPrivateProfileString(string lpAppName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName);
|
||||
[DllImport("kernel32")]
|
||||
public static extern bool WritePrivateProfileString(string lpAppName, string lpKeyName, string lpString, string lpFileName);
|
||||
[DllImport("kernel32")]
|
||||
public static extern uint GetPrivateProfileInt(string lpAppName, string lpKeName, int nDefault, string lpFileName);
|
||||
[DllImport("kernel32")]
|
||||
public static extern uint GetPrivateProfileSection(string lpAppName, byte[] lpPairValues, uint nSize, string lpFileName);
|
||||
[DllImport("kernel32")]
|
||||
public static extern uint GetPrivateProfileSectionNames(byte[] lpSections, uint nSize, string lpFileName);
|
||||
#endregion
|
||||
|
||||
public static DateTime Delay(int MS)
|
||||
{
|
||||
DateTime thisMoment = DateTime.Now;
|
||||
TimeSpan duration = new TimeSpan(0, 0, 0, 0, MS);
|
||||
DateTime afterMoment = thisMoment.Add(duration);
|
||||
|
||||
while (afterMoment >= thisMoment)
|
||||
{
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
|
||||
thisMoment = DateTime.Now;
|
||||
}
|
||||
|
||||
return DateTime.Now;
|
||||
}
|
||||
|
||||
public static CommConfig IniLoad(string AppPath, CommConfig aConfig)
|
||||
{
|
||||
string path;
|
||||
path = Path.GetDirectoryName(AppPath);
|
||||
|
||||
if (aConfig == null)
|
||||
{
|
||||
aConfig = new CommConfig();
|
||||
}
|
||||
if (File.Exists(String.Format("{0}\\CommSet.ini", path)))
|
||||
{
|
||||
StringBuilder ret = new StringBuilder();
|
||||
string InIPath = String.Format("{0}\\CommSet.ini", path);
|
||||
|
||||
// CommType = 0: USBCAN, 1: UARTCAN
|
||||
aConfig.CommType = (int)csIniControlFunction.GetPrivateProfileInt("COMM TYPE", "TYPE", 0, InIPath);
|
||||
|
||||
// SNMP Config
|
||||
// IP
|
||||
ret.Clear();
|
||||
csIniControlFunction.GetPrivateProfileString("SNMP", "IP", "(NONE)", ret, 32, InIPath);
|
||||
aConfig.SnmpIP = ret.ToString();
|
||||
// Model
|
||||
aConfig.SnmpModelIndex = (int)csIniControlFunction.GetPrivateProfileInt("SNMP", "MODEL", 2, InIPath);
|
||||
// Module Quantity
|
||||
aConfig.SnmpMdQty = (int)csIniControlFunction.GetPrivateProfileInt("SNMP", "MD_QTY", 2, InIPath);
|
||||
|
||||
// CAN Config
|
||||
// DEVICE
|
||||
ret.Clear();
|
||||
aConfig.CanDevice = (int)csIniControlFunction.GetPrivateProfileInt("CAN", "DEVICE", 0, InIPath);
|
||||
// INDEX
|
||||
aConfig.CanIndex = (int)csIniControlFunction.GetPrivateProfileInt("CAN", "INDEX", 0, InIPath);
|
||||
// CAN NO
|
||||
aConfig.CanNo = (int)csIniControlFunction.GetPrivateProfileInt("CAN", "CAN_NO", 0, InIPath);
|
||||
// SPEED
|
||||
aConfig.CanBaudrate = (int)csIniControlFunction.GetPrivateProfileInt("CAN", "BAUDRATE", 0, InIPath);
|
||||
// MODEL
|
||||
aConfig.TargetModelIndex = (int)csIniControlFunction.GetPrivateProfileInt("CAN", "MODEL", 0, InIPath);
|
||||
|
||||
// UART Config
|
||||
// PORT
|
||||
ret.Clear();
|
||||
csIniControlFunction.GetPrivateProfileString("UART", "PORT", "(NONE)", ret, 32, InIPath);
|
||||
aConfig.UartPort = ret.ToString();
|
||||
// SPEED
|
||||
aConfig.UartBaudrate = (int)csIniControlFunction.GetPrivateProfileInt("UART", "BAUDRATE", 0, InIPath);
|
||||
|
||||
// Database Config
|
||||
ret.Clear();
|
||||
// Log Period
|
||||
aConfig.DbLogPeriod = (int)csIniControlFunction.GetPrivateProfileInt("DATABASE", "LOG_PERIOD", 5, InIPath);
|
||||
|
||||
// CB Test Config
|
||||
aConfig.CbTestGap = (int)csIniControlFunction.GetPrivateProfileInt("CB_TEST", "MAX_GAP", 1500, InIPath);
|
||||
// CB Test Config
|
||||
aConfig.CbTestTime = (int)csIniControlFunction.GetPrivateProfileInt("CB_TEST", "TIME", 3000, InIPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
aConfig.CommType = csConstData.CommType.COMM_USBCAN;
|
||||
|
||||
// MODEL
|
||||
aConfig.TargetModelIndex = 0;
|
||||
|
||||
// CAN DEVICE
|
||||
aConfig.CanDevice = 0;
|
||||
// CAN INDEX
|
||||
aConfig.CanIndex = 0;
|
||||
// CAN NO
|
||||
aConfig.CanNo = 0;
|
||||
// SPEED
|
||||
aConfig.CanBaudrate = 0;
|
||||
|
||||
// UART PORT
|
||||
aConfig.UartPort = "";
|
||||
// SPEED
|
||||
aConfig.UartBaudrate = 0;
|
||||
|
||||
aConfig.DbLogPeriod = 5;
|
||||
|
||||
aConfig.CbTestGap = 1500;
|
||||
aConfig.CbTestTime = 3000;
|
||||
}
|
||||
|
||||
return aConfig;
|
||||
}
|
||||
|
||||
public static void IniSave(string AppPath, CommConfig aConfig)
|
||||
{
|
||||
string path = System.IO.Path.GetDirectoryName(AppPath);
|
||||
string InIPath = String.Format("{0}\\CommSet.ini", path);
|
||||
|
||||
// write ini
|
||||
|
||||
// CommType = 0: SNMP, 1: UARTCAN, 2: USBCAN
|
||||
csIniControlFunction.WritePrivateProfileString("COMM TYPE", "TYPE", aConfig.CommType.ToString(), InIPath);
|
||||
|
||||
// SNMP Config
|
||||
// IP
|
||||
csIniControlFunction.WritePrivateProfileString("SNMP", "IP", aConfig.SnmpIP, InIPath);
|
||||
// Model
|
||||
csIniControlFunction.WritePrivateProfileString("SNMP", "MODEL", aConfig.SnmpModelIndex.ToString(), InIPath);
|
||||
// Module Quantity
|
||||
csIniControlFunction.WritePrivateProfileString("SNMP", "MD_QTY", aConfig.SnmpMdQty.ToString(), InIPath);
|
||||
|
||||
// CAN Config
|
||||
// DEVICE
|
||||
csIniControlFunction.WritePrivateProfileString("CAN", "DEVICE", aConfig.CanDevice.ToString(), InIPath);
|
||||
// INDEX
|
||||
csIniControlFunction.WritePrivateProfileString("CAN", "INDEX", aConfig.CanIndex.ToString(), InIPath);
|
||||
// CAN NO
|
||||
csIniControlFunction.WritePrivateProfileString("CAN", "CAN_NO", aConfig.CanNo.ToString(), InIPath);
|
||||
// SPEED
|
||||
csIniControlFunction.WritePrivateProfileString("CAN", "BAUDRATE", aConfig.CanBaudrate.ToString(), InIPath);
|
||||
// MODEL
|
||||
csIniControlFunction.WritePrivateProfileString("CAN", "MODEL", aConfig.TargetModelIndex.ToString(), InIPath);
|
||||
|
||||
// UART Config
|
||||
// PORT
|
||||
csIniControlFunction.WritePrivateProfileString("UART", "PORT", aConfig.UartPort.ToString(), InIPath);
|
||||
// SPEED
|
||||
csIniControlFunction.WritePrivateProfileString("UART", "BAUDRATE", aConfig.UartBaudrate.ToString(), InIPath);
|
||||
|
||||
// Database Config
|
||||
// Log Period
|
||||
csIniControlFunction.WritePrivateProfileString("DATABASE", "LOG_PERIOD", aConfig.DbLogPeriod.ToString(), InIPath);
|
||||
|
||||
// CB Test Config
|
||||
// MAX GAP
|
||||
csIniControlFunction.WritePrivateProfileString("CB_TEST", "MAX_GAP", aConfig.CbTestGap.ToString(), InIPath);
|
||||
// TIME
|
||||
csIniControlFunction.WritePrivateProfileString("CB_TEST", "TIME", aConfig.CbTestTime.ToString(), InIPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
87
LFP_Manager_PRM/Function/csMakeDataFunction.cs
Normal file
87
LFP_Manager_PRM/Function/csMakeDataFunction.cs
Normal file
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using LFP_Manager.DataStructure;
|
||||
using LFP_Manager.Utils;
|
||||
|
||||
namespace LFP_Manager.Function
|
||||
{
|
||||
class csMakeDataFunction
|
||||
{
|
||||
private static DeviceSystemData MakeAlarmTripData(int id, short ndata, DeviceSystemData rSystemData)
|
||||
{
|
||||
bool[] aData = csUtils.Int16ToBitArray(ndata);
|
||||
short bFault = rSystemData.StatusData.protect;
|
||||
short bWarning = rSystemData.StatusData.warning;
|
||||
int i = 0;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case 0: // Warning
|
||||
if (aData[i++]) bWarning |= (1 << 2); // Bit 0 : Over voltage warning
|
||||
else bWarning &= ~(1 << 2);
|
||||
if (aData[i++]) bWarning |= (1 << 4); // Bit 1 : Cell Over voltage warning
|
||||
else bWarning &= ~(1 << 4);
|
||||
if (aData[i++]) bWarning |= (1 << 3); // Bit 2 : Low voltage warning
|
||||
else bWarning &= ~(1 << 3);
|
||||
if (aData[i++]) bWarning |= (1 << 5); // Bit 3 : Low cell voltage warning
|
||||
else bWarning &= ~(1 << 5);
|
||||
if (aData[i++]) bWarning |= (1 << 6); // Bit 4 : Charge over current warning
|
||||
else bWarning &= ~(1 << 6);
|
||||
if (aData[i++]) bWarning |= (1 << 7); // Bit 5 : Discharge over current warning
|
||||
else bWarning &= ~(1 << 7);
|
||||
i++; // 06 Abnormal balancing current
|
||||
i++; // 07 Reserved
|
||||
if ((aData[8]) || (aData[9])) bWarning |= (1 << 0); // Bit 8 : Charge over temperature warning, Bit 9 : Discharge over temperature warning
|
||||
else bWarning &= ~(1 << 0);
|
||||
i++; // 08
|
||||
i++; // 09
|
||||
if ((aData[10]) || (aData[11])) bWarning |= (1 << 1); // Bit 10 : Charge low temperature warning, Bit 11 : Discharge low temperature warning
|
||||
else bWarning &= ~(1 << 1);
|
||||
i++; // 10
|
||||
i++; // 11
|
||||
if (aData[i++]) bWarning |= (1 << 11); // 12 : Low capacity warning
|
||||
else bWarning &= ~(1 << 11);
|
||||
i++; // 13
|
||||
if (aData[i++]) bWarning |= (1 << 9); // 14 Cell Voltage Difference Warning
|
||||
else bWarning &= ~(1 << 9);
|
||||
break;
|
||||
case 1: // Status Code 2
|
||||
if (aData[i++]) bFault |= (1 << 2); // Bit 0 : Over voltage warning
|
||||
else bFault &= ~(1 << 2);
|
||||
if (aData[i++]) bFault |= (1 << 4); // Bit 1 : Cell Over voltage warning
|
||||
else bFault &= ~(1 << 4);
|
||||
if (aData[i++]) bFault |= (1 << 3); // Bit 2 : Low voltage warning
|
||||
else bFault &= ~(1 << 3);
|
||||
if (aData[i++]) bFault |= (1 << 5); // Bit 3 : Low cell voltage warning
|
||||
else bFault &= ~(1 << 5);
|
||||
if (aData[i++]) bFault |= (1 << 6); // Bit 4 : Charge over current warning
|
||||
else bFault &= ~(1 << 6);
|
||||
if (aData[i++]) bFault |= (1 << 7); // Bit 5 : Discharge over current warning
|
||||
else bFault &= ~(1 << 7);
|
||||
i++; // 06 Abnormal balancing current
|
||||
i++; // 07 Reserved
|
||||
if ((aData[8]) || (aData[9])) bFault |= (1 << 0); // Bit 8 : Charge over temperature warning, Bit 9 : Discharge over temperature warning
|
||||
else bFault &= ~(1 << 0);
|
||||
i++; // 08
|
||||
i++; // 09
|
||||
if ((aData[10]) || (aData[11])) bFault |= (1 << 1); // Bit 10 : Charge low temperature warning, Bit 11 : Discharge low temperature warning
|
||||
else bFault &= ~(1 << 1);
|
||||
i++; // 10
|
||||
i++; // 11
|
||||
i++; // 12
|
||||
i++; // 13
|
||||
if (aData[i++]) bFault |= (1 << 9); // 14 Cell Voltage Difference Warning
|
||||
else bFault &= ~(1 << 9);
|
||||
break;
|
||||
}
|
||||
|
||||
rSystemData.StatusData.protect = bFault;
|
||||
rSystemData.StatusData.warning = bWarning;
|
||||
|
||||
return rSystemData;
|
||||
}
|
||||
}
|
||||
}
|
||||
627
LFP_Manager_PRM/Function/csSbCanAPI.cs
Normal file
627
LFP_Manager_PRM/Function/csSbCanAPI.cs
Normal file
@@ -0,0 +1,627 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using LFP_Manager.DataStructure;
|
||||
|
||||
namespace LFP_Manager.Function
|
||||
{
|
||||
public static class csSbCanAPI
|
||||
{
|
||||
#region CONST DATA
|
||||
|
||||
/*************************************
|
||||
define
|
||||
**************************************/
|
||||
public static bool ISDAR(byte x)
|
||||
{
|
||||
return (x & 0x01) != 0x00;
|
||||
}
|
||||
|
||||
public static bool ISABOR(byte x)
|
||||
{
|
||||
return (x & 0x02) != 0x00;
|
||||
}
|
||||
|
||||
public static void SETDAR(ref byte x)
|
||||
{
|
||||
x |= 0x01;
|
||||
}
|
||||
public static void SETABOR(ref byte x)
|
||||
{
|
||||
x |= 0x02;
|
||||
}
|
||||
|
||||
// VCP Status Const data
|
||||
public const byte CS_CANv2_ActiveMode = 0x11;
|
||||
public const byte CS_CANv2_SetupMode = 0x10;
|
||||
public const byte uCAN_VCOM = 0x21;
|
||||
public const byte eCAN_VCOM = 0x31;
|
||||
public const byte NotConnect = 0x00;
|
||||
public const byte NotFind = 0xFF;
|
||||
|
||||
// CAN
|
||||
public const byte CR = 0x0D;
|
||||
|
||||
// Error Code
|
||||
public const byte Invalid_Arg = 0x01;
|
||||
public const byte No_Error = 0x00;
|
||||
|
||||
#endregion
|
||||
|
||||
public static bool IsSTD(byte format)
|
||||
{
|
||||
if ((format & 0x06) == 0x04)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
public static bool IsEXT(byte format)
|
||||
{
|
||||
if ((format & 0x06) == 0x06)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
public static bool IsDATA(byte format)
|
||||
{
|
||||
if ((format & 0x05) == 0x04)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
public static bool IsREMOTE(byte format)
|
||||
{
|
||||
if ((format & 0x05) == 0x05)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public static byte SendCANTxFrame(CAN_Struct Tx, ref byte[] SerialBuffer, byte BufferSize, ref byte ConvertSize)
|
||||
{
|
||||
byte ind = 0;
|
||||
byte tmp_index = 0;
|
||||
byte[] buf = new byte[40];
|
||||
|
||||
switch (Tx.Format)
|
||||
{
|
||||
case (byte)CAN_StructFormat.TX_STD_DATA: buf[ind++] = (byte)CAN_SerialCommandHeader.STD_DATA; break;
|
||||
case (byte)CAN_StructFormat.TX_STD_REMOTE: buf[ind++] = (byte)CAN_SerialCommandHeader.STD_REMOTE; break;
|
||||
case (byte)CAN_StructFormat.TX_EXT_DATA: buf[ind++] = (byte)CAN_SerialCommandHeader.EXT_DATA; break;
|
||||
case (byte)CAN_StructFormat.TX_EXT_REMOTE: buf[ind++] = (byte)CAN_SerialCommandHeader.EXT_REMOTE; break;
|
||||
default: return Invalid_Arg;
|
||||
}
|
||||
|
||||
if (IsSTD(Tx.Format))
|
||||
tmp_index = 3;
|
||||
else if (IsEXT(Tx.Format))
|
||||
tmp_index = 8;
|
||||
|
||||
for (int i = 1; i <= tmp_index; i++)
|
||||
{
|
||||
buf[ind++] = toASCII_HEX(Div_4(Tx.ID, (byte)(tmp_index - i)));
|
||||
}
|
||||
|
||||
buf[ind++] = toASCII_HEX(Tx.DLC);
|
||||
|
||||
if (IsDATA(Tx.Format))
|
||||
{
|
||||
|
||||
for (int i = 0; i < Tx.DLC; i++)
|
||||
{
|
||||
buf[ind++] = toASCII_HEX(Div_4(Tx.DATA[i], 1));
|
||||
buf[ind++] = toASCII_HEX(Div_4(Tx.DATA[i], 0));
|
||||
}
|
||||
}
|
||||
|
||||
buf[ind++] = CR;
|
||||
|
||||
if (ind > BufferSize)
|
||||
return Invalid_Arg;
|
||||
|
||||
ConvertSize = ind;
|
||||
|
||||
for (int i = 0; i < ind; i++)
|
||||
{
|
||||
SerialBuffer[i] = buf[i];
|
||||
}
|
||||
|
||||
return No_Error;
|
||||
}
|
||||
|
||||
public static byte SetSerialConfig(SerialConfigInfo info, ref byte[] SerialBuffer, byte BufferSize, ref byte ConvertSize)
|
||||
{
|
||||
|
||||
byte len;
|
||||
byte[] buf = new byte[21];
|
||||
|
||||
buf[0] = (byte)'W';
|
||||
buf[1] = (byte)'S';
|
||||
switch (info.flow)
|
||||
{
|
||||
case (byte)FlowControl.NoFlowControl: buf[2] = (byte)'N'; break;
|
||||
case (byte)FlowControl.HardwareControl: buf[2] = (byte)'H'; break;
|
||||
default: return Invalid_Arg;
|
||||
}
|
||||
|
||||
switch (info.data)
|
||||
{
|
||||
case (byte)DataBits.Data8: buf[3] = (byte)'8'; break;
|
||||
default: return Invalid_Arg;
|
||||
}
|
||||
|
||||
switch (info.parity)
|
||||
{
|
||||
case (byte)Parity.NoParity: buf[4] = (byte)'N'; break;
|
||||
case (byte)Parity.EvenParity: buf[4] = (byte)'E'; break;
|
||||
case (byte)Parity.OddParity: buf[4] = (byte)'O'; break;
|
||||
case (byte)Parity.SpaceParity: buf[4] = (byte)'S'; break;
|
||||
case (byte)Parity.MarkParity: buf[4] = (byte)'M'; break;
|
||||
default: return Invalid_Arg;
|
||||
}
|
||||
|
||||
switch (info.stop)
|
||||
{
|
||||
case (byte)StopBits.OneStop: buf[5] = (byte)'1'; break;
|
||||
case (byte)StopBits.TwoStop: buf[5] = (byte)'2'; break;
|
||||
default: return Invalid_Arg;
|
||||
}
|
||||
byte[] value = new byte[20 - 6];
|
||||
len = int2ascii(info.Baudrate, ref value, 20 - 6);
|
||||
if (len == 0)
|
||||
{
|
||||
return Invalid_Arg;
|
||||
}
|
||||
for (int i = 0; i < len; i++)
|
||||
buf[6 + i] = value[i];
|
||||
|
||||
buf[6 + len] = CR;
|
||||
|
||||
if ((len + 7) > BufferSize)
|
||||
return Invalid_Arg;
|
||||
|
||||
ConvertSize = (byte)(len + 7);
|
||||
|
||||
for (int i = 0; i < (len + 7); i++)
|
||||
{
|
||||
SerialBuffer[i] = buf[i];
|
||||
}
|
||||
|
||||
return No_Error;
|
||||
}
|
||||
|
||||
static byte SetCANConfig(CANConfigInfo info, ref byte[] SerialBuffer, byte BufferSize, ref byte ConvertSize)
|
||||
{
|
||||
byte len;
|
||||
byte ind;
|
||||
byte[] buf = new byte[31];
|
||||
byte[] value = new byte[30];
|
||||
byte function;
|
||||
function = 0;
|
||||
|
||||
buf[0] = (byte)'W';
|
||||
buf[1] = (byte)'C';
|
||||
switch (info.Spec)
|
||||
{
|
||||
case (byte)CANSpec.CAN_A: buf[2] = (byte)'A'; break;
|
||||
case (byte)CANSpec.CAN_B: buf[2] = (byte)'B'; break;
|
||||
default: return Invalid_Arg;
|
||||
}
|
||||
buf[3] = (byte)',';
|
||||
|
||||
len = int2ascii(info.Baudrate, ref value, 4);
|
||||
if (len == 0)
|
||||
{
|
||||
return Invalid_Arg;
|
||||
}
|
||||
for (int i = 0; i < len; i++)
|
||||
buf[4 + i] = value[i];
|
||||
|
||||
buf[len + 4] = (byte)',';
|
||||
ind = (byte)(len + 5);
|
||||
|
||||
len = hex2ID(info.ID, info.Spec, ref value, 8);
|
||||
if (len == 0)
|
||||
{
|
||||
return Invalid_Arg;
|
||||
}
|
||||
for (int i = 0; i < len; i++)
|
||||
buf[ind + i] = value[i];
|
||||
|
||||
buf[len + ind] = (byte)',';
|
||||
ind = (byte)(len + ind + 1);
|
||||
|
||||
len = hex2ID(info.Mask, info.Spec, ref value, 8);
|
||||
if (len == 0)
|
||||
{
|
||||
return Invalid_Arg;
|
||||
}
|
||||
for (int i = 0; i < len; i++)
|
||||
buf[ind + i] = value[i];
|
||||
|
||||
buf[len + ind] = (byte)',';
|
||||
ind = (byte)(len + ind + 1);
|
||||
|
||||
if (info.DAR)
|
||||
SETDAR(ref function);
|
||||
if (info.ABOR)
|
||||
SETABOR(ref function);
|
||||
|
||||
buf[ind++] = toASCII_HEX(function);
|
||||
buf[ind++] = CR;
|
||||
|
||||
|
||||
if (ind > BufferSize)
|
||||
return Invalid_Arg;
|
||||
|
||||
ConvertSize = ind;
|
||||
|
||||
for (int i = 0; i < ind; i++)
|
||||
SerialBuffer[i] = buf[i];
|
||||
|
||||
return No_Error;
|
||||
}
|
||||
|
||||
static byte GetSerialConfig(ref byte[] SerialBuffer, byte BufferSize, ref byte ConvertSize)
|
||||
{
|
||||
if (3 > BufferSize)
|
||||
return Invalid_Arg;
|
||||
ConvertSize = 3;
|
||||
|
||||
SerialBuffer[0] = (byte)'R';
|
||||
SerialBuffer[1] = (byte)'S';
|
||||
SerialBuffer[2] = CR;
|
||||
|
||||
return No_Error;
|
||||
}
|
||||
|
||||
static byte GetCANConfig(ref byte[] SerialBuffer, byte BufferSize, ref byte ConvertSize)
|
||||
{
|
||||
if (3 > BufferSize)
|
||||
return Invalid_Arg;
|
||||
ConvertSize = 3;
|
||||
|
||||
SerialBuffer[0] = (byte)'R';
|
||||
SerialBuffer[1] = (byte)'C';
|
||||
SerialBuffer[2] = CR;
|
||||
|
||||
return No_Error;
|
||||
}
|
||||
|
||||
static byte SaveConfig(ref byte[] SerialBuffer, byte BufferSize, ref byte ConvertSize)
|
||||
{
|
||||
if (3 > BufferSize)
|
||||
return Invalid_Arg;
|
||||
ConvertSize = 3;
|
||||
|
||||
SerialBuffer[0] = (byte)'S';
|
||||
SerialBuffer[1] = (byte)'V';
|
||||
SerialBuffer[2] = CR;
|
||||
|
||||
return No_Error;
|
||||
}
|
||||
|
||||
static byte FirmwareUpgrade(ref byte[] SerialBuffer, byte BufferSize, ref byte ConvertSize)
|
||||
{
|
||||
if (3 > BufferSize)
|
||||
return Invalid_Arg;
|
||||
ConvertSize = 3;
|
||||
|
||||
SerialBuffer[0] = (byte)'F';
|
||||
SerialBuffer[1] = (byte)'U';
|
||||
SerialBuffer[2] = CR;
|
||||
|
||||
return No_Error;
|
||||
}
|
||||
static byte FirmwareVersion(ref byte[] SerialBuffer, byte BufferSize, ref byte ConvertSize)
|
||||
{
|
||||
if (3 > BufferSize)
|
||||
return Invalid_Arg;
|
||||
ConvertSize = 3;
|
||||
|
||||
SerialBuffer[0] = (byte)'F';
|
||||
SerialBuffer[1] = (byte)'V';
|
||||
SerialBuffer[2] = CR;
|
||||
|
||||
return No_Error;
|
||||
}
|
||||
|
||||
static byte GetErrorInfo(ref byte[] SerialBuffer, byte BufferSize, ref byte ConvertSize)
|
||||
{
|
||||
if (1 > BufferSize)
|
||||
return Invalid_Arg;
|
||||
ConvertSize = 1;
|
||||
|
||||
SerialBuffer[0] = (byte)'!';
|
||||
|
||||
return No_Error;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static byte ParsingSerialInfo(ref SerialConfigInfo info, ref byte[] SerialBuffer, byte BufferSize)
|
||||
{
|
||||
SerialConfigInfo tmp;
|
||||
UInt32 baudrate;
|
||||
byte flow, stop, data, parity;
|
||||
|
||||
flow = SerialBuffer[0];
|
||||
data = SerialBuffer[1];
|
||||
parity = SerialBuffer[2];
|
||||
stop = SerialBuffer[3];
|
||||
|
||||
byte[] bBuf = new byte[BufferSize - 5];
|
||||
for (int i = 0; i < BufferSize - 5; i++)
|
||||
bBuf[i] = SerialBuffer[4 + i];
|
||||
|
||||
baudrate = ascii2int(ref bBuf, (byte)(BufferSize - 5));
|
||||
|
||||
switch (flow)
|
||||
{
|
||||
case (byte)'N': tmp.flow = (byte)FlowControl.NoFlowControl; break;
|
||||
case (byte)'H': tmp.flow = (byte)FlowControl.HardwareControl; break;
|
||||
default: return Invalid_Arg;
|
||||
}
|
||||
|
||||
switch (data)
|
||||
{
|
||||
case (byte)'8': tmp.data = (byte)DataBits.Data8; break;
|
||||
default: return Invalid_Arg;
|
||||
}
|
||||
|
||||
switch (parity)
|
||||
{
|
||||
case (byte)'N': tmp.parity = (byte)Parity.NoParity; break;
|
||||
case (byte)'E': tmp.parity = (byte)Parity.EvenParity; break;
|
||||
case (byte)'O': tmp.parity = (byte)Parity.OddParity; break;
|
||||
case (byte)'S': tmp.parity = (byte)Parity.SpaceParity; break;
|
||||
case (byte)'M': tmp.parity = (byte)Parity.MarkParity; break;
|
||||
default: return Invalid_Arg;
|
||||
}
|
||||
switch (stop)
|
||||
{
|
||||
case (byte)'1': tmp.stop = (byte)StopBits.OneStop; break;
|
||||
case (byte)'2': tmp.stop = (byte)StopBits.TwoStop; break;
|
||||
default: return Invalid_Arg;
|
||||
}
|
||||
if ((baudrate % 100) > 0)
|
||||
return Invalid_Arg;
|
||||
else
|
||||
{
|
||||
tmp.Baudrate = baudrate;
|
||||
}
|
||||
|
||||
//*info = tmp;
|
||||
info = tmp;
|
||||
|
||||
return No_Error;
|
||||
}
|
||||
static byte ParsingCANInfo(ref CANConfigInfo info, ref byte[] SerialBuffer, byte BufferSize)
|
||||
{
|
||||
CANConfigInfo tmp;
|
||||
byte[] org = new byte[50];
|
||||
byte[][] tt = new byte[5][];
|
||||
byte function;
|
||||
|
||||
switch (SerialBuffer[0])
|
||||
{
|
||||
case (byte)'A':
|
||||
tmp.Spec = (byte)CANSpec.CAN_A;
|
||||
if (14 >= BufferSize || BufferSize >= 18)
|
||||
return Invalid_Arg;
|
||||
break;
|
||||
case (byte)'B':
|
||||
if (24 >= BufferSize || BufferSize >= 28)
|
||||
return Invalid_Arg;
|
||||
tmp.Spec = (byte)CANSpec.CAN_B;
|
||||
break;
|
||||
default: return Invalid_Arg;
|
||||
}
|
||||
|
||||
org = SerialBuffer;
|
||||
|
||||
//for (int i = 0; i < tt.GetLength(0); i++)
|
||||
// for (int j = 0; j < tt.GetLength(1); j++)
|
||||
// tt[i, j] = 0x00;
|
||||
|
||||
string equation = Encoding.Default.GetString(org);
|
||||
string[] equationTokens = equation.Split(new char[1] { ',' });
|
||||
|
||||
for (int i = 0; i < equationTokens.Length; i++)
|
||||
{
|
||||
tt[i] = Encoding.UTF8.GetBytes(equationTokens[i]);
|
||||
}
|
||||
|
||||
tmp.Baudrate = ascii2int(ref tt[0], (byte)tt[0].Length);
|
||||
tmp.ID = (uint)ascii2ID_Rev(ref tt[1], tmp.Spec);
|
||||
tmp.Mask = (uint)ascii2ID_Rev(ref tt[2], tmp.Spec);
|
||||
function = (byte)ascii2int(ref tt[3], 1);
|
||||
|
||||
if (function > 255)
|
||||
return No_Error;
|
||||
|
||||
if (ISDAR(function))
|
||||
tmp.DAR = true;
|
||||
else
|
||||
tmp.DAR = false;
|
||||
|
||||
if (ISABOR(function))
|
||||
tmp.ABOR = true;
|
||||
else
|
||||
tmp.ABOR = false;
|
||||
|
||||
//*info = tmp;
|
||||
info = tmp;
|
||||
|
||||
return No_Error;
|
||||
}
|
||||
|
||||
static byte ParsingErrorInfo(ref CANErorrInfo info, ref byte[] SerialBuffer, byte BufferSize)
|
||||
{
|
||||
CANErorrInfo tmp = new CANErorrInfo();
|
||||
|
||||
info = tmp;
|
||||
|
||||
return No_Error;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
|
||||
private functions
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
static byte Div_8(UInt32 data, byte index)
|
||||
{
|
||||
byte ret;
|
||||
data = data >> (index * 8);
|
||||
ret = (byte)(data & 0xFF);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static int ascii2hex(byte ch)
|
||||
{
|
||||
if (0x30 <= ch && ch <= 0x39)
|
||||
{//0~9
|
||||
ch &= 0x0f;
|
||||
return ch;
|
||||
}
|
||||
else if (0x61 <= ch && ch <= 0x66)
|
||||
{ //a~f
|
||||
ch &= 0x0f;
|
||||
ch += 9;
|
||||
return ch;
|
||||
}
|
||||
else if (0x41 <= ch && ch <= 0x46)
|
||||
{ //A~F
|
||||
ch &= 0x0f;
|
||||
ch += 9;
|
||||
return ch;
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int ascii2ID_Rev(ref byte[] SourceBuffer, byte idCount)
|
||||
{
|
||||
int idTmp = 0;
|
||||
int tmp = 0, i = 0;
|
||||
for (i = 0; i < idCount; i++)
|
||||
{
|
||||
tmp = ascii2hex(SourceBuffer[i]);
|
||||
if (tmp != -1)
|
||||
{
|
||||
idTmp = idTmp << 4;
|
||||
idTmp |= tmp;
|
||||
}
|
||||
}
|
||||
return idTmp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static byte Div_4(UInt32 data, byte index)
|
||||
{
|
||||
byte ret;
|
||||
data = data >> (index * 4);
|
||||
ret = (byte)(data & 0x0F);
|
||||
return ret;
|
||||
}
|
||||
static byte int2ascii(UInt32 val, ref byte[] SourceBuffer, byte size)
|
||||
{
|
||||
UInt32 check = 10;
|
||||
byte su = 1;
|
||||
|
||||
if (val < 10)
|
||||
return 0;
|
||||
|
||||
while ((val / check) > 0)
|
||||
{
|
||||
su++;
|
||||
check *= 10;
|
||||
}
|
||||
|
||||
if (su > size)
|
||||
return 0;
|
||||
|
||||
string tmpStr = String.Format("{0}", val);
|
||||
|
||||
SourceBuffer = Encoding.UTF8.GetBytes(tmpStr);
|
||||
|
||||
return su;
|
||||
}
|
||||
static UInt32 ascii2int(ref byte[] SourceBuffer, byte size)
|
||||
{
|
||||
UInt32 val = 0;
|
||||
byte ind = 0;
|
||||
int ret = 0;
|
||||
UInt32 mul = 1;
|
||||
|
||||
while (ret != -1)
|
||||
{
|
||||
ret = ascii2hex(SourceBuffer[ind++]);
|
||||
}
|
||||
ind--;
|
||||
|
||||
while (ind > 0)
|
||||
{
|
||||
ind--;
|
||||
ret = ascii2hex(SourceBuffer[ind]);
|
||||
val = (UInt32)(val + (ret * mul));
|
||||
mul *= 10;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static byte hex2ID(UInt32 val, byte idCount, ref byte[] SourceBuffer, byte size)
|
||||
{
|
||||
|
||||
UInt32 comp;
|
||||
|
||||
switch (idCount)
|
||||
{
|
||||
case (byte)CANSpec.CAN_A: comp = 0x07ff; break;
|
||||
case (byte)CANSpec.CAN_B: comp = 0x1fffffff; break;
|
||||
default: return 0;
|
||||
}
|
||||
|
||||
if (val > comp)
|
||||
return 0;
|
||||
|
||||
if (idCount > size)
|
||||
return 0;
|
||||
|
||||
switch (idCount)
|
||||
{
|
||||
case (byte)CANSpec.CAN_A: SourceBuffer = Encoding.UTF8.GetBytes(String.Format("{0:X3}", val)); break;
|
||||
case (byte)CANSpec.CAN_B: SourceBuffer = Encoding.UTF8.GetBytes(String.Format("{0:X8}", val)); break;
|
||||
default: return 0;
|
||||
}
|
||||
|
||||
return idCount;
|
||||
}
|
||||
|
||||
static byte toASCII_HEX(byte int_hex)
|
||||
{
|
||||
byte ret = 0;
|
||||
if (0 <= int_hex && int_hex <= 9)
|
||||
{
|
||||
ret = (byte)('0' + int_hex);
|
||||
}
|
||||
else if (0x0A <= int_hex && int_hex <= 0x0F)
|
||||
{
|
||||
ret = (byte)('A' + (int_hex % 10));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
2111
LFP_Manager_PRM/Function/csValueCANAPI.cs
Normal file
2111
LFP_Manager_PRM/Function/csValueCANAPI.cs
Normal file
File diff suppressed because it is too large
Load Diff
470
LFP_Manager_PRM/LFP_Manager_PRM.csproj
Normal file
470
LFP_Manager_PRM/LFP_Manager_PRM.csproj
Normal file
@@ -0,0 +1,470 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\EntityFramework.6.3.0\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.3.0\build\EntityFramework.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{BE0785A4-0CCB-44C5-A8C0-1AA2245E71F4}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LFP_Manager</RootNamespace>
|
||||
<AssemblyName>LFP_Manager_PRM</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Resources\AMO_LOGO.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Accessibility" />
|
||||
<Reference Include="DevExpress.Charts.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Drawing.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Data.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Pdf.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Office.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.RichEdit.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.RichEdit.v22.2.Export, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Printing.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Data.Desktop.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Sparkline.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.Utils.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Xpo.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraBars.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraCharts.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraCharts.v22.2.UI, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraCharts.v22.2.Wizard, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraGauges.v22.2.Core, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraGauges.v22.2.Win, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraGrid.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraLayout.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraNavBar.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraPrinting.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.3.0\lib\net45\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.3.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IPAddressControlLib">
|
||||
<HintPath>dll\IPAddressControlLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SnmpSharpNet, Version=0.9.4.0, Culture=neutral, PublicKeyToken=b2181aa3b9571feb, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>dll\SnmpSharpNet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.Linq" />
|
||||
<Reference Include="System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\lib\net451\System.Data.SQLite.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.SQLite.EF6, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.113.0\lib\net451\System.Data.SQLite.EF6.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.SQLite.Linq, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.113.0\lib\net451\System.Data.SQLite.Linq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Runtime.Serialization.Formatters.Soap" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Tftp.Net">
|
||||
<HintPath>dll\Tftp.Net.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Controls\ucCalibration.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucCalibration.Designer.cs">
|
||||
<DependentUpon>ucCalibration.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucCommConfig.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucCommConfig.Designer.cs">
|
||||
<DependentUpon>ucCommConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucCommConfig2.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucCommConfig2.Designer.cs">
|
||||
<DependentUpon>ucCommConfig2.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucDataLog.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucDataLog.Designer.cs">
|
||||
<DependentUpon>ucDataLog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucEventLog.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucEventLog.Designer.cs">
|
||||
<DependentUpon>ucEventLog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucHistroy.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucHistroy.Designer.cs">
|
||||
<DependentUpon>ucHistroy.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucMainStatus.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucMainStatus.Designer.cs">
|
||||
<DependentUpon>ucMainStatus.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucModuleIdSet.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucModuleIdSet.Designer.cs">
|
||||
<DependentUpon>ucModuleIdSet.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucParamSet.cs" />
|
||||
<Compile Include="Controls\ucParamSet.Designer.cs">
|
||||
<DependentUpon>ucParamSet.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucShelfStatus.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucShelfStatus.Designer.cs">
|
||||
<DependentUpon>ucShelfStatus.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucStatus.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucStatus.designer.cs">
|
||||
<DependentUpon>ucStatus.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucTargetControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucTargetControl.Designer.cs">
|
||||
<DependentUpon>ucTargetControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucTftpClientcs.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\ucTftpClientcs.Designer.cs">
|
||||
<DependentUpon>ucTftpClientcs.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DataStructure\csCanConstData.cs" />
|
||||
<Compile Include="DataStructure\csDbConstData.cs" />
|
||||
<Compile Include="DataStructure\csSbCanLibConstData.cs" />
|
||||
<Compile Include="Forms\fmxExcelFile.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxExcelFile.designer.cs">
|
||||
<DependentUpon>fmxExcelFile.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxFwImageConverter.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxFwImageConverter.Designer.cs">
|
||||
<DependentUpon>fmxFwImageConverter.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxCalibration.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxCalibration.Designer.cs">
|
||||
<DependentUpon>fmxCalibration.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxFwUpdate.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxFwUpdate.Designer.cs">
|
||||
<DependentUpon>fmxFwUpdate.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxHistory.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxHistory.Designer.cs">
|
||||
<DependentUpon>fmxHistory.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxInventoryConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxInventoryConfig.Designer.cs">
|
||||
<DependentUpon>fmxInventoryConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxInventoryConfig2.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxInventoryConfig2.Designer.cs">
|
||||
<DependentUpon>fmxInventoryConfig2.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxParamConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxParamConfig.Designer.cs">
|
||||
<DependentUpon>fmxParamConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxWait.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxWait.Designer.cs">
|
||||
<DependentUpon>fmxWait.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Function\csCanCommFunction.cs" />
|
||||
<Compile Include="Function\csCanFwUpdateFunction.cs" />
|
||||
<Compile Include="Function\csExcelExport.cs" />
|
||||
<Compile Include="Function\csExcelFunction.cs" />
|
||||
<Compile Include="Function\csExtCANControlFunction.cs" />
|
||||
<Compile Include="Function\csHistoryFunction.cs" />
|
||||
<Compile Include="Function\csSbCanAPI.cs" />
|
||||
<Compile Include="Function\csValueCANAPI.cs" />
|
||||
<Compile Include="Threads\csCanThread.cs" />
|
||||
<Compile Include="Threads\csDbThread.cs" />
|
||||
<Compile Include="DataStructure\csConstData.cs" />
|
||||
<Compile Include="DataStructure\csDataStructure.cs" />
|
||||
<Compile Include="Forms\fmxCommConfig.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxCommConfig.Designer.cs">
|
||||
<DependentUpon>fmxCommConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxMain.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\fmxMain.Designer.cs">
|
||||
<DependentUpon>fmxMain.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Function\csIniControlFunction.cs" />
|
||||
<Compile Include="Function\csMakeDataFunction.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Threads\csValueCanThread.cs" />
|
||||
<Compile Include="Utils\csDBUtils.cs" />
|
||||
<Compile Include="Utils\csExcelControl.cs" />
|
||||
<Compile Include="Utils\csLog.cs" />
|
||||
<Compile Include="Utils\csUtils.cs" />
|
||||
<EmbeddedResource Include="Controls\ucCalibration.resx">
|
||||
<DependentUpon>ucCalibration.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\ucCommConfig.resx">
|
||||
<DependentUpon>ucCommConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\ucCommConfig2.resx">
|
||||
<DependentUpon>ucCommConfig2.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\ucDataLog.resx">
|
||||
<DependentUpon>ucDataLog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\ucEventLog.resx">
|
||||
<DependentUpon>ucEventLog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\ucHistroy.resx">
|
||||
<DependentUpon>ucHistroy.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\ucMainStatus.resx">
|
||||
<DependentUpon>ucMainStatus.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\ucModuleIdSet.resx">
|
||||
<DependentUpon>ucModuleIdSet.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\ucParamSet.resx">
|
||||
<DependentUpon>ucParamSet.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\ucShelfStatus.resx">
|
||||
<DependentUpon>ucShelfStatus.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\ucStatus.resx">
|
||||
<DependentUpon>ucStatus.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\ucTargetControl.resx">
|
||||
<DependentUpon>ucTargetControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\ucTftpClientcs.resx">
|
||||
<DependentUpon>ucTftpClientcs.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\fmxExcelFile.resx">
|
||||
<DependentUpon>fmxExcelFile.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\fmxFwImageConverter.resx">
|
||||
<DependentUpon>fmxFwImageConverter.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\fmxCalibration.resx">
|
||||
<DependentUpon>fmxCalibration.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\fmxCommConfig.resx">
|
||||
<DependentUpon>fmxCommConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\fmxFwUpdate.resx">
|
||||
<DependentUpon>fmxFwUpdate.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\fmxHistory.resx">
|
||||
<DependentUpon>fmxHistory.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\fmxInventoryConfig.resx">
|
||||
<DependentUpon>fmxInventoryConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\fmxInventoryConfig2.resx">
|
||||
<DependentUpon>fmxInventoryConfig2.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\fmxMain.resx">
|
||||
<DependentUpon>fmxMain.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\fmxParamConfig.resx">
|
||||
<DependentUpon>fmxParamConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\fmxWait.resx">
|
||||
<DependentUpon>fmxWait.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\logo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\AMO_LOGO.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="DB Schema\DB_SCHEMA_TABLE.sql" />
|
||||
<Content Include="DB Schema\LOG_DB_SCHEMA_TABLE.sql" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>if not exist "$(TargetDir)\Library" mkdir "$(TargetDir)\Library"
|
||||
if not exist "$(TargetDir)\Library\kerneldlls" mkdir "$(TargetDir)\Library\kerneldlls"
|
||||
move "$(TargetDir)\*.dll" "$(TargetDir)\Library"
|
||||
move "$(TargetDir)\*.pdb" "$(TargetDir)\Library"
|
||||
move "$(TargetDir)\*.xml" "$(TargetDir)\Library"
|
||||
copy "$(ProjectDir)\dll\*.dll" "$(TargetDir)\Library"
|
||||
copy "$(ProjectDir)\dll\kerneldlls\*.*" "$(TargetDir)\Library\kerneldlls"
|
||||
|
||||
if not exist "$(TargetDir)\sql" mkdir "$(TargetDir)\sql"
|
||||
copy "$(ProjectDir)\DB Schema\*.sql" "$(TargetDir)\sql"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>if exist "$(TargetDir)\library" rmdir /s /q "$(TargetDir)\library"
|
||||
if exist "$(TargetDir)\sql" rmdir /s /q "$(TargetDir)\sql"</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\EntityFramework.6.3.0\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.3.0\build\EntityFramework.props'))" />
|
||||
<Error Condition="!Exists('..\packages\EntityFramework.6.3.0\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.3.0\build\EntityFramework.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\EntityFramework.6.3.0\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.3.0\build\EntityFramework.targets')" />
|
||||
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user