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 DotNettyFrom.config;

namespace DotNettyFrom.dialog
{
    public partial class HeartBeatTime : Form
    {
        public HeartBeatTime()
        {
            InitializeComponent();
        }

        private void HeartBeatTime_Load(object sender, EventArgs e)
        {
            NumReadTime.Value = SystemConfig.ReaderIdleTimeSeconds;
            NumWriteTime.Value = SystemConfig.WriterIdleTimeSeconds;
            NumAllTime.Value = SystemConfig.AllIdleTimeSeconds;
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            SystemConfig.ReaderIdleTimeSeconds = (int) NumReadTime.Value;
            SystemConfig.WriterIdleTimeSeconds = (int) NumWriteTime.Value;
            SystemConfig.AllIdleTimeSeconds = (int) NumAllTime.Value;
            this.Close();
        }
    }
}