2023-02-09 08:20:49 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Runtime.InteropServices;
|
2023-03-17 02:47:26 +00:00
|
|
|
|
using System.Collections.ObjectModel;
|
2023-02-09 08:20:49 +00:00
|
|
|
|
|
|
|
|
|
namespace INT_PT002.DataStore
|
|
|
|
|
{
|
2023-03-17 02:47:26 +00:00
|
|
|
|
#region SystemConfiguration
|
2023-02-09 08:20:49 +00:00
|
|
|
|
public class SystemConfiguration
|
|
|
|
|
{
|
|
|
|
|
#region Field
|
2023-03-17 02:47:26 +00:00
|
|
|
|
private bool m_IS_LOGIN;
|
|
|
|
|
|
2023-03-27 02:29:31 +00:00
|
|
|
|
private string m_MAINBOARD_VERSION;
|
2023-03-06 04:52:55 +00:00
|
|
|
|
private int m_RECIPE_NUMBER;
|
|
|
|
|
|
2023-03-11 09:34:19 +00:00
|
|
|
|
private Define.E_LanguageID m_LANGUAGE;
|
|
|
|
|
|
2023-03-06 04:52:55 +00:00
|
|
|
|
private int m_CHART1_DRAW_STEP;
|
|
|
|
|
private int m_CHART2_DRAW_STEP;
|
|
|
|
|
|
|
|
|
|
private int m_LCD_DATA_PERIOD;
|
|
|
|
|
private int m_CHATTERING;
|
|
|
|
|
private int m_JUDGMENT_DELAY_MSEC;
|
|
|
|
|
private int m_BUZZER_OP;
|
|
|
|
|
|
|
|
|
|
private int m_SB_DIFF_FILTER;
|
|
|
|
|
private int m_SB_DIFF_MODE;
|
|
|
|
|
private int m_SB_DATA_MODE;
|
|
|
|
|
private int m_SB_DATA_PERIOD;
|
2023-03-11 09:34:19 +00:00
|
|
|
|
|
|
|
|
|
private string m_SERIAL_NUMBER;
|
2023-03-17 02:47:26 +00:00
|
|
|
|
|
|
|
|
|
private int m_AUTOMATIC_LOGOUT;
|
|
|
|
|
|
|
|
|
|
private string m_LEVEL1_NAME;
|
|
|
|
|
private string m_LEVEL2_NAME;
|
|
|
|
|
private string m_LEVEL3_NAME;
|
2023-02-09 08:20:49 +00:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Constructor
|
|
|
|
|
public SystemConfiguration()
|
|
|
|
|
{
|
|
|
|
|
this.Initialize();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Property
|
2023-03-17 02:47:26 +00:00
|
|
|
|
public bool IS_LOGIN
|
|
|
|
|
{
|
|
|
|
|
get { return this.m_IS_LOGIN; }
|
|
|
|
|
set { this.m_IS_LOGIN = value; }
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-27 02:29:31 +00:00
|
|
|
|
public string MAINBOARD_VERSION
|
|
|
|
|
{
|
|
|
|
|
get { return this.m_MAINBOARD_VERSION; }
|
|
|
|
|
set { this.m_MAINBOARD_VERSION = value; }
|
|
|
|
|
}
|
2023-03-06 04:52:55 +00:00
|
|
|
|
public int RECIPE_NUMBER
|
|
|
|
|
{
|
|
|
|
|
get { return this.m_RECIPE_NUMBER; }
|
|
|
|
|
set { this.m_RECIPE_NUMBER = value; }
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-11 09:34:19 +00:00
|
|
|
|
public Define.E_LanguageID LANGUAGE
|
|
|
|
|
{
|
|
|
|
|
get { return this.m_LANGUAGE; }
|
|
|
|
|
set { this.m_LANGUAGE = value; }
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-06 04:52:55 +00:00
|
|
|
|
public int CHART1_DRAW_STEP
|
2023-02-09 08:20:49 +00:00
|
|
|
|
{
|
2023-03-06 04:52:55 +00:00
|
|
|
|
get { return this.m_CHART1_DRAW_STEP; }
|
|
|
|
|
set { this.m_CHART1_DRAW_STEP = value; }
|
2023-02-09 08:20:49 +00:00
|
|
|
|
}
|
2023-03-06 04:52:55 +00:00
|
|
|
|
public int CHART2_DRAW_STEP
|
2023-02-09 08:20:49 +00:00
|
|
|
|
{
|
2023-03-06 04:52:55 +00:00
|
|
|
|
get { return this.m_CHART2_DRAW_STEP; }
|
|
|
|
|
set { this.m_CHART2_DRAW_STEP = value; }
|
2023-02-09 08:20:49 +00:00
|
|
|
|
}
|
2023-03-06 04:52:55 +00:00
|
|
|
|
|
|
|
|
|
public int LCD_DATA_PERIOD
|
2023-02-09 08:20:49 +00:00
|
|
|
|
{
|
2023-03-06 04:52:55 +00:00
|
|
|
|
get { return this.m_LCD_DATA_PERIOD; }
|
|
|
|
|
set { this.m_LCD_DATA_PERIOD = value; }
|
2023-02-09 08:20:49 +00:00
|
|
|
|
}
|
2023-03-06 04:52:55 +00:00
|
|
|
|
public int CHATTERING
|
2023-02-09 08:20:49 +00:00
|
|
|
|
{
|
2023-03-06 04:52:55 +00:00
|
|
|
|
get { return this.m_CHATTERING; }
|
|
|
|
|
set { this.m_CHATTERING = value; }
|
2023-02-09 08:20:49 +00:00
|
|
|
|
}
|
2023-03-06 04:52:55 +00:00
|
|
|
|
public int JUDGMENT_DELAY_MSEC
|
2023-02-09 08:20:49 +00:00
|
|
|
|
{
|
2023-03-06 04:52:55 +00:00
|
|
|
|
get { return this.m_JUDGMENT_DELAY_MSEC; }
|
|
|
|
|
set { this.m_JUDGMENT_DELAY_MSEC = value; }
|
|
|
|
|
}
|
|
|
|
|
public int BUZZER_OP
|
|
|
|
|
{
|
|
|
|
|
get { return this.m_BUZZER_OP; }
|
|
|
|
|
set { this.m_BUZZER_OP = value; }
|
2023-02-09 08:20:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-06 04:52:55 +00:00
|
|
|
|
public int SB_DIFF_FILTER
|
|
|
|
|
{
|
|
|
|
|
get { return this.m_SB_DIFF_FILTER; }
|
|
|
|
|
set { this.m_SB_DIFF_FILTER = value; }
|
|
|
|
|
}
|
|
|
|
|
public int SB_DIFF_MODE
|
|
|
|
|
{
|
|
|
|
|
get { return this.m_SB_DIFF_MODE; }
|
|
|
|
|
set { this.m_SB_DIFF_MODE = value; }
|
|
|
|
|
}
|
|
|
|
|
public int SB_DATA_MODE
|
|
|
|
|
{
|
|
|
|
|
get { return this.m_SB_DATA_MODE; }
|
|
|
|
|
set { this.m_SB_DATA_MODE = value; }
|
|
|
|
|
}
|
|
|
|
|
public int SB_DATA_PERIOD
|
2023-02-09 08:20:49 +00:00
|
|
|
|
{
|
2023-03-06 04:52:55 +00:00
|
|
|
|
get { return this.m_SB_DATA_PERIOD; }
|
|
|
|
|
set { this.m_SB_DATA_PERIOD = value; }
|
2023-02-09 08:20:49 +00:00
|
|
|
|
}
|
2023-03-11 09:34:19 +00:00
|
|
|
|
|
|
|
|
|
public string SERIAL_NUMBER
|
|
|
|
|
{
|
|
|
|
|
get { return this.m_SERIAL_NUMBER; }
|
|
|
|
|
set { this.m_SERIAL_NUMBER = value; }
|
|
|
|
|
}
|
2023-03-17 02:47:26 +00:00
|
|
|
|
|
|
|
|
|
public int AUTOMATIC_LOGOUT
|
|
|
|
|
{
|
|
|
|
|
get { return this.m_AUTOMATIC_LOGOUT; }
|
|
|
|
|
set { this.m_AUTOMATIC_LOGOUT = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string LEVEL1_NAME
|
|
|
|
|
{
|
|
|
|
|
get { return this.m_LEVEL1_NAME; }
|
|
|
|
|
set { this.m_LEVEL1_NAME = value; }
|
|
|
|
|
}
|
|
|
|
|
public string LEVEL2_NAME
|
|
|
|
|
{
|
|
|
|
|
get { return this.m_LEVEL2_NAME; }
|
|
|
|
|
set { this.m_LEVEL2_NAME = value; }
|
|
|
|
|
}
|
|
|
|
|
public string LEVEL3_NAME
|
|
|
|
|
{
|
|
|
|
|
get { return this.m_LEVEL3_NAME; }
|
|
|
|
|
set { this.m_LEVEL3_NAME = value; }
|
|
|
|
|
}
|
2023-02-09 08:20:49 +00:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Method
|
|
|
|
|
public void Initialize()
|
|
|
|
|
{
|
2023-03-17 02:47:26 +00:00
|
|
|
|
this.IS_LOGIN = false;
|
|
|
|
|
|
2023-03-27 02:29:31 +00:00
|
|
|
|
this.MAINBOARD_VERSION = "000";
|
2023-03-06 04:52:55 +00:00
|
|
|
|
this.RECIPE_NUMBER = 1;
|
2023-02-09 08:20:49 +00:00
|
|
|
|
|
2023-04-14 00:40:45 +00:00
|
|
|
|
this.LANGUAGE = Define.E_LanguageID.English;
|
2023-03-11 09:34:19 +00:00
|
|
|
|
|
2023-03-06 04:52:55 +00:00
|
|
|
|
this.CHART1_DRAW_STEP = 4;
|
|
|
|
|
this.CHART2_DRAW_STEP = 2;
|
|
|
|
|
|
|
|
|
|
this.LCD_DATA_PERIOD = 100;
|
|
|
|
|
this.CHATTERING = 500;
|
|
|
|
|
this.JUDGMENT_DELAY_MSEC = 2000;
|
|
|
|
|
this.BUZZER_OP = 1000;
|
|
|
|
|
|
|
|
|
|
this.SB_DIFF_FILTER = 15;
|
|
|
|
|
this.SB_DATA_MODE = 2;
|
|
|
|
|
this.SB_DATA_PERIOD = 100;
|
2023-03-27 09:00:47 +00:00
|
|
|
|
this.SB_DIFF_MODE = 1;
|
2023-03-11 09:34:19 +00:00
|
|
|
|
|
2023-03-27 09:00:47 +00:00
|
|
|
|
this.SERIAL_NUMBER = "23D0000";
|
2023-03-17 02:47:26 +00:00
|
|
|
|
|
|
|
|
|
this.AUTOMATIC_LOGOUT = 10;
|
|
|
|
|
|
|
|
|
|
this.LEVEL1_NAME = "Level 1";
|
|
|
|
|
this.LEVEL2_NAME = "Level 2";
|
|
|
|
|
this.LEVEL3_NAME = "Level 3";
|
2023-02-09 08:20:49 +00:00
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
2023-03-17 02:47:26 +00:00
|
|
|
|
#endregion
|
|
|
|
|
#region Struct SystemConfiguration
|
2023-02-09 08:20:49 +00:00
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
|
public struct StructSystemConfigurationItem
|
|
|
|
|
{
|
2023-03-06 04:52:55 +00:00
|
|
|
|
public int RECIPE_NUMBER;
|
2023-03-11 09:34:19 +00:00
|
|
|
|
public Define.E_LanguageID LANGUAGE;
|
2023-03-06 04:52:55 +00:00
|
|
|
|
|
|
|
|
|
public int CHART1_DRAW_STEP;
|
|
|
|
|
public int CHART2_DRAW_STEP;
|
|
|
|
|
|
|
|
|
|
public int LCD_DATA_PERIOD;
|
|
|
|
|
public int CHATTERING;
|
|
|
|
|
public int JUDGMENT_DELAY_MSEC;
|
|
|
|
|
public int BUZZER_OP;
|
|
|
|
|
|
|
|
|
|
public int SB_DIFF_FILTER;
|
|
|
|
|
public int SB_DIFF_MODE;
|
|
|
|
|
public int SB_DATA_MODE;
|
|
|
|
|
public int SB_DATA_PERIOD;
|
2023-03-11 09:34:19 +00:00
|
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
|
|
|
|
|
public string SERIAL_NUMBER;
|
2023-03-17 02:47:26 +00:00
|
|
|
|
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
|
|
|
|
|
public string LEVEL1_NAME;
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
|
|
|
|
|
public string LEVEL2_NAME;
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
|
|
|
|
|
public string LEVEL3_NAME;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
2023-02-09 08:20:49 +00:00
|
|
|
|
}
|