treenodecontact.cs

来自「飞信的收发使用csharp进行开发」· CS 代码 · 共 77 行

CS
77
字号
namespace Imps.Client.Pc.UIContactList
{
    using Imps.Client.Pc.BizControls;
    using System;

    public class TreeNodeContact
    {
        private int _contactGroupId;
        private string _contactUri;
        private bool _isContact;
        private NodeKey _nodeKeyValue;

        public TreeNodeContact(NodeKey nodeKeyValue, int contactGroupId)
        {
            this._nodeKeyValue = nodeKeyValue;
            this._contactGroupId = contactGroupId;
            this._isContact = false;
        }

        public TreeNodeContact(NodeKey nodeKeyValue, string uri)
        {
            this._nodeKeyValue = nodeKeyValue;
            this._contactUri = uri;
            this._isContact = true;
        }

        public int ContactGroupId
        {
            get
            {
                return this._contactGroupId;
            }
            internal set
            {
                this._isContact = false;
                this._contactUri = string.Empty;
                this._contactGroupId = value;
            }
        }

        public string ContactUri
        {
            get
            {
                return this._contactUri;
            }
            internal set
            {
                this._isContact = true;
                this._contactGroupId = -1;
                this._contactUri = value;
            }
        }

        public bool IsContactNode
        {
            get
            {
                return this._isContact;
            }
        }

        public NodeKey NodeKeyValue
        {
            get
            {
                return this._nodeKeyValue;
            }
            internal set
            {
                this._nodeKeyValue = value;
            }
        }
    }
}

⌨️ 快捷键说明

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