using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

using ABC.NhomNCC;
using System.Xml;
using System.IO;



namespace ABC.BanLe
{
    
    public partial class GhiChu_Le : DevExpress.XtraEditors.XtraForm {

        public GhiChu_Le()
        {           

            InitializeComponent();  
            this.Text = "Cấu hình nhập lẽ";
            simpleButton1.Click += new EventHandler(simpleButton1_Click);
            simpleButton2.Click+=new EventHandler(simpleButton2_Click);
            txtghichu.Enter += new EventHandler(txtghichu_Enter);
            txtghichu.Leave += new EventHandler(txtghichu_Leave);
            txtghichu.KeyPress += new KeyPressEventHandler(txtghichu_KeyPress);
            

        }

        public string GhiChu;

        void simpleButton2_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            
            this.Close();
        }
       
        

        void simpleButton1_Click(object sender, EventArgs e)
        {

            GhiChu = txtghichu.Text;
            this.DialogResult = DialogResult.OK;
                this.Close();
         
            
        }

        void txtghichu_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == 13)
            {
                GhiChu = txtghichu.Text;
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
            else
            {
                if (e.KeyChar == 27)
                {
                    this.DialogResult = DialogResult.Cancel;
                    this.Close();
                }
            }
        }
        void txtghichu_Leave(object sender, EventArgs e)
        {
            txtghichu.BackColor = Color.White;
        }

        void txtghichu_Enter(object sender, EventArgs e)
        {
            txtghichu.BackColor = Color.NavajoWhite;
        }

        private void simpleButton1_Click_1(object sender, EventArgs e)
        {

        }

        private void txtghichu_EditValueChanged(object sender, EventArgs e)
        {

        }
    }
}
