/// <summary>
        /// 加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LEDPreviewForm_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable dts = LinQBaseDao.Query("select CarType_ID,CarType_DriSName from CarType where CarType_State='启动'").Tables[0];
                if (dts.Rows.Count > 0)
                {
                    for (int i = 0; i < dts.Rows.Count; i++)
                    {
                        int kk = Convert.ToInt32(LinQBaseDao.GetSingle("select count(0) from  ManagementStrategy where ManagementStrategy_DriSName='" + dts.Rows[i][1].ToString() + "' and ManagementStrategy_ControlInfo_ID in(select ControlInfo_ID from ControlInfo where ControlInfo_Name='排队') and ManagementStrategy_State='启动' ").ToString());
                        if (kk == 0)
                        {
                            cartypeid += dts.Rows[i][0].ToString() + ",";
                        }
                    }
                }
                cartypeid = cartypeid.TrimEnd(',');

                //读取LED配置项
                string sql = "select * from PositionLED where PositionLED_State='启动' and PositionLED_Position_ID=" + SystemClass.PositionID + "";
                pled = PositionLEDDAL.GetLED(sql);

                //加载时将窗体显示位置修改到指定位置
                int X = Convert.ToInt32(pled.PositionLED_X);
                int Y = Convert.ToInt32(pled.PositionLED_Y);
                this.Location = new Point(X, Y);
                fontsize      = Convert.ToInt32(pled.PositionLED_FontSize);

                //判断当前门岗是否有LED的配置信息
                if (pled.PositionLED_ID <= 0)
                {
                    lbltishi.Visible         = true;
                    lblleixingting.Visible   = false;
                    lblleixingzhi.Visible    = false;
                    lblChePaiting.Visible    = false;
                    lblpaiduihaoting.Visible = false;
                    lblMenGangting.Visible   = false;
                    lblTongDaoting.Visible   = false;
                    lbltishi.Text            = "当前登录门岗\r\n暂无LED显示配置信息,\r\n请先配置对应门岗显示信息!!!";
                    return;
                }
                else
                {
                    try
                    {
                        //读取配置的高宽(高度与宽度是反的)
                        int weight = Convert.ToInt32(pled.PositionLED_ScreenWeight);
                        int heifht = Convert.ToInt32(pled.PositionLED_ScreenHeight);
                        this.Size = new Size(weight, heifht);

                        //读取配置的字体颜色
                        string s  = pled.PositionLED_Color;
                        int    cd = s.Length - 8;
                        yanse = s.Substring(7, cd);

                        if (pled.PositionLED_Type == 1)
                        {
                            timer1.Enabled = true;

                            BindCountting();
                            BindTypeting();
                            Bindting();
                        }
                        else if (pled.PositionLED_Type == 2)
                        {
                            lblhuanyingyu.Visible    = true;
                            lblleixingting.Visible   = false;
                            lblleixingzhi.Visible    = false;
                            lblChePaiting.Visible    = false;
                            lblpaiduihaoting.Visible = false;
                            lblMenGangting.Visible   = false;
                            lblTongDaoting.Visible   = false;
                            lblhuanyingyu.Text       = pled.PositionLED_Remark.ToString();
                            return;
                        }
                    }
                    catch
                    {
                        //将类型的循环标识加1
                        typecountting = typecountting + 1;
                        if (typecountting >= typeting)
                        {
                            typecountting = 0;
                        }
                        BindTypeting();
                        Bindting();
                    }
                }
            }
            catch
            {
            }
        }
        /// <summary>
        /// 加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LEDPreviewForm_Load(object sender, EventArgs e)
        {
            //读取LED配置项
            string sql = "select * from PositionLED where PositionLED_State='启动' and PositionLED_Position_ID=" + SystemClass.PositionID + "";

            pLED = PositionLEDDAL.GetLED(sql);

            //加载时将窗体显示位置修改到指定位置
            int X = Convert.ToInt32(pLED.PositionLED_X);
            int Y = Convert.ToInt32(pLED.PositionLED_Y);

            this.Location = new Point(X, Y);

            //判断当前门岗是否有LED的配置信息
            if (pLED.PositionLED_ID <= 0)
            {
                lbltishi.Visible = true;
                lbltishi.Text    = "当前登录门岗\r\n暂无LED显示配置信息,\r\n请先配置对应门岗显示信息";
                return;
            }
            else
            {
                DataTable dts = LinQBaseDao.Query("select CarType_ID from CarType where CarType_State='启动'").Tables[0];
                if (dts.Rows.Count > 0)
                {
                    for (int i = 0; i < dts.Rows.Count; i++)
                    {
                        // and ManagementStrategy_State='启动'
                        int kk = Convert.ToInt32(LinQBaseDao.GetSingle("select count(0) from  ManagementStrategy where ManagementStrategy_CarType_ID=" + dts.Rows[i][0].ToString() + " and ManagementStrategy_ControlInfo_ID in(select ControlInfo_ID from ControlInfo where ControlInfo_Name='排队')").ToString());
                        if (kk == 0)
                        {
                            cartypeid += dts.Rows[i][0].ToString() + ",";
                        }
                    }
                }
                cartypeid = cartypeid.TrimEnd(',');

                //读取配置的高宽(高度与宽度是反的)
                int weight = Convert.ToInt32(pLED.PositionLED_ScreenWeight);
                int heifht = Convert.ToInt32(pLED.PositionLED_ScreenHeight);
                this.Size = new Size(weight, heifht);

                //读取配置的字体颜色
                string s  = pLED.PositionLED_Color;
                int    cd = s.Length - 8;
                yanse = s.Substring(7, cd);

                if (pLED.PositionLED_Type == 1)//1为显示排队信息
                {
                    try
                    {
                        BindCount();
                        if (type == 0)
                        {
                            lbltishi.Visible = true;
                            lbltishi.Text    = "一级防火单位,严禁将烟火带入厂区,否则引发事故将移送公安机关处理!!!";
                        }
                        else
                        {
                            BindType();
                            timer1.Enabled   = false; //将刷类型的闹钟关闭
                            lbltishi.Visible = false; //将提示语的LBL关闭
                            TimerLED.Enabled = true;  //只有在显示排队信息时才将闹钟打开
                        }
                    }
                    catch
                    {
                        count = count + 1;
                        if (count == type)
                        {
                            count = 0;
                        }
                        BindType();
                    }
                }
                else if (pLED.PositionLED_Type == 2)//2为显示欢迎语
                {
                    lblhuanyingyu.Visible = true;
                    lblhuanyingyu.Text    = pLED.PositionLED_Remark;
                }
            }
        }