基线 SVN r240

SVN-Revision: r240
This commit is contained in:
cyf
2025-02-06 06:46:06 +00:00
commit ab56a9bcf7
5317 changed files with 902274 additions and 0 deletions
+223
View File
@@ -0,0 +1,223 @@
namespace SendSms
{
partial class Form1
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.btnBegin = new System.Windows.Forms.Button();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panel1 = new System.Windows.Forms.Panel();
this.txtTimeInterval = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.txtName = new System.Windows.Forms.TextBox();
this.txtDataBase = new System.Windows.Forms.TextBox();
this.txtPassword = new System.Windows.Forms.TextBox();
this.txtSeverId = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.Load +=new System.EventHandler(Form1_Load);
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// btnBegin
//
this.btnBegin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnBegin.Location = new System.Drawing.Point(513, 38);
this.btnBegin.Name = "btnBegin";
this.btnBegin.Size = new System.Drawing.Size(79, 23);
this.btnBegin.TabIndex = 0;
this.btnBegin.Text = "开始发送";
this.btnBegin.UseVisualStyleBackColor = true;
this.btnBegin.Click += new System.EventHandler(this.button1_Click);
//
// timer1
//
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// panel1
//
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.txtTimeInterval);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.txtName);
this.panel1.Controls.Add(this.txtDataBase);
this.panel1.Controls.Add(this.txtPassword);
this.panel1.Controls.Add(this.txtSeverId);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.btnBegin);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(604, 72);
this.panel1.TabIndex = 1;
//
// txtTimeInterval
//
this.txtTimeInterval.Location = new System.Drawing.Point(420, 9);
this.txtTimeInterval.Name = "txtTimeInterval";
this.txtTimeInterval.Size = new System.Drawing.Size(89, 21);
this.txtTimeInterval.TabIndex = 10;
this.txtTimeInterval.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtTimeInterval_KeyPress);
//
// label5
//
this.label5.Location = new System.Drawing.Point(336, 9);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(88, 23);
this.label5.TabIndex = 9;
this.label5.Text = "间隔时间设置";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// txtName
//
this.txtName.Location = new System.Drawing.Point(81, 40);
this.txtName.Name = "txtName";
this.txtName.Size = new System.Drawing.Size(98, 21);
this.txtName.TabIndex = 8;
//
// txtDataBase
//
this.txtDataBase.Location = new System.Drawing.Point(242, 9);
this.txtDataBase.Name = "txtDataBase";
this.txtDataBase.Size = new System.Drawing.Size(88, 21);
this.txtDataBase.TabIndex = 7;
//
// txtPassword
//
this.txtPassword.Location = new System.Drawing.Point(242, 40);
this.txtPassword.Name = "txtPassword";
this.txtPassword.PasswordChar = '*';
this.txtPassword.Size = new System.Drawing.Size(88, 21);
this.txtPassword.TabIndex = 6;
//
// txtSeverId
//
this.txtSeverId.Location = new System.Drawing.Point(81, 9);
this.txtSeverId.Name = "txtSeverId";
this.txtSeverId.Size = new System.Drawing.Size(98, 21);
this.txtSeverId.TabIndex = 5;
//
// label4
//
this.label4.Location = new System.Drawing.Point(174, 9);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(71, 23);
this.label4.TabIndex = 4;
this.label4.Text = "数据库";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label3
//
this.label3.Location = new System.Drawing.Point(12, 40);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(71, 23);
this.label3.TabIndex = 3;
this.label3.Text = "登录名称";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label2
//
this.label2.Location = new System.Drawing.Point(174, 40);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(71, 23);
this.label2.TabIndex = 2;
this.label2.Text = "登录密码";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label1
//
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(71, 23);
this.label1.TabIndex = 1;
this.label1.Text = "服务器地址";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// textBox1
//
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox1.Location = new System.Drawing.Point(0, 72);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(604, 314);
this.textBox1.TabIndex = 2;
//
// label6
//
this.label6.Location = new System.Drawing.Point(515, 9);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(78, 23);
this.label6.TabIndex = 11;
this.label6.Text = "秒(最短30秒)";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(604, 386);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.panel1);
this.MinimumSize = new System.Drawing.Size(620, 425);
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "短信发送工具";
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnBegin;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TextBox txtTimeInterval;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtName;
private System.Windows.Forms.TextBox txtDataBase;
private System.Windows.Forms.TextBox txtPassword;
private System.Windows.Forms.TextBox txtSeverId;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label6;
}
}
+423
View File
@@ -0,0 +1,423 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Lskj.Core;
using Aliyun.Acs.Core;
using Aliyun.Acs.Core.Profile;
using Aliyun.Acs.Core.Http;
using Aliyun.Acs.Core.Exceptions;
using System.Runtime.InteropServices;
using Lskj.Data;
using System.Data.SqlClient;
using Lskj.Util;
using System.IO;
using System.Collections.Specialized;
using System.Text.RegularExpressions;
using Lskj.Control;
using Lskj.Business.Impl;
namespace SendSms
{
public partial class Form1 : Form
{
/// <summary>
/// 阿里云账号
/// </summary>
string SMSKey = "LTAI4FoHMd53f81TcwirQFjX";
/// <summary>
/// 阿里云密码
/// </summary>
string SMSSecret = "eU13qa5jgwnY4LfVvRLe0YvCVJCLz1";
/// <summary>
/// 默认签名
/// </summary>
string SignName = "朗速科技";
/// <summary>
/// ini文件内段落名
/// </summary>
string company = "短信发送工具";
/// <summary>
/// 初始时间间隔
/// </summary>
int second = 30;
/// <summary>
/// 是否在运行
/// </summary>
bool isExecing = false;
public Form1()
{
InitializeComponent();
}
/// <summary>
/// 初始化
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Form1_Load(object sender, EventArgs e)
{
txtSeverId.Text = IniUtil.IniReadValue(company, "serverName");
txtDataBase.Text = IniUtil.IniReadValue(company, "dbName");
txtName.Text = IniUtil.IniReadValue(company, "user");
txtPassword.Text = IniUtil.IniReadValue(company, "password");
txtTimeInterval.Text = IniUtil.IniReadValue(company, "interval");
if (string.IsNullOrEmpty(txtTimeInterval.Text)) txtTimeInterval.Text = "30";
txtTimeInterval.LostFocus += new EventHandler(txtTimeInterval_LostFocus);
}
/// <summary>
/// 时间间隔TextBox失去焦点事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void txtTimeInterval_LostFocus(object sender, EventArgs e)
{
string checkStr = txtTimeInterval.Text.ToString();
if (string.IsNullOrEmpty(checkStr)) txtTimeInterval.Text = "30";
int check = Convert.ToInt32(txtTimeInterval.Text.ToString());
if (check < 30)
{
txtTimeInterval.Text = "30";
}
second = Convert.ToInt32(txtTimeInterval.Text.ToString());
IniUtil.IniWriteValue(company, "interval", txtTimeInterval.Text.ToString());
}
/// <summary>
/// 开始发送按钮事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
if (ConnectServer())
{
BaseImpl.HasExistsColumn("P_SystemTab", "SMSKey", "VARCHAR(100)");
BaseImpl.HasExistsColumn("P_SystemTab", "SMSSecret", "VARCHAR(100)");
BaseImpl.HasExistsColumn("P_SystemTab", "SignName", "VARCHAR(100)");
DataRow SystemTab = BaseImpl.GetSystemTab();
if (!string.IsNullOrWhiteSpace(SystemTab["SMSKey"] + "") && !string.IsNullOrWhiteSpace(SystemTab["SMSSecret"] + "") && !string.IsNullOrWhiteSpace(SystemTab["SignName"] + ""))
{
this.SMSKey = SystemTab["SMSKey"] + "";
this.SMSSecret = SystemTab["SMSSecret"] + "";
this.SignName = SystemTab["SignName"] + "";
}
timer1.Interval = 10;
timer1.Enabled = true;
}
}
/// <summary>
/// 发送事件
/// </summary>
public void BeginSend()
{
if (!this.isExecing)
{
try
{
this.textBox1.Invoke(new Action(() =>
{
this.textBox1.Text = "";
}));
ShowMsg("------------开始发送短信(" + DateTime.Now + ")--------------\r\n\r\n");
this.isExecing = true;
string sql = "select id,templeteId, tempContent, sendobject, tempparam1,tempparam2,tempparam3,tempparam4,tempparam5,tempparam6,tempparam7,tempparam8,tempparam9,tempparam10 from P_SystemSMSTempleteTab where issend = 0 order by sendobject";
DataTable dt = SqlHelper.ExecuteDataTable(sql);
if (dt.Rows.Count > 0)
{
foreach (DataRow dr in dt.Rows)
{
string json = FinalJson(dr);
DataRow drReturn = SendSms(dr["templeteId"].ToString(), dr["sendobject"].ToString(), json);
if (drReturn["Code"].ToString() == "OK")
{
string sqlReturn = string.Format("update P_SystemSMSTempleteTab set issend = 2,finishdate = GETDATE(),SendResult = '成功' where id = {0}", dr["id"]);
SqlHelper.ExecuteNonQuery(sqlReturn);
string str = "手机号" + dr["sendobject"].ToString() + "短信发送->成功\r\n";
ShowMsg(str);
}
else
{
string sqlReturn = string.Format("update P_SystemSMSTempleteTab set SendResult = {1},issend=1 where id = {0}", dr["id"], drReturn["Code"].ToString());
SqlHelper.ExecuteNonQuery(sqlReturn);
string str = "手机号" + dr["sendobject"].ToString() + "短信发送->失败" + "(" + drReturn["Code"].ToString() + ")" + "\r\n";
ShowMsg(str);
}
}
ShowMsg("\r\n\r\n------------本次短信发送完成(" + DateTime.Now + ")--------------");
}
else
{
ShowMsg("未检测到需要发送短信的数据");
ShowMsg("\r\n\r\n------------本次短信发送完成(" + DateTime.Now + ")--------------");
}
}
catch (Exception)
{
}
finally
{
string log = textBox1.Text.ToString();
LogUtil.WriteLocalLog(log);
this.isExecing = false;
}
}
}
/// <summary>
/// 发送短信返回DataRow
/// </summary>
/// <param name="templateCode"></param>
/// <param name="phoneNumber"></param>
/// <param name="json"></param>
/// <returns></returns>
public DataRow SendSms(string templateCode, string phoneNumber, string json)
{
DataTable pDataTable = new DataTable();
DataRow drReturn = pDataTable.NewRow();
IClientProfile profile = DefaultProfile.GetProfile("cn-chengdu", SMSKey, SMSSecret);
DefaultAcsClient client = new DefaultAcsClient(profile);
CommonRequest request = new CommonRequest();
request.Method = MethodType.POST;
request.Domain = "dysmsapi.aliyuncs.com";
request.Version = "2017-05-25";
request.Action = "SendSms";
// request.Protocol = ProtocolType.HTTP;
request.AddQueryParameters("PhoneNumbers", phoneNumber);
request.AddQueryParameters("SignName", SignName);
request.AddQueryParameters("TemplateCode", templateCode);
request.AddQueryParameters("TemplateParam", json);
try
{
CommonResponse response = client.GetCommonResponse(request);
string jsonToDr = System.Text.Encoding.Default.GetString(response.HttpResponse.Content);
jsonToDr = "[" + jsonToDr + "]";
drReturn = JsonUtil.ToDataRow(jsonToDr);
}
catch (Aliyun.Acs.Core.Exceptions.ServerException e)
{
Console.WriteLine(e);
}
catch (ClientException e)
{
Console.WriteLine(e);
}
return drReturn;
}
/// <summary>
/// 变量处理成Json
/// </summary>
/// <param name="dr"></param>
/// <returns></returns>
public string FinalJson(DataRow dr)
{
string content = dr["tempContent"].ToString();
content = content.Replace("$", "");
StringCollection resultList = new StringCollection();
try
{
Regex regex = new Regex("{([^{])+}");
MatchCollection mcs = regex.Matches(content);
foreach (Match item in mcs)
{
if (resultList.IndexOf(item.Value) == -1)
{
string field = item.Value.Replace("{", "").Replace("}", "");
resultList.Add(field);
}
}
}
catch (ArgumentException ex)
{
// Syntax error in the regular expression
}
DataTable tblDatas = new DataTable();
DataColumn dc = null;
foreach (string str in resultList)
{
dc = tblDatas.Columns.Add(str, Type.GetType("System.String"));
}
StringCollection allcontent = new StringCollection();
for (int i = 4; i < 14; i++)
{
allcontent.Add(dr[i].ToString());
}
DataRow newRow;
newRow = tblDatas.NewRow();
for (int i = 0; i < tblDatas.Columns.Count; i++)
{
newRow[i] = allcontent[i];
}
string json = JsonUtil.ToJsonObject(newRow);
json = json.Substring(1, json.Length - 2);
return json;
}
/// <summary>
/// timer事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void timer1_Tick(object sender, EventArgs e)
{
timer1.Enabled = false;
if (timer1.Interval == 10)
{
timer1.Interval = second * 1000;
}
BeginSend();
timer1.Enabled = true;
}
/// <summary>
/// 时间间隔TextBox按键判断
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void txtTimeInterval_KeyPress(object sender, KeyPressEventArgs e)
{
if ((e.KeyChar < 48 || e.KeyChar > 57) && e.KeyChar != 8)
{
e.Handled = true;
}
}
/// <summary>
/// 显示消息
/// </summary>
private void ShowMsg(string msg)
{
this.textBox1.Invoke(new Action(() =>
{
this.textBox1.AppendText(msg);
this.textBox1.ScrollToCaret();
}));
}
#region
/// <summary>
/// <para>说明:连接服务器</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-08-09 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="isSave">if set to <c>true</c> [is save].</param>
public bool ConnectServer(bool isSave = false)
{
string serverName = this.txtSeverId.Text.Trim();
string dbName = this.txtDataBase.Text.Trim();
string user = this.txtName.Text.Trim();
string password = this.txtPassword.Text.Trim();
if (string.IsNullOrWhiteSpace(serverName))
{
MessageUtil.Show(ResourceKeys.ServerNameIsNull);
return false;
}
if (string.IsNullOrWhiteSpace(dbName))
{
MessageUtil.Show(ResourceKeys.ServerDBIsNull);
return false;
}
if (string.IsNullOrWhiteSpace(user))
{
MessageUtil.Show("请重新输入用户名");
return false;
}
// 测试数据库连接
try
{
if (CreateConnection())
{
if (isSave)
{
}
else
{
IniUtil.IniWriteValue(company, "serverName", serverName);
IniUtil.IniWriteValue(company, "dbName", dbName);
IniUtil.IniWriteValue(company, "user", user);
IniUtil.IniWriteValue(company, "password", password);
return true;
}
}
else
{
MessageUtil.Show(ResourceKeys.ConnectFault);
return false;
}
}
catch (Exception)
{
MessageUtil.Show(ResourceKeys.ConnectFault);
}
return true;
}
/// <summary>
/// <para>说明:创建数据库连接</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-08-07 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
public bool CreateConnection()
{
string connStr = GetConnection();
if (SqlHelper._connection != null)
{
try
{
SqlHelper._connection.Close();
SqlHelper._connection.Dispose();
}
catch (Exception)
{
}
SqlHelper._connection = null;
}
try
{
SqlHelper._connection = new SqlConnection(connStr);
SqlHelper._connection.Open();
return true;
}
catch (Exception ex)
{
LogHelper.Instance.WriteLog(ex.Message);
}
return false;
}
/// <summary>
/// 获取连接服务器的字符串
/// </summary>
/// <returns></returns>
public string GetConnection()
{
return string.Format("Server={0};Database={1};Persist Security Info=True;User ID={2};Password={3};Connection Timeout=5;MultipleActiveResultSets=true", txtSeverId.Text.ToString(), txtDataBase.Text.ToString(), txtName.Text.ToString(), txtPassword.Text.ToString());
}
#endregion
}
}
+123
View File
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
+64
View File
@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace SendSms
{
public static class IniUtil
{
/// <summary>
/// ini文件目录
/// </summary>
static string Path = System.IO.Directory.GetCurrentDirectory() + "\\" + "Setting.ini";
/// <summary>
/// ini文件获取数据
/// </summary>
/// <param name="section"></param>
/// <param name="key"></param>
/// <param name="defVal"></param>
/// <param name="retVal"></param>
/// <param name="size"></param>
/// <param name="filePath"></param>
/// <returns></returns>
[DllImport("kernel32")]
private static extern int GetPrivateProfileString(string section, string key, string defVal, StringBuilder retVal, int size, string filePath);
/// <summary>
/// ini文件写入数据
/// </summary>
/// <param name="section"></param>
/// <param name="key"></param>
/// <param name="val"></param>
/// <param name="filePath"></param>
/// <returns></returns>
[DllImport("kernel32")]
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
/// <summary>
/// 写INI文件
/// </summary>
/// <param name="section">段落</param>
/// <param name="key">键</param>
/// <param name="iValue">值</param>
public static void IniWriteValue(string section, string key, string iValue)
{
WritePrivateProfileString(section, key, iValue, Path);
}
/// <summary>
/// 读取INI文件
/// </summary>
/// <param name="section">段落</param>
/// <param name="key">键</param>
/// <returns>返回的键值</returns>
public static string IniReadValue(string section, string key)
{
StringBuilder temp = new StringBuilder(255);
int i = GetPrivateProfileString(section, key, "", temp, 255, Path);
return temp.ToString();
}
}
}
+171
View File
@@ -0,0 +1,171 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Web.Script.Serialization;
using System.Collections;
namespace SendSms
{
public static class JsonUtil
{
/// <summary>
/// <para>说明:json 字符串转换为DataTable</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-10-23 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="json">The json.</param>
/// <returns>DataTable.</returns>
public static DataTable ToDataTable(this string json)
{
DataTable dataTable = new DataTable(); //实例化
DataTable result;
try
{
JavaScriptSerializer javaScriptSerializer = new JavaScriptSerializer();
javaScriptSerializer.MaxJsonLength = Int32.MaxValue; //取得最大数值
ArrayList arrayList = javaScriptSerializer.Deserialize<ArrayList>(json);
if (arrayList.Count > 0)
{
foreach (Dictionary<string, object> dictionary in arrayList)
{
if (dictionary.Keys.Count<string>() == 0)
{
result = dataTable;
return result;
}
if (dataTable.Columns.Count == 0)
{
foreach (string current in dictionary.Keys)
{
dataTable.Columns.Add(current, dictionary[current].GetType());
}
}
DataRow dataRow = dataTable.NewRow();
foreach (string current in dictionary.Keys)
{
dataRow[current] = dictionary[current];
}
dataTable.Rows.Add(dataRow); //循环添加行到DataTable中
}
}
}
catch
{
}
result = dataTable;
return result;
}
/// <summary>
/// <para>说明:</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-10-23 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="json">The json.</param>
/// <returns>DataRow.</returns>
public static DataRow ToDataRow(this string json)
{
if (string.IsNullOrWhiteSpace(json)) return null;
return ToDataTable(json).Rows[0];
}
/// <summary>
/// <para>说明:DataTable To JsonArray</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-10-23 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="dtTable">The dt table.</param>
/// <returns>System.String.</returns>
public static string ToJsonArray(this DataTable dtTable)
{
JavaScriptSerializer javaScriptSerializer = new JavaScriptSerializer();
javaScriptSerializer.MaxJsonLength = Int32.MaxValue; //取得最大数值
ArrayList arrayList = new ArrayList();
foreach (DataRow dataRow in dtTable.Rows)
{
Dictionary<string, object> dictionary = new Dictionary<string, object>(); //实例化一个参数集合
foreach (DataColumn dataColumn in dtTable.Columns)
{
dictionary.Add(dataColumn.ColumnName, dataRow[dataColumn.ColumnName].ToStr());
}
arrayList.Add(dictionary); //ArrayList集合中添加键值
}
return javaScriptSerializer.Serialize(arrayList); //返回一个json字符串
}
/// <summary>
/// <para>说明:DataRow To Json</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-10-23 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="row">The row.</param>
/// <returns>System.String.</returns>
public static string ToJsonObject(this DataRow row)
{
JavaScriptSerializer javaScriptSerializer = new JavaScriptSerializer();
javaScriptSerializer.MaxJsonLength = Int32.MaxValue; //取得最大数值
ArrayList arrayList = new ArrayList();
Dictionary<string, object> dictionary = new Dictionary<string, object>(); //实例化一个参数集合
foreach (DataColumn dataColumn in row.Table.Columns)
{
dictionary.Add(dataColumn.ColumnName, row[dataColumn.ColumnName].ToStr());
}
arrayList.Add(dictionary); //ArrayList集合中添加键值
return javaScriptSerializer.Serialize(arrayList);
}
/// <summary>
/// <para>说明:</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-10-23 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="s">The s.</param>
/// <param name="format">The format.</param>
/// <returns>A <see cref="System.String" /> that represents this instance.</returns>
public static string ToStr(this object s, string format = "")
{
string result = string.Empty;
try
{
if (string.IsNullOrWhiteSpace(format))
{
result = s.ToString();
}
else
{
result = string.Format("{0:" + format + "}", s);
}
}
catch
{
}
return result;
}
}
}
+71
View File
@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace SendSms
{
public static class LogUtil
{
/// <summary>
/// Log文件夹目录
/// </summary>
static string folderPath;
/// <summary>
/// 日志文件目录
/// </summary>
static string filePath;
/// <summary>
/// 写入日志
/// </summary>
public static void WriteLocalLog(string log)
{
try
{
//获取程序目录,并完整日志文件夹目录
folderPath = System.IO.Directory.GetCurrentDirectory() + "\\Log";
//TXT日志目录
filePath = folderPath + "\\" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt";
//判断是否存在文件夹
if (!System.IO.Directory.Exists(folderPath))
{
//创建文件夹
Directory.CreateDirectory(folderPath);
}
inPut(log);
}
catch (Exception ex)
{
}
}
/// <summary>
/// 写入日志事件
/// </summary>
/// <param name="log"></param>
private static void inPut(string log)
{
//判断是否存在此TXT文件
if (!System.IO.File.Exists(filePath))
{
FileStream fs1 = new FileStream(filePath, FileMode.Create, FileAccess.Write);//创建写入文件
StreamWriter sw = new StreamWriter(fs1);
sw.WriteLine(log);//开始写入值
sw.Close();
fs1.Close();
}
else
{
FileStream fs1 = new FileStream(filePath, FileMode.Append, FileAccess.Write);//获取文件尾行
StreamWriter sw = new StreamWriter(fs1);
sw.WriteLine(log);//开始写入值
sw.Close();
fs1.Close();
}
}
}
}
+21
View File
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace SendSms
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("SendSms")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SendSms")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("9d54dfc0-3794-4abb-9cc7-0247559cf154")]
// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 内部版本号
// 修订号
//
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace SendSms.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SendSms.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace SendSms.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
+145
View File
@@ -0,0 +1,145 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{846C66B4-7012-4598-9692-513E6684CA69}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SendSms</RootNamespace>
<AssemblyName>SendSms</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="aliyun-net-sdk-core">
<HintPath>..\..\..\引用DLL\aliyun-net-sdk-core.dll</HintPath>
</Reference>
<Reference Include="Lskj.Business">
<HintPath>..\..\..\Debug\Lskj.Business.dll</HintPath>
</Reference>
<Reference Include="Lskj.Control">
<HintPath>..\..\..\Debug\Lskj.Control.dll</HintPath>
</Reference>
<Reference Include="Lskj.Core">
<HintPath>..\..\..\Debug\Lskj.Core.dll</HintPath>
</Reference>
<Reference Include="Lskj.Data">
<HintPath>..\..\..\Debug\Lskj.Data.dll</HintPath>
</Reference>
<Reference Include="Lskj.Util">
<HintPath>..\..\..\Debug\Lskj.Util.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop, Version=1.0.168.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.IO.dll</HintPath>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Runtime, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.Runtime.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.Threading.Tasks.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="IniUtil.cs" />
<Compile Include="JsonUtil.cs" />
<Compile Include="LogUtil.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" /></startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net40" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net40" />
</packages>