using Modbus.Device;
using System.Configuration;
using System.Data;
using System.Windows;

using 头罩视野.Services.Data;

namespace 头罩视野
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
   
    public partial class App : Application
    {
        private IModbusMaster _modbusMaster => ModbusResourceManager.Instance.ModbusMaster;
        private void MainForm_FormClosing(object sender, ExitEventArgs e)
        {
            _modbusMaster.WriteSingleCoil(1, 1, false);

            _modbusMaster.WriteSingleCoil(1, 0, false);
            // 最后退出程序
            System.Windows.Application.Current.Shutdown();
        }
    }

}
