Example #1
0
        /// <summary>
        /// 选择要转发的聊天室
        /// </summary>
        /// <param name="obj"></param>
        private void SelectedChatItemChanged(object obj)
        {
            ChatInfo currentSelectItem = obj as ChatInfo;//当前选择的聊天条目

            ChatItems.ToList().ForEach(x => x.IsChatSelected = false);
            List <ChatInfo> tempChatInfos = ChatItems.Where(x => x.ChatID == currentSelectItem.ChatID && x.IsGroup == currentSelectItem.IsGroup).ToList();

            SelectedChatList.Clear();
            currentSelectItem.IsChatSelected = true;
            SelectedChatList.Add(currentSelectItem);
            if (tempChatInfos?.Count > 0)
            {
                tempChatInfos.ForEach(x => x.IsChatSelected = true);
            }
            if (SelectedChatList.Count > 0)
            {
                IsEnabled = true;
            }
            else
            {
                IsEnabled = false;
            }
        }