Skip to content

Commit

Permalink
提交修复
Browse files Browse the repository at this point in the history
  • Loading branch information
dathlin committed May 30, 2017
1 parent 03bd245 commit 038f1c3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
20 changes: 10 additions & 10 deletions 软件系统客户端模版/FormMainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ private void 账户管理ToolStripMenuItem_Click(object sender, EventArgs e)
OperateResultString result = UserClient.Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode.获取账户信息);
if (result.IsSuccess) return result.Content;
else return result.ToMessageShowString();
},m => UserClient.Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode.更细账户信息 + m).IsSuccess);
}, m => UserClient.Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode.更细账户信息 + m).IsSuccess);
fam.ShowDialog();
fam.Dispose();
}
Expand Down Expand Up @@ -255,7 +255,7 @@ private void Net_Socket_Client_Initialization()
net_socket_client.ClientAlias = $"{UserClient.UserAccount.UserName} ({UserClient.UserAccount.Factory})";//标记客户端在线的名称
net_socket_client.ClientStart();
}
catch(Exception ex)
catch (Exception ex)
{
SoftBasic.ShowExceptionMessage(ex);
}
Expand Down Expand Up @@ -304,10 +304,10 @@ private void Net_socket_client_AcceptString(AsyncStateOne object1, string object
JObject json = JObject.Parse(object2.Substring(4));
UserClient.DateTimeServer = json["Time"].ToObject<DateTime>();
if (IsHandleCreated) Invoke(new Action(() =>
{
toolStripStatusLabel_time.Text = UserClient.DateTimeServer.ToString("yyyy-MM-dd HH:mm");
label_file_count.Text = json["FileCount"].ToObject<int>().ToString();
}));
{
toolStripStatusLabel_time.Text = UserClient.DateTimeServer.ToString("yyyy-MM-dd HH:mm");
label_file_count.Text = json["FileCount"].ToObject<int>().ToString();
}));
}
else if (head_code == CommonHeadCode.MultiNetHeadCode.文件数量)
{
Expand Down Expand Up @@ -438,7 +438,7 @@ private void MainRenderInitialization()

private void SetShowRenderControl(UserControl control)
{
if(!ReferenceEquals(CurrentRender,control))
if (!ReferenceEquals(CurrentRender, control))
{
CurrentRender = control;
all_main_render.ForEach(c => c.Visible = false);
Expand All @@ -448,9 +448,9 @@ private void SetShowRenderControl(UserControl control)
private void SetShowRenderControl(Type typeControl)
{
UserControl control = null;
foreach(var c in all_main_render)
foreach (var c in all_main_render)
{
if(c.GetType()==typeControl)
if (c.GetType() == typeControl)
{
control = c;
break;
Expand All @@ -471,6 +471,6 @@ private void label_file_count_Click(object sender, EventArgs e)

#endregion


}
}
16 changes: 8 additions & 8 deletions 软件系统服务端模版/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private void 消息发送ToolStripMenuItem_Click(object sender, EventArgs e)
using (FormInputAndAction fiaa = new FormInputAndAction(
m =>
{
net_socket_server.SendAllClients(CommonHeadCode.MultiNetHeadCode.弹窗消息 + m); return true;
net_socket_server.SendAllClients(CommonHeadCode.MultiNetHeadCode.弹窗消息 + m); return true;
}))
{
fiaa.ShowDialog();
Expand Down Expand Up @@ -312,11 +312,11 @@ private void Net_simplify_server_ReceivedBytesEvent(AsyncStateBase object1, byte
private void Net_simplify_server_ReceiveStringEvent(AsyncStateBase object1, string object2)
{
//必须返回结果,调用SendMessage(object1,[实际数据]);
if(object2.StartsWith("A"))
if (object2.StartsWith("A"))
{
DataProcessingWithStartA(object1, object2);
}
else if(object2.StartsWith("B"))
else if (object2.StartsWith("B"))
{
DataProcessingWithStartB(object1, object2);
}
Expand Down Expand Up @@ -612,7 +612,7 @@ private void Net_socket_clients_change(string str)
#endregion

#region 后台计数线程

/*********************************************************************************************
*
* 说明 一个后台线程,用来执行一些周期执行的东西
Expand Down Expand Up @@ -643,9 +643,9 @@ public void ThreadTimeTick()
int hour = -1;
int day = -1;
Action DTimeShow = delegate
{
toolStripStatusLabel_time.Text = DateTime.Now.ToString();
};
{
toolStripStatusLabel_time.Text = DateTime.Now.ToString();
};

while (IsWindowShow)
{
Expand Down Expand Up @@ -705,7 +705,7 @@ private void Simple_File_Initiaization()
net_simple_file_server.FileChange += Net_simple_file_server_FileChange;
net_simple_file_server.ServerStart(CommonLibrary.CommonLibrary.Port_Share_File);
}
catch(Exception ex)
catch (Exception ex)
{
SoftBasic.ShowExceptionMessage(ex);
}
Expand Down

0 comments on commit 038f1c3

Please sign in to comment.