123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Windows.Forms;
- using MSXML2;//引入com microsoft.xml.3.0
- namespace WindowsApplication1
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click_1(object sender, EventArgs e)
- {
- string uid = t_uid.Text.Trim();
- string pwd = t_pwd.Text.Trim();
- string mob = t_mob.Text.Trim();
- string msg = t_msg.Text.Trim();
- string Send_URL = "http://service.winic.org/sys_port/gateway/?id=" + uid + "&pwd=" + pwd + "&to=" + mob + "&content=" + msg + "&time=";
- //____________________________
- MSXML2.XMLHTTP xmlhttp = new MSXML2.XMLHTTP();
- xmlhttp.open("GET", Send_URL, false, null, null);
- xmlhttp.send("");
- MSXML2.XMLDocument dom = new XMLDocument();
- Byte[] b = (Byte[])xmlhttp.responseBody;
- //string Flag = System.Text.ASCIIEncoding.UTF8.GetString(b, 0, b.Length);
- string andy = System.Text.Encoding.GetEncoding("GB2312").GetString(b).Trim();
- vtag.Text = andy;
- }
- private void button2_Click(object sender, EventArgs e)
- {
- string uid = t_uid.Text.Trim();
- string pwd = t_pwd.Text.Trim();
- string Send_URL = "http://service.winic.org:8009/webservice/public/remoney.asp?uid=" + uid + "&pwd=" + pwd + "";
- //____________________________
- MSXML2.XMLHTTP xmlhttp = new MSXML2.XMLHTTP();
- xmlhttp.open("GET", Send_URL, false, null, null);
- xmlhttp.send("");
- MSXML2.XMLDocument dom = new XMLDocument();
- Byte[] b = (Byte[])xmlhttp.responseBody;
- //string Flag = System.Text.ASCIIEncoding.UTF8.GetString(b, 0, b.Length);
- string andy = System.Text.Encoding.GetEncoding("GB2312").GetString(b).Trim();
- vtag.Text = andy;
- }
- private void button3_Click(object sender, EventArgs e)
- {
- SoftKey ytSoftKey = new SoftKey();
- short ret = ytSoftKey.Ini();
- if (ret == -1053) { MessageBox.Show("系统上没有发现有任何加密锁,请插入加密锁后再进行操作。"); return; }
- // else MessageBox.Show("正版用户");
- // card_gzdy@gdb.com.cn 21组 3480 周小姐
- string retMsg = ytSoftKey.GetErrInfo(ret);
- if (ret != 0)
- {
- //m_key.Text是用户输入的授权码,为513个字符串长度,含结束字符串
- ret = ytSoftKey.Reg("A8FB611A633FA015754E9D762BD7889C6CCD8C01699AE9D6CF35AA13D6BD0FADF51764A04CA91F03E944595C5DA1591AFD0EA0DA0E82680CD7F4C7D78EAFCFD29315DC0A90E7A1AAD44EE114862A27C3F5B2D08345E920071814D1CED2C86F2BCBCDD268C89C62E1B792EFDDF64C748BD6308385892D7456850F580EE6F4B6F8");//使用我们的开发工具生成的加密类的注册函数对生成的加密文件进行注册
- if (ret != 0) { MessageBox.Show("注册错误,错误原因是:" + ytSoftKey.GetErrInfo(ret)); return; }
- ret = ytSoftKey.Ini();
- if (ret != 0) MessageBox.Show("找不到指定的加密锁,继续运行将会导致运算结果不正确。错误原因:" + ytSoftKey.GetErrInfo(ret));
- else MessageBox.Show("注册成功");
- }
- if (ret == 0)
- {
- int D0 = 0; int D1 = 0; int D2 = 0; int D3 = 0; int D4 = 0; int D5 = 0; int D6 = 0; int D7 = 0;
- double F0 = 0; double F1 = 0; double F2 = 0; double F3 = 0; double F4 = 0; double F5 = 0; double F6 = 0; double F7 = 0;
- string S0 = "AAAA"; string S1 = ""; string S2 = ""; string S3 = ""; string S4 = ""; string S5 = ""; string S6 = ""; string S7 = "";
- short ret2 = ytSoftKey.GetJMGTest(ref D0, ref D1, ref D2, ref D3, ref D4, ref D5, ref D6, ref D7,
- ref F0, ref F1, ref F2, ref F3, ref F4, ref F5, ref F6, ref F7,
- ref S0, ref S1, ref S2, ref S3, ref S4, ref S5, ref S6, ref S7);
- MessageBox.Show(S0);
- }
- }
- }
- }
|