附近的人
This commit is contained in:
1 parent
725b510748
commit
2fcd9b23fa
94 files changed
+7063
-2007
No files matched your search
@@ -66,7 +66,7 @@ namespace Assets.Scripts.Apis
|
||||
}
|
||||
//todo: check local database, insert new user
|
||||
|
||||
//PubCommData.CurrentUser = user;
|
||||
//App.CurrentUser = user;
|
||||
|
||||
return new JsonResult<UserResultModel>() { result = true, data = user };
|
||||
}
|
||||
|
||||
@@ -12,4 +12,6 @@ public static class App
|
||||
public static int RouteIdParam = 0;
|
||||
|
||||
public static UserResultModel CurrentUser { get; set; }
|
||||
|
||||
public static IDictionary<string,Texture> TextureCache = new Dictionary<string, Texture>();
|
||||
}
|
||||
@@ -18,9 +18,7 @@ namespace Assets.Scripts
|
||||
public static UserApi userApi = new UserApi();
|
||||
public static MapApi mapApi = new MapApi();
|
||||
public static MapInterruptRecordApi mapInterruptRecordApi = new MapInterruptRecordApi();
|
||||
|
||||
public static IPEndPoint UdpAddress ;
|
||||
|
||||
public static IPEndPoint TcpAddress ;
|
||||
public static IPEndPoint UdpAddress { get; private set; } = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000);
|
||||
public static IPEndPoint TcpAddress { get; private set; } = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11001);
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,7 @@ namespace Assets.Scripts.Devices.Ant
|
||||
this.AntModelId = md.ModelNumber;
|
||||
|
||||
//var deviceId = $"{ this.searchProfile.deviceNumber }:{ this.searchProfile.deviceType }";
|
||||
//var device = deviceService.Get(PubCommData.CurrentUser.Id, deviceId);
|
||||
//var device = deviceService.Get(App.CurrentUser.Id, deviceId);
|
||||
//if (device != null)
|
||||
//{
|
||||
// device.AntManufacturerId = _ManufacturerId;
|
||||
@@ -151,7 +151,7 @@ namespace Assets.Scripts.Devices.Ant
|
||||
private void InitManufacturer()
|
||||
{
|
||||
//var deviceId = $"{ this.searchProfile.deviceNumber }:{ this.searchProfile.deviceType }";
|
||||
//Device device = PubCommData.CurrentUser != null ? deviceService.Get(PubCommData.CurrentUser.Id, deviceId) : null;
|
||||
//Device device = App.CurrentUser != null ? deviceService.Get(App.CurrentUser.Id, deviceId) : null;
|
||||
//if (device != null && device.AntManufacturerId > 0)
|
||||
//{
|
||||
// this._ManufacturerId = device.AntManufacturerId;
|
||||
|
||||
@@ -305,7 +305,7 @@ namespace Assets.Scripts.Devices.Ant
|
||||
}
|
||||
else if (device2.State == DeviceState.Disconnected)
|
||||
{
|
||||
//var deviceInfo = deviceService.Get(PubCommData.CurrentUser.Id, $"{ device2.searchProfile.deviceNumber }:{ device2.searchProfile.deviceType }");
|
||||
//var deviceInfo = deviceService.Get(App.CurrentUser.Id, $"{ device2.searchProfile.deviceNumber }:{ device2.searchProfile.deviceType }");
|
||||
//if (deviceInfo != null && deviceInfo.Paired)
|
||||
//{
|
||||
// device2.Connect();
|
||||
@@ -431,7 +431,7 @@ namespace Assets.Scripts.Devices.Ant
|
||||
}
|
||||
|
||||
//var deviceService = new DeviceService();
|
||||
//var info = deviceService.Get(PubCommData.CurrentUser.Id, device.searchProfile.deviceNumber.ToString() + ":" + device.searchProfile.deviceType);
|
||||
//var info = deviceService.Get(App.CurrentUser.Id, device.searchProfile.deviceNumber.ToString() + ":" + device.searchProfile.deviceType);
|
||||
//if (info != null && info.Paired == false)
|
||||
//{
|
||||
// info.Paired = true;
|
||||
@@ -492,7 +492,7 @@ namespace Assets.Scripts.Devices.Ant
|
||||
if (save)
|
||||
{
|
||||
//var deviceService = new DeviceService();
|
||||
//var info = deviceService.Get(PubCommData.CurrentUser.Id, device.searchProfile.deviceNumber.ToString() + ":" + device.searchProfile.deviceType);
|
||||
//var info = deviceService.Get(App.CurrentUser.Id, device.searchProfile.deviceNumber.ToString() + ":" + device.searchProfile.deviceType);
|
||||
//if (info != null && info.Paired)
|
||||
//{
|
||||
// info.Paired = false;
|
||||
|
||||
Reference in new issue
Block a user