private void SimpleButton_Click(object sender, RoutedEventArgs e)
        {
            MyVisitor        visitor  = new MyVisitor();
            DocumentIterator iterator = new DocumentIterator(richEditControl1.Document, true);

            while (iterator.MoveNext())
            {
                iterator.Current.Accept(visitor);
            }
            textEdit1.Text = visitor.Text;
        }
Ejemplo n.º 2
0
 private void btnIteratorRun_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     #region #runvisitor
     MyVisitor        visitor  = new MyVisitor();
     DocumentIterator iterator = new DocumentIterator(richEditControl1.Document, true);
     while (iterator.MoveNext())
     {
         iterator.Current.Accept(visitor);
     }
     memoEdit1.Text = visitor.Text;
     #endregion #runvisitor
 }