示例#1
0
        internal void _SetImageIndex(int index)
        {
            this.iImage = index;

            if (this.iImage >= 0)
            {
                this.fFormat |= NativeHeader.HDF_IMAGE;
            }
            else
            {
                if (this.iImage != -1)
                {
                    throw new ArgumentException(ErrMsg.InvVal(index.ToString()), "value");
                }

                this.fFormat &= (~NativeHeader.HDF_IMAGE);
            }
        }
示例#2
0
        internal void _SetImageAlign(LeftRightAlignment enValue)
        {
            int       nFlag;
            const int fMask = NativeHeader.HDF_BITMAP_ON_RIGHT;

            switch (enValue)
            {
            case LeftRightAlignment.Left:
                nFlag = 0;
                break;

            case LeftRightAlignment.Right:
                nFlag = NativeHeader.HDF_BITMAP_ON_RIGHT;
                break;

            default:
                throw new NotSupportedException(ErrMsg.InvVal(enValue.ToString()), null);
            }

            this.fFormat &= (~fMask);
            this.fFormat |= nFlag;
        }