INT63DC_2C/INT63DC_2C/Forms/FormInformation.cs

574 lines
30 KiB
C#
Raw Normal View History

2024-03-07 06:43:33 +00:00
using System;
using System.Linq;
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
using SmartX;
using INT63DC_2C.DialogForms;
using INT63DC_ImageDll;
namespace INT63DC_2C.Forms
{
public partial class FormInformation : Form
{
#region Field
private FormMain m_ParentForm;
private Collection<SmartLabel> CollectionControlVerLabel;
#endregion
#region Constructor
public FormInformation(FormMain parent)
{
InitializeComponent();
this.ParentForm = parent;
}
#endregion
#region Property
public FormMain ParentForm
{
get { return this.m_ParentForm; }
private set { this.m_ParentForm = value; }
}
#endregion
#region Method
private void InitializeDesign()
{
ImageDll images = new ImageDll();
2024-03-19 07:29:50 +00:00
switch (this.ParentForm.SystemConfig.Language)
2024-03-07 06:43:33 +00:00
{
2024-03-19 07:29:50 +00:00
case DataStore.LanguageID.Korean:
break;
case DataStore.LanguageID.English:
#region English
this.labelTitle.Text = "Information";
this.buttonScreen.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engScreenDisable));
this.buttonScreen.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engScreenDown));
this.buttonScreen.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engScreenUp));
this.buttonBack.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engBackDisable));
this.buttonBack.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engBackDown));
this.buttonBack.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engBackUp));
#endregion
break;
case DataStore.LanguageID.Chinese:
#region Chinese
this.labelTitle.Text = "信息";
this.buttonScreen.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnScreenDisable));
this.buttonScreen.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnScreenDown));
this.buttonScreen.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnScreenUp));
this.buttonBack.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnBackDisable));
this.buttonBack.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnBackDown));
this.buttonBack.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnBackUp));
#endregion
break;
case DataStore.LanguageID.Czech:
#region Czech
this.labelTitle.Text = "Informace o systému";
this.buttonScreen.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeScreenDisable));
this.buttonScreen.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeScreenDown));
this.buttonScreen.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeScreenUp));
this.buttonBack.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeBackDisable));
this.buttonBack.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeBackDown));
this.buttonBack.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeBackUp));
#endregion
break;
case DataStore.LanguageID.German:
#region German
this.labelTitle.Text = "Systeminformation";
this.buttonScreen.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerScreenDisable));
this.buttonScreen.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerScreenDown));
this.buttonScreen.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerScreenUp));
this.buttonBack.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerBackDisable));
this.buttonBack.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerBackDown));
this.buttonBack.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerBackUp));
#endregion
break;
case DataStore.LanguageID.Japanese:
#region Japanese
this.labelTitle.Text = "情報";
this.buttonScreen.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnScreenDisable));
this.buttonScreen.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnScreenDown));
this.buttonScreen.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnScreenUp));
this.buttonBack.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnBackDisable));
this.buttonBack.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnBackDown));
this.buttonBack.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnBackUp));
2024-03-19 07:29:50 +00:00
#endregion
break;
default:
break;
2024-03-07 06:43:33 +00:00
}
}
private void InitializeAsInfomation()
{
bool fileCheck = false;
string filePath = "";
filePath = this.ParentForm.PathSystemFileFolder + "ASinfo.txt";
this.ParentForm.smartFileIO.FilePathName = filePath;
FileInfo fileInfo = new FileInfo(filePath);
fileCheck = fileInfo.Exists;
if (fileCheck == true)
{
this.ParentForm.smartFileIO.Open(this.ParentForm.BufferSmartUart);
this.DisplayAsInfo(this.ParentForm.SystemConfig.Language);
}
else
{
this.ParentForm.smartFileIO.Open(this.ParentForm.BufferSmartUart);
this.CreateASInfo();
this.DisplayAsInfo(this.ParentForm.SystemConfig.Language);
}
this.ParentForm.smartFileIO.Close();
//주소가 한줄일 경우 Email,Website라벨 위치 조정
if (this.labelAddress2.Text == "")
{
this.labelAddress2.Visible = false;
this.labelEmail.Location = new Point(224, 469);
this.labelWebsite.Location = new Point(224, 515);
}
else
{
this.labelAddress2.Visible = true;
this.labelEmail.Location = new Point(224, 515);
this.labelWebsite.Location = new Point(224, 561);
}
}
private void DefaultSetting()
{
2024-03-07 06:45:20 +00:00
this.labelDisplayVer.Text = "8.2.0";
2024-03-07 06:43:33 +00:00
this.labelSerialNo.Text = this.ParentForm.SystemConfig.SerialNumber;
this.textBoxSerialNo.Location = new Point(395, 225);
this.textBoxSerialNo.Visible = false;
this.tabControlSpecialFunction.Location = new Point(695, 74);
this.tabControlSpecialFunction.Visible = false;
this.CollectionControlVerLabel = new Collection<SmartLabel>();
this.CollectionControlVerLabel.Clear();
switch (this.ParentForm.SystemConfig.EquipmentColumns)
{
case 2:
this.CollectionControlVerLabel.Add(this.labelMainControlVer);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion1);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion2);
this.labelSub3.Visible = this.labelSubBoardVersion3.Visible = false;
this.labelSub4.Visible = this.labelSubBoardVersion4.Visible = false;
this.labelSub5.Visible = this.labelSubBoardVersion5.Visible = false;
this.labelSub6.Visible = this.labelSubBoardVersion6.Visible = false;
this.labelSub7.Visible = this.labelSubBoardVersion7.Visible = false;
this.labelSub8.Visible = this.labelSubBoardVersion8.Visible = false;
this.labelSub9.Visible = this.labelSubBoardVersion9.Visible = false;
this.labelSub10.Visible = this.labelSubBoardVersion10.Visible = false;
this.labelSub11.Visible = this.labelSubBoardVersion11.Visible = false;
this.labelSub12.Visible = this.labelSubBoardVersion12.Visible = false;
this.labelSub13.Visible = this.labelSubBoardVersion13.Visible = false;
this.labelSub14.Visible = this.labelSubBoardVersion14.Visible = false;
this.labelSub15.Visible = this.labelSubBoardVersion15.Visible = false;
this.labelSub16.Visible = this.labelSubBoardVersion16.Visible = false;
break;
case 3:
this.CollectionControlVerLabel.Add(this.labelMainControlVer);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion1);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion2);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion3);
this.labelSub4.Visible = this.labelSubBoardVersion4.Visible = false;
this.labelSub5.Visible = this.labelSubBoardVersion5.Visible = false;
this.labelSub6.Visible = this.labelSubBoardVersion6.Visible = false;
this.labelSub7.Visible = this.labelSubBoardVersion7.Visible = false;
this.labelSub8.Visible = this.labelSubBoardVersion8.Visible = false;
this.labelSub9.Visible = this.labelSubBoardVersion9.Visible = false;
this.labelSub10.Visible = this.labelSubBoardVersion10.Visible = false;
this.labelSub11.Visible = this.labelSubBoardVersion11.Visible = false;
this.labelSub12.Visible = this.labelSubBoardVersion12.Visible = false;
this.labelSub13.Visible = this.labelSubBoardVersion13.Visible = false;
this.labelSub14.Visible = this.labelSubBoardVersion14.Visible = false;
this.labelSub15.Visible = this.labelSubBoardVersion15.Visible = false;
this.labelSub16.Visible = this.labelSubBoardVersion16.Visible = false;
break;
case 4:
this.CollectionControlVerLabel.Add(this.labelMainControlVer);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion1);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion2);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion3);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion4);
this.labelSub5.Visible = this.labelSubBoardVersion5.Visible = false;
this.labelSub6.Visible = this.labelSubBoardVersion6.Visible = false;
this.labelSub7.Visible = this.labelSubBoardVersion7.Visible = false;
this.labelSub8.Visible = this.labelSubBoardVersion8.Visible = false;
this.labelSub9.Visible = this.labelSubBoardVersion9.Visible = false;
this.labelSub10.Visible = this.labelSubBoardVersion10.Visible = false;
this.labelSub11.Visible = this.labelSubBoardVersion11.Visible = false;
this.labelSub12.Visible = this.labelSubBoardVersion12.Visible = false;
this.labelSub13.Visible = this.labelSubBoardVersion13.Visible = false;
this.labelSub14.Visible = this.labelSubBoardVersion14.Visible = false;
this.labelSub15.Visible = this.labelSubBoardVersion15.Visible = false;
this.labelSub16.Visible = this.labelSubBoardVersion16.Visible = false;
break;
case 5:
this.CollectionControlVerLabel.Add(this.labelMainControlVer);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion1);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion2);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion3);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion4);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion5);
this.labelSub6.Visible = this.labelSubBoardVersion6.Visible = false;
this.labelSub7.Visible = this.labelSubBoardVersion7.Visible = false;
this.labelSub8.Visible = this.labelSubBoardVersion8.Visible = false;
this.labelSub9.Visible = this.labelSubBoardVersion9.Visible = false;
this.labelSub10.Visible = this.labelSubBoardVersion10.Visible = false;
this.labelSub11.Visible = this.labelSubBoardVersion11.Visible = false;
this.labelSub12.Visible = this.labelSubBoardVersion12.Visible = false;
this.labelSub13.Visible = this.labelSubBoardVersion13.Visible = false;
this.labelSub14.Visible = this.labelSubBoardVersion14.Visible = false;
this.labelSub15.Visible = this.labelSubBoardVersion15.Visible = false;
this.labelSub16.Visible = this.labelSubBoardVersion16.Visible = false;
break;
case 6:
this.CollectionControlVerLabel.Add(this.labelMainControlVer);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion1);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion2);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion3);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion4);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion5);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion6);
this.labelSub7.Visible = this.labelSubBoardVersion7.Visible = false;
this.labelSub8.Visible = this.labelSubBoardVersion8.Visible = false;
this.labelSub9.Visible = this.labelSubBoardVersion9.Visible = false;
this.labelSub10.Visible = this.labelSubBoardVersion10.Visible = false;
this.labelSub11.Visible = this.labelSubBoardVersion11.Visible = false;
this.labelSub12.Visible = this.labelSubBoardVersion12.Visible = false;
this.labelSub13.Visible = this.labelSubBoardVersion13.Visible = false;
this.labelSub14.Visible = this.labelSubBoardVersion14.Visible = false;
this.labelSub15.Visible = this.labelSubBoardVersion15.Visible = false;
this.labelSub16.Visible = this.labelSubBoardVersion16.Visible = false;
break;
case 7:
this.CollectionControlVerLabel.Add(this.labelMainControlVer);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion1);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion2);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion3);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion4);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion5);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion6);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion7);
this.labelSub8.Visible = this.labelSubBoardVersion8.Visible = false;
this.labelSub9.Visible = this.labelSubBoardVersion9.Visible = false;
this.labelSub10.Visible = this.labelSubBoardVersion10.Visible = false;
this.labelSub11.Visible = this.labelSubBoardVersion11.Visible = false;
this.labelSub12.Visible = this.labelSubBoardVersion12.Visible = false;
this.labelSub13.Visible = this.labelSubBoardVersion13.Visible = false;
this.labelSub14.Visible = this.labelSubBoardVersion14.Visible = false;
this.labelSub15.Visible = this.labelSubBoardVersion15.Visible = false;
this.labelSub16.Visible = this.labelSubBoardVersion16.Visible = false;
break;
case 8:
this.CollectionControlVerLabel.Add(this.labelMainControlVer);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion1);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion2);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion3);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion4);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion5);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion6);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion7);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion8);
this.labelSub9.Visible = this.labelSubBoardVersion9.Visible = false;
this.labelSub10.Visible = this.labelSubBoardVersion10.Visible = false;
this.labelSub11.Visible = this.labelSubBoardVersion11.Visible = false;
this.labelSub12.Visible = this.labelSubBoardVersion12.Visible = false;
this.labelSub13.Visible = this.labelSubBoardVersion13.Visible = false;
this.labelSub14.Visible = this.labelSubBoardVersion14.Visible = false;
this.labelSub15.Visible = this.labelSubBoardVersion15.Visible = false;
this.labelSub16.Visible = this.labelSubBoardVersion16.Visible = false;
break;
case 10:
this.CollectionControlVerLabel.Add(this.labelMainControlVer);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion1);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion2);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion3);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion4);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion5);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion6);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion7);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion8);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion9);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion10);
this.labelSub11.Visible = this.labelSubBoardVersion11.Visible = false;
this.labelSub12.Visible = this.labelSubBoardVersion12.Visible = false;
this.labelSub13.Visible = this.labelSubBoardVersion13.Visible = false;
this.labelSub14.Visible = this.labelSubBoardVersion14.Visible = false;
this.labelSub15.Visible = this.labelSubBoardVersion15.Visible = false;
this.labelSub16.Visible = this.labelSubBoardVersion16.Visible = false;
break;
case 12:
this.CollectionControlVerLabel.Add(this.labelMainControlVer);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion1);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion2);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion3);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion4);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion5);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion6);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion7);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion8);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion9);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion10);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion11);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion12);
this.labelSub13.Visible = this.labelSubBoardVersion13.Visible = false;
this.labelSub14.Visible = this.labelSubBoardVersion14.Visible = false;
this.labelSub15.Visible = this.labelSubBoardVersion15.Visible = false;
this.labelSub16.Visible = this.labelSubBoardVersion16.Visible = false;
break;
case 16:
this.CollectionControlVerLabel.Add(this.labelMainControlVer);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion1);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion2);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion3);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion4);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion5);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion6);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion7);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion8);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion9);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion10);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion11);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion12);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion13);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion14);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion15);
this.CollectionControlVerLabel.Add(this.labelSubBoardVersion16);
break;
default:
break;
}
foreach (SmartLabel label in this.CollectionControlVerLabel)
label.Text = "-";
this.labelMainControlVer.Text = "-";
}
private void CreateASInfo()
{
// ASinfo 생성(기본 : 인테크)
this.ParentForm.smartFileIO.WriteString("(주)인테크코리아", 0);
this.ParentForm.smartFileIO.WriteString("Tel.82-32-681-0714 / Fax.82-32-681-0713", 1);
this.ParentForm.smartFileIO.WriteString("인천광역시 서구 장고개로 217번길 10", 2);
this.ParentForm.smartFileIO.WriteString("", 3);
this.ParentForm.smartFileIO.WriteString("sales@intechkorea.com", 4);
this.ParentForm.smartFileIO.WriteString("http://www.intechkorea.com", 5);
this.ParentForm.smartFileIO.WriteString("INTECHKOREA CO., LTD", 6);
this.ParentForm.smartFileIO.WriteString("Tel.82-32-681-0714 / Fax.82-32-681-0713", 7);
this.ParentForm.smartFileIO.WriteString("10, Janggogae-ro 217beon-gil, Seo-gu,", 8);
this.ParentForm.smartFileIO.WriteString("Incheon, Republic of Korea", 9);
this.ParentForm.smartFileIO.WriteString("sales@intechkorea.com", 10);
this.ParentForm.smartFileIO.WriteString("http://www.intechkorea.com", 11);
}
private void DisplayAsInfo(DataStore.LanguageID language)
{
string readText = "";
bool readCheck = false;
int index = 0;
if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Korean)
index = 0;
else
index = 6;
#region 회사별 AS정보 입력
readText = this.ParentForm.smartFileIO.ReadString(index, ref readCheck);
if (readCheck == true)
{
if (this.labelCompany.Text != readText)
this.labelCompany.Text = readText;
}
else
this.labelCompany.Text = "";
readText = this.ParentForm.smartFileIO.ReadString(index + 1, ref readCheck);
if (readCheck == true)
{
if (this.labelTelNumber.Text != readText)
this.labelTelNumber.Text = readText;
}
else
this.labelTelNumber.Text = "";
readText = this.ParentForm.smartFileIO.ReadString(index + 2, ref readCheck);
if (readCheck == true)
{
if (this.labelAddress1.Text != readText)
this.labelAddress1.Text = readText;
}
else
this.labelAddress1.Text = "";
readText = this.ParentForm.smartFileIO.ReadString(index + 3, ref readCheck);
if (readCheck == true)
{
if (this.labelAddress2.Text != readText)
this.labelAddress2.Text = readText;
}
else
this.labelAddress2.Text = "";
readText = this.ParentForm.smartFileIO.ReadString(index + 4, ref readCheck);
if (readCheck == true)
{
if (this.labelEmail.Text != readText)
this.labelEmail.Text = readText;
}
else
this.labelEmail.Text = "";
readText = this.ParentForm.smartFileIO.ReadString(index + 5, ref readCheck);
if (readCheck == true)
{
if (this.labelWebsite.Text != readText)
this.labelWebsite.Text = readText;
}
else
this.labelWebsite.Text = "";
#endregion
}
public void UpdateProgreamVersionDisplay(DataStore.EquipmentStatus status, Collection<string> values)
{
StringBuilder sb;
if (values == null || values.Count == 0 || this.CollectionControlVerLabel.Count > values.Count)
return;
for (int i = 0; i < this.CollectionControlVerLabel.Count; i++)
{
sb = new StringBuilder(values[i].Trim());
sb.Insert(sb.Length - 1, ".");
sb.Insert(sb.Length - 3, ".");
this.CollectionControlVerLabel[i].Text = sb.ToString();
}
}
public void DisplayRefresh()
{
this.ParentForm.SystemConfig.CurrentForm = DataStore.FormStore.FormInformation;
this.ParentForm.TransferDataStream(CommunicationCommand.Read, CommunicationID.MainBoard, CommunicationAddress._1500_ProgramVersion, "");
}
#endregion
#region Override Member
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
this.InitializeDesign();
this.InitializeAsInfomation();
this.DefaultSetting();
}
#endregion
#region Event Handler
private void labelSerialNo_Click(object sender, EventArgs e)
{
if (ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level4Developer)
{
this.textBoxSerialNo.Visible = true;
this.textBoxSerialNo.BringToFront();
this.smartKeyboard1.KeyboardType = SmartX.SmartKeyboard.KEYBOARDTYPES.NORMAL;
this.smartKeyboard1.Left = 8;
this.smartKeyboard1.Top = 280;
this.smartKeyboard1.Width = 1000;
this.smartKeyboard1.Height = 480;
this.smartKeyboard1.Hide();
this.smartKeyboard1.TargetInputObject = this.textBoxSerialNo;
this.textBoxSerialNo.Text = this.labelSerialNo.Text;
this.smartKeyboard1.Show();
}
}
private void smartKeyboard1_OnXKeyClick(object sender, EventArgs e)
{
this.smartKeyboard1.Hide();
this.textBoxSerialNo.Text = this.labelSerialNo.Text;
this.textBoxSerialNo.Visible = false;
}
private void textBoxSerialNo_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
e.Handled = true;
this.smartKeyboard1.Hide();
this.textBoxSerialNo.Visible = false;
this.labelSerialNo.Text = this.textBoxSerialNo.Text.Trim();
this.ParentForm.SystemConfig.SerialNumber = this.labelSerialNo.Text;
this.ParentForm.SaveSystemConfigurationFile1(this.ParentForm.SystemConfig);
}
else if (e.KeyChar == 27) // ESC 눌렀을 때
{
e.Handled = true;
this.smartKeyboard1.Hide();
this.textBoxSerialNo.Text = this.labelSerialNo.Text;
this.textBoxSerialNo.Visible = false;
}
}
private void buttonSubBoardVersion_Click(object sender, EventArgs e)
{
this.ParentForm.TransferDataStream(CommunicationCommand.Read, CommunicationID.MainBoard, CommunicationAddress._1500_ProgramVersion, "");
}
private void buttonBack_Click(object sender, EventArgs e)
{
this.tabControlSpecialFunction.Visible = false;
this.ParentForm.ChildFormMenu.DisplayRefresh();
((FormMain)(Owner)).smartForm.Show((int)DataStore.FormStore.FormMenu);
}
private void buttonScreen_Click(object sender, EventArgs e)
{
if (this.tabControlSpecialFunction.Visible == false)
this.tabControlSpecialFunction.Visible = true;
else
this.tabControlSpecialFunction.Visible = false;
}
#endregion
}
}