コード例 #1
0
        private void TimerEventProcessor(Object myObject, EventArgs myEventArgs)
        {
            bool isget = WeichatTool.Getticket();

            if (isget)
            {
                isget = WeichatTool.GetUserinfo();
                if (isget)
                {
                    GoTimer.Stop();
                    GoTimer.Enabled = false;
                    Hide();
                    MainForm.Show();
                }
            }
        }
コード例 #2
0
        private void Init()
        {
            bool init = WeichatTool.InitWeicaht();

            WeichatTool.Friendlist = WeichatTool.Memberlist();
            var Friendlist = JsonConvert.DeserializeObject <dynamic>(WeichatTool.Friendlist);

            //创建好友列表容器
            CCWin.SkinControl.ChatListItem chatListItem1 = new CCWin.SkinControl.ChatListItem();
            //设置容器
            chatListItem1.Bounds           = new System.Drawing.Rectangle(0, 1, 202, 53);
            chatListItem1.IsOpen           = true;
            chatListItem1.IsTwinkleHide    = false;
            chatListItem1.OwnerChatListBox = this.FriendList;
            chatListItem1.Tag  = null;
            chatListItem1.Text = "好友列表";
            chatListItem1.TwinkleSubItemNumber = 0;
            int runnum = 0;

            //填充好友列表
            foreach (var rows in Friendlist.MemberList)
            {
                CCWin.SkinControl.ChatListSubItem chatListSubItemNum = new CCWin.SkinControl.ChatListSubItem();
                chatListSubItemNum.Bounds        = new System.Drawing.Rectangle(0, 27, 202, 27);
                chatListSubItemNum.DisplayName   = rows.RemarkName;
                chatListSubItemNum.HeadRect      = new System.Drawing.Rectangle(5, 30, 20, 20);
                chatListSubItemNum.HeadImage     = WeichatTool.CreateHttpimg("https://wx.qq.com" + rows.HeadImgUrl);
                chatListSubItemNum.ID            = ((uint)(0u));
                chatListSubItemNum.NicName       = rows.NickName;
                chatListSubItemNum.OwnerListItem = chatListItem1;
                chatListSubItemNum.PersonalMsg   = rows.Signature;;
                chatListItem1.SubItems.AddRange(new CCWin.SkinControl.ChatListSubItem[] {
                    chatListSubItemNum
                });
                this.FriendList.Items.AddRange(new CCWin.SkinControl.ChatListItem[] { chatListItem1 });
                runnum++;
                if (runnum % 5 == 0)
                {
                    Thread.Sleep(5000);
                }
            }
        }
コード例 #3
0
        private void GetQrocode()
        {
            Image WeichatQrcode = WeichatTool.QrcodeStream();

            Qrcode.BackgroundImage = WeichatQrcode;
        }