예제 #1
0
 public void initQunAndPaint()
 {
     try
     {
         CacheData.GroupList = CoolQApiExtend.GetGroupList(coolQApi);
         MyLogUtil.ErrToLog("获取的群列表大小:" + CacheData.GroupList.Count);
         MyLogUtil.ErrToLog("skinDataGridView2" + skinDataGridView2);
         MyLogUtil.ErrToLog("CacheData.GroupList" + CacheData.GroupList);
         MyLogUtil.ErrToLog("CacheData.BaseJson" + CacheData.BaseJson);
         //选中群列表中某些群
         UpdateDataGridView(skinDataGridView2, CacheData.GroupList, CacheData.BaseJson.CheckedQQQun);
         //选中群列表中某些群
         UpdateDataGridView(skinDataGridView1, CacheData.GroupList, CacheData.MovieConfig.CheckedQQQun);
     }
     catch (Exception eee)
     {
         MyLogUtil.ErrToLog("加载群信息失败,原因:" + eee);
     }
 }
예제 #2
0
        /// <summary>
        /// 刷新群列表
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            button2.Enabled = false;
            try {
                label1.Text = "正在刷新群列表...";
                //获取QQ群列表
                List <GroupInfo> qqQunList = CoolQApiExtend.GetGroupList(CacheData.CoolQApi);


                //将群数据刷新到组件
                RefreshQunListCom(qqQunList);
                //说明:加载选中群员的信息转移到了button3_Click

                //webChat.FriendsList(false);
            }
            catch (Exception ex)
            {
                label1.Text = "请重新获取";
                MessageBox.Show("刷新群列表出现异常,原因:" + ex.Message);
                MyLogUtil.ErrToLog("刷新群列表出现异常,原因:" + ex);
            }
            button2.Enabled = true;
        }