void SaveReport()
{
string pathReport = Data.StrategyPath.Replace(".xml", ".csv");
string partilaPath = Data.StrategyPath.Replace(".xml", "");
int reportIndex = 0;
do
{
reportIndex++;
pathReport = partilaPath + "-report-" + reportIndex.ToString() + ".csv";
} while (File.Exists(pathReport));
try
{
using (StreamWriter outfile = new StreamWriter(pathReport))
{
outfile.Write(sbReport.ToString());
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}