大量细节修改优化,新组件的BUG修复,完成测试winform,wpf,asp net mvc

This commit is contained in:
dathlin
2017-09-14 22:14:08 +08:00
parent 8e2e3c8562
commit cafc3e065d
10 changed files with 71 additions and 38 deletions

View File

@@ -28,7 +28,6 @@
/// </summary>
private void InitializeComponent()
{
this.logNetAnalysisControl1 = new HslCommunication.LogNet.LogNetAnalysisControl();
this.userButton16 = new HslCommunication.Controls.UserButton();
this.userButton17 = new HslCommunication.Controls.UserButton();
this.userButton15 = new HslCommunication.Controls.UserButton();
@@ -47,19 +46,9 @@
this.userButton2 = new HslCommunication.Controls.UserButton();
this.userButton1 = new HslCommunication.Controls.UserButton();
this.userButton_login = new HslCommunication.Controls.UserButton();
this.logNetAnalysisControl1 = new HslCommunication.LogNet.LogNetAnalysisControl();
this.SuspendLayout();
//
// logNetAnalysisControl1
//
this.logNetAnalysisControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.logNetAnalysisControl1.Location = new System.Drawing.Point(8, 7);
this.logNetAnalysisControl1.Name = "logNetAnalysisControl1";
this.logNetAnalysisControl1.Size = new System.Drawing.Size(785, 696);
this.logNetAnalysisControl1.TabIndex = 47;
this.logNetAnalysisControl1.Load += new System.EventHandler(this.logNetAnalysisControl1_Load);
//
// userButton16
//
this.userButton16.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -330,6 +319,16 @@
this.userButton_login.UIText = "网络日志查看";
this.userButton_login.Click += new System.EventHandler(this.userButton_login_Click);
//
// logNetAnalysisControl1
//
this.logNetAnalysisControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.logNetAnalysisControl1.Location = new System.Drawing.Point(4, 6);
this.logNetAnalysisControl1.Name = "logNetAnalysisControl1";
this.logNetAnalysisControl1.Size = new System.Drawing.Size(789, 697);
this.logNetAnalysisControl1.TabIndex = 47;
//
// FormLogView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);

View File

@@ -30,7 +30,7 @@ namespace ClientsLibrary
/// <summary>
/// 本软件的当前版本,用来验证更新的关键依据
/// </summary>
public static SystemVersion CurrentVersion { get; } = new SystemVersion("1.0.0");
public static SystemVersion CurrentVersion { get; } = new SystemVersion("1.0.0.170914");

View File

@@ -59,7 +59,10 @@ namespace CommonLibrary
/// <summary>
/// 系统的所属分厂
/// </summary>
public List<string> SystemFactories { get; set; } = new List<string>();
public List<string> SystemFactories { get; set; } = new List<string>()
{
"分厂示例1","分厂示例2"
};
@@ -140,9 +143,6 @@ namespace CommonLibrary
public override string ToSaveString()
{
JObject json = new JObject();
@@ -154,13 +154,14 @@ namespace CommonLibrary
json.Add(nameof(IsThemeDark), new JValue(IsThemeDark));
return json.ToString();
}
public override void LoadByString(string content)
{
JObject json = JObject.Parse(content);
string systemInfo = SoftBasic.GetValueFromJsonObject(json, nameof(SystemInfo), "");
if (systemInfo == SystemInfo)
{
//文件匹配正
//确认账户名及密码是本机的记录,而不是从其他电脑端拷贝过来的
LoginName = SoftBasic.GetValueFromJsonObject(json, nameof(LoginName), LoginName);
IsNewVersionRunning = SoftBasic.GetValueFromJsonObject(json, nameof(IsNewVersionRunning), IsNewVersionRunning);
Password = SoftBasic.GetValueFromJsonObject(json, nameof(Password), Password);

View File

@@ -37,7 +37,13 @@ namespace CommonLibrary
*
**************************************************************************/
SoftBasic.FrameworkVersion = new SystemVersion("1.3.0");
/**************************************************************************
*
* 时间2017年9月14日 22:06:27 版本号1.4.0
*
**************************************************************************/
SoftBasic.FrameworkVersion = new SystemVersion("1.4.0");
}

Binary file not shown.

View File

@@ -1460,6 +1460,11 @@
文件保存失败
</summary>
</member>
<member name="F:HslCommunication.HslCommunicationCode.Hsl_Protocol_File_Directory_Files">
<summary>
请求文件列表的暗号
</summary>
</member>
<member name="F:HslCommunication.HslCommunicationCode.Hsl_Protocol_NoZipped">
<summary>
不压缩数据字节
@@ -4222,6 +4227,13 @@
用于接收上传文件时的临时文件夹,临时文件使用结束后会被删除
</summary>
</member>
<member name="M:HslCommunication.FileServerBase.GetDirectoryFiles(System.String)">
<summary>
获取文件夹的所有文件列表
</summary>
<param name="segment">额外的片段名称</param>
<returns></returns>
</member>
<member name="T:HslCommunication.OperateResult">
<summary>
操作结果的类,只带有成功标志和错误信息

View File

@@ -310,7 +310,7 @@ namespace 软件系统客户端Wpf
TextBlockSoftCopyright.Text = $"本软件著作权归{CommonLibrary.Resource.StringResouce.SoftCopyRight}所有";
// 上次登录为7天以前则清除账户密码
if ((DateTime.Now - UserClient.JsonSettings.LoginTime).TotalDays < 7)
{
//加载数据

View File

@@ -57,6 +57,8 @@ namespace 软件系统客户端Wpf.Views
}
using (FormSimplyFileUpload upload = new FormSimplyFileUpload(
CommonHeadCode.KeyToken,
UserClient.LogNet,
UserClient.ServerIp,
CommonLibrary.CommonLibrary.Port_Share_File,
UserClient.UserAccount.UserName))

View File

@@ -28,6 +28,12 @@ namespace 软件系统客户端Wpf.Views
public UserFileRenderItem()
{
InitializeComponent();
fileClient = new FileClient()
{
KeyToken = CommonLibrary.CommonHeadCode.KeyToken,
LogNet = UserClient.LogNet,
};
}
private BitmapImage BitmapToBitmapImage(System.Drawing.Bitmap bitmap)
@@ -89,7 +95,7 @@ namespace 软件系统客户端Wpf.Views
}
//确认删除
OperateResultString result = SimpleFileClient.DeleteFile(UserClient.ServerIp, CommonLibrary.CommonLibrary.Port_Share_File, Hufile.FileName);
OperateResultString result = fileClient.DeleteFile(UserClient.ServerIp, CommonLibrary.CommonLibrary.Port_Share_File, Hufile.FileName);
if(result.IsSuccess)
{
MessageBox.Show("删除成功!");
@@ -120,12 +126,12 @@ namespace 软件系统客户端Wpf.Views
save_file_name += "\\" + Hufile.FileName;
OperateResultString result = SimpleFileClient.DownloadFile(UserClient.ServerIp, CommonLibrary.CommonLibrary.Port_Share_File, Hufile.FileName,
OperateResultString result = fileClient.DownloadFile(UserClient.ServerIp, CommonLibrary.CommonLibrary.Port_Share_File, Hufile.FileName,
(m, n) =>
{
Dispatcher.Invoke(new Action(() =>
{
FileDownloadProgress.Value = m * 100d / n;
FileDownloadProgress.Value = m * 100 / n;
}));
}, save_file_name);
@@ -146,5 +152,9 @@ namespace 软件系统客户端Wpf.Views
FileDownloadButton.IsEnabled = true;
}));
}
FileClient fileClient;
}
}

