Skip to content

Commit 234a34c

Browse files
committed
1
1
1 parent 0952c9d commit 234a34c

File tree

11 files changed

+121
-9
lines changed

11 files changed

+121
-9
lines changed

.vs/Ipad/v15/.suo

2 KB
Binary file not shown.
4 KB
Binary file not shown.
8.05 KB
Binary file not shown.

IPADDemo/FormDemo.Designer.cs

Lines changed: 93 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

IPADDemo/FormDemo.cs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ namespace IPADDemo
1515
{
1616
public partial class FormDemo : Form
1717
{
18+
XzyWeChatThread weChatThread;
19+
1820
public FormDemo()
1921
{
2022
InitializeComponent();
@@ -25,8 +27,7 @@ public FormDemo()
2527

2628
private void FormDemo_Load(object sender, EventArgs e)
2729
{
28-
XzyWeChatThread weChatThread = new XzyWeChatThread();
29-
30+
weChatThread = new XzyWeChatThread();
3031
}
3132

3233
void calback_qrcode(string qrcode)
@@ -43,5 +44,25 @@ void calback_show(string str)
4344
{
4445
textBox1.Text = str;
4546
}
47+
48+
private void button1_Click(object sender, EventArgs e)
49+
{
50+
weChatThread.Wx_SendMsg(txt_msgWxid.Text, txt_msgText.Text);
51+
}
52+
53+
private void button2_Click(object sender, EventArgs e)
54+
{
55+
OpenFileDialog ofd = new OpenFileDialog();
56+
57+
ofd.Filter = "图片文件 |*.jpg;*.png";
58+
ofd.ValidateNames = true;
59+
ofd.CheckPathExists = true;
60+
ofd.CheckFileExists = true;
61+
if (ofd.ShowDialog() == DialogResult.OK)
62+
{
63+
string FileName = ofd.FileName;
64+
weChatThread.Wx_SendImg(txt_msgWxid.Text, FileName);
65+
}
66+
}
4667
}
4768
}

IPADDemo/WeChat/XzyWeChatThread.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ public unsafe void Init62(string str16, string WxUsername, string wxpassword)
579579
this.TcpSendMsg(TcpMsg.OL, this.wxUser);
580580
Task.Factory.StartNew(delegate { this.Wx_GetContacts(); });
581581

582-
//马志远:登录成功后,取出token备用
582+
//:登录成功后,取出token备用
583583
XzyWxApis.WXGetLoginToken(pointerWxUser, (int)pushStr1);
584584
var datas3 = MarshalNativeToManaged((IntPtr)pushStr);
585585
var sstr3 = datas3.ToString();
@@ -604,7 +604,7 @@ public unsafe void Init62(string str16, string WxUsername, string wxpassword)
604604
this.TcpSendMsg(TcpMsg.OL, this.wxUser);
605605
Task.Factory.StartNew(delegate { this.Wx_GetContacts(); });
606606

607-
//马志远:登录成功后,取出token备用
607+
//:登录成功后,取出token备用
608608
XzyWxApis.WXGetLoginToken(pointerWxUser, (int)pushStr1);
609609
var datas3 = MarshalNativeToManaged((IntPtr)pushStr);
610610
var sstr3 = datas3.ToString();
@@ -714,6 +714,7 @@ public static int TimeStamp
714714
/// <param name="content"></param>
715715
public unsafe void Wx_SendMsg(string wxid, string content)
716716
{
717+
WxDelegate.show(string.Format("发送文字: {0}", content));
717718
content = content.Replace(" ", "\r\n");
718719
fixed (int* WxUser1 = &pointerWxUser, msgptr1 = &msgPtr)
719720
{
@@ -732,7 +733,7 @@ public unsafe void Wx_SendMsg(string wxid, string content)
732733
/// <param name="imgpath"></param>
733734
public unsafe void Wx_SendImg(string wxid, string imgpath)
734735
{
735-
WxDelegate.show(string.Format("发送图片 {0}", imgpath));
736+
WxDelegate.show(string.Format("发送图片 {0}", imgpath));
736737

737738
fixed (int* WxUser1 = &pointerWxUser, imptr1 = &wx_imptr)
738739
{
@@ -1212,7 +1213,7 @@ public unsafe Dictionary<string, packitme> RedpackOK(string json, int Timestamp)
12121213
Wx_ReleaseEX(ref redPack);
12131214
#endregion
12141215

1215-
#region 循环接收红包事件,先隐藏掉,马志远
1216+
#region 循环接收红包事件,先隐藏掉
12161217
double time = Utilities.GetTimestamp;
12171218
//while (true)
12181219
//{

IPADDemo/bin/Debug/IPADDemo.exe

1.5 KB
Binary file not shown.

IPADDemo/bin/Debug/IPADDemo.pdb

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

IPADDemo/obj/Debug/IPADDemo.exe

1.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)