代码精简优化,正式发布框架1.0.4版本

This commit is contained in:
dathlin
2017-05-20 09:41:21 +08:00
parent aaf9175c35
commit 5f7e55b311
6 changed files with 82 additions and 47 deletions

View File

@@ -11,8 +11,8 @@ namespace CommonLibrary
static CommonLibrary() static CommonLibrary()
{ {
//初始化模版的版本号 //初始化模版的版本号
//预计第一个正式发行的版本为1.1.0 日期为2017-05-10 //预计第一个正式发行的版本为1.1.0 日期为2017-08-10
SoftBasic.FrameworkVersion = new SystemVersion("1.0.3"); SoftBasic.FrameworkVersion = new SystemVersion("1.0.4");
} }

Binary file not shown.

View File

@@ -3459,6 +3459,11 @@
查找 System.Drawing.Bitmap 类型的本地化资源。 查找 System.Drawing.Bitmap 类型的本地化资源。
</summary> </summary>
</member> </member>
<member name="P:HslCommunication.Properties.Resources.qrcode_for_gh_319218678954_258">
<summary>
查找 System.Drawing.Bitmap 类型的本地化资源。
</summary>
</member>
<member name="P:HslCommunication.Properties.Resources.ram"> <member name="P:HslCommunication.Properties.Resources.ram">
<summary> <summary>
查找 System.Drawing.Bitmap 类型的本地化资源。 查找 System.Drawing.Bitmap 类型的本地化资源。

View File

@@ -14,23 +14,26 @@ using HslCommunication.Enthernet;
using HslCommunication.BasicFramework; using HslCommunication.BasicFramework;
//============================================================================ /***************************************************************************************
// 模版日期 2017-02-21 *
// 创建人 胡少林 * 模版日期 2017-05-20
// 版权所有 胡少林 * 创建人 胡少林
// 授权说明 模版仅授权个人使用如需商用请联系hsl200909@163.com洽谈 * 版权所有 胡少林
// 说明 JSON组件引用自james newton-king遵循MIT授权协议 * 授权说明 模版仅授权个人使用如需商用请联系hsl200909@163.com洽谈
// 说明 文件的图标来源于http://fileicons.chromefans.org/,感谢作者的无私分享 * 说明 JSON组件引用自james newton-king遵循MIT授权协议
//============================================================================ * 说明二 文件的图标来源于http://fileicons.chromefans.org/,感谢作者的无私分享
*
****************************************************************************************/
/***************************************************************************************
*
* 版本说明 最新版以github为准由于提交更改比较频繁需要经常查看官网地址:https://github.com/dathlin/C-S-
* 注意 本代码的相关操作未作密码验证,如有需要,请自行完成
* 示例 密码验证具体示例参照Form1_FormClosing(object sender, FormClosingEventArgs e)方法
* 如果 遇到启动调试就退出了请注释掉Program.cs文件中的指允许启动一个实例的代码
*
****************************************************************************************/
//============================================================================
//
// 注意:本代码的相关操作未作密码验证,如有需要,请自行完成
// 示例具体示例参照Form1_FormClosing(object sender, FormClosingEventArgs e)方法
// 如果遇到启动调试就退出了请注释掉Program.cs文件中的指允许启动一个实例的代码
//
//============================================================================
@@ -125,22 +128,28 @@ namespace 软件系统客户端模版
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
//实例化一个密码修改的窗口,并指定了实现修改的具体方法,指定了密码长度 //实例化一个密码修改的窗口,并指定了实现修改的具体方法,指定了密码长度
FormPasswordModify fpm = new FormPasswordModify(UserClient.UserAccount.Password, using (FormPasswordModify fpm = new FormPasswordModify(UserClient.UserAccount.Password,
p => { p =>
JObject json = new JObject();json.Add(UserAccount.UserNameText, UserClient.UserAccount.UserName); {
json.Add(UserAccount.PasswordText, p); JObject json = new JObject
{
{ UserAccount.UserNameText, UserClient.UserAccount.UserName },
{ UserAccount.PasswordText, p }
};
return UserClient.Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode. + json.ToString()).IsSuccess; return UserClient.Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode. + json.ToString()).IsSuccess;
}, 6, 8); }, 6, 8))
{
fpm.ShowDialog(); fpm.ShowDialog();
fpm.Dispose(); }
} }
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
FormAbout fa = new FormAbout(Resource.StringResouce.SoftName, using (FormAbout fa = new FormAbout(Resource.StringResouce.SoftName,
UserClient.CurrentVersion, 2017, Resource.StringResouce.SoftCopyRight); UserClient.CurrentVersion, 2017, Resource.StringResouce.SoftCopyRight))
{
fa.ShowDialog(); fa.ShowDialog();
fa.Dispose(); }
} }
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void ToolStripMenuItem_Click(object sender, EventArgs e)
@@ -151,31 +160,35 @@ namespace 软件系统客户端模版
UserClient.JsonSettings.IsNewVersionRunning = false; UserClient.JsonSettings.IsNewVersionRunning = false;
UserClient.JsonSettings.SaveToFile(); UserClient.JsonSettings.SaveToFile();
} }
FormUpdateLog ful = new FormUpdateLog(UserClient.HistoryVersions); using (FormUpdateLog ful = new FormUpdateLog(UserClient.HistoryVersions))
{
ful.ShowDialog(); ful.ShowDialog();
ful.Dispose(); }
} }
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
FormAboutVersion fav = new FormAboutVersion(UserClient.CurrentVersion); using (FormAboutVersion fav = new FormAboutVersion(UserClient.CurrentVersion))
{
fav.ShowDialog(); fav.ShowDialog();
fav.Dispose(); }
} }
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
FormInputAndAction fiaa = new FormInputAndAction(str => UserClient.Net_simplify_client.ReadFromServer( using (FormInputAndAction fiaa = new FormInputAndAction(str => UserClient.Net_simplify_client.ReadFromServer(
CommonHeadCode.SimplifyHeadCode. + str).IsSuccess,UserClient.Announcement); CommonHeadCode.SimplifyHeadCode. + str).IsSuccess, UserClient.Announcement))
{
fiaa.ShowDialog(); fiaa.ShowDialog();
fiaa.Dispose(); }
} }
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
FormLog flg = new FormLog(); using (FormLog flg = new FormLog())
{
flg.ShowDialog(); flg.ShowDialog();
flg.Dispose(); }
} }
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void ToolStripMenuItem_Click(object sender, EventArgs e)

