コード例 #1
0
ファイル: BaseControl.cs プロジェクト: mattweb28/pspplayer
        private void RenderBorder()
        {
            IntPtr  hdc = NativeMethods.GetWindowDC(this.Handle);
            APIRect s   = new APIRect();

            NativeMethods.GetWindowRect(this.Handle, ref s);

            using (Graphics g = Graphics.FromHdc(hdc))
            {
                DrawingTools.DrawBorder((BorderStyle2)(int)this.BorderStyle, this.BorderColor, g, new Rectangle(0, 0, s.Width, s.Height));
            }
            NativeMethods.ReleaseDC(this.Handle, hdc);
        }
コード例 #2
0
ファイル: WidgetListBox.cs プロジェクト: NTDLS/SyntaxBox
        private void RenderBorder()
        {
            IntPtr  hdc = NativeUser32Api.GetWindowDC(this.Handle);
            RECTAPI s   = new RECTAPI();

            NativeUser32Api.GetWindowRect(this.Handle, ref s);

            using (Graphics g = Graphics.FromHdc(hdc))
            {
                DrawingTools.DrawBorder((ControlBorderStyle)(int)this.BorderStyle, this.BorderColor, g, new Rectangle(0, 0, s.Width, s.Height));
            }
            NativeUser32Api.ReleaseDC(this.Handle, hdc);
        }
コード例 #3
0
        void Draw(object sender, WidgetDrawArgs args)
        {
            if (!Parent.VisualSettings.DrawOutline)
            {
                return;
            }

            DrawingTools.DrawBorder(
                Parent._white_dot,
                args.SpriteBatch,
                args.DrawingArea.ToRectangle(),
                OutlineThickness,
                Parent.VisualSettings.OutlineColor,
                Parent.VisualSettings.OutlineSides
                );
        }