//高斯正反算结果导出 private void button6_Click(object sender, EventArgs e) { FileOperate fo = new FileOperate(); SaveFileDialog save = new SaveFileDialog(); save.Filter = "文本文件(*.txt)|*.txt"; save.ShowDialog(); if (save.FileName == "") { return; } if (gauss_positive_res.Count == 0 && gauss_negative_res.Count == 0) { MessageBox.Show("请先进行计算!"); return; } else if (gauss_positive_res.Count != 0) { fo.ExportFile(save.FileName, gauss_positive_res); } else if (gauss_negative_res.Count != 0) { fo.ExportFile(save.FileName, gauss_negative_res); } }
private void button11_Click(object sender, EventArgs e) { FileOperate fo = new FileOperate(); SaveFileDialog save = new SaveFileDialog(); save.Filter = "文本文件(*.txt)|*.txt"; save.ShowDialog(); if (save.FileName == "") { return; } fo.ExportFile(save.FileName, trans_res); }