View File

@@ -36,6 +36,7 @@
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabel_version = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripStatusLabel_version = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabel_time = new System.Windows.Forms.ToolStripStatusLabel();
this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -53,7 +54,7 @@
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.listBox1 = new System.Windows.Forms.ListBox(); this.listBox1 = new System.Windows.Forms.ListBox();
this.toolStripStatusLabel_time = new System.Windows.Forms.ToolStripStatusLabel(); this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1.SuspendLayout(); this.statusStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
@@ -90,6 +91,12 @@
this.toolStripStatusLabel_version.Size = new System.Drawing.Size(43, 17); this.toolStripStatusLabel_version.Size = new System.Drawing.Size(43, 17);
this.toolStripStatusLabel_version.Text = "V1.0.0"; this.toolStripStatusLabel_version.Text = "V1.0.0";
// //
// toolStripStatusLabel_time
//
this.toolStripStatusLabel_time.Name = "toolStripStatusLabel_time";
this.toolStripStatusLabel_time.Size = new System.Drawing.Size(32, 17);
this.toolStripStatusLabel_time.Text = "时间";
//
// menuStrip1 // menuStrip1
// //
this.menuStrip1.BackColor = System.Drawing.SystemColors.ActiveCaption; this.menuStrip1.BackColor = System.Drawing.SystemColors.ActiveCaption;
@@ -155,7 +162,8 @@
// //
this.ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem, this.ToolStripMenuItem,
this.ToolStripMenuItem}); this.ToolStripMenuItem,
this.ToolStripMenuItem});
this.ToolStripMenuItem.Name = "关于ToolStripMenuItem"; this.ToolStripMenuItem.Name = "关于ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(54, 25); this.ToolStripMenuItem.Size = new System.Drawing.Size(54, 25);
this.ToolStripMenuItem.Text = "关于"; this.ToolStripMenuItem.Text = "关于";
@@ -246,11 +254,12 @@
this.listBox1.Size = new System.Drawing.Size(216, 344); this.listBox1.Size = new System.Drawing.Size(216, 344);
this.listBox1.TabIndex = 8; this.listBox1.TabIndex = 8;
// //
// toolStripStatusLabel_time // 框架作者ToolStripMenuItem
// //
this.toolStripStatusLabel_time.Name = "toolStripStatusLabel_time"; this.ToolStripMenuItem.Name = "框架作者ToolStripMenuItem";
this.toolStripStatusLabel_time.Size = new System.Drawing.Size(32, 17); this.ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
this.toolStripStatusLabel_time.Text = "时间"; this.ToolStripMenuItem.Text = "框架作者";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
// Form1 // Form1
// //
@@ -307,6 +316,7 @@
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel_time; private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel_time;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
} }
} }

View File

@@ -179,6 +179,13 @@ namespace 软件系统服务端模版
fm.ShowDialog(); fm.ShowDialog();
} }
} }
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
using (FormAuthorAdvertisement faa = new FormAuthorAdvertisement())
{
faa.ShowDialog();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
//该部分比较复杂,需要对委托,匿名委托概念比较清晰 //该部分比较复杂,需要对委托,匿名委托概念比较清晰