Beispiel #1
0
        protected override async Task ExportProject(Project project, string filename)
        {
            ProjectToCSV exporter = new ProjectToCSV(project as LMProject, filename);
            await Task.Run(() => exporter.Export());

            ExportDone = true;
        }
Beispiel #2
0
        public void ExportProject(Project project, IGUIToolkit guiToolkit)
        {
            string proposed_filename = project.Description.Title + ".csv";

            // Sanitize proposed filename
            foreach (char c in InvalidChars)
            {
                proposed_filename = proposed_filename.Replace(c.ToString(), "");
            }

            string filename = guiToolkit.SaveFile(Catalog.GetString("Output file"), proposed_filename,
                                                  Config.HomeDir, "CSV",
                                                  new string[] { "*.csv" });

            if (filename == null)
            {
                return;
            }

            filename = System.IO.Path.ChangeExtension(filename, ".csv");

            try {
                ProjectToCSV exporter = new ProjectToCSV(project, filename);
                exporter.Export();
                guiToolkit.InfoMessage(Catalog.GetString("Project exported successfully"));
            } catch (Exception ex) {
                guiToolkit.ErrorMessage(Catalog.GetString("Error exporting project"));
                Log.Exception(ex);
            }
        }
Beispiel #3
0
        public void ExportProject(Project project, IGUIToolkit guiToolkit)
        {
            string filename = guiToolkit.SaveFile(Catalog.GetString("Output file"), null,
                                                  Config.HomeDir, "CSV",
                                                  new string[] { ".csv" });

            if (filename == null)
            {
                return;
            }

            filename = System.IO.Path.ChangeExtension(filename, ".csv");

            try {
                ProjectToCSV exporter = new ProjectToCSV(project, filename);
                exporter.Export();
                guiToolkit.InfoMessage(Catalog.GetString("Project exported successfully"));
            }catch (Exception ex) {
                guiToolkit.ErrorMessage(Catalog.GetString("Error exporting project"));
                Log.Exception(ex);
            }
        }
Beispiel #4
0
        public void ExportProject(Project project, IGUIToolkit guiToolkit)
        {
            string proposed_filename = project.Description.Title + ".csv";

            // Sanitize proposed filename
            foreach (char c in InvalidChars) {
                proposed_filename = proposed_filename.Replace(c.ToString(), "");
            }

            string filename = guiToolkit.SaveFile (Catalog.GetString ("Output file"), proposed_filename,
                                  Config.HomeDir, "CSV",
                                  new string[] { "*.csv" });

            if (filename == null)
                return;

            filename = System.IO.Path.ChangeExtension (filename, ".csv");

            try {
                ProjectToCSV exporter = new ProjectToCSV (project, filename);
                exporter.Export ();
                guiToolkit.InfoMessage (Catalog.GetString ("Project exported successfully"));
            } catch (Exception ex) {
                guiToolkit.ErrorMessage (Catalog.GetString ("Error exporting project"));
                Log.Exception (ex);
            }
        }
Beispiel #5
0
        protected override void ExportProject(Project project, string filename)
        {
            ProjectToCSV exporter = new ProjectToCSV(project as LMProject, filename);

            exporter.Export();
        }
Beispiel #6
0
 protected override void ExportProject(Project project, string filename)
 {
     ProjectToCSV exporter = new ProjectToCSV (project as ProjectLongoMatch, filename);
     exporter.Export ();
 }