Пример #1
0
        /// <summary> 文档某节的Item绘制完成 </summary>
        /// <param name="AData">当前绘制的Data</param>
        /// <param name="ADrawItemIndex">Item对应的DrawItem序号</param>
        /// <param name="ADrawRect">Item对应的绘制区域</param>
        /// <param name="ADataDrawLeft">Data绘制时的Left</param>
        /// <param name="ADataDrawBottom">Data绘制时的Bottom</param>
        /// <param name="ADataScreenTop">绘制时呈现Data的Top位置</param>
        /// <param name="ADataScreenBottom">绘制时呈现Data的Bottom位置</param>
        /// <param name="ACanvas">画布</param>
        /// <param name="APaintInfo">绘制时的其它信息</param>
        protected override void DoSectionDrawItemPaintAfter(Object sender, HCCustomData aData, int aItemNo, int aDrawItemNo, RECT aDrawRect,
                                                            int aDataDrawLeft, int aDataDrawRight, int aDataDrawBottom, int aDataScreenTop, int aDataScreenBottom, HCCanvas aCanvas, PaintInfo aPaintInfo)
        {
            if ((!FHideTrace) && (FTraceCount > 0))  // 显示痕迹且有痕迹
            {
                HCCustomItem vItem = aData.Items[aItemNo];
                if (vItem.StyleNo > HCStyle.Null)
                {
                    DeItem vDeItem = vItem as DeItem;
                    if (vDeItem.StyleEx != StyleExtra.cseNone)  // 添加批注
                    {
                        HCDrawAnnotateDynamic vDrawAnnotate = new HCDrawAnnotateDynamic();
                        vDrawAnnotate.DrawRect = aDrawRect;
                        vDrawAnnotate.Title    = vDeItem.GetHint();
                        vDrawAnnotate.Text     = aData.GetDrawItemText(aDrawItemNo);

                        this.AnnotatePre.AddDrawAnnotate(vDrawAnnotate);
                    }
                }
            }

            if ((FPageBlankTip != "") && (aData is HCPageData))
            {
                if (aDrawItemNo < aData.DrawItems.Count - 1)
                {
                    if (aData.Items[aData.DrawItems[aDrawItemNo + 1].ItemNo].PageBreak)
                    {
                        DrawBlankTip_(aDataDrawLeft, aDrawRect.Top + aDrawRect.Height + aData.GetLineBlankSpace(aDrawItemNo), aDataDrawRight, aDataDrawBottom, aCanvas);
                    }
                }
                else
                {
                    DrawBlankTip_(aDataDrawLeft, aDrawRect.Top + aDrawRect.Height + aData.GetLineBlankSpace(aDrawItemNo), aDataDrawRight, aDataDrawBottom, aCanvas);
                }
            }

            base.DoSectionDrawItemPaintAfter(sender, aData, aItemNo, aDrawItemNo, aDrawRect, aDataDrawLeft, aDataDrawRight,
                                             aDataDrawBottom, aDataScreenTop, aDataScreenBottom, aCanvas, aPaintInfo);
        }
