Exemplo n.º 1
0
 private void WriteCsv()
 {
     try
     {
         using (var writer = new StreamWriter(_currentFilePath, false, _host.Encoding))
         {
             _host.Write(writer, CsvRows);
         }
     }
     catch (Exception e)
     {
         ErrorMessages.Add(e.ToString());
     }
 }
Exemplo n.º 2
0
        private void WriteCsv()
        {
            var saveFileService = _viewService.SaveFileSelectionService;
            var fileName        = saveFileService.SelectFile("Save As..", CsvFileFilter, _currentFilePath);

            if (fileName == null)
            {
                return;
            }

            try
            {
                using (var writer = new StreamWriter(fileName, false, _host.Encoding))
                {
                    _host.Write(writer, CsvRows);
                }
            }
            catch (Exception e)
            {
                ErrorMessages.Add(e.ToString());
            }
        }