Beispiel #1
0
        /// <summary>
        /// 生成所有打开过的MOD文件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tsCreateMOD_Click(object sender, EventArgs e)
        {
            List <MyConfig> list = XmlHelper.XmlDeserializeFromFile <List <MyConfig> >(Application.StartupPath + "/工具配置文件/TableConfig.xml", Encoding.UTF8);

            foreach (MyConfig item in list)
            {
                if (!DataHelper.XkfyData.Tables.Contains(item.MainDtName))
                {
                    continue;
                }
                BuildModsFiles(item.MainDtName);
            }

            foreach (DataTable dt in DataHelper.MapData.Tables)
            {
                string txtName = dt.TableName + ".txt";
                StructureMapData(dt, txtName);
                _tl.BuildDataSetXmlMap(dt.TableName);
            }
            if (!string.IsNullOrEmpty(DataHelper.FilePath))
            {
                DialogResult dialogR = MessageBox.Show("Mod数据生成成功!是否打开生成的数据目录?", "提示信息", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                if (dialogR == DialogResult.Yes)
                {
                    System.Diagnostics.Process.Start("explorer.exe", DataHelper.FilePath);
                }
            }
        }