Exemplo n.º 1
0
 public xTextFile(string filePath)
 {
     this.frequencies = new List <xWordFrequencies>();
     this.filePath    = filePath;
     fileName         = (new FileInfo(filePath)).Name;
     if (fileName.EndsWith(".doc"))
     {
         Processor = DocProcessor.GetInstance();
     }
     else if (fileName.EndsWith("docx"))
     {
         Processor = DocxProcessor.GetInstance();
     }
     else if (fileName.EndsWith("htm") || fileName.EndsWith("html"))
     {
         Processor = HtmProcessor.GetInstance();
     }
     else if (fileName.EndsWith("odt"))
     {
         Processor = OdtProcessor.GetInstance();
     }
     else if (fileName.EndsWith("pdf"))
     {
         Processor = PdfProcessor.GetInstance();
     }
     else if (fileName.EndsWith("rtf"))
     {
         Processor = RtfProcessor.GetInstance();
     }
     else if (fileName.EndsWith("txt"))
     {
         Processor = TxtProcessor.GetInstance();
     }
     else if (fileName.EndsWith("xlsx"))
     {
         Processor = XlsProcessor.GetInstance();
     }
 }
Exemplo n.º 2
0
 private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
 {
     DocProcessor.Dispose();
 }