Exemplo n.º 1
0
 public async Task ArcParameterCombinedTest(string outputXlsx)
 {
     using (ArcFile arcFile = new ArcFile("disc.arc"))
     {
         await arcFile.ExtractParameterToXlsx(outputXlsx, true, progress);
     }
     using (ArcFile arcFile = new ArcFile("hdd.arc"))
     {
         await arcFile.ExtractParameterToXlsx(outputXlsx, false, progress);
     }
 }
Exemplo n.º 2
0
        static async Task Extract(ExtractOptions o)
        {
            var progress = o.Verbose ? consoleProgress : null;

            if (!o.Commu &&
                !o.Parameter &&
                !o.Image &&
                !o.Lyrics &&
                !o.All)
            {
                Console.Error.WriteLine("No data specified to extract. Use --help for guidelines on usage.");
                return;
            }

            using ArcFile arcFile = new ArcFile(o.Input);
            if (o.Commu)
            {
                await arcFile.ExtractCommusToXlsx(o.Output, o.Overwrite, progress);
            }
            if (o.Parameter)
            {
                await arcFile.ExtractParameterToXlsx(o.Output, o.Overwrite, progress);
            }
            if (o.Image)
            {
                if (o.Overwrite && Directory.Exists(o.Output))
                {
                    Directory.Delete(o.Output, true);
                }
                await arcFile.ExtractAllImages(o.Output, progress);
            }
            if (o.Lyrics)
            {
                if (o.Overwrite && Directory.Exists(o.Output))
                {
                    Directory.Delete(o.Output, true);
                }
                await arcFile.ExtractLyrics(o.Output, o.Overwrite, progress);
            }
            if (o.All)
            {
                if (o.Overwrite && Directory.Exists(o.Output))
                {
                    Directory.Delete(o.Output, true);
                }
                await arcFile.ExtractAllAsync(o.Output, false, progress);
            }
        }
Exemplo n.º 3
0
        public async Task ExtractParameter()
        {
            try
            {
                ClearStatus();
                string fileName = _getFileName.SaveGetFileName("Save As", ArcFile.RemoveArcExtension(ArcPath).Item1 + "_parameter.xlsx", "Excel spreadsheet (*.xlsx)|*.xlsx");
                if (fileName != null)
                {
                    await ArcFile.ExtractParameterToXlsx(fileName, true, ProgressReporter);

                    ReportMessage("Done.");
                }
            }
            catch (Exception ex)
            {
                ReportException(ex);
            }
        }
Exemplo n.º 4
0
 public async Task ArcParameterIndividualTest(string arcName, string outputXlsx)
 {
     using ArcFile arcFile = new ArcFile(arcName);
     await arcFile.ExtractParameterToXlsx(outputXlsx, true, progress);
 }