点击回首页
我的浏览记录 | | 帮助?
当前位置:
首页>> 企业应用>> Winform 自定义换肤界面OA管理系统源码>> 源文件浏览
[商业版 150RMB] WinForm,下载次数:5 次 | 关键字: 皮肤 控件 oa

源码截图

源码目录树

;
当前路径:Cool.Windows.Forms/CoolForm.cs
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Cool.Windows.Forms
{
    public class CoolForm : Form
    {
        private Size NormalSize = new Size(320, 240);

        private Panel TopBorderBar;
        private Panel BottomBorderBar;
        private Panel RightBorderBar;
        private Panel LeftBorderBar;

        private int borderBarWidth = 2;

        private Rectangle TopBorderRect;
        private Rectangle BottomBorderRect;
        private Rectangle RightBorderRect;
        private Rectangle LeftBorderRect;

        private MouseMoveStatus leftMouseMove = default(MouseMoveStatus);
        private MouseMoveStatus topMouseMove = default(MouseMoveStatus);
        private MouseMoveStatus rightMouseMove = default(MouseMoveStatus);
        private MouseMoveStatus bottomMouseMove = default(MouseMoveStatus);

        private bool leftMouseDown = false;
        private bool topMouseDown = false;
        private bool rightMouseDown = false;
        private bool bottomMouseDown = false;


        public CoolForm()
        {
            InitializeComponent();

            LeftBorderRect = new Rectangle(0, 0, borderBarWidth, LeftBorderBar.Height);
            TopBorderRect = new Rectangle(0, 0, TopBorderBar.Width, borderBarWidth);
            RightBorderRect = new Rectangle(RightBorderBar.Width - borderBarWidth, 0, borderBarWidth, RightBorderBar.Height);
            BottomBorderRect = new Rectangle(0, BottomBorderBar.Height - borderBarWidth, BottomBorderBar.Width, borderBarWidth);

        }

        private Color _borderColor = Color.FromArgb(0, 163, 129);
        [System.ComponentModel.Browsable(true)]
        [System.ComponentModel.DefaultValue(typeof(Color), "Color.FromArgb(0, 163, 129)")]
        public Color BorderColor
        {
            get => _borderColor;
            set
            {
                _borderColor = value;
                TopBorderBar.BackColor = _borderColor;
                BottomBorderBar.BackColor = _borderColor;
                RightBorderBar.BackColor = _borderColor;
                LeftBorderBar.BackColor = _borderColor;
            }
        }


        private bool _isBorder = true;
        [System.ComponentModel.Browsable(true)]
        [System.ComponentModel.DefaultValue(typeof(bool), "true")]
        public bool IsBorder
        {
            get => _isBorder;
            set
            {
                _isBorder = value;
                LeftBorderBar.Visible = _isBorder;
                TopBorderBar.Visible = _isBorder;
                RightBorderBar.Visible = _isBorder;
                BottomBorderBar.Visible = _isBorder;
            }
        }

        //是否可以拖动窗体来改变大小
        private bool _isDragging = true;
        [System.ComponentModel.Browsable(true)]
        [System.ComponentModel.DefaultValue(typeof(bool), "true")]
        public bool IsDragging
        {
            get => _isDragging;
            set
            {
                _isDragging = value;
            }
        }

        private void InitializeComponent()
        {
            this.LeftBorderBar = new System.Windows.Forms.Pane...
完整源码文件,请先购买后再查看
关于我们 | 顾问团队 | 发展历程 | 联系我们 | 源码上传
联系电话(Tel):4008-010-151(免长途)
地址:北京市海淀区大恒科技大厦五层 邮编:100080
Floor 5th,Daheng Building,Zhongguancun,Beijing,China,100080
51Aspx.com 版权所有 CopyRight © 2006-2022. 京ICP备09089570号 | 京公网安备11010702000869号