예제 #1
0
        public void SimpleAtlPresentationUofTranslatorExport(string bstrSourcePath, string bstrDestPath)
        {
            try
            {
                //System.Windows.Forms.MessageBox.Show("bstrSourcePath: " + bstrSourcePath);
                string inputFilePath = preprocessOfficeInputFileByAppName(bstrSourcePath);
                //System.Windows.Forms.MessageBox.Show("inputFilePath: " + inputFilePath);


                object tempFile     = System.IO.Path.GetTempFileName();
                string destTempFile = (string)tempFile;

                IUOFTranslator trans = new PresentationTranslator();
                trans.OoxToUof(inputFilePath, destTempFile);
                //System.Windows.Forms.MessageBox.Show("bstrDestPath: " + bstrDestPath);

                System.IO.File.Copy(destTempFile, bstrDestPath, true);



                //IUOFTranslator trans = new PresentationTranslator();
                //trans.OoxToUof(inputFilePath, bstrDestPath);
                //System.Windows.Forms.MessageBox.Show("bstrDestPath: " + bstrDestPath);
            }
            catch (Exception e)
            {
                //System.Windows.Forms.MessageBox.Show(e.ToString());
            }
        }
예제 #2
0
        public void SimpleAtlPresentationUofTranslatorImport(string bstrSourcePath, string bstrDestPath)
        {
            try
            {
                //FileInfo FileInfoTempFile = new FileInfo(bstrSourcePath);
                //bool isReadOnly = FileInfoTempFile.IsReadOnly;
                //FileInfoTempFile.IsReadOnly = true;
                //System.Windows.Forms.MessageBox.Show(bstrSourcePath);
                //System.Windows.Forms.MessageBox.Show("Read-only source");


                IUOFTranslator trans = new PresentationTranslator();
                trans.UofToOox(bstrSourcePath, bstrDestPath);
            }
            catch (Exception e)
            {
                System.Windows.Forms.MessageBox.Show(e.ToString());
            }
        }