private void btnImportEffFiles_Click(object sender, EventArgs e)
{
string name;
string path;
string[] strFileSources = null;
ofdSelectFile.Multiselect = true;
ofdSelectFile.FileName = null;
ofdSelectFile.Filter = "XML配置文件(*.xml)|*.xml";
ofdSelectFile.ShowDialog();
strFileSources = ofdSelectFile.FileNames;
foreach (string fileSource in strFileSources)
{
try
{
path = fileSource.Substring(((fileSource.LastIndexOf("\\")) + 1), fileSource.Length - fileSource.LastIndexOf("\\") - 1);
name = path.Substring(0, path.LastIndexOf('.'));
File.Copy(fileSource, Application.StartupPath + "\\" + path);
Configuration.ModifyMainCfgXML(name, path, false);
LoadEffects();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}