Пример #2
0
        /// <summary> 文档某节的Item绘制完成 </summary>
        /// <param name="AData">当前绘制的Data</param>
        /// <param name="ADrawItemIndex">Item对应的DrawItem序号</param>
        /// <param name="ADrawRect">Item对应的绘制区域</param>
        /// <param name="ADataDrawLeft">Data绘制时的Left</param>
        /// <param name="ADataDrawBottom">Data绘制时的Bottom</param>
        /// <param name="ADataScreenTop">绘制时呈现Data的Top位置</param>
        /// <param name="ADataScreenBottom">绘制时呈现Data的Bottom位置</param>
        /// <param name="ACanvas">画布</param>
        /// <param name="APaintInfo">绘制时的其它信息</param>
        protected override void DoSectionDrawItemPaintAfter(Object sender, HCCustomData aData, int aDrawItemNo, RECT aDrawRect,
                                                            int aDataDrawLeft, int aDataDrawBottom, int aDataScreenTop, int aDataScreenBottom, HCCanvas aCanvas, PaintInfo aPaintInfo)
        {
            if (FTraceCount > 0)  // 显示批注
            {
                HCCustomItem vItem = aData.Items[aData.DrawItems[aDrawItemNo].ItemNo];
                if (vItem.StyleNo > HCStyle.Null)
                {
                    DeItem vDeItem = vItem as DeItem;
                    if (vDeItem.StyleEx != StyleExtra.cseNone)  // 添加批注
                    {
                        HCDrawAnnotateDynamic vDrawAnnotate = new HCDrawAnnotateDynamic();
                        vDrawAnnotate.DrawRect = aDrawRect;
                        vDrawAnnotate.Title    = vDeItem.GetHint();
                        vDrawAnnotate.Text     = aData.GetDrawItemText(aDrawItemNo);

                        this.AnnotatePre.AddDrawAnnotate(vDrawAnnotate);
                    }
                }
            }

            base.DoSectionDrawItemPaintAfter(sender, aData, aDrawItemNo, aDrawRect, aDataDrawLeft, aDataDrawBottom,
                                             aDataScreenTop, aDataScreenBottom, aCanvas, aPaintInfo);
        }
Пример #3
0
        private void DoEmrEditMouseUp(object sender, MouseEventArgs e)
        {
            string vInfo = "";

            HCCustomItem vActiveItem = FEmrEdit.Data.GetTopLevelItem();

            if (vActiveItem != null)
            {
                if (FEmrEdit.Data.ActiveDomain.BeginNo >= 0)
                {
                    DeGroup vDeGroup = FEmrEdit.Data.Items[FEmrEdit.Data.ActiveDomain.BeginNo] as DeGroup;

                    vInfo = vDeGroup[DeProp.Name];
                }

                if (vActiveItem is DeItem)
                {
                    DeItem vDeItem = vActiveItem as DeItem;
                    if (vDeItem.StyleEx != StyleExtra.cseNone)
                    {
                        vInfo += "-" + vDeItem.GetHint();
                    }
                    else
                    if (vDeItem.Active &&
                        (vDeItem[DeProp.Index] != "") &&
                        (!vDeItem.IsSelectComplate) &&
                        (!vDeItem.IsSelectPart) &&
                        (Environment.TickCount - FMouseDownTick < 500)
                        )
                    {
                        vInfo = vInfo + "元素(" + vDeItem[DeProp.Index] + ")";

                        if (FEmrEdit.Data.ReadOnly)
                        {
                            //tssDeInfo.Text = "";
                            return;
                        }

                        POINT            vPt             = FEmrEdit.Data.GetActiveDrawItemCoord(); // 得到相对EmrEdit的坐标
                        HCCustomDrawItem vActiveDrawItem = FEmrEdit.Data.GetTopLevelDrawItem();
                        RECT             vDrawItemRect   = vActiveDrawItem.Rect;
                        vDrawItemRect = HC.View.HC.Bounds(vPt.X, vPt.Y, vDrawItemRect.Width, vDrawItemRect.Height);

                        if (HC.View.HC.PtInRect(vDrawItemRect, new POINT(e.X, e.Y)))
                        {
                            vPt.Y = vPt.Y + vActiveDrawItem.Height;

                            Point vPoint = new Point(vPt.X, vPt.Y);
                            vPoint = FEmrEdit.PointToScreen(vPoint);

                            //HC.Win32.User.ClientToScreen(FEmrEdit.Handle, ref vPt);
                            vPt.X = vPoint.X;
                            vPt.Y = vPoint.Y;
                            PopupForm().PopupDeItem(vDeItem, vPt);
                        }
                    }
                }
                else
                if (vActiveItem is DeEdit)
                {
                }
                else
                if (vActiveItem is DeCombobox)
                {
                }
                else
                if (vActiveItem is DeDateTimePicker)
                {
                }
            }

            //tssDeInfo.Text = vInfo;
        }