View File

@@ -25,13 +25,14 @@ namespace 软件系统客户端模版.UIControls
private void userButton_upload_Click(object sender, EventArgs e)
{
//上传数据,先对权限进行验证
//上传数据
if(UserClient.UserAccount.Grade<AccountGrade.Technology)
{
MessageBox.Show("权限不够!");
return;
}
// 上传文件
using (FormSimplyFileUpload upload = new FormSimplyFileUpload(
CommonHeadCode.KeyToken,
UserClient.LogNet,
@@ -65,7 +66,7 @@ namespace 软件系统客户端模版.UIControls
ClearControls();
if (files?.Count > 0 && panel2.Width > 20)
{
int location_y = 2;
int location_y = 2 - panel2.VerticalScroll.Value;
//添加子控件
foreach(var m in files)
{
@@ -85,17 +86,17 @@ namespace 软件系统客户端模版.UIControls
return MessageBox.Show("请确认是否真的删除?", "删除确认", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes;
}
});
panel2.Controls.Add(item);
item.BackColor = Color.White;
item.BorderStyle = BorderStyle.FixedSingle;
item.SetFile(m, () => m.UploadName == UserClient.UserAccount.UserName);
item.Location = new Point(2, location_y);
int width = panel2.VerticalScroll.Visible ? panel2.Width - 4 - SystemInformation.VerticalScrollBarWidth : panel2.Width - 4;
item.Size = new Size(width, item.Size.Height);
item.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
panel2.Controls.Add(item); // 添加显示
item.BackColor = Color.White; // 白色的背景
item.BorderStyle = BorderStyle.FixedSingle; // 边框样式
item.SetFile(m, () => m.UploadName == UserClient.UserAccount.UserName); // 设置文件显示并提供一个删除使能的权限,此处设置是登录名和上传人不一致时,删除键不能点击
item.Location = new Point(2, location_y); // 控件的位置
int width = panel2.VerticalScroll.Visible ? panel2.Width - 4 - SystemInformation.VerticalScrollBarWidth : panel2.Width - 4; // 控件的宽度
item.Size = new Size(width, item.Size.Height); // 控件的大小
item.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;// 控件随窗口变化的样式
location_y += item.Height + 4;
FilesControls.Push(item);
location_y += item.Height + 4; // 位置偏移
FilesControls.Push(item);// 控件压入堆栈
}
}
@@ -127,12 +128,12 @@ namespace 软件系统客户端模版.UIControls
private void ShareFilesRender_Load(object sender, EventArgs e)
{
//选择是否禁用上传键
// 选择是否禁用上传键
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
//搜索时触发的数据
// 搜索时触发的数据
if(!string.IsNullOrEmpty(textBox1.Text))
{
string pattern = textBox1.Text;
@@ -146,5 +147,7 @@ namespace 软件系统客户端模版.UIControls
SetFilesShow(Cache_Files);
}
}
}
}