⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 invitecontrol.cs

📁 飞信的收发使用csharp进行开发
💻 CS
📖 第 1 页 / 共 4 页
字号:
                if (i >= this._maxSelectedCount)
                {
                    return;
                }
            }
        }

        public void SetTreeFocus()
        {
            this.treeContacts.Focus();
        }

        private void treeContacts_NodeAferCheck(object sender, BuddySelectionTreeCheckEventArgs e)
        {
            this.CheckNode(e.Node);
        }

        private void txtSearch_GotFocus(object sender, EventArgs e)
        {
            if (this.txtSearch.Text == this.emptyText)
            {
                this.fireByFunction = true;
                this.txtSearch.Text = "";
                this.fireByFunction = false;
                this.txtSearch.ForeColor = Color.Black;
            }
        }

        private void txtSearch_LostFocus(object sender, EventArgs e)
        {
            if (this.txtSearch.Text == "")
            {
                this.fireByFunction = true;
                this.txtSearch.Text = this.emptyText;
                this.fireByFunction = false;
                this.txtSearch.ForeColor = Color.Silver;
            }
        }

        private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            if (!this.fireByFunction)
            {
                try
                {
                    string keyWord = this.txtSearch.Text.Trim();
                    if (keyWord != this._lastSearchString)
                    {
                        this.treeContacts.Nodes.Clear();
                        if (keyWord.Length <= 0)
                        {
                            this.bindList();
                            this.MatchHelper.Clear();
                        }
                        else
                        {
                            Imps.Client.Core.ContactCollection matchContacts = this.MatchHelper.GetMatchContacts(keyWord);
                            List<Imps.Client.Core.Contact> allowContacts = this.GetAllowContacts(matchContacts.ListContacts);
                            if (this.ShowSelf && (this.me != null))
                            {
                                try
                                {
                                    if (("我自己".Contains(keyWord) || this.CurrentUser.MobileNo.Contains(keyWord)) || this.CurrentUser.Sid.ToString().Contains(keyWord))
                                    {
                                        this.AddMySelfNode();
                                    }
                                }
                                catch
                                {
                                }
                            }
                            this.BindContacts(null, allowContacts);
                        }
                        if (this._selectedContacts.Count > 0)
                        {
                            this.ReSelectNodes();
                        }
                        this._lastSearchString = keyWord;
                    }
                }
                catch (Exception exception)
                {
                    ClientLogger.WriteException(exception);
                }
                finally
                {
                    this.lblNoneContacts.Visible = this.treeContacts.Nodes.Count == 0;
                }
            }
        }

        private void UnCheckAllLable()
        {
            foreach (Label label in this.flowPanlContacts.Controls)
            {
                if (this.IsCheckedLabel(label))
                {
                    this.UnCheckLabel(label);
                }
            }
        }

        private void UnCheckLabel(Label label)
        {
            label.ForeColor = Color.Black;
            label.BackColor = Color.Transparent;
        }

        private void xSplitContainer_SplitterMoved(object sender, SplitterEventArgs e)
        {
            if (this.SplitterMoved != null)
            {
                this.SplitterMoved(sender, e);
            }
        }

        private Imps.Client.Core.User CurrentUser
        {
            get
            {
                return this._framework.AccountManager.CurrentUser;
            }
        }

        private ContactMatchHelper MatchHelper
        {
            get
            {
                if (this._matchHelper == null)
                {
                    this._matchHelper = new ContactMatchHelper(this.CurrentUser);
                }
                return this._matchHelper;
            }
        }

        public int MaxSelectedCount
        {
            get
            {
                return this._maxSelectedCount;
            }
            set
            {
                this._maxSelectedCount = value;
            }
        }

        public string Message
        {
            get
            {
                return this.lblMessage.Text;
            }
            set
            {
                this.lblMessage.Text = value;
            }
        }

        public int MessageLabelHeight
        {
            get
            {
                return this.lblMessage.Height;
            }
            set
            {
                this.lblMessage.Height = value;
            }
        }

        public bool OnlyShowOnline
        {
            get
            {
                return this._onlyShowOnline;
            }
            set
            {
                this._onlyShowOnline = value;
            }
        }

        public bool SearchTextBoxVisible
        {
            get
            {
                return this.txtSearch.Visible;
            }
            set
            {
                this.txtSearch.Visible = true;
            }
        }

        public Imps.Client.Core.Contact SelectedContact
        {
            get
            {
                if ((this.treeContacts.SelectedNode != null) && (this.treeContacts.SelectedNode.Tag is Imps.Client.Core.Contact))
                {
                    return (this.treeContacts.SelectedNode.Tag as Imps.Client.Core.Contact);
                }
                return null;
            }
        }

        public List<Imps.Client.Core.Contact> SelectedContacts
        {
            get
            {
                return this._selectedContacts;
            }
        }

        public bool ShowGroup
        {
            get
            {
                return this._showGroup;
            }
            set
            {
                this._showGroup = value;
            }
        }

        public bool ShowJ2MER1
        {
            get
            {
                return this._showJ2MER1;
            }
            set
            {
                this._showJ2MER1 = value;
            }
        }

        public bool ShowMobileBuddy
        {
            get
            {
                return this._showMobileBuddy;
            }
            set
            {
                this._showMobileBuddy = value;
            }
        }

        public bool ShowSelf
        {
            get
            {
                return this._showSelf;
            }
            set
            {
                this._showSelf = value;
            }
        }

        public bool ShowSMSOffline
        {
            get
            {
                return this._showSMSOffline;
            }
            set
            {
                this._showSMSOffline = value;
            }
        }

        public bool ShowSMSOnline
        {
            get
            {
                return this._showSMSOnline;
            }
            set
            {
                this._showSMSOnline = value;
            }
        }

        public bool ShowSymbianR1
        {
            get
            {
                return this._showSymbianR1;
            }
            set
            {
                this._showSymbianR1 = value;
            }
        }
    }
}

⌨️ 快捷键说明

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