changtuiqie 7 лет назад
Родитель
Сommit
1957f29394

BIN
.vs/Ipad/v15/.suo


+ 49 - 3
IPADDemo/FormDemo.Designer.cs

@@ -208,6 +208,10 @@
             this.txt_qrcodeLog = new System.Windows.Forms.TextBox();
             this.txt_qrcodeLog = new System.Windows.Forms.TextBox();
             this.button42 = new System.Windows.Forms.Button();
             this.button42 = new System.Windows.Forms.Button();
             this.button14 = new System.Windows.Forms.Button();
             this.button14 = new System.Windows.Forms.Button();
+            this.button49 = new System.Windows.Forms.Button();
+            this.textBox2 = new System.Windows.Forms.TextBox();
+            this.textBox3 = new System.Windows.Forms.TextBox();
+            this.label57 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.tabControl1.SuspendLayout();
             this.tabControl1.SuspendLayout();
             this.tabPage1.SuspendLayout();
             this.tabPage1.SuspendLayout();
@@ -264,7 +268,7 @@
             this.tabControl1.Controls.Add(this.tabPage10);
             this.tabControl1.Controls.Add(this.tabPage10);
             this.tabControl1.Controls.Add(this.tabPage11);
             this.tabControl1.Controls.Add(this.tabPage11);
             this.tabControl1.Controls.Add(this.tabPage12);
             this.tabControl1.Controls.Add(this.tabPage12);
-            this.tabControl1.Location = new System.Drawing.Point(223, 13);
+            this.tabControl1.Location = new System.Drawing.Point(224, 13);
             this.tabControl1.Name = "tabControl1";
             this.tabControl1.Name = "tabControl1";
             this.tabControl1.SelectedIndex = 0;
             this.tabControl1.SelectedIndex = 0;
             this.tabControl1.Size = new System.Drawing.Size(773, 425);
             this.tabControl1.Size = new System.Drawing.Size(773, 425);
@@ -272,6 +276,10 @@
             // 
             // 
             // tabPage1
             // tabPage1
             // 
             // 
+            this.tabPage1.Controls.Add(this.button49);
+            this.tabPage1.Controls.Add(this.textBox2);
+            this.tabPage1.Controls.Add(this.textBox3);
+            this.tabPage1.Controls.Add(this.label57);
             this.tabPage1.Controls.Add(this.button24);
             this.tabPage1.Controls.Add(this.button24);
             this.tabPage1.Controls.Add(this.txt_linkImgUrl);
             this.tabPage1.Controls.Add(this.txt_linkImgUrl);
             this.tabPage1.Controls.Add(this.label28);
             this.tabPage1.Controls.Add(this.label28);
@@ -445,7 +453,7 @@
             // 
             // 
             // button1
             // button1
             // 
             // 
-            this.button1.Location = new System.Drawing.Point(485, 59);
+            this.button1.Location = new System.Drawing.Point(334, 59);
             this.button1.Name = "button1";
             this.button1.Name = "button1";
             this.button1.Size = new System.Drawing.Size(86, 28);
             this.button1.Size = new System.Drawing.Size(86, 28);
             this.button1.TabIndex = 4;
             this.button1.TabIndex = 4;
@@ -457,7 +465,7 @@
             // 
             // 
             this.txt_msgText.Location = new System.Drawing.Point(122, 59);
             this.txt_msgText.Location = new System.Drawing.Point(122, 59);
             this.txt_msgText.Name = "txt_msgText";
             this.txt_msgText.Name = "txt_msgText";
-            this.txt_msgText.Size = new System.Drawing.Size(344, 25);
+            this.txt_msgText.Size = new System.Drawing.Size(206, 25);
             this.txt_msgText.TabIndex = 3;
             this.txt_msgText.TabIndex = 3;
             // 
             // 
             // label3
             // label3
@@ -1996,6 +2004,40 @@
             this.button14.UseVisualStyleBackColor = true;
             this.button14.UseVisualStyleBackColor = true;
             this.button14.Click += new System.EventHandler(this.button14_Click);
             this.button14.Click += new System.EventHandler(this.button14_Click);
             // 
             // 
+            // button49
+            // 
+            this.button49.Location = new System.Drawing.Point(654, 59);
+            this.button49.Name = "button49";
+            this.button49.Size = new System.Drawing.Size(86, 28);
+            this.button49.TabIndex = 25;
+            this.button49.Text = "群发";
+            this.button49.UseVisualStyleBackColor = true;
+            this.button49.Click += new System.EventHandler(this.button49_Click);
+            // 
+            // textBox2
+            // 
+            this.textBox2.Location = new System.Drawing.Point(442, 59);
+            this.textBox2.Name = "textBox2";
+            this.textBox2.Size = new System.Drawing.Size(206, 25);
+            this.textBox2.TabIndex = 24;
+            // 
+            // textBox3
+            // 
+            this.textBox3.Location = new System.Drawing.Point(442, 13);
+            this.textBox3.Name = "textBox3";
+            this.textBox3.Size = new System.Drawing.Size(206, 25);
+            this.textBox3.TabIndex = 22;
+            this.textBox3.Text = "[\"AB1\",\"AC2\",\"AD3\"]";
+            // 
+            // label57
+            // 
+            this.label57.AutoSize = true;
+            this.label57.Location = new System.Drawing.Point(338, 18);
+            this.label57.Name = "label57";
+            this.label57.Size = new System.Drawing.Size(54, 15);
+            this.label57.TabIndex = 21;
+            this.label57.Text = "wxid:";
+            // 
             // FormDemo
             // FormDemo
             // 
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -2225,5 +2267,9 @@
         private System.Windows.Forms.TextBox txt_addUserInfo;
         private System.Windows.Forms.TextBox txt_addUserInfo;
         private System.Windows.Forms.Label label55;
         private System.Windows.Forms.Label label55;
         private System.Windows.Forms.Button button48;
         private System.Windows.Forms.Button button48;
