public Image ConvertToGif(EquationInput ei) { m_ei = ei; string fileName = Path.GetTempPath() + Guid.NewGuid().ToString() + ".tmp"; m_eo = new EquationOutputFileGIF(fileName); if (m_ei.Get()) { // Console.WriteLine("Get MTEF"); if (m_ei.GetMTEF()) { if (ConvertToOutput()) { Image img = Bitmap.FromFile(fileName); //File.Delete(fileName); return(img); } } } return(null); }
virtual protected bool Convert() { bool bReturn = false; Console.WriteLine("Converting {0} to {1}", m_ei.ToString(), m_eo.ToString()); Console.WriteLine("Get equation: {0}", m_ei.strFileName); if (m_ei.Get()) { Console.WriteLine("Get MTEF"); if (m_ei.GetMTEF()) { Console.WriteLine("Convert Equation"); if (ConvertToOutput()) { Console.WriteLine("Write equation: {0}", m_eo.strFileName); if (m_eo.Put()) { bReturn = true; } } } } Console.WriteLine("Convert success: {0}\r\n", bReturn.ToString()); return(bReturn); }
public string ConvertToText(EquationInput ei) { m_ei = ei; m_eo = new EquationOutputFileText("", "Texvc.tdl"); if (m_ei.Get()) { // Console.WriteLine("Get MTEF"); if (m_ei.GetMTEF()) { if (ConvertToOutput()) { return(m_eo.strEquation); } } } return(""); }