Exemplo n.º 1
0
        public void onXlsxRequest(XlsxRequest xlsxObject)
        {
            XmlStringsExporter xmlStringsExporter = new XmlStringsExporter(xlsxObject.InputPath);
            List <StringObj>   stringsToTranslate = xmlStringsExporter.exportStrings();
            XlsFileMaker       xlsFileMaker       = new XlsFileMaker(callback);

            stringsToTranslate.Add(new StringObj(xlsxObject.AppDescription, APP_DESCRIPTION));
            stringsToTranslate.Insert(0, new StringObj(xlsxObject.AppName, APP_NAME));
            stringsToTranslate.Insert(1, new StringObj(xlsxObject.AppSummary, APP_SUMMARY));
            xlsFileMaker.makeXlsFile(xlsxObject.Language, stringsToTranslate, xlsxObject.OutputPath);
        }
        private void prepareCoordinator()
        {
            FilesCoordinator filesCoordinator = new FilesCoordinator(this);

            if (isExcelInput)
            {
                XmlRequest xmlRequest = new XmlRequest(inputPathTB.Text, outputPathTB.Text);
                filesCoordinator.coordinateFiles(xmlRequest);
            }

            else
            {
                XlsxRequest xlsxRequest = new XlsxRequest(inputPathTB.Text, outputPathTB.Text);
                xlsxRequest.Language       = languageTB.Text;
                xlsxRequest.AppSummary     = appSummaryTB.Text;
                xlsxRequest.AppName        = appNameTB.Text;
                xlsxRequest.AppDescription = appDescriptionRTB.Text;
                filesCoordinator.coordinateFiles(xlsxRequest);
            }
        }