static public void ExportActorsToCSVFile(string directory, Project project, List <Dialogue> dialogues, Language language, DateTime dateFrom) { string path = Path.Combine(directory, "Actors_" + project.GetName() + "_" + language.VoicingCode + ".csv"); using (System.IO.StreamWriter file = new System.IO.StreamWriter(path, false, Encoding.UTF8)) { //Name, Voice Actor, Species, Gender, Build, Age, Height, Personality, Voice Kit, ID { ExporterCsv.CsvLineWriter header = new ExporterCsv.CsvLineWriter(); header.AddField("Name"); header.AddField("Voice Actor"); header.AddField("Species"); header.AddField("Gender"); header.AddField("Build"); header.AddField("Age"); header.AddField("Height"); header.AddField("Personality"); header.AddField("Voice Kit"); header.AddField("Actor ID"); header.WriteLine(file); } foreach (Actor actor in project.ListActors) { string actorID = actor.ID; string name = actor.Name; string voiceActor = project.GetLocalizedVoiceActorFromKit(actor.VoiceKit, language); string voiceKit = actor.VoiceKit; string species = actor.Species; string gender = actor.Gender; string build = actor.Build; string age = actor.Age.ToString(); string height = actor.Height.ToString(); string personality = actor.Personality; if (voiceActor == "") { voiceActor = project.GetVoiceActorNameFromKit(actor.VoiceKit); } //Name, Voice Actor, Species, Gender, Build, Age, Height, Personality, Voice Kit, ID ExporterCsv.CsvLineWriter line = new ExporterCsv.CsvLineWriter(); line.AddField(name); line.AddField(voiceActor); line.AddField(species); line.AddField(gender); line.AddField(build); line.AddField(age); line.AddField(height); line.AddField(personality); line.AddField(voiceKit); line.AddField(actorID); line.WriteLine(file); } } }