123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using FastReport.Forms;
- using FastReport.Utils;
- using System.Drawing;
- using System.Windows.Forms;
- namespace FastReport
- {
- partial class RichObject : IHasEditor
- {
- #region Public Methods
- internal void DrawDesign(FRPaintEventArgs e)
- {
- if (IsDesigning)
- {
- e.Graphics.DrawString(Res.Get("Forms,RichTextEditor,Invoke"), DrawUtils.DefaultReportFont, Brushes.Gray,
- new RectangleF(AbsLeft * e.ScaleX, AbsTop * e.ScaleY, Width * e.ScaleX, Height * e.ScaleY));
- DrawMarkers(e);
- }
- }
- /// <inheritdoc/>
- public bool InvokeEditor()
- {
- using (RichSelectorForm form = new RichSelectorForm(this))
- {
- if (form.ShowDialog() == DialogResult.OK)
- {
- actualTextStart = 0;
- actualTextLength = 0;
- return true;
- }
- }
- return false;
- }
- /// <inheritdoc/>
- public override SmartTagBase GetSmartTag()
- {
- return new RichObjectSmartTag(this);
- }
- /// <inheritdoc/>
- public override ContextMenuBase GetContextMenu()
- {
- return new TextObjectBaseMenu(Report.Designer);
- }
- #endregion
- }
- }
|