示例#1
0
        protected Size DrawMatrixType(ViewInfo view, int x, int y, string type, DrawMatrixValues drawValues)
        {
            Contract.Requires(view != null);
            Contract.Requires(type != null);
            Contract.Requires(drawValues != null);

            if (IsHidden && !IsWrapped)
            {
                return(DrawHidden(view, x, y));
            }

            var origX = x;
            var origY = y;

            AddSelection(view, x, y, view.Font.Height);

            x += TextPadding;

            x = AddIcon(view, x, y, Icons.Matrix, HotSpot.NoneId, HotSpotType.None);

            var tx = x;

            x = AddAddressOffset(view, x, y);

            x = AddText(view, x, y, view.Settings.TypeColor, HotSpot.NoneId, type) + view.Font.Width;
            if (!IsWrapped)
            {
                x = AddText(view, x, y, view.Settings.NameColor, HotSpot.NameId, Name);
            }
            x = AddOpenClose(view, x, y);

            x += view.Font.Width;

            x = AddComment(view, x, y);

            DrawInvalidMemoryIndicator(view, y);
            AddTypeDrop(view, y);
            AddDelete(view, y);

            if (LevelsOpen[view.Level])
            {
                drawValues(tx, ref x, ref y);
            }

            return(new Size(x - origX, y - origY + view.Font.Height));
        }
示例#2
0
        protected int DrawMatrixType(ViewInfo view, int x, int y, string type, DrawMatrixValues drawValues)
        {
            Contract.Requires(view != null);
            Contract.Requires(type != null);
            Contract.Requires(drawValues != null);

            if (IsHidden)
            {
                return(DrawHidden(view, x, y));
            }

            AddSelection(view, x, y, view.Font.Height);
            AddDelete(view, x, y);
            AddTypeDrop(view, x, y);

            x += TextPadding;

            x = AddIcon(view, x, y, Icons.Matrix, HotSpot.NoneId, HotSpotType.None);

            var tx = x;

            x = AddAddressOffset(view, x, y);

            x = AddText(view, x, y, Program.Settings.TypeColor, HotSpot.NoneId, type) + view.Font.Width;
            x = AddText(view, x, y, Program.Settings.NameColor, HotSpot.NameId, Name);
            x = AddOpenClose(view, x, y);

            x += view.Font.Width;

            x = AddComment(view, x, y);

            if (levelsOpen[view.Level])
            {
                drawValues(ref x, ref y, tx);
            }

            return(y + view.Font.Height);
        }
示例#3
0
        protected Size DrawMatrixType(DrawContext context, int x, int y, string type, DrawMatrixValues drawValues)
        {
            Contract.Requires(context != null);
            Contract.Requires(type != null);
            Contract.Requires(drawValues != null);

            if (IsHidden && !IsWrapped)
            {
                return(DrawHidden(context, x, y));
            }

            var origX = x;
            var origY = y;

            AddSelection(context, x, y, context.Font.Height);

            x = AddIconPadding(context, x);

            x = AddIcon(context, x, y, context.IconProvider.Matrix, HotSpot.NoneId, HotSpotType.None);

            var tx = x;

            x = AddAddressOffset(context, x, y);

            x = AddText(context, x, y, context.Settings.TypeColor, HotSpot.NoneId, type) + context.Font.Width;
            if (!IsWrapped)
            {
                x = AddText(context, x, y, context.Settings.NameColor, HotSpot.NameId, Name);
            }
            x = AddOpenCloseIcon(context, x, y);

            x += context.Font.Width;

            x = AddComment(context, x, y);

            DrawInvalidMemoryIndicatorIcon(context, y);
            AddContextDropDownIcon(context, y);
            AddDeleteIcon(context, y);

            if (LevelsOpen[context.Level])
            {
                drawValues(tx, ref x, ref y);
            }

            return(new Size(x - origX, y - origY + context.Font.Height));
        }