Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightAggregationManager
This commit is contained in:
commit
480d705255
3 files changed
+29
-20
No files matched your search
@@ -5,10 +5,12 @@ using System.Data;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Windows;
|
||||
using System.Windows.Markup;
|
||||
using System.Xml.Linq;
|
||||
using TouchSocket.Core;
|
||||
using TouchSocket.Sockets;
|
||||
using static SunlightAggregationManager.UserClass.AsyncTcpServer;
|
||||
|
||||
namespace SunlightAggregationManager.UserClass
|
||||
{
|
||||
@@ -67,7 +69,7 @@ namespace SunlightAggregationManager.UserClass
|
||||
MainWindowViewModel.Updata_Memory(MainWindowViewModel._userData, "User='" + deserializedPerson?.User + "'", myDict);
|
||||
|
||||
Console.WriteLine("[Log on]User[" + deserializedPerson?.User + "]Note[" + (deserializedPerson?.Dat ?? "unknown") + "]");
|
||||
Command(deserializedPerson?.Dat ?? "NOT", client.Id);
|
||||
Command(deserializedPerson?.Dat ?? "NOT", client.Id, deserializedPerson!);
|
||||
}
|
||||
else
|
||||
{//首次登录记录
|
||||
@@ -94,8 +96,9 @@ namespace SunlightAggregationManager.UserClass
|
||||
login.Add("UserId", dat?.Field<object>("UserID") ?? "");
|
||||
login.Add("UserName", dat?.Field<object>("Name") ?? "");
|
||||
|
||||
var d = JsonSerializer.Serialize(login);
|
||||
client.SendAsync(d);
|
||||
deserializedPerson!.Dat = JsonSerializer.Serialize(login);
|
||||
var jsdat = JsonSerializer.Serialize(deserializedPerson);
|
||||
client.SendAsync(jsdat);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -164,7 +167,7 @@ namespace SunlightAggregationManager.UserClass
|
||||
Console.WriteLine("TCP SERVER:START");
|
||||
}
|
||||
|
||||
public static async void Command(string dat,string id)//
|
||||
public static async void Command(string dat,string id , Person person)//
|
||||
{
|
||||
string Command="", ret ="";
|
||||
|
||||
@@ -215,7 +218,9 @@ namespace SunlightAggregationManager.UserClass
|
||||
ret = JsonSerializer.Serialize(data_);
|
||||
}
|
||||
|
||||
await service.SendAsync(id, ret);
|
||||
person.Dat=ret.ToString();
|
||||
var jsdat = JsonSerializer.Serialize(person);
|
||||
await service.SendAsync(id, jsdat);
|
||||
}
|
||||
|
||||
public static List<Dictionary<string, object?>>? ToList(DataTable table)//datatable转list
|
||||
|
||||
Reference in new issue
Block a user