基本信息
源码名称:微信数据提交工具 完整源码下载
源码大小:2.66M
文件格式:.rar
开发语言:C#
更新时间:2014-12-09
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
在微信公众平台开发中,有些xml的提交,用这个工具,比较方便一些。
源码涉及到httpRequest的操作
public partial class frmMain : SkinForm
{
private Thread uiThread = null;
private SystemMenuNativeWindow _systemMenuNativeWindow;
private OwnerDrawSystemMenuHook _ownerDrawSystemMenuHook;
private MyOpaqueLayer m_OpaqueLayer = null;//半透明蒙板层MyOpaqueLayer
public frmMain()
{
InitializeComponent();
try
{
_ownerDrawSystemMenuHook = new OwnerDrawSystemMenuHook();
}
catch
{
;
}
cmdType.SelectedIndex = 0;
initval();
}
protected override void OnCreateControl()
{
base.OnCreateControl();
if (_systemMenuNativeWindow == null)
{
_systemMenuNativeWindow = new SystemMenuNativeWindow(this);
}
_systemMenuNativeWindow.AppendSeparator();
_systemMenuNativeWindow.AppendMenu(
1001,
"更多微信公众平台开发资讯",
delegate(object sender, EventArgs e)
{
});
}
private void cmdType_SelectedIndexChanged(object sender, EventArgs e)
{
var iIndex = cmdType.SelectedIndex;
switch (iIndex) {
case 0:
ShowPane(panelText);
break;
case 1:
ShowPane(panelImage);
break;
case 2:
ShowPane(panelVoice);
break;
case 3:
ShowPane(panelVideo);
break;
case 4:
ShowPane(panelLocation);
break;
case 5:
ShowPane(panelLink);
break;
default :
ShowPane(panelText);
break;
}
}
private void ShowPane(Panel panel) {
panelText.Hide();
panelImage.Hide();
panelVoice.Hide();
panelVideo.Hide();
panelLocation.Hide();
panelLink.Hide();
panel.Show();
}
private void artLogo_Click(object sender, EventArgs e)
{
}
private void but_setting_Click(object sender, EventArgs e)
{
FormVal form = new FormVal(this).FormParser();
WxRequest val = new RequestParser().Execute(form);
PostEntity entity = new BuilderProcess().Execute(val, form);
this.txtPost.Text = entity.StreamXml;
}
private void but_send_Click(object sender, EventArgs e)
{
String streamXmlPost = txtPost.Text.Trim();
String strServPath = txtServAddress.Text.Trim();
if (String.IsNullOrEmpty(streamXmlPost) || String.IsNullOrEmpty(strServPath))
return;
uiThread = new Thread(new ThreadStart(new SendMessageUiThread(this) { OnBeginComminucation = ComminucationBegin, OnEndComminucation = ComminucationComplate, OnChangeRiceveMsg = ChangeRiceveMsg }.Process));
uiThread.Start();
}
protected void ChangeRiceveMsg(String strStream) {
XmlFormat.Process(ref strStream, false);
txtRiceve.Text = strStream;
}
protected void ComminucationBegin() {
ShowOpaqueLayer(this, 200, true);
}
protected void ComminucationComplate()
{
HideOpaqueLayer();
}
/// <summary>
/// 显示遮罩层
/// </summary>
/// <param name="control"></param>
/// <param name="alpha"></param>
/// <param name="showLoadingImage"></param>
public void ShowOpaqueLayer(Control control, int alpha, bool showLoadingImage)
{
if (this.m_OpaqueLayer == null)
{
this.m_OpaqueLayer = new MyOpaqueLayer(alpha, showLoadingImage);
control.Controls.Add(this.m_OpaqueLayer);
this.m_OpaqueLayer.Dock = DockStyle.Fill;
this.m_OpaqueLayer.BringToFront();
}
this.m_OpaqueLayer.Enabled = true;
this.m_OpaqueLayer.Visible = true;
}
/// <summary>
/// 隐藏遮罩层
/// </summary>
public void HideOpaqueLayer()
{
if (this.m_OpaqueLayer != null)
{
this.m_OpaqueLayer.Enabled = false;
this.m_OpaqueLayer.Visible = false;
}
}
private void initval() {
this.txtServAddress.Text = "http://localhost/acc/wx/basic.ashx";
this.txtFromUserName.Text = "jw2100";
this.txtToUserName.Text = "v101081";
this.txtContent.Text = "hello";
}
}