123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- using FastReport.Forms;
- using System.Drawing.Drawing2D;
- using System.Drawing;
- using System;
- using System.Windows.Forms;
- namespace FastReport
- {
- partial class ShapeObject : IHasEditor
- {
- #region Public Methods
- /// <inheritdoc/>
- public bool InvokeEditor()
- {
- using (FillEditorForm editor = new FillEditorForm())
- {
- editor.Fill = Fill.Clone();
- if (editor.ShowDialog() == DialogResult.OK)
- {
- Fill = editor.Fill;
- return true;
- }
- return false;
- }
- }
- /// <inheritdoc/>
- public override void OnBeforeInsert(int flags)
- {
- shape = (ShapeKind)flags;
- }
- /// <inheritdoc/>
- public override int GetImageIndex()
- {
- switch (Shape)
- {
- case ShapeKind.Rectangle:
- return 108;
- case ShapeKind.RoundRectangle:
- return 109;
- case ShapeKind.Ellipse:
- return 110;
- case ShapeKind.Triangle:
- return 111;
- case ShapeKind.Diamond:
- return 131;
- }
- return base.GetImageIndex();
- }
- #endregion
- }
- }
|