/// <summary> /// 窗体加载事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Motherform_Load(System.Object sender, System.EventArgs e) { //读取配置信息 string TempLutFileName = ""; if (m_bIncludeLayerNames) { TempLutFileName = CommXmlHandle.c_strLUT_Standard; } else { TempLutFileName = CommXmlHandle.c_strLUT_WorldMap; } if (!CommXmlHandle.ReadLUT(Path.GetDirectoryName(GetType().Assembly.Location), TempLutFileName)) { MessageBox.Show("读取配置信息有误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// 读取XML配置文件信息 /// </summary> private void ReadXmlConfig() { //读取配置信息 string TempLutFileName = ""; if (m_IncludeLayerName) { TempLutFileName = CommXmlHandle.c_strLUT_Standard; } else { TempLutFileName = CommXmlHandle.c_strLUT_WorldMap; } if (!CommXmlHandle.ReadLUT(Path.GetDirectoryName(GetType().Assembly.Location), TempLutFileName)) { MessageBox.Show("读取配置信息有误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// 是否包含图层名 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mnuIncludeLayerNames_Click(System.Object sender, System.EventArgs e) { if (mnuIncludeLayerNames.Checked) { mnuIncludeLayerNames.Checked = false; m_bIncludeLayerNames = false; if (!CommXmlHandle.ReadLUT(Path.GetDirectoryName(GetType().Assembly.Location), CommXmlHandle.c_strLUT_WorldMap)) { MessageBox.Show("读取配置信息有误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { mnuIncludeLayerNames.Checked = true; m_bIncludeLayerNames = true; if (!CommXmlHandle.ReadLUT(Path.GetDirectoryName(GetType().Assembly.Location), CommXmlHandle.c_strLUT_Standard)) { MessageBox.Show("读取配置信息有误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }