INT_PT002/INT_PT002/DataStore/SystemConfiguration.cs

222 lines
5.9 KiB
C#
Raw Normal View History

2023-02-09 08:20:49 +00:00
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Collections.ObjectModel;
2023-02-09 08:20:49 +00:00
namespace INT_PT002.DataStore
{
#region SystemConfiguration
2023-02-09 08:20:49 +00:00
public class SystemConfiguration
{
#region Field
private bool m_IS_LOGIN;
private string m_MAINBOARD_VERSION;
2023-03-06 04:52:55 +00:00
private int m_RECIPE_NUMBER;
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;
private string m_SERIAL_NUMBER;
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
public bool IS_LOGIN
{
get { return this.m_IS_LOGIN; }
set { this.m_IS_LOGIN = value; }
}
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; }
}
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
}
public string SERIAL_NUMBER
{
get { return this.m_SERIAL_NUMBER; }
set { this.m_SERIAL_NUMBER = value; }
}
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()
{
this.IS_LOGIN = false;
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-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;
this.SB_DIFF_MODE = 1;
this.SERIAL_NUMBER = "23D0000";
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
}
#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;
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;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
public string SERIAL_NUMBER;
[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
}