Esempio n. 1
0
        /// <summary>
        /// Detekce prostoru Overlay
        /// </summary>
        /// <param name="drawArgs"></param>
        void ITextEditOverlay.DetectOverlayBounds(TextEditDrawArgs drawArgs)
        {
            int size = drawArgs.InnerBounds.Height - 2;

            if (size > 24)
            {
                size = 24;
            }
            Rectangle overlayBounds = new Rectangle(drawArgs.InnerBounds.Right - size, drawArgs.InnerBounds.Top, size, size);
            Rectangle textBounds    = drawArgs.TextBounds;

            textBounds.Width       = overlayBounds.X - textBounds.X;
            drawArgs.TextBounds    = textBounds;
            drawArgs.OverlayBounds = overlayBounds;
        }
Esempio n. 2
0
        /// <summary>
        /// Vykreslení
        /// </summary>
        /// <param name="drawArgs"></param>
        void ITextEditOverlay.DrawOverlay(TextEditDrawArgs drawArgs)
        {
            if (!drawArgs.OverlayBounds.HasValue)
            {
                return;
            }
            Rectangle overlayBounds = drawArgs.OverlayBounds.Value;
            Image     image         = this.Image;

            if (image == null)
            {
                image = (!IsRelationToDocument ? Skin.TextBox.IconRelationRecord : Skin.TextBox.IconRelationDocument);
            }
            if (drawArgs.HasFocus || drawArgs.InteractiveState.HasFlag(GInteractiveState.FlagOver))
            {
                Painter.DrawImage(drawArgs.Graphics, overlayBounds, image, drawArgs.InteractiveState);
            }
            else
            {
                Painter.DrawImage(drawArgs.Graphics, overlayBounds, image, 0.45f);
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Vykreslení
 /// </summary>
 /// <param name="drawArgs"></param>
 void ITextEditOverlay.DrawOverlay(TextEditDrawArgs drawArgs)
 {
     Painter.DrawRelationLine(drawArgs.Graphics, drawArgs.InnerBounds, this.IsRelationToDocument, this.IsRelationInGrid, color: LineColor);
 }
Esempio n. 4
0
 /// <summary>
 /// Detekce prostoru Overlay
 /// </summary>
 /// <param name="drawArgs"></param>
 void ITextEditOverlay.DetectOverlayBounds(TextEditDrawArgs drawArgs)
 {
 }