网络组件代码重构,文件传输标准重写,完成winform适配。其他待完成

This commit is contained in:
dathlin
2017-09-13 21:08:18 +08:00
parent 38e7700c5b
commit 8e2e3c8562
9 changed files with 653 additions and 194 deletions

View File

@@ -36,7 +36,7 @@ namespace ClientsLibrary
ofd.Multiselect = true;
if (ofd.ShowDialog() == DialogResult.OK)
{
using (FormFileOperate fUpload = new FormFileOperate(CommonHeadCode.KeyToken, new System.Net.IPEndPoint(
using (FormFileOperate fUpload = new FormFileOperate(CommonHeadCode.KeyToken,UserClient.LogNet, new System.Net.IPEndPoint(
System.Net.IPAddress.Parse(UserClient.ServerIp), CommonLibrary.CommonLibrary.Port_Update_Remote),
ofd.FileNames, "", "", ""))
{

View File

@@ -105,6 +105,10 @@ namespace ClientsLibrary
KeyToken = CommonHeadCode.KeyToken,
};
/// <summary>
/// 客户端的日志纪录对象
/// </summary>
public static HslCommunication.LogNet.ILogNet LogNet { get; set; }
/// <summary>

View File

@@ -17,7 +17,7 @@ namespace ClientsLibrary
/// </summary>
public class UserPortrait
{
public UserPortrait(string filePath,Action<string> loadPic,Action disPic)
public UserPortrait(string filePath, Action<string> loadPic, Action disPic)
{
if (!System.IO.Directory.Exists(filePath))
{
@@ -52,7 +52,7 @@ namespace ClientsLibrary
bitmap300.Dispose();
bitmap32.Dispose();
using (FormFileOperate ffo = new FormFileOperate(CommonHeadCode.KeyToken, new System.Net.IPEndPoint(
using (FormFileOperate ffo = new FormFileOperate(CommonHeadCode.KeyToken,UserClient.LogNet, new System.Net.IPEndPoint(
System.Net.IPAddress.Parse(UserClient.ServerIp), CommonLibrary.CommonLibrary.Port_Portrait_Server),
new string[]
{
@@ -123,11 +123,11 @@ namespace ClientsLibrary
}
}
}
public void ThreadPoolDownloadSizeLarge()
{
string path = FileSavePath;
OperateResultString result = UserClient.Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode., UserClient.UserAccount.UserName);
OperateResultString result = UserClient.Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode., UserClient.UserAccount.UserName, null, null);
if (result.IsSuccess)
{
if (result.Content[0] == 'Y')