contactgroupnode.cs

来自「破解的飞信源代码」· CS 代码 · 共 220 行

CS
220
字号
namespace Imps.Client.Pc.BizControls
{
    using System;
    using System.Drawing;

    public class ContactGroupNode : PaintTreeNode
    {
        private bool _enableAddContact;
        private bool _enableConversation;
        private bool _enableFileShare;
        private bool _enableIVR;
        private bool _enableSms;
        private string _name;
        private bool _showAddContact;
        private bool _showConversation;
        private bool _showFileShare;
        private bool _showIVR;
        private bool _showSms;
        private string _staticCol;
        private static Font _staticGroupFont = new Font("宋体", 10f, FontStyle.Bold);
        public bool ModifyColumnRectTopOnly;

        protected ContactGroupNode()
        {
            this._enableConversation = true;
            this._enableIVR = true;
            this._enableSms = true;
            this._enableFileShare = true;
            this._enableAddContact = true;
            this._showConversation = true;
            this._showIVR = true;
            this._showSms = true;
            this._showFileShare = true;
            this._showAddContact = true;
        }

        public ContactGroupNode(string groupName)
        {
            this._enableConversation = true;
            this._enableIVR = true;
            this._enableSms = true;
            this._enableFileShare = true;
            this._enableAddContact = true;
            this._showConversation = true;
            this._showIVR = true;
            this._showSms = true;
            this._showFileShare = true;
            this._showAddContact = true;
            this.initClass(groupName);
        }

        protected virtual void initClass(string groupName)
        {
            PaintTreeColumn column = new PaintTreeColumn();
            column.bDrawRectangle = true;
            column.bHoverRectangle = false;
            column.Column = 0;
            column.ColumnText = groupName;
            column.ColumnType = PaintTreeColumnType.TEXT;
            column.ColumnFont = _staticGroupFont;
            base.Columns.Add(column);
            column = new PaintTreeColumn();
            column.bDrawRectangle = true;
            column.bHoverRectangle = false;
            column.Column = 1;
            column.ColumnText = "";
            column.ColumnType = PaintTreeColumnType.TEXT;
            column.ColumnFont = _staticGroupFont;
            base.Columns.Add(column);
        }

        internal bool EnableAddContact
        {
            get
            {
                return this._enableAddContact;
            }
            set
            {
                this._enableAddContact = value;
            }
        }

        internal bool EnableConversation
        {
            get
            {
                return this._enableConversation;
            }
            set
            {
                this._enableConversation = value;
            }
        }

        internal bool EnableFileShare
        {
            get
            {
                return this._enableFileShare;
            }
            set
            {
                this._enableFileShare = value;
            }
        }

        internal bool EnableIVR
        {
            get
            {
                return this._enableIVR;
            }
            set
            {
                this._enableIVR = value;
            }
        }

        internal bool EnableSms
        {
            get
            {
                return this._enableSms;
            }
            set
            {
                this._enableSms = value;
            }
        }

        public string GroupName
        {
            get
            {
                return this._name;
            }
            set
            {
                base.Columns[0].ColumnText = value;
                this._name = value;
            }
        }

        internal bool ShowAddContact
        {
            get
            {
                return this._showAddContact;
            }
            set
            {
                this._showAddContact = value;
            }
        }

        internal bool ShowConversation
        {
            get
            {
                return this._showConversation;
            }
            set
            {
                this._showConversation = value;
            }
        }

        internal bool ShowFileShare
        {
            get
            {
                return this._showFileShare;
            }
            set
            {
                this._showFileShare = value;
            }
        }

        internal bool ShowIVR
        {
            get
            {
                return this._showIVR;
            }
            set
            {
                this._showIVR = value;
            }
        }

        internal bool ShowSms
        {
            get
            {
                return this._showSms;
            }
            set
            {
                this._showSms = value;
            }
        }

        public string StaticCol
        {
            get
            {
                return this._staticCol;
            }
            set
            {
                this._staticCol = value;
                base.Columns[1].ColumnText = value;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?