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 INT_PT002.DataStore;

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

        #region Constructor
        public DialogFormMessage()
        {
            InitializeComponent();
        }
        public DialogFormMessage(int code)
        {
            InitializeComponent();

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

            switch (code)
            {
                case 1:
                    this.smartGroupBox1.Text = "Error 00";
                    this.labelMessage1.Text = "오류 발생! 재부팅 해 주십시오";
                    this.labelMessage2.Text = "Warning! Please restart this equipment";
                    this.buttonOK.Visible = false;
                    break;
                default:
                    break;
            }
        }
        public DialogFormMessage(string str, Define.E_LanguageID language)
        {
            InitializeComponent();

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

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

                this.smartGroupBox1.Text = "Notice";
                this.labelMessage1.Text = str + "개의 파일이 백업되었습니다.";
                this.labelMessage2.Text = "";
            }
            else if (language == Define.E_LanguageID.English)
            {
                this.buttonOK.ButtonText = "OK";

                this.smartGroupBox1.Text = "Notice";
                this.labelMessage1.Text = str + " files have been backed up";
                this.labelMessage2.Text = "";
            }
            else
            {

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

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

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

                #region 한글
                switch (code)
                {
                    case 1:
                        this.smartGroupBox1.Text = "Error 01";
                        this.labelMessage1.Text = "입력범위를 확인하세요.";
                        this.labelMessage2.Text = "";
                        break;
                    case 2:
                        this.smartGroupBox1.Text = "Error 02";
                        this.labelMessage1.Text = "최신 프로그램입니다.";
                        this.labelMessage2.Text = "";
                        break;
                    case 3:
                        this.smartGroupBox1.Text = "Error 03";
                        this.labelMessage1.Text = "연속으로 불량이 발생했습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 4:
                        this.smartGroupBox1.Text = "Error 04";
                        this.labelMessage1.Text = "백업할 파일이 없습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 5:
                        this.smartGroupBox1.Text = "Error 05";
                        this.labelMessage1.Text = "USB메모리가 장착되지 않았습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 6:
                        this.smartGroupBox1.Text = "Error 06";
                        this.labelMessage1.Text = "제조사에 문의하세요";
                        this.labelMessage2.Text = "";
                        break;
                    case 7:
                        this.smartGroupBox1.Text = "Error 07";
                        this.labelMessage1.Text = "USB에 업데이트 할 파일이 없습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 8:
                        this.smartGroupBox1.Text = "Error 08";
                        this.labelMessage1.Text = "업데이트 할 실행파일 개수가 많습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 9:
                        this.smartGroupBox1.Text = "Error 09";
                        this.labelMessage1.Text = "USB에 업데이트 폴더가 없습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 10:
                        this.smartGroupBox1.Text = "Error 10";
                        this.labelMessage1.Text = "해당 메모리가 장착되지 않았습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 11:
                        this.smartGroupBox1.Text = "Error 11";
                        this.labelMessage1.Text = "이미지 폴더가 없습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 12:
                        this.smartGroupBox1.Text = "Error 12";
                        this.labelMessage1.Text = "적체박스를 비워 주세요.";
                        this.labelMessage2.Text = "";
                        break;
                    case 13:
                        this.smartGroupBox1.Text = "시스템 백업";
                        this.labelMessage1.Text = "백업 완료";
                        this.labelMessage2.Text = "";
                        break;
                    case 14:
                        this.smartGroupBox1.Text = "시스템 백업";
                        this.labelMessage1.Text = "백업 실패 !!";
                        this.labelMessage2.Text = "";
                        break;
                    case 15:
                        this.smartGroupBox1.Text = "Error 15";
                        this.labelMessage1.Text = "가져올 파일이 없습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 16:
                        this.smartGroupBox1.Text = "Error 16";
                        this.labelMessage1.Text = "에러 발생! 다시 시도해주세요";
                        this.labelMessage2.Text = "";
                        break;
                    case 17:
                        this.smartGroupBox1.Text = "Error 17";
                        this.labelMessage1.Text = "초기화를 실행해 주세요";
                        this.labelMessage2.Text = "";
                        break;
                    case 18:
                        this.smartGroupBox1.Text = "Message 18";
                        this.labelMessage1.Text = "전원을 끄고 다시 켜주세요";
                        this.labelMessage2.Text = "";
                        this.buttonOK.Visible = false;
                        break;
                    case 19:
                        this.smartGroupBox1.Text = "Error 19";
                        this.labelMessage1.Text = "통신 포트 연결 에러.";
                        this.labelMessage1.Text = "제조사에 문의하세요.";
                        break;
                    case 20:
                        this.smartGroupBox1.Text = "Error 20";
                        this.labelMessage1.Text = "MASCA 통신 전송이 실패했습니다";
                        this.labelMessage2.Text = "";
                        break;
                    case 21:
                        this.smartGroupBox1.Text = "Error 21";
                        this.labelMessage1.Text = "서보 오프 후에 다시 시도해주세요";
                        this.labelMessage2.Text = "";
                        break;
                    case 22:
                        this.smartGroupBox1.Text = "Error 22";
                        this.labelMessage1.Text = "메인보드 통신 상태 확인해주세요";
                        this.labelMessage2.Text = "";
                        break;
                    case 31:
                        this.smartGroupBox1.Text = "Error 31";
                        this.labelMessage1.Text = "유저 파일 에러";
                        this.labelMessage2.Text = "";
                        break;
                    case 32:
                        this.smartGroupBox1.Text = "Error 32";
                        this.labelMessage1.Text = "ID 확인하세요";
                        this.labelMessage2.Text = "";
                        break;
                    case 33:
                        this.smartGroupBox1.Text = "Error 33";
                        this.labelMessage1.Text = "Password 확인하세요";
                        this.labelMessage2.Text = "";
                        break;
                    case 34:
                        this.smartGroupBox1.Text = "Error 34";
                        this.labelMessage1.Text = "동일한 ID가 있습니다!";
                        this.labelMessage2.Text = "";
                        break;
                    case 35:
                        this.smartGroupBox1.Text = "Error 35";
                        this.labelMessage1.Text = "4~10자 입력 하세요!";
                        this.labelMessage2.Text = "";
                        break;
                    case 36:
                        this.PictureBoxVisible(false);

                        this.smartGroupBox1.Text = "";
                        this.labelMessage1.Text = "데이터가 없습니다";
                        this.labelMessage2.Text = "";
                        break;
                    default:
                        this.smartGroupBox1.Text = "Error 99";
                        this.labelMessage1.Text = "제조사에 문의하세요";
                        this.labelMessage2.Text = "";
                        break;
                }
                #endregion
            }
            else if (language == Define.E_LanguageID.English)
            {
                this.buttonOK.ButtonText = "OK";

                #region 영문
                switch (code)
                {
                    case 1:
                        this.smartGroupBox1.Text = "Error 01";
                        this.labelMessage1.Text = "Please check the input range";
                        this.labelMessage2.Text = "";
                        break;
                    case 2:
                        this.smartGroupBox1.Text = "Error 02";
                        this.labelMessage1.Text = "Application is the lastest";
                        this.labelMessage2.Text = "";
                        break;
                    case 3:
                        this.smartGroupBox1.Text = "Error 03";
                        this.labelMessage1.Text = "Detect Continuous N.G !!";
                        this.labelMessage2.Text = "";
                        break;
                    case 4:
                        this.smartGroupBox1.Text = "Error 04";
                        this.labelMessage1.Text = "There are no Backup files";
                        this.labelMessage2.Text = "";
                        break;
                    case 5:
                        this.smartGroupBox1.Text = "Error 05";
                        this.labelMessage1.Text = "There is no USB MEMORY";
                        this.labelMessage2.Text = "";
                        break;
                    case 6:
                        this.smartGroupBox1.Text = "Error 06";
                        this.labelMessage1.Text = "Please contact a manufacturer";
                        this.labelMessage2.Text = "";
                        break;
                    case 7:
                        this.smartGroupBox1.Text = "Error 07";
                        this.labelMessage1.Text = "There are no update files in USB";
                        this.labelMessage2.Text = "";
                        break;
                    case 8:
                        this.smartGroupBox1.Text = "Error 08";
                        this.labelMessage1.Text = "Too much file for update";
                        this.labelMessage2.Text = "";
                        break;
                    case 9:
                        this.smartGroupBox1.Text = "Error 09";
                        this.labelMessage1.Text = "There is no folder has update files in USB";
                        this.labelMessage2.Text = "";
                        break;
                    case 10:
                        this.smartGroupBox1.Text = "Error 10";
                        this.labelMessage1.Text = "There is no MEMORY";
                        this.labelMessage2.Text = "";
                        break;
                    case 11:
                        this.smartGroupBox1.Text = "Error 11";
                        this.labelMessage1.Text = "There is no folder has Image in USB";
                        this.labelMessage2.Text = "";
                        break;
                    case 12:
                        this.smartGroupBox1.Text = "Error 12";
                        this.labelMessage1.Text = "Please load the box blank";
                        this.labelMessage2.Text = "";
                        break;
                    case 13:
                        this.smartGroupBox1.Text = "System backup";
                        this.labelMessage1.Text = "Backup Complete";
                        this.labelMessage2.Text = "";
                        break;
                    case 14:
                        this.smartGroupBox1.Text = "System backup";
                        this.labelMessage1.Text = "Backup Fail !!";
                        this.labelMessage2.Text = "";
                        break;
                    case 15:
                        this.smartGroupBox1.Text = "Error 15";
                        this.labelMessage1.Text = "There are no files to be imported";
                        this.labelMessage2.Text = "";
                        break;
                    case 16:
                        this.smartGroupBox1.Text = "Error 16";
                        this.labelMessage1.Text = "Error occured! Try again";
                        this.labelMessage2.Text = "";
                        break;
                    case 17:
                        this.smartGroupBox1.Text = "Error 17";
                        this.labelMessage1.Text = "Please proceed with initialization";
                        this.labelMessage2.Text = "";
                        break;
                    case 18:
                        this.smartGroupBox1.Text = "Message 18";
                        this.labelMessage1.Text = "Please restart this equipment";
                        this.labelMessage2.Text = "";
                        this.buttonOK.Visible = false;
                        break;
                    case 19:
                        this.smartGroupBox1.Text = "Error 19";
                        this.labelMessage1.Text = "COM2 port problem.";
                        this.labelMessage1.Text = "Please contact a manufacturer.";
                        break;
                    case 20:
                        this.smartGroupBox1.Text = "Error 20";
                        this.labelMessage1.Text = "Transmission failed to MASCA";
                        this.labelMessage2.Text = "";
                        break;
                    case 21:
                        this.smartGroupBox1.Text = "Error 21";
                        this.labelMessage1.Text = "After th servo-off,";
                        this.labelMessage2.Text = "please try again.";
                        break;
                    case 22:
                        this.smartGroupBox1.Text = "Error 22";
                        this.labelMessage1.Text = "Please check the communication status ";
                        this.labelMessage2.Text = "with the main board.";
                        break;
                    case 23:
                        this.smartGroupBox1.Text = "Error 23";
                        this.labelMessage1.Text = "Equipment Stop : Counting output";
                        this.labelMessage2.Text = "";
                        break;
                    case 24:
                        this.smartGroupBox1.Text = "Error 24";
                        this.labelMessage1.Text = "MACSA communication transmission failed";
                        this.labelMessage2.Text = "";
                        break;
                    case 25:
                        this.smartGroupBox1.Text = "Error 25";
                        this.labelMessage1.Text = "Check the barcode scanner connection.";
                        this.labelMessage2.Text = "";
                        break;
                    case 26:
                        this.smartGroupBox1.Text = "OPC";
                        this.labelMessage1.Text = "OPC Operation Mode : Server";
                        this.labelMessage2.Text = "";
                        break;
                    case 27:
                        this.smartGroupBox1.Text = "Error 27";
                        this.labelMessage1.Text = "No. 996~1000 : Assign Random Mode function";
                        this.labelMessage2.Text = "[Menu]-[Basic]-[Product setting]-[Random Mode]";
                        break;
                    // 28 사용
                    case 31:
                        this.smartGroupBox1.Text = "Error 31";
                        this.labelMessage1.Text = "User files error";
                        this.labelMessage2.Text = "";
                        break;
                    case 32:
                        this.smartGroupBox1.Text = "Error 32";
                        this.labelMessage1.Text = "Check the ID";
                        this.labelMessage2.Text = "";
                        break;
                    case 33:
                        this.smartGroupBox1.Text = "Error 33";
                        this.labelMessage1.Text = "Check the password";
                        this.labelMessage2.Text = "";
                        break;
                    case 34:
                        this.smartGroupBox1.Text = "Error 34";
                        this.labelMessage1.Text = "The system already has the same ID";
                        this.labelMessage2.Text = "";
                        break;
                    case 35:
                        this.smartGroupBox1.Text = "Error 35";
                        this.labelMessage1.Text = "Please enter 4-10 characters";
                        this.labelMessage2.Text = "";
                        break;
                    case 36:
                        this.PictureBoxVisible(false);

                        this.smartGroupBox1.Text = "";
                        this.labelMessage1.Text = "No Data";
                        this.labelMessage2.Text = "";
                        break;
                    default:
                        this.smartGroupBox1.Text = "Error 99";
                        this.labelMessage1.Text = "Please contact a manufacturer";
                        break;
                }
                #endregion
            }         
            else
            {

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

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

            switch (language)
            {
                case Define.E_LanguageID.Korean:
                    #region Korean
                    switch (code)
                    {
                        case 1:
                            this.buttonOK.ButtonText = "OK";
                            this.smartGroupBox1.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.buttonOK.ButtonText = "OK";
                            this.smartGroupBox1.Text = "Error 01";
                            this.labelMessage1.Text = "Confirm input range";
                            this.labelMessage2.Text = message;
                            break;
                        default:
                            break;
                    }
                    #endregion
                    break;
                default:
                    break;
            }

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

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

            switch (language)
            {
                case Define.E_LanguageID.Korean:
                    #region 한글
                    switch (code)
                    {
                        case 1:
                            this.smartGroupBox1.Text = "Error 01";
                            this.labelMessage1.Text = "ID를 찾을 수 없습니다";
                            break;
                        case 2:
                            this.smartGroupBox1.Text = "Error 02";
                            this.labelMessage1.Text = "ID : 동일한 ID가 있습니다";
                            break;
                        case 3:
                            this.smartGroupBox1.Text = "Error 03";
                            this.labelMessage1.Text = "ID : 6~20자 입력하세요";
                            break;
                        case 4:
                            this.smartGroupBox1.Text = "Error 04";
                            this.labelMessage1.Text = "ID : 6~20자 입력하세요";
                            break;
                        case 5:
                            this.smartGroupBox1.Text = "Error 05";
                            this.labelMessage1.Text = "ID : 연속된 문자(123,321,abc,cba...)또는";
                            this.labelMessage2.Text = "동일한 문자(111,222,aaa...) 사용 할 수 없습니다";
                            break;
                        case 6:
                            this.smartGroupBox1.Text = "Error 06";
                            this.labelMessage1.Text = "ID : 사용할 수 없는 문자가 포함되어 있습니다";
                            break;
                        case 7:
                            this.smartGroupBox1.Text = "Error 07";
                            this.labelMessage1.Text = "ID : 사용자 계정이 만료 되었습니다";
                            break;
                        case 8:
                            this.smartGroupBox1.Text = "Error 08";
                            this.labelMessage1.Text = "PASSWORD : 이전 패스워드 입니다";
                            break;
                        case 9:
                            this.smartGroupBox1.Text = "Error 09";
                            this.labelMessage1.Text = "PASSWORD : 6~20자 입력하세요";
                            break;
                        case 10:
                            this.smartGroupBox1.Text = "Error 10";
                            this.labelMessage1.Text = "PASSWORD : 6~20자 입력하세요";
                            break;
                        case 11:
                            this.smartGroupBox1.Text = "Error 11";
                            this.labelMessage1.Text = "PASSWORD : 연속된 문자(123,321,abc,cba...)또는";
                            this.labelMessage2.Text = "동일한 문자(111,222,aaa...) 사용 할 수 없습니다";
                            break;
                        case 12:
                            this.smartGroupBox1.Text = "Error 12";
                            this.labelMessage1.Text = "PASSWORD : 사용할 수 없는 문자가 포함되어 있습니다";
                            this.labelMessage2.Text = "사용 가능 특수문자 : !@#$%^&*+-.";
                            break;
                        case 13:
                            this.smartGroupBox1.Text = "Error 13";
                            this.labelMessage1.Text = "PASSWORD : 영문1이상, 숫자1이상, 특수문자1이상";
                            this.labelMessage2.Text = "포함하여 주십시오";
                            break;
                        case 14:
                            this.smartGroupBox1.Text = "Error 14";
                            this.labelMessage1.Text = "비밀번호를 확인하세요";
                            break;
                        case 15:
                            this.smartGroupBox1.Text = "Error 15";
                            this.labelMessage1.Text = "PASSWORD : 비밀번호가 만료 되었습니다";
                            break;
                        case 16:
                            this.smartGroupBox1.Text = "Error 16";
                            this.labelMessage1.Text = "필수 설정 항목을 설정해 주십시오";
                            break;
                        case 17:
                            this.smartGroupBox1.Text = "Error 17";
                            this.labelMessage1.Text = "";
                            break;
                        case 18:
                            this.smartGroupBox1.Text = "Error 18";
                            this.labelMessage1.Text = "";
                            break;
                        default:
                            this.smartGroupBox1.Text = "Error 99";
                            this.labelMessage1.Text = "제조사에 문의하세요";
                            break;
                    }
                    #endregion
                    break;
                case Define.E_LanguageID.English:
                    #region 영문
                    switch (code)
                    {
                        case 1:
                            this.smartGroupBox1.Text = "Error 01";
                            this.labelMessage1.Text = "ID not found";
                            break;
                        case 2:
                            this.smartGroupBox1.Text = "Error 02";
                            this.labelMessage1.Text = "ID : ID already exists";
                            break;
                        case 3:
                            this.smartGroupBox1.Text = "Error 03";
                            this.labelMessage1.Text = "ID : Please enter 6~20 characters";
                            break;
                        case 4:
                            this.smartGroupBox1.Text = "Error 04";
                            this.labelMessage1.Text = "ID : Please enter 6~20 characters";
                            break;
                        case 5:
                            this.smartGroupBox1.Text = "Error 05";
                            this.labelMessage1.Text = "ID : Consecutive(123,321,abc,cba...) or";
                            this.labelMessage2.Text = "identical(111,222,aaa...) characters cannot be used.";
                            break;
                        case 6:
                            this.smartGroupBox1.Text = "Error 06";
                            this.labelMessage1.Text = "ID : Contains invalid characters";
                            break;
                        case 7:
                            this.smartGroupBox1.Text = "Error 07";
                            this.labelMessage1.Text = "ID : User account has expired";
                            break;
                        case 8:
                            this.smartGroupBox1.Text = "Error 08";
                            this.labelMessage1.Text = "PASSWORD : This is the old password";
                            break;
                        case 9:
                            this.smartGroupBox1.Text = "Error 09";
                            this.labelMessage1.Text = "PASSWORD : Please enter 6~20 characters";
                            break;
                        case 10:
                            this.smartGroupBox1.Text = "Error 10";
                            this.labelMessage1.Text = "PASSWORD : Please enter 6~20 characters";
                            break;
                        case 11:
                            this.smartGroupBox1.Text = "Error 11";
                            this.labelMessage1.Text = "PASSWORD : Consecutive(123,321,abc,cba...) or";
                            this.labelMessage2.Text = "identical(111,222,aaa...) characters cannot be used.";
                            break;
                        case 12:
                            this.smartGroupBox1.Text = "Error 12";
                            this.labelMessage1.Text = "PASSWORD : Contains invalid characters";
                            this.labelMessage2.Text = "Special characters allowed : !@#$%^&*+-.";
                            break;
                        case 13:
                            this.smartGroupBox1.Text = "Error 13";
                            this.labelMessage1.Text = "PASSWORD : Please include at least one English letter,";
                            this.labelMessage2.Text = "at least one number, and at least one special character";
                            break;
                        case 14:
                            this.smartGroupBox1.Text = "Error 14";
                            this.labelMessage1.Text = "Check your password";
                            break;
                        case 15:
                            this.smartGroupBox1.Text = "Error 15";
                            this.labelMessage1.Text = "PASSWORD : Password has expired";
                            break;
                        case 16:
                            this.smartGroupBox1.Text = "Error 16";
                            this.labelMessage1.Text = "Please set the required setting items";
                            break;
                        case 17:
                            this.smartGroupBox1.Text = "Error 17";
                            this.labelMessage1.Text = "";
                            break;
                        case 18:
                            this.smartGroupBox1.Text = "Error 18";
                            this.labelMessage1.Text = "";
                            break;
                        default:
                            this.smartGroupBox1.Text = "Error 99";
                            this.labelMessage1.Text = "Please contact a manufacturer";
                            break;
                    }
                    #endregion
                    break;
                default:
                    break;
            }
        }
        public DialogFormMessage(Define.E_MessageBoxIcon icon, string code, string message1, string message2, int autoClose_sec)
        {
            InitializeComponent();

            this.timerAutoClose.Enabled = false;

            switch (icon)
            {
                case Define.E_MessageBoxIcon.None:
                    this.pictureBoxAsterisk.Visible = false;
                    this.pictureBoxExclamation.Visible = false;
                    this.pictureBoxHand.Visible = false;
                    this.pictureBoxQuestion.Visible = false;
                    break;
                case Define.E_MessageBoxIcon.Hand:
                    this.pictureBoxAsterisk.Visible = false;
                    this.pictureBoxExclamation.Visible = false;
                    this.pictureBoxHand.Visible = true;
                    this.pictureBoxQuestion.Visible = false;
                    break;
                case Define.E_MessageBoxIcon.Question:
                    this.pictureBoxAsterisk.Visible = false;
                    this.pictureBoxExclamation.Visible = false;
                    this.pictureBoxHand.Visible = false;
                    this.pictureBoxQuestion.Visible = true;
                    break;
                case Define.E_MessageBoxIcon.Exclamation:
                    this.pictureBoxAsterisk.Visible = false;
                    this.pictureBoxExclamation.Visible = true;
                    this.pictureBoxHand.Visible = false;
                    this.pictureBoxQuestion.Visible = false;
                    break;
                case Define.E_MessageBoxIcon.Asterisk:
                    this.pictureBoxAsterisk.Visible = true;
                    this.pictureBoxExclamation.Visible = false;
                    this.pictureBoxHand.Visible = false;
                    this.pictureBoxQuestion.Visible = false;
                    break;
                default:
                    break;
            }

            this.smartGroupBox1.Text = code;
            this.labelMessage1.Text = message1;
            this.labelMessage2.Text = message2;

            if (autoClose_sec != 0)
            {
                this.timerAutoClose.Interval = autoClose_sec * 1000;
                this.timerAutoClose.Enabled = true;
            }
        }
        #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);
        }

        private void PictureBoxVisible(bool bValue)
        {
            this.pictureBoxAsterisk.Visible = bValue;
            this.pictureBoxExclamation.Visible = bValue;
            this.pictureBoxHand.Visible = bValue;
            this.pictureBoxQuestion.Visible = bValue;
        }
        #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();
        }

        private void timerAutoClose_Tick(object sender, EventArgs e)
        {
            this.timerAutoClose.Enabled = false;
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
        #endregion
    }
}