+        private System.Windows.Forms.Button button49;
+        private System.Windows.Forms.TextBox textBox2;
+        private System.Windows.Forms.TextBox textBox3;
+        private System.Windows.Forms.Label label57;
     }
     }
 }
 }

+ 5 - 0
IPADDemo/FormDemo.cs

@@ -81,6 +81,11 @@ namespace IPADDemo
             var res=weChatThread.Wx_SendMsg(txt_msgWxid.Text, txt_msgText.Text);
             var res=weChatThread.Wx_SendMsg(txt_msgWxid.Text, txt_msgText.Text);
         }
         }
 
 
+        private void button49_Click(object sender, EventArgs e)
+        {
+            var res = weChatThread.Wx_MassMessage(txt_msgWxid.Text, txt_msgText.Text);
+        }
+
         private void button2_Click(object sender, EventArgs e)
         private void button2_Click(object sender, EventArgs e)
         {
         {
             OpenFileDialog ofd = new OpenFileDialog();
             OpenFileDialog ofd = new OpenFileDialog();

+ 27 - 0
IPADDemo/IPADDemo.csproj

@@ -11,6 +11,21 @@
     <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
     <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <FileAlignment>512</FileAlignment>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -178,5 +193,17 @@
     <Content Include="ffmpeg\silk_v3_decoder.exe" />
     <Content Include="ffmpeg\silk_v3_decoder.exe" />
     <Content Include="ffmpeg\silk_v3_encoder.exe" />
     <Content Include="ffmpeg\silk_v3_encoder.exe" />
   </ItemGroup>
   </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
+      <Visible>False</Visible>
+      <ProductName>Microsoft .NET Framework 4.6.1 %28x86 和 x64%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>
 </Project>

+ 13 - 0
IPADDemo/IPADDemo.csproj.user

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <PublishUrlHistory />
+    <InstallUrlHistory />
+    <SupportUrlHistory />
+    <UpdateUrlHistory />
+    <BootstrapperUrlHistory />
+    <ErrorReportUrlHistory />
+    <FallbackCulture>zh-CN</FallbackCulture>
+    <VerifyUploadedFiles>false</VerifyUploadedFiles>
+  </PropertyGroup>
+</Project>

+ 38 - 0
IPADDemo/WeChat/XzyWeChatThread.cs

@@ -704,6 +704,26 @@ namespace IPADDemo.WeChat
             }
             }
         }
         }
 
 
+        /// <summary>
+        /// 群发消息
+        /// </summary>
+        /// <param name="wxid"></param>
+        /// <param name="content"></param>
+        /// <returns></returns>
+        public unsafe string Wx_MassMessage(string wxid, string content)
+        {
+            WxDelegate.show(string.Format("发送文字: {0}", content));
+            content = content.Replace(" ", "\r\n");
+            fixed (int* WxUser1 = &pointerWxUser, msgptr1 = &msgPtr)
+            {
+                XzyWxApis.WXMassMessage(pointerWxUser, wxid, content, (int)msgptr1);
+                var datas = MarshalNativeToManaged((IntPtr)msgPtr);
+                var str = datas.ToString();
+                Wx_ReleaseEX(ref msgPtr);
+                return str;
+            }
+        }
+
         private int wx_imptr;
         private int wx_imptr;
         /// <summary>
         /// <summary>
         /// 发消息 - 图片
         /// 发消息 - 图片
@@ -1814,6 +1834,24 @@ namespace IPADDemo.WeChat
             return result;
             return result;
         }
         }
 
 
+        /// <summary>
+        /// 公众号搜索
+        /// </summary>
+        /// <param name="search"></param>
+        /// <returns></returns>
+        public unsafe string Wx_WebSearch(string search)
+        {
+            var result = "";
+            fixed (int* WxUser1 = &pointerWxUser, msgptr1 = &msgPtr)
+            {
+                XzyWxApis.WXWebSearch(pointerWxUser, search, (int)msgptr1);
+                var datas = MarshalNativeToManaged((IntPtr)msgPtr);
+                result = datas.ToString();
+                Wx_ReleaseEX(ref msgPtr);
+            }
+            return result;
+        }
+
         /// <summary>
         /// <summary>
         /// 获取公众号菜单
         /// 获取公众号菜单
         /// </summary>
         /// </summary>

BIN
IPADDemo/bin/Debug/IPADDemo.exe


BIN
IPADDemo/bin/Debug/IPADDemo.pdb


BIN
IPADDemo/obj/Debug/IPADDemo.csproj.GenerateResource.cache


BIN
IPADDemo/obj/Debug/IPADDemo.exe


BIN
IPADDemo/obj/Debug/IPADDemo.pdb