Esempio n. 1
0
 public static string Serialize(string rtf, int start, int length)
 {
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         RtfConverter converter = new RtfConverter();
         converter.Rtf = rtf;
         return converter.Serialize(start, length);
     }
     finally
     {
         Cursor.Current = Cursors.Default;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// NOTE:
 /// this assumes that "this" is a new one and doesn't conflict with 
 /// other rtfConverters (always create a new).
 /// </summary>
 /// <param name="snippet"></param>
 /// <param name="rtf"></param>
 public static string GetTextFromRtf(string rtf)
 {
     try
     {
         string retVal;
         Cursor.Current = Cursors.WaitCursor;
         RtfConverter converter = new RtfConverter();
         converter.Rtf = rtf;
         retVal = converter.Serialize(0,converter.Text.Length);
         return retVal;
     }
     finally
     {
         Cursor.Current = Cursors.Default;
     }
 }