diff --git "a/\350\275\257\344\273\266\347\263\273\347\273\237\345\256\242\346\210\267\347\253\257\346\250\241\347\211\210/FormMainWindow.cs" "b/\350\275\257\344\273\266\347\263\273\347\273\237\345\256\242\346\210\267\347\253\257\346\250\241\347\211\210/FormMainWindow.cs" index ecc289d..41a0736 100644 --- "a/\350\275\257\344\273\266\347\263\273\347\273\237\345\256\242\346\210\267\347\253\257\346\250\241\347\211\210/FormMainWindow.cs" +++ "b/\350\275\257\344\273\266\347\263\273\347\273\237\345\256\242\346\210\267\347\253\257\346\250\241\347\211\210/FormMainWindow.cs" @@ -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(); } @@ -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); } @@ -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(); if (IsHandleCreated) Invoke(new Action(() => - { - toolStripStatusLabel_time.Text = UserClient.DateTimeServer.ToString("yyyy-MM-dd HH:mm"); - label_file_count.Text = json["FileCount"].ToObject().ToString(); - })); + { + toolStripStatusLabel_time.Text = UserClient.DateTimeServer.ToString("yyyy-MM-dd HH:mm"); + label_file_count.Text = json["FileCount"].ToObject().ToString(); + })); } else if (head_code == CommonHeadCode.MultiNetHeadCode.文件数量) { @@ -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); @@ -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; @@ -471,6 +471,6 @@ private void label_file_count_Click(object sender, EventArgs e) #endregion - + } } diff --git "a/\350\275\257\344\273\266\347\263\273\347\273\237\346\234\215\345\212\241\347\253\257\346\250\241\347\211\210/Form1.cs" "b/\350\275\257\344\273\266\347\263\273\347\273\237\346\234\215\345\212\241\347\253\257\346\250\241\347\211\210/Form1.cs" index c7b87b9..f3bf0e6 100644 --- "a/\350\275\257\344\273\266\347\263\273\347\273\237\346\234\215\345\212\241\347\253\257\346\250\241\347\211\210/Form1.cs" +++ "b/\350\275\257\344\273\266\347\263\273\347\273\237\346\234\215\345\212\241\347\253\257\346\250\241\347\211\210/Form1.cs" @@ -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(); @@ -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); } @@ -612,7 +612,7 @@ private void Net_socket_clients_change(string str) #endregion #region 后台计数线程 - + /********************************************************************************************* * * 说明 一个后台线程,用来执行一些周期执行的东西 @@ -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) { @@ -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); }