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

namespace MesFun
{
    public partial class MesFunction : Form
    {
        public MesFunction()
        {
            InitializeComponent();
        }


        private void InitMqtt()
        {
            string url;
            string topicMqttTargetTopicPLC;
            string topicMqttTargetTopicTagTypeCodeID;
            url = ConfigurationManager.AppSettings["MqttUrl"];
            //与web页面返回监控的主题一样的
            topicMqttTargetTopicPLC = ConfigurationManager.AppSettings["MqttTargetTopicPLC"];
            topicMqttTargetTopicTagTypeCodeID = ConfigurationManager.AppSettings["MqttTargetTopicTagTypeCodeID"];

            //变量变化日志
            new InitMqtt2(url, topicMqttTargetTopicTagTypeCodeID);
            MesWorkMqtt.Mqtt.StartAsync();
            //保存质量数据
            new MisDataSaveDate.Funtion().InitMqtt2(url, topicMqttTargetTopicPLC);
            //处理MES业务的Function
            new MisDataFunDll.MisDataFun().InitMqtt2(url, topicMqttTargetTopicPLC);
        }
    }
}
