Ejemplo n.º 1
0
        private void txtSearch_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                e.Handled = true;
                var data = !IsListenView?NotListenWeChatData.FindAll(item => { return(item.ShowName.Contains(txtSearch.Text)); }) : ListenWeChatData.FindAll(item => { return(item.ShowName.Contains(txtSearch.Text)); });

                SetContactsView(data);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 搜索
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            var data = !IsListenView?NotListenWeChatData.FindAll(item => { return(item.ShowName.Contains(txtSearch.Text)); }) : ListenWeChatData.FindAll(item => { return(item.ShowName.Contains(txtSearch.Text)); });

            SetContactsView(data);
        }