using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using tool;

namespace terminal
{
    public partial class FetchingFrom : Form
    {
        AutoResizeForm m_auto_resize_form = new AutoResizeForm();
        //定义该接口后会自动打开扫描
        public string m_key;
        public  bool m_is_return=false;

        public FetchingFrom()
        {
            InitializeComponent();
        }

        private void returnBtn_Click(object sender, EventArgs e)
        {
            m_is_return = true;
            this.Close();
        }

        private void FetchingFrom_Load(object sender, EventArgs e)
        {
            this.label6.Text = "厦门市政停车终端" + json_file_operation.Instance.read_json_string("ternimalNumber") + "号机";
            this.label7.Text = this.label7.Text + json_file_operation.Instance.read_json_string("ternimalNumber");

            this.timeLab.Text = System.DateTime.Now.ToString("yyyy-MM-dd");
            this.timeLab.Visible = true;
        }

        private void ScannerTextBox_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Control || e.KeyCode == Keys.Enter)
            {
                this.ScannerTextBox.Text = this.ScannerTextBox.Text.Replace("\r\n", "");
                m_key = ScannerTextBox.Text;
                m_is_return = false;
                this.Close();
            }
        }

        private void FetchingFrom_Activated(object sender, EventArgs e)
        {
            this.ScannerTextBox.Focus();
        }

        private void label3_Click(object sender, EventArgs e)
        {

        }
    }
}
