//private void LoadGisMapInfo()
        //{
        //    XmlDocument xmldoc = new XmlDocument();
        //    if (System.IO.File.Exists(Application.StartupPath + "\\MapGis\\GraphicsConfig.xml"))
        //    {
        //        xmldoc.Load(Application.StartupPath + "\\MapGis\\GraphicsConfig.xml");
        //    }
        //    else
        //    {
        //        MessageBox.Show("图形图形尚未配置完成,请配置后再使用!", "提示", MessageBoxButtons.OK);
        //        isConfiged = false;
        //        return;
        //    }
        //    if (xmldoc.SelectSingleNode("//底图").InnerText == null || xmldoc.SelectSingleNode("//底图").InnerText == "")
        //    {
        //        MessageBox.Show("图形图形尚未配置完成,请配置后再使用!", "提示", MessageBoxButtons.OK);
        //        isConfiged = false;
        //        return;
        //    }
        //    else
        //    {
        //        MapFilePath = xmldoc.SelectSingleNode("//底图").InnerText;
        //    }
        //    if (xmldoc.SelectSingleNode("//分站").InnerText == null || xmldoc.SelectSingleNode("//分站").InnerText == "")
        //    {
        //        MessageBox.Show("图形图形尚未配置完成,请配置后再使用!", "提示", MessageBoxButtons.OK);
        //        isConfiged = false;
        //        return;
        //    }
        //    else
        //    {
        //        StationFilePath = xmldoc.SelectSingleNode("//分站").InnerText;
        //    }
        //    if (xmldoc.SelectSingleNode("//正向移动图").InnerText == null || xmldoc.SelectSingleNode("//正向移动图").InnerText == "")
        //    {
        //        MessageBox.Show("图形图形尚未配置完成,请配置后再使用!", "提示", MessageBoxButtons.OK);
        //        isConfiged = false;
        //        return;
        //    }
        //    else
        //    {
        //        MoverZFilePath = xmldoc.SelectSingleNode("//正向移动图").InnerText;
        //    }
        //    if (xmldoc.SelectSingleNode("//反向移动图").InnerText == null || xmldoc.SelectSingleNode("//反向移动图").InnerText == "")
        //    {
        //        MessageBox.Show("图形图形尚未配置完成,请配置后再使用!", "提示", MessageBoxButtons.OK);
        //        isConfiged = false;
        //        return;
        //    }
        //    else
        //    {
        //        MoverFFilePath = xmldoc.SelectSingleNode("//反向移动图").InnerText;
        //    }
        //}

        private void AddStationToMapGis(DataTable dt)
        {
            try
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    string id          = dt.Rows[i]["stationaddress"].ToString() + "." + dt.Rows[i]["stationheadaddress"].ToString();
                    string stationname = dt.Rows[i]["stationheadplace"].ToString();
                    ZzhaControlLibrary.StationInfo sinfo = new ZzhaControlLibrary.StationInfo(id, stationname);
                    this.MapGis.StationHashTable.Add(sinfo.StationName, sinfo);
                }
            }
            catch (Exception ex)
            {
                this.SetBtnEnabel(false);
                MessageBox.Show("接收器安装地址存在重复值,请做修改!", "提示", MessageBoxButtons.OK);
            }
        }
        //private void LoadGisMapInfo()
        //{
        //    XmlDocument xmldoc = new XmlDocument();
        //    if (System.IO.File.Exists(Application.StartupPath + "\\MapGis\\GraphicsConfig.xml"))
        //    {
        //        xmldoc.Load(Application.StartupPath + "\\MapGis\\GraphicsConfig.xml");
        //    }
        //    else
        //    {
        //        MessageBox.Show("图形图形尚未配置完成,请配置后再使用!", "提示", MessageBoxButtons.OK);
        //        isConfiged = false;
        //        return;
        //    }
        //    if (xmldoc.SelectSingleNode("//底图").InnerText == null || xmldoc.SelectSingleNode("//底图").InnerText == "")
        //    {
        //        MessageBox.Show("图形图形尚未配置完成,请配置后再使用!", "提示", MessageBoxButtons.OK);
        //        isConfiged = false;
        //        return;
        //    }
        //    else
        //    {
        //        MapFilePath = xmldoc.SelectSingleNode("//底图").InnerText;
        //    }
        //    if (xmldoc.SelectSingleNode("//分站").InnerText == null || xmldoc.SelectSingleNode("//分站").InnerText == "")
        //    {
        //        MessageBox.Show("图形图形尚未配置完成,请配置后再使用!", "提示", MessageBoxButtons.OK);
        //        isConfiged = false;
        //        return;
        //    }
        //    else
        //    {
        //        StationFilePath = xmldoc.SelectSingleNode("//分站").InnerText;
        //    }
        //    if (xmldoc.SelectSingleNode("//正向移动图").InnerText == null || xmldoc.SelectSingleNode("//正向移动图").InnerText == "")
        //    {
        //        MessageBox.Show("图形图形尚未配置完成,请配置后再使用!", "提示", MessageBoxButtons.OK);
        //        isConfiged = false;
        //        return;
        //    }
        //    else
        //    {
        //        MoverZFilePath = xmldoc.SelectSingleNode("//正向移动图").InnerText;
        //    }
        //    if (xmldoc.SelectSingleNode("//反向移动图").InnerText == null || xmldoc.SelectSingleNode("//反向移动图").InnerText == "")
        //    {
        //        MessageBox.Show("图形图形尚未配置完成,请配置后再使用!", "提示", MessageBoxButtons.OK);
        //        isConfiged = false;
        //        return;
        //    }
        //    else
        //    {
        //        MoverFFilePath = xmldoc.SelectSingleNode("//反向移动图").InnerText;
        //    }
        //}

        private void AddStationToMapGis(DataTable dt)
        {
            try
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    string id = dt.Rows[i]["stationaddress"].ToString() + "." + dt.Rows[i]["stationheadaddress"].ToString();
                    string stationname = dt.Rows[i]["stationheadplace"].ToString();
                    ZzhaControlLibrary.StationInfo sinfo = new ZzhaControlLibrary.StationInfo(id, stationname);
                    this.MapGis.StationHashTable.Add(sinfo.StationName, sinfo);
                }
                
            }
            catch (Exception ex)
            {
                this.SetBtnEnabel(false);
                MessageBox.Show("接收器安装地址存在重复值,请做修改!", "提示", MessageBoxButtons.OK);
            }
        }