Example #1
0
        private IUOFTranslator initConverter(string inputFileName, DocumentType type)
        {
            IUOFTranslator Converter;

            if (type == DocumentType.Word)
            {
                Converter = TranslatorFactory.CheckFileType(DocType.Word);
                Converter.AddProgressMessageListener(this.progressListener);
                Converter.AddFeedbackMessageListener(this.feedbackListenerForLog);
                return(Converter);
            }
            else if (type == DocumentType.Excel)
            {
                Converter = TranslatorFactory.CheckFileType(DocType.Excel);
                Converter.AddProgressMessageListener(this.progressListener);
                Converter.AddFeedbackMessageListener(this.feedbackListenerForLog);
                return(Converter);
            }
            else if (type == DocumentType.Powerpnt)
            {
                Converter = TranslatorFactory.CheckFileType(DocType.Powerpoint);
                Converter.AddProgressMessageListener(this.progressListener);
                Converter.AddFeedbackMessageListener(this.feedbackListenerForLog);
                return(Converter);
            }

            return(null);
        }