|
|
|
@ -9,6 +9,7 @@ using System.Security.Cryptography;
|
|
|
|
|
using System.IO; |
|
|
|
|
using UnityEngine.Networking; |
|
|
|
|
using UnityEngine.EventSystems; |
|
|
|
|
using AX.MessageSystem; |
|
|
|
|
|
|
|
|
|
#region 接口数据类型 |
|
|
|
|
#pragma warning disable IDE1006 // 命名样式 |
|
|
|
@ -263,13 +264,23 @@ public class DevicePanelManager : MonoBehaviour
|
|
|
|
|
#endregion |
|
|
|
|
void Awake() |
|
|
|
|
{ |
|
|
|
|
MessageDispatcher.AddListener("ConfigLoadOver", ConfigLoadOver); |
|
|
|
|
Instance = this; |
|
|
|
|
} |
|
|
|
|
private void Start() |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
private void OnDestroy() |
|
|
|
|
{ |
|
|
|
|
MessageDispatcher.RemoveListener("ConfigLoadOver", ConfigLoadOver); |
|
|
|
|
} |
|
|
|
|
private void ConfigLoadOver(IMessage obj) |
|
|
|
|
{ |
|
|
|
|
LoadDeciceData(); |
|
|
|
|
LoadDeviceObjConfig(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void RefreshData() |
|
|
|
|
{ |
|
|
|
|
StopAllCoroutines(); |
|
|
|
@ -626,7 +637,7 @@ public class DevicePanelManager : MonoBehaviour
|
|
|
|
|
{ |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
string url = string.Format(HttpManager.Instance.GetBreakPointsById, objId); |
|
|
|
|
string url = string.Format(HttpManager.Instance.GetOilTankById, objId); |
|
|
|
|
Debug.Log($"the url is :{ url}"); |
|
|
|
|
if (Application.platform == RuntimePlatform.WebGLPlayer) |
|
|
|
|
{ |
|
|
|
@ -673,7 +684,7 @@ public class DevicePanelManager : MonoBehaviour
|
|
|
|
|
DeviceObjManager.Instance.AddObj(bindName); |
|
|
|
|
} |
|
|
|
|
var json = JsonConvert.SerializeObject(BindObjectList); |
|
|
|
|
string url = string.Format(HttpManager.Instance.PostBreakPointsById, objId); |
|
|
|
|
string url = string.Format(HttpManager.Instance.PostIOilTankById, objId); |
|
|
|
|
if (Application.platform == RuntimePlatform.WebGLPlayer) |
|
|
|
|
{ |
|
|
|
|
url = url.Substring(url.IndexOf("api") - 1); |
|
|
|
@ -687,7 +698,7 @@ public class DevicePanelManager : MonoBehaviour
|
|
|
|
|
public void SaveDeviceObjConfig() |
|
|
|
|
{ |
|
|
|
|
var json = JsonConvert.SerializeObject(BindObjectList); |
|
|
|
|
string url = string.Format(HttpManager.Instance.PostBreakPointsById, objId); |
|
|
|
|
string url = string.Format(HttpManager.Instance.PostIOilTankById, objId); |
|
|
|
|
if (Application.platform == RuntimePlatform.WebGLPlayer) |
|
|
|
|
{ |
|
|
|
|
url = url.Substring(url.IndexOf("api") - 1); |
|
|
|
|