INT63DC_2C/INT63DC_2C/DialogForms/DialogFormMessage.cs

779 lines
32 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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.Forms;
namespace INT63DC_2C.DialogForms
{
public partial class DialogFormMessage : Form
{
#region Field
private FormMain m_ParentForm;
#endregion
#region Constructor
public DialogFormMessage()
{
InitializeComponent();
}
public DialogFormMessage(string str, DataStore.LanguageID language)
{
InitializeComponent();
this.labelErrorCode.Text = "";
this.labelMessage1.Text = "";
this.labelMessage2.Text = "";
if (language == DataStore.LanguageID.Korean)
{
this.labelErrorCode.Text = "Notice";
this.labelMessage1.Text = str + "개의 파일이 백업되었습니다.";
}
else if (language == DataStore.LanguageID.English)
{
this.labelErrorCode.Text = "Notice";
this.labelMessage1.Text = str + " files are backed up";
}
else if (language == DataStore.LanguageID.Chinese)
{
this.buttonOK.Text = "好";
this.labelErrorCode.Text = "通知";
this.labelMessage1.Text = str + " 个文件已备份";
}
else if (language == DataStore.LanguageID.Czech)
{
this.labelErrorCode.Text = "Upozornění";
this.labelMessage1.Text = "Těchto " + str + " soubory byly zálohovány.";
}
else if (language == DataStore.LanguageID.German)
{
this.buttonOK.Text = "Bestätigen";
this.labelErrorCode.Text = "Meldung";
this.labelMessage1.Text = str + " Dateien wurden gesichert";
}
else
{
}
}
public DialogFormMessage(int code, DataStore.LanguageID language)
{
InitializeComponent();
this.labelErrorCode.Text = "";
this.labelMessage1.Text = "";
this.labelMessage2.Text = "";
if (language == DataStore.LanguageID.Korean)
{
#region 한글
switch (code)
{
case 1:
this.labelErrorCode.Text = "Error 01";
this.labelMessage1.Text = "입력범위를 확인하세요.";
break;
case 2:
this.labelErrorCode.Text = "Error 02";
this.labelMessage1.Text = "최신 프로그램입니다.";
break;
case 3:
this.labelErrorCode.Text = "Error 03";
this.labelMessage1.Text = "연속으로 불량이 발생했습니다";
break;
case 4:
this.labelErrorCode.Text = "Error 04";
this.labelMessage1.Text = "백업할 파일이 없습니다";
break;
case 5:
this.labelErrorCode.Text = "Error 05";
this.labelMessage1.Text = "USB메모리가 장착되지 않았습니다";
break;
case 6:
this.labelErrorCode.Text = "Error 06";
this.labelMessage1.Text = "제조사에 문의하세요";
break;
case 7:
this.labelErrorCode.Text = "Error 07";
this.labelMessage1.Text = "USB에 업데이트 할 파일이 없습니다";
break;
case 8:
this.labelErrorCode.Text = "Error 08";
this.labelMessage1.Text = "업데이트 할 실행파일 개수가 많습니다";
break;
case 9:
this.labelErrorCode.Text = "Error 09";
this.labelMessage1.Text = "USB에 업데이트 폴더가 없습니다";
break;
case 10:
this.labelErrorCode.Text = "Error 10";
this.labelMessage1.Text = "해당 메모리가 장착되지 않았습니다";
break;
case 11:
this.labelErrorCode.Text = "Info 11";
this.labelMessage1.Text = "중량 Limit 설정 확인하세요!";
break;
case 12:
break;
case 13:
break;
case 14:
break;
case 15:
break;
case 16:
break;
case 17:
this.labelErrorCode.Text = "Error 17";
this.labelMessage1.Text = "초기화를 실행해 주세요";
break;
case 18:
this.labelErrorCode.Text = "Info 18";
this.labelMessage1.Text = "전원을 끄고 다시 켜주세요";
break;
case 19:
break;
case 20:
break;
case 23:
this.labelErrorCode.Text = "Error 23";
this.labelMessage1.Text = "통신 연결 상태를 확인하세요";
this.labelMessage2.Text = "";
break;
case 31:
this.labelErrorCode.Text = "Error 31";
this.labelMessage1.Text = "유저 파일 에러";
this.labelMessage2.Text = "";
break;
case 32:
this.labelErrorCode.Text = "Error 32";
this.labelMessage1.Text = "ID 확인하세요";
this.labelMessage2.Text = "";
break;
case 33:
this.labelErrorCode.Text = "Error 33";
this.labelMessage1.Text = "Password 확인하세요";
this.labelMessage2.Text = "";
break;
case 34:
this.labelErrorCode.Text = "Error 34";
this.labelMessage1.Text = "동일한 ID가 있습니다!";
this.labelMessage2.Text = "";
break;
case 35:
this.labelErrorCode.Text = "Error 35";
this.labelMessage1.Text = "4~10자 입력 하세요!";
this.labelMessage2.Text = "";
break;
default:
this.labelErrorCode.Text = "Error 99";
this.labelMessage1.Text = "제조사에 문의하세요";
break;
}
#endregion
}
else if (language == DataStore.LanguageID.English)
{
#region 영문
switch (code)
{
case 1:
this.labelErrorCode.Text = "Error 01";
this.labelMessage1.Text = "Confirm input range";
break;
case 2:
this.labelErrorCode.Text = "Error 02";
this.labelMessage1.Text = "Application is the lastest";
break;
case 3:
this.labelErrorCode.Text = "Error 03";
this.labelMessage1.Text = "Detect Continuous N.G !!";
break;
case 4:
this.labelErrorCode.Text = "Error 04";
this.labelMessage1.Text = "There are no Backup files";
break;
case 5:
this.labelErrorCode.Text = "Error 05";
this.labelMessage1.Text = "No USB Memory";
break;
case 6:
this.labelErrorCode.Text = "Error 06";
this.labelMessage1.Text = "Please contact a manufacturer";
break;
case 7:
this.labelErrorCode.Text = "Error 07";
this.labelMessage1.Text = "There are no update files in USB";
break;
case 8:
this.labelErrorCode.Text = "Error 08";
this.labelMessage1.Text = "Too much file for update";
break;
case 9:
this.labelErrorCode.Text = "Error 09";
this.labelMessage1.Text = "There is no folder has update files in USB";
break;
case 10:
this.labelErrorCode.Text = "Error 10";
this.labelMessage1.Text = "There is no MEMORY";
break;
case 11:
this.labelErrorCode.Text = "Info 11";
this.labelMessage1.Text = "Confirm input range (Weight Limit)";
break;
case 12:
break;
case 13:
break;
case 14:
break;
case 15:
break;
case 16:
break;
case 17:
this.labelErrorCode.Text = "Error 17";
this.labelMessage1.Text = "Please run the initialization";
break;
case 18:
this.labelErrorCode.Text = "Error 18";
this.labelMessage1.Text = "Turn the power off and back on.";
break;
case 19:
break;
case 20:
break;
case 23:
this.labelErrorCode.Text = "Error 23";
this.labelMessage1.Text = "Check the communication connection status";
this.labelMessage2.Text = "";
break;
case 31:
this.labelErrorCode.Text = "Error 31";
this.labelMessage1.Text = "User files error";
this.labelMessage2.Text = "";
break;
case 32:
this.labelErrorCode.Text = "Error 32";
this.labelMessage1.Text = "Check the ID";
this.labelMessage2.Text = "";
break;
case 33:
this.labelErrorCode.Text = "Error 33";
this.labelMessage1.Text = "Check the password";
this.labelMessage2.Text = "";
break;
case 34:
this.labelErrorCode.Text = "Error 34";
this.labelMessage1.Text = "The system already has the same ID";
this.labelMessage2.Text = "";
break;
case 35:
this.labelErrorCode.Text = "Error 35";
this.labelMessage1.Text = "Please enter 4-10 characters";
this.labelMessage2.Text = "";
break;
default:
this.labelErrorCode.Text = "Error 99";
this.labelMessage1.Text = "Please contact a manufacturer";
break;
}
#endregion
}
else if (language == DataStore.LanguageID.Chinese)
{
#region 중문
this.buttonOK.Text = "好";
switch (code)
{
case 1:
this.labelErrorCode.Text = "錯誤 01";
this.labelMessage1.Text = "确认输入范围";
break;
case 2:
this.labelErrorCode.Text = "錯誤 02";
this.labelMessage1.Text = "最近应用";
break;
case 3:
this.labelErrorCode.Text = "錯誤 03";
this.labelMessage1.Text = "测试连续NG";
break;
case 4:
this.labelErrorCode.Text = "錯誤 04";
this.labelMessage1.Text = "无支持文件";
break;
case 5:
this.labelErrorCode.Text = "錯誤 05";
this.labelMessage1.Text = "无USB存储卡";
break;
case 6:
this.labelErrorCode.Text = "錯誤 06";
this.labelMessage1.Text = "请联系厂商";
break;
case 7:
this.labelErrorCode.Text = "錯誤 07";
this.labelMessage1.Text = "USB无更新文件";
break;
case 8:
this.labelErrorCode.Text = "錯誤 08";
this.labelMessage1.Text = "太多文件需更新";
break;
case 9:
this.labelErrorCode.Text = "錯誤 09";
this.labelMessage1.Text = "USB没有文件夹需要更新文件다";
break;
case 10:
this.labelErrorCode.Text = "錯誤 10";
this.labelMessage1.Text = "无存储";
break;
case 11:
break;
case 12:
break;
case 13:
break;
case 14:
break;
case 15:
break;
case 16:
break;
case 17:
this.labelErrorCode.Text = "錯誤 17";
this.labelMessage1.Text = "运行初始化";
break;
case 18:
this.labelErrorCode.Text = "錯誤 18";
this.labelMessage1.Text = "关掉电源,然后在打开电源";
break;
case 19:
break;
case 20:
break;
case 23:
this.labelErrorCode.Text = "錯誤 23";
this.labelMessage1.Text = "检查通讯连接状态";
this.labelMessage2.Text = "";
break;
case 31:
this.labelErrorCode.Text = "錯誤 31";
this.labelMessage1.Text = "用户文件错误";
this.labelMessage2.Text = "";
break;
case 32:
this.labelErrorCode.Text = "錯誤 32";
this.labelMessage1.Text = "检查身份证";
this.labelMessage2.Text = "";
break;
case 33:
this.labelErrorCode.Text = "錯誤 33";
this.labelMessage1.Text = "检查密码";
this.labelMessage2.Text = "";
break;
case 34:
this.labelErrorCode.Text = "錯誤 34";
this.labelMessage1.Text = "系统已具有相同的ID";
this.labelMessage2.Text = "";
break;
case 35:
this.labelErrorCode.Text = "錯誤 35";
this.labelMessage1.Text = "请输入4-10个字符";
this.labelMessage2.Text = "";
break;
default:
this.labelErrorCode.Text = "錯誤 99";
this.labelMessage1.Text = "请联系厂商";
break;
}
#endregion
}
else if (language == DataStore.LanguageID.Czech)
{
#region 체코어
switch (code)
{
case 1:
this.labelErrorCode.Text = "Chyba 01";
this.labelMessage1.Text = "Potvrďte zadanou hodnotu";
this.labelMessage2.Text = "";
break;
case 2:
this.labelErrorCode.Text = "Chyba 02";
this.labelMessage1.Text = "Software je aktuální";
this.labelMessage2.Text = "";
break;
case 3:
this.labelErrorCode.Text = "Chyba 03";
this.labelMessage1.Text = "Detekovat neustále chybějící produkt";
this.labelMessage2.Text = "";
break;
case 4:
this.labelErrorCode.Text = "Chyba 04";
this.labelMessage1.Text = "Chybí zálohové soubory";
this.labelMessage2.Text = "";
break;
case 5:
this.labelErrorCode.Text = "Chyba 05";
this.labelMessage1.Text = "USB nepřipojeno";
this.labelMessage2.Text = "";
break;
case 6:
this.labelErrorCode.Text = "Chyba 06";
this.labelMessage1.Text = "Kontaktujte výrobce";
this.labelMessage2.Text = "";
break;
case 7:
this.labelErrorCode.Text = "Chyba 07";
this.labelMessage1.Text = "Na USB chybí aktualizační soubory";
this.labelMessage2.Text = "";
break;
case 8:
this.labelErrorCode.Text = "Chyba 08";
this.labelMessage1.Text = "Příliš mnoho souboru k aktualizaci";
this.labelMessage2.Text = "";
break;
case 9:
this.labelErrorCode.Text = "Chyba 09";
this.labelMessage1.Text = "Na USB disku není žádná složka s aktualizačními soubory.";
this.labelMessage2.Text = "";
break;
case 10:
this.labelErrorCode.Text = "Chyba 10";
this.labelMessage1.Text = "Chybí paměť";
this.labelMessage2.Text = "";
break;
case 11:
break;
case 12:
break;
case 13:
break;
case 14:
break;
case 15:
break;
case 16:
break;
case 17:
this.labelErrorCode.Text = "Chybě 17";
this.labelMessage1.Text = "Prosím proveďte spuštění";
this.labelMessage2.Text = "";
break;
case 18:
this.labelErrorCode.Text = "Chybě 18";
this.labelMessage1.Text = "Vypněte a zapněte hlavním vypínačem";
this.labelMessage2.Text = "";
break;
case 19:
break;
case 20:
break;
case 23:
this.labelErrorCode.Text = "Chybě 23";
this.labelMessage1.Text = "Zkontrolujte stav komunikačního připojení";
this.labelMessage2.Text = "";
break;
case 31:
this.labelErrorCode.Text = "Chybě 31";
this.labelMessage1.Text = "Chyba souborů uživatele";
this.labelMessage2.Text = "";
break;
case 32:
this.labelErrorCode.Text = "Chybě 32";
this.labelMessage1.Text = "Zkontrolujte ID";
this.labelMessage2.Text = "";
break;
case 33:
this.labelErrorCode.Text = "Chybě 33";
this.labelMessage1.Text = "Zkontrolujte heslo";
this.labelMessage2.Text = "";
break;
case 34:
this.labelErrorCode.Text = "Chybě 34";
this.labelMessage1.Text = "Systém již má stejné ID";
this.labelMessage2.Text = "";
break;
case 35:
this.labelErrorCode.Text = "Chybě 35";
this.labelMessage1.Text = "Zadejte 410 znaků";
this.labelMessage2.Text = "";
break;
default:
this.labelErrorCode.Text = "Chybě 99";
this.labelMessage1.Text = "Kontaktujte výrobce";
this.labelMessage2.Text = "";
break;
}
#endregion
}
else if (language == DataStore.LanguageID.German)
{
#region 독일어
switch (code)
{
case 1:
this.labelErrorCode.Text = "Fehler 01";
this.labelMessage1.Text = "Den eingegebenen Wert bestätigen";
break;
case 2:
this.labelErrorCode.Text = "Fehler 02";
this.labelMessage1.Text = "Software ist up-to-date";
break;
case 3:
this.labelErrorCode.Text = "Fehler 03";
this.labelMessage1.Text = "Fehlendes Produkt dauerhaft detektieren";
break;
case 4:
this.labelErrorCode.Text = "Fehler 04";
this.labelMessage1.Text = "Sicherungsdateien fehlen";
break;
case 5:
this.labelErrorCode.Text = "Fehler 05";
this.labelMessage1.Text = "USB nicht angeschlossen";
break;
case 6:
this.labelErrorCode.Text = "Fehler 06";
this.labelMessage1.Text = "Hersteller kontaktieren";
break;
case 7:
this.labelErrorCode.Text = "Fehler 07";
this.labelMessage1.Text = "Auf USB fehlen Aktualisierungsdateien";
break;
case 8:
this.labelErrorCode.Text = "Fehler 08";
this.labelMessage1.Text = "Zu viele ausführbare Dateien";
this.labelMessage2.Text = "zum Aktualisieren";
break;
case 9:
this.labelErrorCode.Text = "Fehler 09";
this.labelMessage1.Text = "Ordner mit den Aktualisierungsdateien";
this.labelMessage2.Text = "fehlt auf dem USB";
break;
case 10:
this.labelErrorCode.Text = "Fehler 10";
this.labelMessage1.Text = "Speicher/ Datenspeicher fehlt";
break;
case 11:
break;
case 12:
break;
case 13:
break;
case 14:
break;
case 15:
break;
case 16:
break;
case 17:
this.labelErrorCode.Text = "Fehler 17";
this.labelMessage1.Text = "Bitte starten";
break;
case 18:
this.labelErrorCode.Text = "Fehler 18";
this.labelMessage1.Text = "Mit dem Hauptschalter";
this.labelMessage2.Text = "aus- und einschalten";
break;
case 19:
break;
case 20:
break;
case 23:
this.labelErrorCode.Text = "Fehler 23";
this.labelMessage1.Text = "Überprüfen Sie den Status der";
this.labelMessage2.Text = "Kommunikationsverbindung";
break;
case 31:
this.labelErrorCode.Text = "Fehler 31";
this.labelMessage1.Text = "Fehler der Benutzerdateien";
this.labelMessage2.Text = "";
break;
case 32:
this.labelErrorCode.Text = "Fehler 32";
this.labelMessage1.Text = "Überprüfen Sie die ID";
this.labelMessage2.Text = "";
break;
case 33:
this.labelErrorCode.Text = "Fehler 33";
this.labelMessage1.Text = "Überprüfen Sie das Passwort";
this.labelMessage2.Text = "";
break;
case 34:
this.labelErrorCode.Text = "Fehler 34";
this.labelMessage1.Text = "Das System hat bereits die gleiche ID";
this.labelMessage2.Text = "";
break;
case 35:
this.labelErrorCode.Text = "Fehler 35";
this.labelMessage1.Text = "Bitte geben Sie 4-10 Zeichen ein";
this.labelMessage2.Text = "";
break;
default:
this.labelErrorCode.Text = "Fehler 99";
this.labelMessage1.Text = "Hersteller kontaktieren";
break;
}
#endregion
}
else
{
}
}
public DialogFormMessage(int code, DataStore.LanguageID language, FormMain parent)
{
InitializeComponent();
this.ParentForm = parent;
this.labelErrorCode.Text = "";
this.labelMessage1.Text = "";
this.labelMessage2.Text = "";
if (language == DataStore.LanguageID.Korean)
{
#region 한글
switch (code)
{
case 11:
this.labelErrorCode.Text = "Error 11";
this.labelMessage1.Text = "입력센서 에러에 의해 정지하였습니다.";
break;
default:
this.labelErrorCode.Text = "Error 99";
this.labelMessage1.Text = "제조사에 문의하세요";
break;
}
#endregion
}
else if (language == DataStore.LanguageID.English)
{
#region 영문
switch (code)
{
case 11:
this.labelErrorCode.Text = "Error 11";
this.labelMessage1.Text = "Emergency stop due to entry sensor error";
break;
default:
this.labelErrorCode.Text = "Error 99";
this.labelMessage1.Text = "Please contact a manufacturer";
break;
}
#endregion
}
else if (language == DataStore.LanguageID.Chinese)
{
#region 중문
this.buttonOK.Text = "好";
switch (code)
{
case 11:
this.labelErrorCode.Text = "錯誤 11";
this.labelMessage1.Text = "由于进入传感器错误导致紧急停止";
break;
default:
this.labelErrorCode.Text = "錯誤 99";
this.labelMessage1.Text = "请联系厂商";
break;
}
#endregion
}
else if (language == DataStore.LanguageID.Czech)
{
#region 체코어
switch (code)
{
case 11:
this.labelErrorCode.Text = "Chybě 11";
this.labelMessage1.Text = "Nouzové zastavení z důvodu chyby snímače vstupu";
break;
default:
this.labelErrorCode.Text = "Chybě 99";
this.labelMessage1.Text = "Kontaktujte výrobce";
break;
}
#endregion
}
else if (language == DataStore.LanguageID.German)
{
#region 독일어
switch (code)
{
case 11:
this.labelErrorCode.Text = "Fehler 11";
this.labelMessage1.Text = "Notstopp aufgrund eines Eintrittssensorfehlers";
break;
default:
this.labelErrorCode.Text = "Fehler 99";
this.labelMessage1.Text = "Hersteller kontaktieren";
break;
}
#endregion
}
else
{
}
}
#endregion
#region Property
public FormMain ParentForm
{
get { return this.m_ParentForm; }
set { this.m_ParentForm = value; }
}
#endregion
#region Method
private void InitializeContnrol()
{
int x = 0, y = 0;
x = Screen.PrimaryScreen.Bounds.Width / 2 - this.Size.Width / 2;
y = Screen.PrimaryScreen.Bounds.Height / 2 - this.Size.Height / 2;
this.Location = new Point(x, y);
this.Size = new Size(450, 165);
}
#endregion
#region Override Member
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
this.InitializeContnrol();
}
#endregion
#region Event Handler
private void buttonOK_Click(object sender, EventArgs e)
{
if (this.ParentForm != null)
{
if (this.ParentForm.smartThread.State == SmartX.SmartThread.ThreadState.Running)
this.ParentForm.smartThread.End();
}
this.DialogResult = DialogResult.OK;
this.Close();
}
#endregion
}
}