SaveFileDialog saveFile1 = new SaveFileDialog();
saveFile1.Filter = "文本文件(.txt)|*.txt";
saveFile1.FilterIndex = 1;
if (saveFile1.ShowDialog() == System.Windows.Forms.DialogResult.OK && saveFile1.FileName.Length > 0)
{
System.IO.StreamWriter sw = new System.IO.StreamWriter(saveFile1.FileName, false);
try
{
foreach (var ittt in Utility.Effectlist)
{
sw.WriteLine("\n"+ittt.Key+"触发"+ittt.Value); //输出内容
}
}
catch(Exception ex)
{
Utility.WriteLog(ex,"输出统计","TXTError");
}
finally
{
sw.Close();
}
}