public LoadRTFFile ( string strFileName ) : bool | ||
strFileName | string | spcial file name |
return | bool |
public bool LoadRTFFile( string strFileName )
{
//myTokenStack.Clear();
myCurrentToken = null ;
if( System.IO.File.Exists( strFileName ))
{
System.IO.FileStream stream = new System.IO.FileStream( strFileName , System.IO.FileMode.Open , System.IO.FileAccess.Read );
myReader = new System.IO.StreamReader( stream , System.Text.Encoding.ASCII );
myBaseStream = stream;
myLex = new RTFLex( myReader );
return true ;
}
return false;
}
/// <summary> /// load rtf file /// </summary> /// <param name="strFileName">file name</param> public void Load(string strFileName) { myEncoding = null; using (var reader = new RTFReader()) { if (reader.LoadRTFFile(strFileName)) { Load(reader); reader.Close(); } reader.Close(); } }