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;

namespace ITC81DB_2.DialogForms
{
    public partial class DialogFormMessage : Form
    {
        #region Field

        #endregion

        #region Constructor
        public DialogFormMessage()
        {
            InitializeComponent();
        }
        public DialogFormMessage(string str, Define.E_LanguageID language)
        {
            InitializeComponent();

            this.labelErrorCode.Text = "";
            this.labelMessage1.Text = "";
            this.labelMessage2.Text = "";

            if (language == Define.E_LanguageID.Korean)
            {
                this.labelErrorCode.Text = "Notice";
                this.labelMessage1.Text = str + "개의 파일이 백업되었습니다.";
                this.labelMessage2.Text = "";
            }
            else if (language == Define.E_LanguageID.English)
            {
                this.labelErrorCode.Text = "Notice";
                this.labelMessage1.Text = str + " files are backed up";
                this.labelMessage2.Text = "";
            }
            else if (language == Define.E_LanguageID.Chinese)
            {
                this.labelErrorCode.Text = "注意";
                this.labelMessage1.Text = "备份" + str + "个文件";
                this.labelMessage2.Text = "";
            }
            else if (language == Define.E_LanguageID.Spanish)
            {
                this.labelErrorCode.Text = "Darse cuenta";
                this.labelMessage1.Text = str + " archivos están respaldados";
                this.labelMessage2.Text = "";
            }
            else
            {

            }
        }
        public DialogFormMessage(int code, Define.E_LanguageID language)
        {
            InitializeComponent();

            this.labelErrorCode.Text = "";
            this.labelMessage1.Text = "";
            this.labelMessage2.Text = "";

            if (language == Define.E_LanguageID.Korean)
            {
                this.buttonOK.Text = "OK";

                #region 한글
                switch (code)
                {
                    case 1:
                        this.labelErrorCode.Text = "Error 01";
                        this.labelMessage1.Text = "입력범위를 확인하세요.";
                        this.labelMessage2.Text = "";
                        break;
                    case 2:
                        this.labelErrorCode.Text = "Error 02";
                        this.labelMessage1.Text = "최신 프로그램입니다.";
                        this.labelMessage2.Text = "";
                        break;
                    case 3:
                        this.labelErrorCode.Text = "Error 03";
                        this.labelMessage1.Text = "연속으로 불량이 발생했습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 4:
                        this.labelErrorCode.Text = "Error 04";
                        this.labelMessage1.Text = "백업할 파일이 없습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 5:
                        this.labelErrorCode.Text = "Error 05";
                        this.labelMessage1.Text = "USB메모리가 장착되지 않았습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 6:
                        this.labelErrorCode.Text = "Error 06";
                        this.labelMessage1.Text = "제조사에 문의하세요";
                        this.labelMessage2.Text = "";
                        break;
                    case 7:
                        this.labelErrorCode.Text = "Error 07";
                        this.labelMessage1.Text = "USB에 업데이트 할 파일이 없습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 8:
                        this.labelErrorCode.Text = "Error 08";
                        this.labelMessage1.Text = "업데이트 할 실행파일 개수가 많습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 9:
                        this.labelErrorCode.Text = "Error 09";
                        this.labelMessage1.Text = "USB에 업데이트 폴더가 없습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 10:
                        this.labelErrorCode.Text = "Error 10";
                        this.labelMessage1.Text = "해당 메모리가 장착되지 않았습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 11:
                        this.labelErrorCode.Text = "Error 11";
                        this.labelMessage1.Text = "이미지 폴더가 없습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 12:
                        this.labelErrorCode.Text = "Error 12";
                        this.labelMessage1.Text = "적체박스를 비워 주세요.";
                        this.labelMessage2.Text = "";
                        break;
                    case 13:
                        this.labelErrorCode.Text = "시스템 백업";
                        this.labelMessage1.Text = "백업 완료";
                        this.labelMessage2.Text = "";
                        break;
                    case 14:
                        this.labelErrorCode.Text = "시스템 백업";
                        this.labelMessage1.Text = "백업 실패 !!";
                        this.labelMessage2.Text = "";
                        break;
                    case 15:
                        this.labelErrorCode.Text = "Error 15";
                        this.labelMessage1.Text = "가져올 파일이 없습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 16:
                        this.labelErrorCode.Text = "Error 16";
                        this.labelMessage1.Text = "에러 발생! 다시 시도해주세요";
                        this.labelMessage2.Text = "";
                        break;
                    case 17:
                        this.labelErrorCode.Text = "Error 17";
                        this.labelMessage1.Text = "초기화를 실행해 주세요";
                        this.labelMessage2.Text = "";
                        break;
                    case 18:
                        this.labelErrorCode.Text = "Message 18";
                        this.labelMessage1.Text = "전원을 끄고 다시 켜주세요";
                        this.labelMessage2.Text = "";
                        this.buttonOK.Visible = false;
                        break;
                    case 19:
                        this.labelErrorCode.Text = "Error 19";
                        this.labelMessage1.Text = "통신 포트 연결 에러.";
                        this.labelMessage1.Text = "제조사에 문의하세요.";
                        break;
                    case 20:
                        this.labelErrorCode.Text = "Error 20";
                        this.labelMessage1.Text = "MASCA 통신 전송이 실패했습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 21:
                        this.labelErrorCode.Text = "Error 21";
                        this.labelMessage1.Text = "서보 오프 후에 다시 시도해주세요";
                        this.labelMessage2.Text = "";
                        break;
                    case 22:
                        this.labelErrorCode.Text = "Error 22";
                        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;
                    case 41:
                        this.labelErrorCode.Text = "Error 41";
                        this.labelMessage1.Text = "저장 실패";
                        this.labelMessage2.Text = "다시 시도해 주세요";
                        break;
                    case 42:
                        this.labelErrorCode.Text = "Error 42";
                        this.labelMessage1.Text = "읽기 실패";
                        this.labelMessage2.Text = "다시 시도해 주세요";
                        break;
                    case 43:
                        this.labelErrorCode.Text = "Error 43";
                        this.labelMessage1.Text = "센서에러 감지시간은 판정지연 값 이상이어야 합니다.";
                        this.labelMessage2.Text = "다시 입력해 주세요";
                        break;
                    default:
                        this.labelErrorCode.Text = "Error 99";
                        this.labelMessage1.Text = "제조사에 문의하세요";
                        this.labelMessage2.Text = "";
                        break;
                }
                #endregion
            }
            else if (language == Define.E_LanguageID.English)
            {
                this.buttonOK.Text = "OK";

                #region 영문
                switch (code)
                {
                    case 1:
                        this.labelErrorCode.Text = "Error 01";
                        this.labelMessage1.Text = "Confirm input range";
                        this.labelMessage2.Text = "";
                        break;
                    case 2:
                        this.labelErrorCode.Text = "Error 02";
                        this.labelMessage1.Text = "Application is the lastest";
                        this.labelMessage2.Text = "";
                        break;
                    case 3:
                        this.labelErrorCode.Text = "Error 03";
                        this.labelMessage1.Text = "Detect Continuous N.G !!";
                        this.labelMessage2.Text = "";
                        break;
                    case 4:
                        this.labelErrorCode.Text = "Error 04";
                        this.labelMessage1.Text = "There are no Backup files";
                        this.labelMessage2.Text = "";
                        break;
                    case 5:
                        this.labelErrorCode.Text = "Error 05";
                        this.labelMessage1.Text = "No USB Memory";
                        this.labelMessage2.Text = "";
                        break;
                    case 6:
                        this.labelErrorCode.Text = "Error 06";
                        this.labelMessage1.Text = "Please contact a manufacturer";
                        this.labelMessage2.Text = "";
                        break;
                    case 7:
                        this.labelErrorCode.Text = "Error 07";
                        this.labelMessage1.Text = "There are no update files in USB";
                        this.labelMessage2.Text = "";
                        break;
                    case 8:
                        this.labelErrorCode.Text = "Error 08";
                        this.labelMessage1.Text = "Too much file for update";
                        this.labelMessage2.Text = "";
                        break;
                    case 9:
                        this.labelErrorCode.Text = "Error 09";
                        this.labelMessage1.Text = "There is no folder has update files in USB";
                        this.labelMessage2.Text = "";
                        break;
                    case 10:
                        this.labelErrorCode.Text = "Error 10";
                        this.labelMessage1.Text = "There is no MEMORY";
                        this.labelMessage2.Text = "";
                        break;
                    case 11:
                        this.labelErrorCode.Text = "Error 11";
                        this.labelMessage1.Text = "There is no folder has Image in USB";
                        this.labelMessage2.Text = "";
                        break;
                    case 12:
                        this.labelErrorCode.Text = "Error 12";
                        this.labelMessage1.Text = "Please load the box blank";
                        this.labelMessage2.Text = "";
                        break;
                    case 13:
                        this.labelErrorCode.Text = "System backup";
                        this.labelMessage1.Text = "Backup Complete";
                        this.labelMessage2.Text = "";
                        break;
                    case 14:
                        this.labelErrorCode.Text = "System backup";
                        this.labelMessage1.Text = "Backup Fail !!";
                        this.labelMessage2.Text = "";
                        break;
                    case 15:
                        this.labelErrorCode.Text = "Error 15";
                        this.labelMessage1.Text = "There are no files to be imported";
                        this.labelMessage2.Text = "";
                        break;
                    case 16:
                        this.labelErrorCode.Text = "Error 16";
                        this.labelMessage1.Text = "Error occured! Try again";
                        this.labelMessage2.Text = "";
                        break;
                    case 17:
                        this.labelErrorCode.Text = "Error 17";
                        this.labelMessage1.Text = "Please run the initialization";
                        this.labelMessage2.Text = "";
                        break;
                    case 18:
                        this.labelErrorCode.Text = "Message 18";
                        this.labelMessage1.Text = "Turn OFF the power and then turn ON the power.";
                        this.labelMessage2.Text = "";
                        this.buttonOK.Visible = false;
                        break;
                    case 19:
                        this.labelErrorCode.Text = "Error 19";
                        this.labelMessage1.Text = "COM2 port problem.";
                        this.labelMessage1.Text = "Please contact a manufacturer.";
                        break;
                    case 20:
                        this.labelErrorCode.Text = "Error 20";
                        this.labelMessage1.Text = "Transmission failed to MASCA";
                        this.labelMessage2.Text = "";
                        break;
                    case 21:
                        this.labelErrorCode.Text = "Error 21";
                        this.labelMessage1.Text = "After th servo-off,";
                        this.labelMessage2.Text = "please try again.";
                        break;
                    case 22:
                        this.labelErrorCode.Text = "Error 22";
                        this.labelMessage1.Text = "Please check the communication status ";
                        this.labelMessage2.Text = "with the main board.";
                        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;
                    case 41:
                        this.labelErrorCode.Text = "Error 41";
                        this.labelMessage1.Text = "Failed to save";
                        this.labelMessage2.Text = "Please try again";
                        break;
                    case 42:
                        this.labelErrorCode.Text = "Error 42";
                        this.labelMessage1.Text = "Failed to read";
                        this.labelMessage2.Text = "Please try again";
                        break;
                    case 43:
                        this.labelErrorCode.Text = "Error 43";
                        this.labelMessage1.Text = "The sensor error detection time must be longer";
                        this.labelMessage2.Text = "than the judgment delay value.";
                        break;
                    default:
                        this.labelErrorCode.Text = "Error 99";
                        this.labelMessage1.Text = "Please contact a manufacturer";
                        break;
                }
                #endregion
            }
            else if (language == Define.E_LanguageID.Chinese)
            {
                this.buttonOK.Text = "确认";

                #region 중문
                switch (code)
                {
                    case 1:
                        this.labelErrorCode.Text = "错误 01";
                        this.labelMessage1.Text = "确认输入范围";
                        this.labelMessage2.Text = "";
                        break;
                    case 2:
                        this.labelErrorCode.Text = "错误 02";
                        this.labelMessage1.Text = "最新应用";
                        this.labelMessage2.Text = "";
                        break;
                    case 3:
                        this.labelErrorCode.Text = "错误 03";
                        this.labelMessage1.Text = "测试连续不良";
                        this.labelMessage2.Text = "";
                        break;
                    case 4:
                        this.labelErrorCode.Text = "错误 04";
                        this.labelMessage1.Text = "无支持文件";
                        this.labelMessage2.Text = "";
                        break;
                    case 5:
                        this.labelErrorCode.Text = "错误 05";
                        this.labelMessage1.Text = "无USB存储卡";
                        this.labelMessage2.Text = "";
                        break;
                    case 6:
                        this.labelErrorCode.Text = "错误 06";
                        this.labelMessage1.Text = "请联系厂商";
                        this.labelMessage2.Text = "";
                        break;
                    case 7:
                        this.labelErrorCode.Text = "错误 07";
                        this.labelMessage1.Text = "USB无更新文件";
                        this.labelMessage2.Text = "";
                        break;
                    case 8:
                        this.labelErrorCode.Text = "错误 08";
                        this.labelMessage1.Text = "太多文件需更新";
                        this.labelMessage2.Text = "";
                        break;
                    case 9:
                        this.labelErrorCode.Text = "错误 09";
                        this.labelMessage1.Text = "USB没有文件夹需要更新文件";
                        this.labelMessage2.Text = "";
                        break;
                    case 10:
                        this.labelErrorCode.Text = "错误 10";
                        this.labelMessage1.Text = "无存储";
                        this.labelMessage2.Text = "";
                        break;
                    case 11:
                        this.labelErrorCode.Text = "错误 11";
                        this.labelMessage1.Text = "没有图像文件夹";
                        this.labelMessage2.Text = "";
                        break;
                    case 12:
                        this.labelErrorCode.Text = "错误 12";
                        this.labelMessage1.Text = "请清理箱子";
                        this.labelMessage2.Text = "";
                        break;
                    case 13:
                        this.labelErrorCode.Text = "系统备份";
                        this.labelMessage1.Text = "复制完成";
                        this.labelMessage2.Text = "";
                        break;
                    case 14:
                        this.labelErrorCode.Text = "系统备份";
                        this.labelMessage1.Text = "复制失败 !!";
                        this.labelMessage2.Text = "";
                        break;
                    case 15:
                        this.labelErrorCode.Text = "错误 15";
                        this.labelMessage1.Text = "无文件导入";
                        this.labelMessage2.Text = "";
                        break;
                    case 16:
                        this.labelErrorCode.Text = "错误 16";
                        this.labelMessage1.Text = "错误发生，重试";
                        this.labelMessage2.Text = "";
                        break;
                    case 17:
                        this.labelErrorCode.Text = "错误 17";
                        this.labelMessage1.Text = "运行初始化";
                        this.labelMessage2.Text = "";
                        break;
                    case 18:
                        this.labelErrorCode.Text = "Message 18";
                        this.labelMessage1.Text = "关掉电源，然后在打开电源";
                        this.labelMessage2.Text = "";
                        this.buttonOK.Visible = false;
                        break;
                    case 19:
                        this.labelErrorCode.Text = "错误 19";
                        this.labelMessage1.Text = "通信点连接错误";
                        this.labelMessage1.Text = "请联系厂商";
                        break;
                    case 20:
                        this.labelErrorCode.Text = "错误 20";
                        this.labelMessage1.Text = "传送到MASCA失败";
                        this.labelMessage2.Text = "";
                        break;
                    case 21:
                        this.labelErrorCode.Text = "错误 21";
                        this.labelMessage1.Text = "关闭伺服后请重试";
                        this.labelMessage2.Text = "";
                        break;
                    case 22:
                        this.labelErrorCode.Text = "错误 22";
                        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 = "已有相同的用户名";
                        this.labelMessage2.Text = "";
                        break;
                    case 35:
                        this.labelErrorCode.Text = "错误 35";
                        this.labelMessage1.Text = "请输入4~10个字符!";
                        this.labelMessage2.Text = "";
                        break;
                    case 41:
                        this.labelErrorCode.Text = "Error 41";
                        this.labelMessage1.Text = "保存失败";
                        this.labelMessage2.Text = "请再试一次";
                        break;
                    case 42:
                        this.labelErrorCode.Text = "Error 42";
                        this.labelMessage1.Text = "读取失败";
                        this.labelMessage2.Text = "请再试一次";
                        break;
                    case 43:
                        this.labelErrorCode.Text = "Error 43";
                        this.labelMessage1.Text = "传感器错误检测时间必须大于判断延迟值。";
                        this.labelMessage2.Text = "";
                        break;
                    default:
                        this.labelErrorCode.Text = "错误 99";
                        this.labelMessage1.Text = "请联系厂商";
                        this.labelMessage2.Text = "";
                        break;
                }
                #endregion
            }
            else if (language == Define.E_LanguageID.Spanish)
            {
                #region 스페인어
                switch (code)
                {
                    case 1:
                        this.labelErrorCode.Text = "Error 01";
                        this.labelMessage1.Text = "Confirmar rango de entrada";
                        this.labelMessage2.Text = "";
                        break;
                    case 2:
                        this.labelErrorCode.Text = "Error 02";
                        this.labelMessage1.Text = "La aplicación es la una anterior";
                        this.labelMessage2.Text = "";
                        break;
                    case 3:
                        this.labelErrorCode.Text = "Error 03";
                        this.labelMessage1.Text = "Detectar continuo N.G !!";
                        this.labelMessage2.Text = "";
                        break;
                    case 4:
                        this.labelErrorCode.Text = "Error 04";
                        this.labelMessage1.Text = "No hay archivos de copia de seguridad";
                        this.labelMessage2.Text = "";
                        break;
                    case 5:
                        this.labelErrorCode.Text = "Error 05";
                        this.labelMessage1.Text = "No hay memoria USB";
                        this.labelMessage2.Text = "";
                        break;
                    case 6:
                        this.labelErrorCode.Text = "Error 06";
                        this.labelMessage1.Text = "Póngase en contacto con un fabricante";
                        this.labelMessage2.Text = "";
                        break;
                    case 7:
                        this.labelErrorCode.Text = "Error 07";
                        this.labelMessage1.Text = "No hay archivos de actualización en USB";
                        this.labelMessage2.Text = "";
                        break;
                    case 8:
                        this.labelErrorCode.Text = "Error 08";
                        this.labelMessage1.Text = "Demasiado archivo para la actualización";
                        this.labelMessage2.Text = "";
                        break;
                    case 9:
                        this.labelErrorCode.Text = "Error 09";
                        this.labelMessage1.Text = "No hay carpeta que haya actualizado";
                        this.labelMessage2.Text = "archivos en USB";
                        break;
                    case 10:
                        this.labelErrorCode.Text = "Error 10";
                        this.labelMessage1.Text = "No hay memoria";
                        this.labelMessage2.Text = "";
                        break;
                    case 11:
                        this.labelErrorCode.Text = "Error 11";
                        this.labelMessage1.Text = "No hay carpeta tiene imagen en USB";
                        this.labelMessage2.Text = "";
                        break;
                    case 12:
                        this.labelErrorCode.Text = "Error 12";
                        this.labelMessage1.Text = "Por favor cargue la caja en blanco";
                        this.labelMessage2.Text = "";
                        break;
                    case 13:
                        this.labelErrorCode.Text = "System backup";
                        this.labelMessage1.Text = "Copia de seguridad completa";
                        this.labelMessage2.Text = "";
                        break;
                    case 14:
                        this.labelErrorCode.Text = "System backup";
                        this.labelMessage1.Text = "Fallo de respaldo !!";
                        this.labelMessage2.Text = "";
                        break;
                    case 15:
                        this.labelErrorCode.Text = "Error 15";
                        this.labelMessage1.Text = "No hay archivos para ser importados.";
                        this.labelMessage2.Text = "";
                        break;
                    case 16:
                        this.labelErrorCode.Text = "Error 16";
                        this.labelMessage1.Text = "¡Ocurrió un error!";
                        this.labelMessage2.Text = "";
                        break;
                    case 17:
                        this.labelErrorCode.Text = "Error 17";
                        this.labelMessage1.Text = "Por favor ejecuta la inicialización";
                        this.labelMessage2.Text = "";
                        break;
                    case 18:
                        this.labelErrorCode.Text = "Message 18";
                        this.labelMessage1.Text = "Apague la alimentación y luego encienda";
                        this.labelMessage2.Text = "la alimentación.";
                        this.buttonOK.Visible = false;
                        break;
                    case 19:
                        this.labelErrorCode.Text = "Error 19";
                        this.labelMessage1.Text = "El puerto COM2 tiene un problema. Por favor, compruebe";
                        this.labelMessage1.Text = "el estado de la comunicación con la placa principal.";
                        break;
                    case 20:
                        this.labelErrorCode.Text = "Error 20";
                        this.labelMessage1.Text = "La transmisión no pudo a Masca";
                        this.labelMessage2.Text = "";
                        break;
                    case 21:
                        this.labelErrorCode.Text = "Error 21";
                        this.labelMessage1.Text = "Después del servo-off, inténtalo de nuevo.";
                        this.labelMessage2.Text = "";
                        break;
                    case 22:
                        this.labelErrorCode.Text = "Error 22";
                        this.labelMessage1.Text = "Por favor, compruebe el estado de la";
                        this.labelMessage2.Text = "comunicación con la placa principal.";
                        break;
                    case 31:
                        this.labelErrorCode.Text = "Error 31";
                        this.labelMessage1.Text = "Error de archivos de usuario";
                        this.labelMessage2.Text = "";
                        break;
                    case 32:
                        this.labelErrorCode.Text = "Error 32";
                        this.labelMessage1.Text = "Compruebe la identificación";
                        this.labelMessage2.Text = "";
                        break;
                    case 33:
                        this.labelErrorCode.Text = "Error 33";
                        this.labelMessage1.Text = "Compruebe la contraseña";
                        this.labelMessage2.Text = "";
                        break;
                    case 34:
                        this.labelErrorCode.Text = "Error 34";
                        this.labelMessage1.Text = "El sistema ya tiene la misma identificación.";
                        this.labelMessage2.Text = "";
                        break;
                    case 35:
                        this.labelErrorCode.Text = "Error 35";
                        this.labelMessage1.Text = "Por favor ingrese 4-10 caracteres";
                        this.labelMessage2.Text = "";
                        break;
                    case 41:
                        this.labelErrorCode.Text = "Error 41";
                        this.labelMessage1.Text = "No se pudo guardar";
                        this.labelMessage2.Text = "Inténtalo de nuevo";
                        break;
                    case 42:
                        this.labelErrorCode.Text = "Error 42";
                        this.labelMessage1.Text = "No poder leer";
                        this.labelMessage2.Text = "Inténtalo de nuevo";
                        break;
                    case 43:
                        this.labelErrorCode.Text = "Error 43";
                        this.labelMessage1.Text = "El tiempo de detección de error del sensor debe";
                        this.labelMessage2.Text = "ser mayor que el valor de retardo de evaluación.";
                        break;
                    default:
                        this.labelErrorCode.Text = "Error 99";
                        this.labelMessage1.Text = "Póngase en contacto con un fabricante";
                        break;
                }
                #endregion
            }
            else
            {

            }
        }
        public DialogFormMessage(int code, Define.E_LanguageID language, string message)
        {
            InitializeComponent();

            this.labelErrorCode.Text = "";
            this.labelMessage1.Text = "";
            this.labelMessage2.Text = "";

            switch (language)
            {
                case Define.E_LanguageID.Korean:
                    #region Korean
                    switch (code)
                    {
                        case 1:
                            this.labelErrorCode.Text = "Error 01";
                            this.labelMessage1.Text = "입력범위를 확인하세요.";
                            this.labelMessage2.Text = message;
                            break;
                        default:
                            break;
                    } 
                    #endregion
                    break;
                case Define.E_LanguageID.English:
                    #region English
                    switch (code)
                    {
                        case 1:
                            this.labelErrorCode.Text = "Error 01";
                            this.labelMessage1.Text = "Confirm input range";
                            this.labelMessage2.Text = message;
                            break;
                        default:
                            break;
                    } 
                    #endregion
                    break;
                case Define.E_LanguageID.Chinese:
                    #region Chinese
                    switch (code)
                    {
                        case 1:
                            this.labelErrorCode.Text = "错误 01";
                            this.labelMessage1.Text = "检查输入范围。";
                            this.labelMessage2.Text = message;
                            break;
                        default:
                            break;
                    }
                    #endregion
                    break;
                case Define.E_LanguageID.Spanish:
                    #region Spanish
                    switch (code)
                    {
                        case 1:
                            this.labelErrorCode.Text = "Error 01";
                            this.labelMessage1.Text = "Confirmar rango de entrada.";
                            this.labelMessage2.Text = message;
                            break;
                        default:
                            break;
                    }
                    #endregion
                    break;
                default:
                    break;
            }

        }
        #endregion

        #region Property

        #endregion

        #region Method
        private void InitializeControl()
        {
            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);
        }
        #endregion

        #region Override Member
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            this.InitializeControl();
        }
        #endregion

        #region Event Handler
        private void buttonOK_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
        #endregion
    }
}