Skip to content

Commit

Permalink
代码精简优化,正式发布框架1.0.4版本
Browse files Browse the repository at this point in the history
  • Loading branch information
dathlin committed May 20, 2017
1 parent aaf9175 commit 5f7e55b
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 47 deletions.
4 changes: 2 additions & 2 deletions CommonLibrary/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public class CommonLibrary
static CommonLibrary()
{
//初始化模版的版本号
//预计第一个正式发行的版本为1.1.0 日期为2017-05-10
SoftBasic.FrameworkVersion = new SystemVersion("1.0.3");
//预计第一个正式发行的版本为1.1.0 日期为2017-08-10
SoftBasic.FrameworkVersion = new SystemVersion("1.0.4");

}

Expand Down
Binary file modified Public/HslCommunication.dll
Binary file not shown.
5 changes: 5 additions & 0 deletions Public/HslCommunication.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

91 changes: 52 additions & 39 deletions 软件系统客户端模版/FormMainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,26 @@
using HslCommunication.BasicFramework;


//============================================================================
// 模版日期 2017-02-21
// 创建人 胡少林
// 版权所有 胡少林
// 授权说明 模版仅授权个人使用,如需商用,请联系[email protected]洽谈
// 说明 JSON组件引用自james newton-king,遵循MIT授权协议
// 说明 文件的图标来源于http://fileicons.chromefans.org/,感谢作者的无私分享
//============================================================================
/***************************************************************************************
*
* 模版日期 2017-05-20
* 创建人 胡少林
* 版权所有 胡少林
* 授权说明 模版仅授权个人使用,如需商用,请联系[email protected]洽谈
* 说明一 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文件中的指允许启动一个实例的代码
//
//============================================================================



Expand Down Expand Up @@ -125,22 +128,28 @@ private void FormMainWindow_FormClosing(object sender, FormClosingEventArgs e)
private void 修改密码ToolStripMenuItem_Click(object sender, EventArgs e)
{
//实例化一个密码修改的窗口,并指定了实现修改的具体方法,指定了密码长度
FormPasswordModify fpm = new FormPasswordModify(UserClient.UserAccount.Password,
p => {
JObject json = new JObject();json.Add(UserAccount.UserNameText, UserClient.UserAccount.UserName);
json.Add(UserAccount.PasswordText, p);
using (FormPasswordModify fpm = new FormPasswordModify(UserClient.UserAccount.Password,
p =>
{
JObject json = new JObject
{
{ UserAccount.UserNameText, UserClient.UserAccount.UserName },
{ UserAccount.PasswordText, p }
};
return UserClient.Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode.密码修改 + json.ToString()).IsSuccess;
}, 6, 8);
fpm.ShowDialog();
fpm.Dispose();
}, 6, 8))
{
fpm.ShowDialog();
}
}

private void 关于本软件ToolStripMenuItem_Click(object sender, EventArgs e)
{
FormAbout fa = new FormAbout(Resource.StringResouce.SoftName,
UserClient.CurrentVersion, 2017, Resource.StringResouce.SoftCopyRight);
fa.ShowDialog();
fa.Dispose();
using (FormAbout fa = new FormAbout(Resource.StringResouce.SoftName,
UserClient.CurrentVersion, 2017, Resource.StringResouce.SoftCopyRight))
{
fa.ShowDialog();
}
}

private void 更新日志ToolStripMenuItem_Click(object sender, EventArgs e)
Expand All @@ -151,31 +160,35 @@ private void 更新日志ToolStripMenuItem_Click(object sender, EventArgs e)
UserClient.JsonSettings.IsNewVersionRunning = false;
UserClient.JsonSettings.SaveToFile();
}
FormUpdateLog ful = new FormUpdateLog(UserClient.HistoryVersions);
ful.ShowDialog();
ful.Dispose();
using (FormUpdateLog ful = new FormUpdateLog(UserClient.HistoryVersions))
{
ful.ShowDialog();
}
}

private void 版本号说明ToolStripMenuItem_Click(object sender, EventArgs e)
{
FormAboutVersion fav = new FormAboutVersion(UserClient.CurrentVersion);
fav.ShowDialog();
fav.Dispose();
using (FormAboutVersion fav = new FormAboutVersion(UserClient.CurrentVersion))
{
fav.ShowDialog();
}
}

private void 更改公告ToolStripMenuItem_Click(object sender, EventArgs e)
{
FormInputAndAction fiaa = new FormInputAndAction(str => UserClient.Net_simplify_client.ReadFromServer(
CommonHeadCode.SimplifyHeadCode.更新公告 + str).IsSuccess,UserClient.Announcement);
fiaa.ShowDialog();
fiaa.Dispose();
using (FormInputAndAction fiaa = new FormInputAndAction(str => UserClient.Net_simplify_client.ReadFromServer(
CommonHeadCode.SimplifyHeadCode.更新公告 + str).IsSuccess, UserClient.Announcement))
{
fiaa.ShowDialog();
}
}

private void 日志查看ToolStripMenuItem_Click(object sender, EventArgs e)
{
FormLog flg = new FormLog();
flg.ShowDialog();
flg.Dispose();
using (FormLog flg = new FormLog())
{
flg.ShowDialog();
}
}

private void 注册账号ToolStripMenuItem_Click(object sender, EventArgs e)
Expand Down
22 changes: 16 additions & 6 deletions 软件系统服务端模版/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions 软件系统服务端模版/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ private void 关于软件ToolStripMenuItem_Click(object sender, EventArgs e)
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)
{
//该部分比较复杂,需要对委托,匿名委托概念比较清晰
Expand Down

0 comments on commit 5f7e55b

Please sign in to comment.