615 lines
30 KiB
C#
615 lines
30 KiB
C#
using System;
|
|
using System.Linq;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
using INT63DC_2C.DialogForms;
|
|
using INT63DC_ImageDll;
|
|
|
|
namespace INT63DC_2C.Forms
|
|
{
|
|
public partial class FormEquipmentSetting : Form
|
|
{
|
|
#region Field
|
|
private FormMain m_ParentForm;
|
|
#endregion
|
|
|
|
#region Constructor
|
|
public FormEquipmentSetting(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();
|
|
|
|
switch (this.ParentForm.SystemConfig.Language)
|
|
{
|
|
case DataStore.E_LanguageID.Korean:
|
|
break;
|
|
case DataStore.E_LanguageID.English:
|
|
#region English
|
|
this.labelTitle.Text = "Equipment settings";
|
|
|
|
this.labelStaticLane.Text = "Lane";
|
|
this.labelStaticOrder.Text = "Order";
|
|
this.labelStaticIndividualNG.Text = "Individual NG";
|
|
this.labelStaticLanguage.Text = "Language";
|
|
this.labelStaticSorter1Location.Text = "Sorter1 Location";
|
|
this.labelStaticSorter2Location.Text = "Sorter2 Location";
|
|
this.labelStaticSorter3Location.Text = "Sorter3 Location";
|
|
this.labelStaticLogin.Text = "Login";
|
|
this.labelStaticEmptyWeight.Text = "Empty weight Set";
|
|
this.labelStaticMotor.Text = "Motor";
|
|
this.labelStaticWeightLimitIgnoreCount.Text = "Weight limit - Ignore count";
|
|
|
|
this.labelInfo1.Text = "※ Sorting NG products by weight";
|
|
this.labelInfo2.Text = "※ Normal product (selected under quantity)";
|
|
this.labelInfo3.Text = "※ Sampling Sorting (if not used, use in sorter 2)";
|
|
|
|
this.labelBuadrateWarning.Text = "※ After changing setting, Turn the power off and back on";
|
|
this.labelBuadrateWarning2.Text = "※ Do not change the value except engineer";
|
|
|
|
this.buttonSave.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engSaveDisable));
|
|
this.buttonSave.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engSaveDown));
|
|
this.buttonSave.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engSaveUp));
|
|
|
|
this.buttonBack.DisableImage = 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.E_LanguageID.Chinese:
|
|
#region Chinese
|
|
this.labelTitle.Text = "设备设置";
|
|
|
|
this.labelStaticLane.Text = "列";
|
|
this.labelStaticOrder.Text = "重量显示";
|
|
this.labelStaticIndividualNG.Text = "单独NG";
|
|
this.labelStaticLanguage.Text = "语言";
|
|
this.labelStaticSorter1Location.Text = "分类机1 地点";
|
|
this.labelStaticSorter2Location.Text = "分类机2 地点";
|
|
this.labelStaticSorter3Location.Text = "分类机3 地点";
|
|
this.labelStaticLogin.Text = "登錄";
|
|
this.labelStaticEmptyWeight.Text = "空重设置";
|
|
this.labelStaticMotor.Text = "马达";
|
|
this.labelStaticWeightLimitIgnoreCount.Text = "重量限制 - 忽略计数";
|
|
this.labelStaticDataStoragePeriod.Text = "数据保存期限";
|
|
this.labelStaticMonths.Text = "几个月";
|
|
|
|
this.radioButtonAcMotor.Text = "交流电机(AC)";
|
|
this.radioButtonServoMotor.Text = "伺服电机(Servo)";
|
|
|
|
this.radioButtonWeightViewForward.Text = "正向(1~12)";
|
|
this.radioButtonWeightViewReverse.Text = "反向(12~1)";
|
|
|
|
this.labelInfo1.Text = "※ 重量不良产品筛选";
|
|
this.labelInfo2.Text = "※ 正常产品 (选择数量未达标)";
|
|
this.labelInfo3.Text = "※ 采样筛选 (未使用时在筛选机2中使用)";
|
|
|
|
this.labelBuadrateWarning.Text = "※ 电源重启后,设置会自动更新";
|
|
this.labelBuadrateWarning2.Text = "※ 除了工程师之外,不要改变这个值";
|
|
|
|
this.buttonEachNG.DownImage = this.buttonLogin.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnOn_84X25));
|
|
this.buttonEachNG.UpImage = this.buttonLogin.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnOff_84X25));
|
|
|
|
this.buttonSave.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnSaveDisable));
|
|
this.buttonSave.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnSaveDown));
|
|
this.buttonSave.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnSaveUp));
|
|
|
|
this.buttonBack.DisableImage = 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.E_LanguageID.Czech:
|
|
#region Czech
|
|
this.labelTitle.Text = "Nastavení zařízení";
|
|
|
|
this.labelStaticLane.Text = "Řada";
|
|
this.labelStaticOrder.Text = "Zobrazení hmotnosti";
|
|
this.labelStaticIndividualNG.Text = "Individuální vyřazování";
|
|
this.labelStaticLanguage.Text = "Jazyk";
|
|
this.labelStaticSorter1Location.Text = "Vyřazovač1 umístění";
|
|
this.labelStaticSorter2Location.Text = "Vyřazovač2 umístění";
|
|
this.labelStaticSorter3Location.Text = "Vyřazovač3 umístění";
|
|
this.labelStaticLogin.Text = "Přihlásit se";
|
|
this.labelStaticEmptyWeight.Text = "Nastavení prázdné hmotnosti";
|
|
this.labelStaticMotor.Text = "Motor";
|
|
this.labelStaticWeightLimitIgnoreCount.Text = "hmotnostní limit - ignorovat počet";
|
|
|
|
this.labelInfo1.Text = "※ Třídění NG produktů podle hmotnosti";
|
|
this.labelInfo2.Text = "※ Normální produkt (vybrán pod množstvím)";
|
|
this.labelInfo3.Text = "※ Třídění vzorků (pokud není použito, použijte v třídiči 2)";
|
|
|
|
this.labelBuadrateWarning.Text = "※ Po změně nastavení vypněte a znovu zapněte napájení";
|
|
this.labelBuadrateWarning2.Text = "※ Nezměňujte hodnotu kromě inženýra";
|
|
|
|
this.buttonSave.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeSaveDisable));
|
|
this.buttonSave.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeSaveDown));
|
|
this.buttonSave.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeSaveUp));
|
|
|
|
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.E_LanguageID.German:
|
|
#region German
|
|
this.labelTitle.Text = "Vorrichtungeinstellung";
|
|
|
|
this.radioButtonWeightViewForward.Text = "Vorwärts(1~12)";
|
|
this.radioButtonWeightViewReverse.Text = "Rückwärts(1~12)";
|
|
|
|
this.labelStaticLane.Text = "Reihe";
|
|
this.labelStaticSorter1Location.Text = "Sortierer1 Standort";
|
|
this.labelStaticSorter2Location.Text = "Sortierer2 Standort";
|
|
this.labelStaticSorter3Location.Text = "Sortierer3 Standort";
|
|
this.labelStaticLogin.Text = "Einloggen";
|
|
this.labelStaticIndividualNG.Text = "Individuelle Aussortierung";
|
|
this.labelStaticOrder.Text = "Gewichtsanzeige";
|
|
this.labelStaticLanguage.Text = "Sprache";
|
|
this.labelStaticEmptyWeight.Text = "Leergewichtseinstellung";
|
|
this.labelStaticMotor.Text = "Motor";
|
|
this.labelStaticWeightLimitIgnoreCount.Text = "Gewichtsgrenze - Zählung ignorieren";
|
|
|
|
this.labelInfo1.Text = "※ Sortieren von NG-Produkten nach Gewicht";
|
|
this.labelInfo2.Text = "※ Normales Produkt (ausgewählt unter Menge)";
|
|
this.labelInfo3.Text = "※ Sampling Sorting (falls nicht verwendet, in Sortierer 2 verwenden)";
|
|
|
|
this.labelBuadrateWarning.Text = "※ Stellen Sie nach dem Einstellen des Servoantriebs sicher, Mit dem Hauptschalter aus- und einschalten";
|
|
this.labelBuadrateWarning2.Text = "※ Werte dürfen nur vom Servicetechniker des Herstellers geändert werden";
|
|
|
|
this.buttonSave.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerSaveDisable));
|
|
this.buttonSave.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerSaveDown));
|
|
this.buttonSave.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerSaveUp));
|
|
|
|
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.E_LanguageID.Japanese:
|
|
#region Japanese
|
|
this.labelTitle.Text = "装置設定";
|
|
|
|
this.labelStaticLane.Text = "レㅡン";
|
|
this.labelStaticOrder.Text = "オㅡダㅡ";
|
|
this.labelStaticIndividualNG.Text = "個別NG";
|
|
this.labelStaticLanguage.Text = "言語";
|
|
this.labelStaticSorter1Location.Text = "ソㅡタㅡ 1 の場所";
|
|
this.labelStaticSorter2Location.Text = "ソㅡタㅡ 2 の場所";
|
|
this.labelStaticSorter3Location.Text = "ソㅡタㅡ 3 の場所";
|
|
this.labelStaticLogin.Text = "ログイン";
|
|
this.labelStaticEmptyWeight.Text = "空重量セット";
|
|
this.labelStaticMotor.Text = "モㅡタㅡ";
|
|
this.labelStaticWeightLimitIgnoreCount.Text = "重量制限 - 無視数量";
|
|
|
|
this.radioButtonAcMotor.Text = "交流モㅡタㅡ";
|
|
this.radioButtonServoMotor.Text = "サㅡボモㅡタㅡ";
|
|
this.radioButtonWeightViewForward.Text = "順方向(1~12)";
|
|
this.radioButtonWeightViewReverse.Text = "逆方向(12~1)";
|
|
|
|
this.labelInfo1.Text = "※ 重量NG製品選別";
|
|
this.labelInfo2.Text = "※ 正常製品数量未達選別";
|
|
this.labelInfo3.Text = "※ サンプリング選別 (未使用時選別機2を使用)";
|
|
|
|
this.labelBuadrateWarning.Text = "※ 設定変更後は電源を入れ直してください";
|
|
this.labelBuadrateWarning2.Text = "※ エンジニア以外は値を変更しないこと";
|
|
|
|
this.buttonSave.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnSaveDisable));
|
|
this.buttonSave.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnSaveDown));
|
|
this.buttonSave.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnSaveUp));
|
|
|
|
this.buttonBack.DisableImage = 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));
|
|
#endregion
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
private void InitializeControl()
|
|
{
|
|
string value = "";
|
|
|
|
// 장비 열
|
|
this.comboBoxEquipmentColumn.Items.Clear();
|
|
this.comboBoxEquipmentColumn.Items.Add(2);
|
|
this.comboBoxEquipmentColumn.Items.Add(3);
|
|
this.comboBoxEquipmentColumn.Items.Add(4);
|
|
this.comboBoxEquipmentColumn.Items.Add(5);
|
|
this.comboBoxEquipmentColumn.Items.Add(6);
|
|
this.comboBoxEquipmentColumn.Items.Add(7);
|
|
this.comboBoxEquipmentColumn.Items.Add(8);
|
|
this.comboBoxEquipmentColumn.Items.Add(10);
|
|
this.comboBoxEquipmentColumn.Items.Add(12);
|
|
this.comboBoxEquipmentColumn.Items.Add(15);
|
|
this.comboBoxEquipmentColumn.Items.Add(16);
|
|
this.comboBoxEquipmentColumn.SelectedItem = this.ParentForm.SystemConfig.EquipmentColumns;
|
|
|
|
// 선별기1 위치
|
|
value = this.ParentForm.SystemConfig.Sorter1Location.ToString();
|
|
if (this.labelSorter1Location.Text != value)
|
|
this.labelSorter1Location.Text = value;
|
|
|
|
// 선별기2 위치
|
|
value = this.ParentForm.SystemConfig.Sorter2Location.ToString();
|
|
if (this.labelSorter2Location.Text != value)
|
|
this.labelSorter2Location.Text = value;
|
|
|
|
// 선별기3 위치
|
|
value = this.ParentForm.SystemConfig.Sorter3Location.ToString();
|
|
if (this.labelSorter3Location.Text != value)
|
|
this.labelSorter3Location.Text = value;
|
|
|
|
// Empty중량설정
|
|
if (this.ParentForm.SystemConfig.EmptyWeight == "")
|
|
value = "0";
|
|
else
|
|
value = this.ParentForm.SystemConfig.EmptyWeight;
|
|
|
|
this.labelEmptyWeight.Text = Helper.StringToDecimalPlaces(value, this.ParentForm.SystemConfig.DecimalPlaces);
|
|
|
|
// Weight Limit 무시수량
|
|
value = this.ParentForm.SystemConfig.WeightLimitIgnoreCount.ToString();
|
|
if (this.labelWeightLimitIgnoreCount.Text != value)
|
|
this.labelWeightLimitIgnoreCount.Text = value;
|
|
|
|
// 로그인
|
|
if (this.ParentForm.SystemConfig.IsLogin == true)
|
|
this.buttonLogin.ButtonDown();
|
|
else
|
|
this.buttonLogin.ButtonUp();
|
|
|
|
// 개별 NG
|
|
if (this.ParentForm.SystemConfig.IsEachNG == true)
|
|
this.buttonEachNG.ButtonDown();
|
|
else
|
|
this.buttonEachNG.ButtonUp();
|
|
|
|
// 모터
|
|
if (this.ParentForm.SystemConfig.MotorSelect == 0)
|
|
this.radioButtonAcMotor.Checked = true;
|
|
else
|
|
this.radioButtonServoMotor.Checked = true;
|
|
|
|
// 중량표시
|
|
if (this.ParentForm.SystemConfig.IsWeightViewForward == true)
|
|
this.radioButtonWeightViewForward.Checked = true;
|
|
else
|
|
this.radioButtonWeightViewReverse.Checked = true;
|
|
|
|
// 언어
|
|
if (this.ParentForm.SystemConfig.Language == DataStore.E_LanguageID.Chinese)
|
|
this.radioButtonLanguageChinese.Checked = true;
|
|
else if (this.ParentForm.SystemConfig.Language == DataStore.E_LanguageID.Czech)
|
|
this.radioButtonLanguageCzech.Checked = true;
|
|
else if (this.ParentForm.SystemConfig.Language == DataStore.E_LanguageID.English)
|
|
this.radioButtonLanguageEnglish.Checked = true;
|
|
else if (this.ParentForm.SystemConfig.Language == DataStore.E_LanguageID.Korean)
|
|
this.radioButtonLanguageKorean.Checked = true;
|
|
else if (this.ParentForm.SystemConfig.Language == DataStore.E_LanguageID.German)
|
|
this.radioButtonLanguageGerman.Checked = true;
|
|
else if (this.ParentForm.SystemConfig.Language == DataStore.E_LanguageID.Japanese)
|
|
this.radioButtonLanguageJap.Checked = true;
|
|
else
|
|
this.radioButtonLanguageKorean.Checked = true;
|
|
|
|
// serial port
|
|
if (this.ParentForm.SystemConfig.ComPort == "COM1")
|
|
this.radioButtonCOM1.Checked = true;
|
|
else
|
|
this.radioButtonCOM2.Checked = true;
|
|
|
|
// DataStoragePeriod
|
|
value = this.ParentForm.SystemConfig.StoragePeriod.ToString();
|
|
if (this.labelDataStoragePeriod.Text != value)
|
|
this.labelDataStoragePeriod.Text = value;
|
|
|
|
this.buttonSave.Visible = false;
|
|
|
|
// Control Visible false
|
|
// COM PORT
|
|
this.smartLabel1.Visible = false;
|
|
this.panel3.Visible = false;
|
|
// MOTOR
|
|
this.labelStaticMotor.Visible = false;
|
|
this.panel1.Visible = false;
|
|
}
|
|
|
|
public void DisplayRefresh()
|
|
{
|
|
this.InitializeControl();
|
|
|
|
this.ParentForm.SystemConfig.CurrentForm = DataStore.FormStore.FormEquipmentSetting;
|
|
}
|
|
#endregion
|
|
|
|
#region Override Member
|
|
protected override void OnLoad(EventArgs e)
|
|
{
|
|
base.OnLoad(e);
|
|
|
|
this.InitializeDesign();
|
|
}
|
|
#endregion
|
|
|
|
#region Event Handler
|
|
private void control_Click(object sender, EventArgs e)
|
|
{
|
|
if (this.buttonSave.Visible != true)
|
|
this.buttonSave.Visible = true;
|
|
}
|
|
|
|
private void buttonSave_Click(object sender, EventArgs e)
|
|
{
|
|
// 장비 열
|
|
if (this.comboBoxEquipmentColumn.SelectedIndex == 0)
|
|
this.ParentForm.SystemConfig.EquipmentColumns = 2;
|
|
else if (this.comboBoxEquipmentColumn.SelectedIndex == 1)
|
|
this.ParentForm.SystemConfig.EquipmentColumns = 3;
|
|
else if (this.comboBoxEquipmentColumn.SelectedIndex == 2)
|
|
this.ParentForm.SystemConfig.EquipmentColumns = 4;
|
|
else if (this.comboBoxEquipmentColumn.SelectedIndex == 3)
|
|
this.ParentForm.SystemConfig.EquipmentColumns = 5;
|
|
else if (this.comboBoxEquipmentColumn.SelectedIndex == 4)
|
|
this.ParentForm.SystemConfig.EquipmentColumns = 6;
|
|
else if (this.comboBoxEquipmentColumn.SelectedIndex == 5)
|
|
this.ParentForm.SystemConfig.EquipmentColumns = 7;
|
|
else if (this.comboBoxEquipmentColumn.SelectedIndex == 6)
|
|
this.ParentForm.SystemConfig.EquipmentColumns = 8;
|
|
else if (this.comboBoxEquipmentColumn.SelectedIndex == 7)
|
|
this.ParentForm.SystemConfig.EquipmentColumns = 10;
|
|
else if (this.comboBoxEquipmentColumn.SelectedIndex == 8)
|
|
this.ParentForm.SystemConfig.EquipmentColumns = 12;
|
|
else if (this.comboBoxEquipmentColumn.SelectedIndex == 9)
|
|
this.ParentForm.SystemConfig.EquipmentColumns = 15;
|
|
else
|
|
this.ParentForm.SystemConfig.EquipmentColumns = 16;
|
|
|
|
// 선별기1 위치
|
|
this.ParentForm.SystemConfig.Sorter1Location = int.Parse(this.labelSorter1Location.Text.ToString());
|
|
|
|
// 선별기2 위치
|
|
this.ParentForm.SystemConfig.Sorter2Location = int.Parse(this.labelSorter2Location.Text.ToString());
|
|
|
|
// 선별기3 위치
|
|
this.ParentForm.SystemConfig.Sorter3Location = int.Parse(this.labelSorter3Location.Text.ToString());
|
|
|
|
// Empty중량설정
|
|
this.ParentForm.SystemConfig.EmptyWeight = this.labelEmptyWeight.Text.Replace(".", "");
|
|
|
|
// Weight Limit 무시수량
|
|
this.ParentForm.SystemConfig.WeightLimitIgnoreCount = int.Parse(this.labelWeightLimitIgnoreCount.Text.ToString());
|
|
|
|
// 로그인
|
|
if (this.ParentForm.SystemConfig.IsOptPart11 == true)
|
|
this.ParentForm.SystemConfig.IsLogin = true;
|
|
else
|
|
{
|
|
if (this.buttonLogin.ButtonStatus == SmartX.SmartButton.BUTSTATUS.DOWN)
|
|
this.ParentForm.SystemConfig.IsLogin = true;
|
|
else
|
|
this.ParentForm.SystemConfig.IsLogin = false;
|
|
}
|
|
|
|
// 개별 NG
|
|
if (this.buttonEachNG.ButtonStatus == SmartX.SmartButton.BUTSTATUS.DOWN)
|
|
this.ParentForm.SystemConfig.IsEachNG = true;
|
|
else
|
|
this.ParentForm.SystemConfig.IsEachNG = false;
|
|
|
|
// 모터
|
|
//if (this.radioButtonAcMotor.Checked == true)
|
|
// this.ParentForm.SystemConfig.MotorSelect = 0;
|
|
//else
|
|
// this.ParentForm.SystemConfig.MotorSelect = 1;
|
|
this.ParentForm.SystemConfig.MotorSelect = 1;
|
|
|
|
// 중량표시
|
|
if (this.radioButtonWeightViewForward.Checked == true)
|
|
this.ParentForm.SystemConfig.IsWeightViewForward = true;
|
|
else
|
|
this.ParentForm.SystemConfig.IsWeightViewForward = false;
|
|
|
|
// 언어
|
|
if (this.radioButtonLanguageKorean.Checked == true)
|
|
this.ParentForm.SystemConfig.Language = DataStore.E_LanguageID.Korean;
|
|
else if (this.radioButtonLanguageEnglish.Checked == true)
|
|
this.ParentForm.SystemConfig.Language = DataStore.E_LanguageID.English;
|
|
else if (this.radioButtonLanguageChinese.Checked == true)
|
|
this.ParentForm.SystemConfig.Language = DataStore.E_LanguageID.Chinese;
|
|
else if (this.radioButtonLanguageCzech.Checked == true)
|
|
this.ParentForm.SystemConfig.Language = DataStore.E_LanguageID.Czech;
|
|
else if (this.radioButtonLanguageGerman.Checked == true)
|
|
this.ParentForm.SystemConfig.Language = DataStore.E_LanguageID.German;
|
|
else if (this.radioButtonLanguageJap.Checked == true)
|
|
this.ParentForm.SystemConfig.Language = DataStore.E_LanguageID.Japanese;
|
|
else
|
|
this.ParentForm.SystemConfig.Language = DataStore.E_LanguageID.Korean;
|
|
|
|
// 데이터 저장기간
|
|
this.ParentForm.SystemConfig.StoragePeriod = int.Parse(this.labelDataStoragePeriod.Text);
|
|
|
|
// COM Port
|
|
//if (this.radioButtonCOM1.Checked == true)
|
|
// this.ParentForm.SystemConfig.ComPort = "COM1";
|
|
//else
|
|
// this.ParentForm.SystemConfig.ComPort = "COM2";
|
|
this.ParentForm.SystemConfig.ComPort = "COM2";
|
|
|
|
// SystemConfig 파일 저장
|
|
this.ParentForm.SaveSystemConfigurationFile1(this.ParentForm.SystemConfig);
|
|
this.ParentForm.SaveSystemConfigurationFile2(this.ParentForm.SystemConfig);
|
|
|
|
DialogFormMessage myMsg = new DialogFormMessage(18, this.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
|
|
this.groupBoxSpecialMenu.Enabled = false;
|
|
this.buttonSave.Enabled = false;
|
|
this.buttonBack.Visible = false;
|
|
}
|
|
private void buttonBack_Click(object sender, EventArgs e)
|
|
{
|
|
this.ParentForm.ChildFormMenu.DisplayRefresh();
|
|
((FormMain)(Owner)).smartForm.Show((int)DataStore.FormStore.FormMenu);
|
|
}
|
|
private void buttonFunction_Click(object sender, EventArgs e)
|
|
{
|
|
// COM PORT
|
|
this.smartLabel1.Visible = true;
|
|
this.panel3.Visible = true;
|
|
// MOTOR
|
|
this.labelStaticMotor.Visible = true;
|
|
this.panel1.Visible = true;
|
|
}
|
|
|
|
private void labelSorter1Location_Click(object sender, EventArgs e)
|
|
{
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelSorter1Location.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 1 || myKeyPad.doubleValue > 9999 || myKeyPad.StringValue == this.labelSorter2Location.Text ||
|
|
myKeyPad.StringValue == this.labelSorter3Location.Text)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelSorter1Location.Text = myKeyPad.StringValue;
|
|
|
|
if (this.buttonSave.Visible != true)
|
|
this.buttonSave.Visible = true;
|
|
}
|
|
}
|
|
}
|
|
private void labelSorter2Location_Click(object sender, EventArgs e)
|
|
{
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelSorter2Location.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.StringValue == this.labelSorter1Location.Text)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelSorter2Location.Text = myKeyPad.StringValue;
|
|
|
|
if (this.buttonSave.Visible != true)
|
|
this.buttonSave.Visible = true;
|
|
}
|
|
}
|
|
}
|
|
private void labelSorter3Location_Click(object sender, EventArgs e)
|
|
{
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelSorter3Location.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.StringValue == this.labelSorter1Location.Text)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelSorter3Location.Text = myKeyPad.StringValue;
|
|
|
|
if (this.buttonSave.Visible != true)
|
|
this.buttonSave.Visible = true;
|
|
}
|
|
}
|
|
}
|
|
private void labelSetEmptyWeight_Click(object sender, EventArgs e)
|
|
{
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelEmptyWeight.Text, 4, this.ParentForm.SystemConfig.DecimalPlaces, false, this.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue > 9999)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.ParentForm.SystemConfig.EmptyWeight = myKeyPad.StringValue.Replace(".", "");
|
|
this.labelEmptyWeight.Text = myKeyPad.StringValue;
|
|
|
|
if (this.buttonSave.Visible != true)
|
|
this.buttonSave.Visible = true;
|
|
}
|
|
}
|
|
}
|
|
private void labelWeightLimitIgnoreCount_Click(object sender, EventArgs e)
|
|
{
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelWeightLimitIgnoreCount.Text, 2, 0, false, this.ParentForm.SystemConfig.Language);
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 99)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelWeightLimitIgnoreCount.Text = myKeyPad.StringValue;
|
|
|
|
if (this.buttonSave.Visible != true)
|
|
this.buttonSave.Visible = true;
|
|
}
|
|
}
|
|
}
|
|
private void labelDataStoragePeriod_Click(object sender, EventArgs e)
|
|
{
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDataStoragePeriod.Text, 2, 0, false, this.ParentForm.SystemConfig.Language);
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
{
|
|
if (myKeyPad.doubleValue < 1 || myKeyPad.doubleValue > 99)
|
|
{
|
|
// 입력범위를 확인하세요
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
|
|
myMsg.ShowDialog();
|
|
}
|
|
else
|
|
{
|
|
this.labelDataStoragePeriod.Text = myKeyPad.StringValue;
|
|
|
|
if (this.buttonSave.Visible != true)
|
|
this.buttonSave.Visible = true;
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
} |