作者: 乔克斯
查看: 35200|回复: 24
打印 上一主题 下一主题

【好友列表操作Demo】CSkin好友列表的基础操作-2013.12.21更新

[复制链接]
跳转到指定楼层
#
乔克斯 发表于 2014-7-31 01:34:45 | 只看该作者 |只看大图 回帖奖励 |正序浏览 |阅读模式
查看: 35200|回复: 24
【CSkin_Demo】CSkin好友列表的基础操作
  本案例是对CSkin.dll中的好友列表的一个简单操作案例,刚新手入门的可以看看。

效果图:
1.获取选择好友。

2.删除选中好友。

3.闪烁选择好友。


更新时间:2013-12-21
窗体代码:
[C#] 纯文本查看 复制代码
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CCWin.SkinControl;

namespace Demo
{
    public partial class Form1 : Form
    {
        public Form1() {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e) {
            ChatListItem item = new ChatListItem("我的好友");
            ChatListSubItem sub = new ChatListSubItem();
            sub.NicName = "乔克斯";
            sub.DisplayName = "小乔";
            sub.Status = ChatListSubItem.UserStatus.QMe;
            item.SubItems.Add(sub);
            this.chatListBox1.Items.Add(item);
            ChatListItem item2 = new ChatListItem("亲人");
            ChatListSubItem sub2 = new ChatListSubItem();
            sub2.NicName = "乔克斯";
            sub2.DisplayName = "小乔";
            sub2.Status = ChatListSubItem.UserStatus.QMe;
            item2.SubItems.Add(sub2);
            this.chatListBox1.Items.Add(item2);
        }

        private void chatListBox1_DoubleClickSubItem(object sender, ChatListEventArgs e) {
            MessageBox.Show("你双击了" + e.SelectSubItem.NicName);
        }

        private void skinButton1_Click(object sender, EventArgs e) {
            this.chatListBox1.SelectItem.SubItems.Remove(this.chatListBox1.SelectSubItem);
        }

        private void skinButton2_Click(object sender, EventArgs e) {
            if (this.chatListBox1.SelectSubItem != null)
                MessageBox.Show("你选中了" + this.chatListBox1.SelectSubItem.NicName + " 分组是" + this.chatListBox1.SelectSubItem.OwnerListItem.Text);
        }

        private void skinButton3_Click(object sender, EventArgs e) {
            this.chatListBox1.SelectSubItem.IsTwinkle = true;
        }
    }
}

项目案例源码:

评分

参与人数 1金钱 +1 收起 理由
co聪仔co + 1 感谢分享,LZ辛苦了~

查看全部评分

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏1 转播转播
回复 论坛版权

使用道具 举报

24#
z582601898 发表于 2020-12-4 14:55:13 | 只看该作者
        感谢分享,LZ辛苦了~
23#
哇哇大哭 发表于 2019-6-11 14:09:06 | 只看该作者
楼主,这个列表的标题头可以隐藏或者不显示么。
22#
wodeyxsj 发表于 2019-6-9 14:36:58 | 只看该作者
谢谢分享
回复

使用道具 举报

21#
todayhxq 发表于 2019-4-30 09:22:06 | 只看该作者
非常好,感谢楼主
20#
boxxie 发表于 2019-3-27 13:16:35 | 只看该作者
多谢楼主分享哟
19#
brirmb 发表于 2019-3-22 12:41:14 | 只看该作者
学习分享,学习学习
18#
dana136 发表于 2018-7-1 22:41:23 | 只看该作者
想看看分组的源码
17#
co聪仔co 发表于 2018-6-2 10:47:46 | 只看该作者
怎么更换里面的图片?
16#
水依寒 发表于 2017-11-9 21:22:19 | 只看该作者
╮(╯▽╰)╭,就是这个弹窗不知道怎么优化掉
15#
sinner 发表于 2017-7-18 16:04:01 | 只看该作者
非常好,真的可以强力支持
您需要登录后才可以回帖 登录 | 加入CSkin博客

本版积分规则

QQ|申请友链|小黑屋|手机版|Archiver|CSkin ( 粤ICP备13070794号

Powered by Discuz! X3.2  © 2001-2013 Comsenz Inc.  Designed by ARTERY.cn
GMT+8, 2024-5-9 04:44, Processed in 0.601203 second(s), 34 queries , Gzip On.

快速回复 返回顶部 返回列表