Exemple #1
0
        private RichTextEditViewInfo GetViewInfo(ControlGraphicsInfoArgs info)
        {
            RepositoryItemMyButtonEdit ri = (info.ViewInfo as ButtonEditViewInfo).Item as RepositoryItemMyButtonEdit;
            RichTextEditViewInfo       vi = new RichTextEditViewInfo(ri.RichEdit);

            vi.Bounds    = info.ViewInfo.ContentRect;
            vi.EditValue = info.ViewInfo.DisplayText;
            vi.CalcViewInfo(info.Graphics);
            return(vi);
        }
Exemple #2
0
 private void logView_CustomDrawRowPreview(object sender, RowObjectCustomDrawEventArgs e)
 {
     using (RichTextEditViewInfo vi = new RichTextEditViewInfo(emailLogRenderer.Value)) {
         var view  = ((GridView)sender);
         var email = (AdReminderEmail)view.GetRow(e.RowHandle);
         vi.LoadText(email.EmailSource);
         vi.UpdatePaintAppearance();
         vi.CalcViewInfo(e.Graphics, MouseButtons.None, Point.Empty, e.Bounds);
         RichTextEditPainter.DrawRTF(vi, e.Cache);
     }
     e.Handled = true;
 }
 private void logView_CustomDrawRowPreview(object sender, RowObjectCustomDrawEventArgs e)
 {
     using (RichTextEditViewInfo vi = new RichTextEditViewInfo(emailLogRenderer.Value)) {
         var view = ((GridView)sender);
         var email = (AdReminderEmail)view.GetRow(e.RowHandle);
         vi.LoadText(email.EmailSource);
         vi.UpdatePaintAppearance();
         vi.CalcViewInfo(e.Graphics, MouseButtons.None, Point.Empty, e.Bounds);
         RichTextEditPainter.DrawRTF(vi, e.Cache);
     }
     e.Handled = true;
 }
 private static void UpdateRichTextEditViewInfo(Graphics graphics, string rtfText, RichTextEditViewInfo vi, Rectangle bounds)
 {
     vi.LoadText(rtfText);
     vi.Bounds = bounds;
     vi.CalcViewInfo(graphics);
 }