private void buttonExportResult_Click(object sender, EventArgs e) { try { string path = Anny.ShowSaveFileDialog(); StringBuilder sb = new StringBuilder(""); sb.Append("搜索引擎").Append("\t") .Append("关键字").Append("\t") .Append("排位").Append("\t") .Append("标题").Append("\t") .Append("网址").Append("\r\n"); foreach (var i in spiders) { foreach (var j in i.Ranklist()) { sb.Append(j.searchengine).Append("\t") .Append(j.keyword).Append("\t") .Append(j.no).Append("\t") .Append(j.title).Append("\t") .Append(j.ipaddress).Append("\r\n"); } } Anny.SaveToFile(sb.ToString(), path); System.Diagnostics.Process.Start(path); } catch (Exception) { } }
public void SaveData() { Anny.SaveToFile(Anny.ToXml(spiderFormulas), Path); }