Пример #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 button3_Click(object sender, EventArgs e)
        {
            try
            {
                if (radioButton1.Checked)
                {
                    CacheData.IsAutoAddGroupMemberJifen = true;
                }


                if (comboBox1.Text == "" || comboBox2.Text == "")
                {
                    MessageBox.Show("请选择qq群和数据库!");
                    return;
                }
                //缓存当前选中的QQ群
                CacheData.SelectedGroupIndex = comboBox2.SelectedIndex;

                //webChat.grox[comboBox2.SelectedIndex].seq = comboBox1.Text;
                CacheData.Seq = comboBox1.Text;

                //加载当前选中群的群员信息
                label1.Text = "正在加载选中群的群员信息";
                MyLogUtil.ToLogFotTest("选中的索引值:" + CacheData.SelectedGroupIndex);
                GroupInfo currentSelectedGroup = CacheData.CurrentGroupList[CacheData.SelectedGroupIndex];
                CacheData.CurrentSelectedGroupId = currentSelectedGroup.GroupId;
                //MyLogUtil.ToLogFotTest("#####进入主界面前,选中的群:"+currentSelectedGroup.GroupName+"____"+currentSelectedGroup.GroupId + "___" + comboBox2.SelectedIndex);
                CoolQApiExtend.GetGroupMemberListAndCache(CacheData.CoolQApi, currentSelectedGroup.GroupId);


                Form1 qr = new Form1(currentSelectedGroup, this.Text);
                CacheData.MainFrom = qr;
                qr.Show();
                Hide();
            }catch (Exception ex)
            {
                CacheData.CoolQApi.AddLog(40, Newbe.CQP.Framework.CoolQLogLevel.Debug, "qrCode类中button3_Click方法出错,异常信息:" + ex);
                MyLogUtil.ErrToLog("进入主界面时出现错误,原因:" + ex);
                MessageBox.Show("进入主界面出现错误");
            }
        }
Пример #3
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;
        }
Пример #4
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            String qqQunNum = textBox13.Text;

            CoolQApiExtend.GetGroupMemberList(Convert.ToInt64(qqQunNum), coolQApi);
        }
Пример #5
0
 private void button5_Click(object sender, EventArgs e)
 {
     CoolQApiExtend.ParseGroupList("AAAAAQASAAAAACz8gXYACLXn07DQxbfi");
 }