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;

namespace SLC1_N
{
    public partial class Form_HQMESconfig : Form
    {
        public Form_HQMESconfig()
        {
            InitializeComponent();
        }
        private void Form_HQMESconfig_Load(object sender, EventArgs e)
        {
            tb_ActionName.Text = Form1.m_ActionName;
            tb_Tools.Text = Form1.m_Tools;
            tb_LINE.Text = Form1.m_LINE;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Form1.m_ActionName = tb_ActionName.Text;
            Form1.m_Tools = tb_Tools.Text;
            Form1.m_LINE = tb_LINE.Text;

            // Json记录
            var config = new JsonConfig("config.json");
            config.SetValue("LINE", tb_LINE.Text);
            config.SetValue("ActionName", tb_ActionName.Text);
            config.SetValue("Tools", tb_Tools.Text);
            this.Close();
        }

    }
}
