コード例 #1
0
ファイル: Program.cs プロジェクト: nadavbh12/RocksmithToTab
        static void SaveScore(Score score, string baseFileName, string outputDirectory, string outputFormat)
        {
            string basePath = Path.Combine(outputDirectory, baseFileName);
            // make sure that the directory where the path points to exists
            string dir = Path.GetDirectoryName(basePath);

            Directory.CreateDirectory(dir);

            if (outputFormat == "gp5")
            {
                gp5Exporter.ExportScore(score, basePath + ".gp5");
            }
            else if (outputFormat == "gpif")
            {
                gpxExporter.ExportGpif(score, basePath + ".gpif");
            }
            else if (outputFormat == "json")
            {
                System.IO.File.WriteAllText(basePath + ".json", score.Serialize());
            }
            else
            {
                gpxExporter.ExportGPX(score, basePath + ".gpx");
            }
        }
コード例 #2
0
        static void SaveScore(Score score, string baseFileName, string outputDirectory, string outputFormat)
        {
            string basePath = Path.Combine(outputDirectory, baseFileName);

            // create a separate file for each arrangement
            if (outputFormat == "gp5")
            {
                gp5Exporter.ExportScore(score, basePath + ".gp5");
            }
            else if (outputFormat == "gpif")
            {
                gpxExporter.ExportGpif(score, basePath + ".gpif");
            }
            else
            {
                gpxExporter.ExportGPX(score, basePath + ".gpx");
            }
        }