MQTTData 버튼 추가
This commit is contained in:
@@ -43,8 +43,10 @@ namespace Studio
|
|||||||
private string maxResponseTimeApi;
|
private string maxResponseTimeApi;
|
||||||
|
|
||||||
public Dictionary<string, StudioEntityWithState<object>> baseData = new();
|
public Dictionary<string, StudioEntityWithState<object>> baseData = new();
|
||||||
|
private Dictionary<string, DateTime> lastUpdateTime = new();
|
||||||
|
|
||||||
public event Action<string, StudioEntityWithState<object>> onAPIDataLoaded;
|
public event Action<string, StudioEntityWithState<object>> onAPIDataLoaded;
|
||||||
|
public event Action<string, Dictionary<string, Dictionary<string, string>>, TimeSpan> onMQTTDataLoaded;
|
||||||
|
|
||||||
//private string
|
//private string
|
||||||
private StudioService(StudioRepoistory repository)
|
private StudioService(StudioRepoistory repository)
|
||||||
@@ -67,12 +69,28 @@ namespace Studio
|
|||||||
//Que에 담아둔다?
|
//Que에 담아둔다?
|
||||||
private void OnTopicList(string type, Dictionary<string, Dictionary<string, string>> entities)
|
private void OnTopicList(string type, Dictionary<string, Dictionary<string, string>> entities)
|
||||||
{
|
{
|
||||||
//데이터 시간 체크 , entity의 총 크기,type에 따라 각자 시간 계산
|
DateTime now = DateTime.Now;
|
||||||
// entities가 type + rawdata {type : {entity}, {entity} ...}
|
TimeSpan elapsedTime;
|
||||||
|
|
||||||
|
// elapsed 계산
|
||||||
|
if (lastUpdateTime.ContainsKey(type))
|
||||||
|
{
|
||||||
|
DateTime last = lastUpdateTime[type];
|
||||||
|
elapsedTime = now - last;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
elapsedTime = TimeSpan.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
lastUpdateTime[type] = now;
|
||||||
|
|
||||||
foreach (var idKey in entities)
|
foreach (var idKey in entities)
|
||||||
{
|
{
|
||||||
UpdateTopicData(type, idKey.Key, idKey.Value);
|
UpdateTopicData(type, idKey.Key, idKey.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMQTTDataLoaded?.Invoke(type, entities, elapsedTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task UpdateTopicData(string type, string id, Dictionary<string, string> entity)
|
private async Task UpdateTopicData(string type, string id, Dictionary<string, string> entity)
|
||||||
@@ -90,7 +108,6 @@ namespace Studio
|
|||||||
|
|
||||||
DispatchMachineEvent(type, id, entity);
|
DispatchMachineEvent(type, id, entity);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Dictionary<string, Dictionary<string, Dictionary<string, string>>> timelineEntity = new();
|
private Dictionary<string, Dictionary<string, Dictionary<string, string>>> timelineEntity = new();
|
||||||
|
|||||||
76
Assets/TMPFolder/Panel_APIDataInfo.cs
Normal file
76
Assets/TMPFolder/Panel_APIDataInfo.cs
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Studio.Setting.Connect;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
using XRLib.UI;
|
||||||
|
|
||||||
|
namespace XED.UI
|
||||||
|
{
|
||||||
|
public class Panel_APIDataInfo : PanelBase
|
||||||
|
{
|
||||||
|
TextMeshProUGUI RawData;
|
||||||
|
RectTransform rawDataRect;
|
||||||
|
float rawDataFoldHeight;
|
||||||
|
float rawDataOriginHeight;
|
||||||
|
RectTransform RawDataFoldButton;
|
||||||
|
bool isRawDataFoldOn;
|
||||||
|
TextMeshProUGUI PacketSize;
|
||||||
|
TextMeshProUGUI LastRequestTime;
|
||||||
|
TextMeshProUGUI LastResponseTime;
|
||||||
|
TextMeshProUGUI ElapsedTime;
|
||||||
|
|
||||||
|
public override void AfterAwake()
|
||||||
|
{
|
||||||
|
rawDataRect = RawData.GetComponent<RectTransform>();
|
||||||
|
rawDataFoldHeight = rawDataRect.sizeDelta.y;
|
||||||
|
RawDataFoldButton.GetComponent<Button>().onClick.AddListener(OnClickRawDataFoldButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowData(StudioEntityWithState<object> data)
|
||||||
|
{
|
||||||
|
RawData.text = JsonConvert.SerializeObject(data.Entity, Formatting.Indented);
|
||||||
|
|
||||||
|
rawDataOriginHeight = RawData.preferredHeight;
|
||||||
|
rawDataOriginHeight = Mathf.Max(rawDataFoldHeight, rawDataOriginHeight);
|
||||||
|
|
||||||
|
rawDataRect = RawData.GetComponent<RectTransform>();
|
||||||
|
Vector2 sizeDelta = rawDataRect.sizeDelta;
|
||||||
|
sizeDelta.y = rawDataOriginHeight;
|
||||||
|
rawDataRect.sizeDelta = sizeDelta;
|
||||||
|
|
||||||
|
var byteSize = System.Text.Encoding.Default.GetBytes(data.Entity.ToString()).Length;
|
||||||
|
PacketSize.text = byteSize.ToString();
|
||||||
|
LastRequestTime.text = data.lastRequestTime.ToString();
|
||||||
|
LastResponseTime.text = data.lastResponseTime.ToString();
|
||||||
|
|
||||||
|
var elapsed = data.elapsedTime;
|
||||||
|
int minutes = elapsed.Minutes;
|
||||||
|
int seconds = elapsed.Seconds;
|
||||||
|
int milliseconds = elapsed.Milliseconds;
|
||||||
|
ElapsedTime.text = $"{minutes:D2}:{seconds:D2}.{milliseconds:D3}";
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnClickRawDataFoldButton()
|
||||||
|
{
|
||||||
|
if (isRawDataFoldOn)
|
||||||
|
{
|
||||||
|
Vector2 sizeDelta = rawDataRect.sizeDelta;
|
||||||
|
sizeDelta.y = rawDataOriginHeight;
|
||||||
|
rawDataRect.sizeDelta = sizeDelta;
|
||||||
|
RawDataFoldButton.localRotation = Quaternion.Euler(0, 0, 0);
|
||||||
|
isRawDataFoldOn = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Vector2 sizeDelta = rawDataRect.sizeDelta;
|
||||||
|
sizeDelta.y = rawDataFoldHeight;
|
||||||
|
rawDataRect.sizeDelta = sizeDelta;
|
||||||
|
RawDataFoldButton.localRotation = Quaternion.Euler(0f, 0f, 180f);
|
||||||
|
isRawDataFoldOn = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
2
Assets/TMPFolder/Panel_APIDataInfo.cs.meta
Normal file
2
Assets/TMPFolder/Panel_APIDataInfo.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c6f31aa48605d82488b6d31bc7347b4f
|
||||||
71
Assets/TMPFolder/Panel_MQTTDataInfo.cs
Normal file
71
Assets/TMPFolder/Panel_MQTTDataInfo.cs
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
using XRLib.UI;
|
||||||
|
|
||||||
|
namespace XED.UI
|
||||||
|
{
|
||||||
|
public class Panel_MQTTDataInfo : PanelBase
|
||||||
|
{
|
||||||
|
TextMeshProUGUI RawData;
|
||||||
|
RectTransform rawDataRect;
|
||||||
|
float rawDataFoldHeight;
|
||||||
|
float rawDataOriginHeight;
|
||||||
|
RectTransform RawDataFoldButton;
|
||||||
|
bool isRawDataFoldOn;
|
||||||
|
TextMeshProUGUI PacketSize;
|
||||||
|
TextMeshProUGUI ElapsedTime;
|
||||||
|
|
||||||
|
public override void AfterAwake()
|
||||||
|
{
|
||||||
|
rawDataRect = RawData.GetComponent<RectTransform>();
|
||||||
|
rawDataFoldHeight = rawDataRect.sizeDelta.y;
|
||||||
|
RawDataFoldButton.GetComponent<Button>().onClick.AddListener(OnClickRawDataFoldButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowData(Dictionary<string, Dictionary<string, string>> data, TimeSpan elapsedTime)
|
||||||
|
{
|
||||||
|
RawData.text = JsonConvert.SerializeObject(data, Formatting.Indented);
|
||||||
|
|
||||||
|
rawDataOriginHeight = RawData.preferredHeight;
|
||||||
|
rawDataOriginHeight = Mathf.Max(rawDataFoldHeight, rawDataOriginHeight);
|
||||||
|
|
||||||
|
rawDataRect = RawData.GetComponent<RectTransform>();
|
||||||
|
Vector2 sizeDelta = rawDataRect.sizeDelta;
|
||||||
|
sizeDelta.y = rawDataOriginHeight;
|
||||||
|
rawDataRect.sizeDelta = sizeDelta;
|
||||||
|
|
||||||
|
var byteSize = System.Text.Encoding.Default.GetBytes(data.ToString()).Length;
|
||||||
|
PacketSize.text = byteSize.ToString();
|
||||||
|
|
||||||
|
var elapsed = elapsedTime;
|
||||||
|
int minutes = elapsed.Minutes;
|
||||||
|
int seconds = elapsed.Seconds;
|
||||||
|
int milliseconds = elapsed.Milliseconds;
|
||||||
|
ElapsedTime.text = $"{minutes:D2}:{seconds:D2}.{milliseconds:D3}";
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnClickRawDataFoldButton()
|
||||||
|
{
|
||||||
|
if (isRawDataFoldOn)
|
||||||
|
{
|
||||||
|
Vector2 sizeDelta = rawDataRect.sizeDelta;
|
||||||
|
sizeDelta.y = rawDataOriginHeight;
|
||||||
|
rawDataRect.sizeDelta = sizeDelta;
|
||||||
|
RawDataFoldButton.localRotation = Quaternion.Euler(0, 0, 0);
|
||||||
|
isRawDataFoldOn = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Vector2 sizeDelta = rawDataRect.sizeDelta;
|
||||||
|
sizeDelta.y = rawDataFoldHeight;
|
||||||
|
rawDataRect.sizeDelta = sizeDelta;
|
||||||
|
RawDataFoldButton.localRotation = Quaternion.Euler(0f, 0f, 180f);
|
||||||
|
isRawDataFoldOn = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
2
Assets/TMPFolder/Panel_MQTTDataInfo.cs.meta
Normal file
2
Assets/TMPFolder/Panel_MQTTDataInfo.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 17058a4d54a5ac34ebbbc0083005f47c
|
||||||
@@ -9,6 +9,7 @@ using Newtonsoft.Json;
|
|||||||
using Best.HTTP.JSON;
|
using Best.HTTP.JSON;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace XED.UI
|
namespace XED.UI
|
||||||
{
|
{
|
||||||
@@ -17,11 +18,13 @@ namespace XED.UI
|
|||||||
UI_BaseDataButton apiDataButtonPrefab;
|
UI_BaseDataButton apiDataButtonPrefab;
|
||||||
UI_MQTTDataButton mqttDataButtonPrefab;
|
UI_MQTTDataButton mqttDataButtonPrefab;
|
||||||
|
|
||||||
UI_DataRepositoryButtonList APIDataList;
|
RectTransform APIDataList;
|
||||||
RectTransform Info_API;
|
RectTransform MQTTDataList;
|
||||||
RectTransform Info_Basedata;
|
|
||||||
RectTransform Info_MQTT;
|
RectTransform Panel_APIInfo;
|
||||||
RectTransform Info_MQTTdata;
|
RectTransform Panel_APIDataInfo;
|
||||||
|
RectTransform Panel_MQTTInfo;
|
||||||
|
RectTransform Panel_MQTTDataInfo;
|
||||||
|
|
||||||
TextMeshProUGUI TotalRequestPacketSize;
|
TextMeshProUGUI TotalRequestPacketSize;
|
||||||
TextMeshProUGUI AverageRequestPacketSize;
|
TextMeshProUGUI AverageRequestPacketSize;
|
||||||
@@ -33,20 +36,10 @@ namespace XED.UI
|
|||||||
TextMeshProUGUI MaximumResponsePacketAPI;
|
TextMeshProUGUI MaximumResponsePacketAPI;
|
||||||
TextMeshProUGUI MaximumResponseTimeAPI;
|
TextMeshProUGUI MaximumResponseTimeAPI;
|
||||||
|
|
||||||
TextMeshProUGUI RawData;
|
|
||||||
RectTransform rawDataRect;
|
|
||||||
float rawDataFoldHeight;
|
|
||||||
float rawDataOriginHeight;
|
|
||||||
RectTransform RawDataFoldButton;
|
|
||||||
bool isRawDataFoldOn;
|
|
||||||
TextMeshProUGUI PacketSize;
|
|
||||||
TextMeshProUGUI LastRequestTime;
|
|
||||||
TextMeshProUGUI LastResponseTime;
|
|
||||||
TextMeshProUGUI ElapsedTime;
|
|
||||||
|
|
||||||
LayoutGroup[] layoutGroups;
|
LayoutGroup[] layoutGroups;
|
||||||
|
|
||||||
Dictionary<string, UI_BaseDataButton> apiButtons = new();
|
Dictionary<string, UI_BaseDataButton> apiButtons = new();
|
||||||
|
Dictionary<string, UI_MQTTDataButton> mqttButtons = new();
|
||||||
|
|
||||||
public override void AfterAwake()
|
public override void AfterAwake()
|
||||||
{
|
{
|
||||||
@@ -56,18 +49,16 @@ namespace XED.UI
|
|||||||
label.panel_Repository = this;
|
label.panel_Repository = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
StudioService.Instance.onAPIDataLoaded += CreateAPIDataButton;
|
StudioService.Instance.onAPIDataLoaded += UpdateAPIDataButton;
|
||||||
|
StudioService.Instance.onMQTTDataLoaded += UpdateMQTTDataButton;
|
||||||
|
|
||||||
apiDataButtonPrefab = Resources.Load<UI_BaseDataButton>("Prefabs/UI/Button/UI_BaseDataButton");
|
apiDataButtonPrefab = Resources.Load<UI_BaseDataButton>("Prefabs/UI/Button/UI_BaseDataButton");
|
||||||
mqttDataButtonPrefab = Resources.Load<UI_MQTTDataButton>("Prefabs/UI/Button/UI_MQTTDataButton");
|
mqttDataButtonPrefab = Resources.Load<UI_MQTTDataButton>("Prefabs/UI/Button/UI_MQTTDataButton");
|
||||||
|
|
||||||
layoutGroups = GetComponentsInChildren<LayoutGroup>();
|
layoutGroups = GetComponentsInChildren<LayoutGroup>();
|
||||||
rawDataRect = RawData.GetComponent<RectTransform>();
|
|
||||||
rawDataFoldHeight = rawDataRect.sizeDelta.y;
|
|
||||||
RawDataFoldButton.GetComponent<Button>().onClick.AddListener(OnClickRawDataFoldButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateAPIDataButton(string name, StudioEntityWithState<object> value)
|
void UpdateAPIDataButton(string name, StudioEntityWithState<object> value)
|
||||||
{
|
{
|
||||||
if (!apiButtons.ContainsKey(name))
|
if (!apiButtons.ContainsKey(name))
|
||||||
{
|
{
|
||||||
@@ -86,9 +77,21 @@ namespace XED.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateMQTTDataButton()
|
void UpdateMQTTDataButton(string name, Dictionary<string, Dictionary<string, string>> value, TimeSpan elapsedTime)
|
||||||
{
|
{
|
||||||
|
if (!mqttButtons.ContainsKey(name))
|
||||||
|
{
|
||||||
|
var button = Instantiate(mqttDataButtonPrefab, MQTTDataList.transform);
|
||||||
|
mqttButtons.Add(name, button);
|
||||||
|
button.panel_Repository = this;
|
||||||
|
button.SetButtonData(name, value, elapsedTime);
|
||||||
|
|
||||||
|
RebuildLayout();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mqttButtons[name].SetButtonData(name, value, elapsedTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RebuildLayout()
|
public void RebuildLayout()
|
||||||
@@ -113,77 +116,38 @@ namespace XED.UI
|
|||||||
MaximumResponsePacketAPI.text = info.MaximumResponsePacketAPI;
|
MaximumResponsePacketAPI.text = info.MaximumResponsePacketAPI;
|
||||||
MaximumResponseTimeAPI.text = info.MaximumResponseTimeAPI;
|
MaximumResponseTimeAPI.text = info.MaximumResponseTimeAPI;
|
||||||
|
|
||||||
Info_API.gameObject.SetActive(true);
|
Panel_APIInfo.gameObject.SetActive(true);
|
||||||
Info_Basedata.gameObject.SetActive(false);
|
Panel_APIDataInfo.gameObject.SetActive(false);
|
||||||
Info_MQTT.gameObject.SetActive(false);
|
Panel_MQTTInfo.gameObject.SetActive(false);
|
||||||
Info_MQTTdata.gameObject.SetActive(false);
|
Panel_MQTTDataInfo.gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowInformation_APIData(StudioEntityWithState<object> baseDataValue)
|
public void ShowInformation_APIData(StudioEntityWithState<object> baseDataValue)
|
||||||
{
|
{
|
||||||
RawData.text = JsonConvert.SerializeObject(baseDataValue.Entity, Formatting.Indented);
|
Panel_APIDataInfo.GetComponent<Panel_APIDataInfo>().ShowData(baseDataValue);
|
||||||
|
|
||||||
rawDataOriginHeight = RawData.preferredHeight;
|
Panel_APIInfo.gameObject.SetActive(false);
|
||||||
rawDataOriginHeight = Mathf.Max(rawDataFoldHeight, rawDataOriginHeight);
|
Panel_APIDataInfo.gameObject.SetActive(true);
|
||||||
|
Panel_MQTTInfo.gameObject.SetActive(false);
|
||||||
rawDataRect = RawData.GetComponent<RectTransform>();
|
Panel_MQTTDataInfo.gameObject.SetActive(false);
|
||||||
Vector2 sizeDelta = rawDataRect.sizeDelta;
|
|
||||||
sizeDelta.y = rawDataOriginHeight;
|
|
||||||
rawDataRect.sizeDelta = sizeDelta;
|
|
||||||
|
|
||||||
var byteSize = System.Text.Encoding.Default.GetBytes(baseDataValue.Entity.ToString()).Length;
|
|
||||||
PacketSize.text = byteSize.ToString();
|
|
||||||
LastRequestTime.text = baseDataValue.lastRequestTime.ToString();
|
|
||||||
LastResponseTime.text = baseDataValue.lastResponseTime.ToString();
|
|
||||||
|
|
||||||
var elapsed = baseDataValue.elapsedTime;
|
|
||||||
int minutes = elapsed.Minutes;
|
|
||||||
int seconds = elapsed.Seconds;
|
|
||||||
int milliseconds = elapsed.Milliseconds;
|
|
||||||
ElapsedTime.text = $"{minutes:D2}:{seconds:D2}.{milliseconds:D3}";
|
|
||||||
|
|
||||||
Info_API.gameObject.SetActive(false);
|
|
||||||
Info_Basedata.gameObject.SetActive(true);
|
|
||||||
Info_MQTT.gameObject.SetActive(false);
|
|
||||||
Info_MQTTdata.gameObject.SetActive(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowInformation_MQTT()
|
public void ShowInformation_MQTT()
|
||||||
{
|
{
|
||||||
|
Panel_APIInfo.gameObject.SetActive(false);
|
||||||
Info_API.gameObject.SetActive(false);
|
Panel_APIDataInfo.gameObject.SetActive(false);
|
||||||
Info_Basedata.gameObject.SetActive(false);
|
Panel_MQTTInfo.gameObject.SetActive(true);
|
||||||
Info_MQTT.gameObject.SetActive(true);
|
Panel_MQTTDataInfo.gameObject.SetActive(false);
|
||||||
Info_MQTTdata.gameObject.SetActive(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowInformation_MQTTData()
|
public void ShowInformation_MQTTData(Dictionary<string, Dictionary<string, string>> data, TimeSpan elapsedTime)
|
||||||
{
|
{
|
||||||
|
Panel_MQTTDataInfo.GetComponent<Panel_MQTTDataInfo>().ShowData(data, elapsedTime);
|
||||||
|
|
||||||
Info_API.gameObject.SetActive(false);
|
Panel_APIInfo.gameObject.SetActive(false);
|
||||||
Info_Basedata.gameObject.SetActive(false);
|
Panel_APIDataInfo.gameObject.SetActive(false);
|
||||||
Info_MQTT.gameObject.SetActive(false);
|
Panel_MQTTInfo.gameObject.SetActive(false);
|
||||||
Info_MQTTdata.gameObject.SetActive(true);
|
Panel_MQTTDataInfo.gameObject.SetActive(true);
|
||||||
}
|
|
||||||
|
|
||||||
void OnClickRawDataFoldButton()
|
|
||||||
{
|
|
||||||
if (isRawDataFoldOn)
|
|
||||||
{
|
|
||||||
Vector2 sizeDelta = rawDataRect.sizeDelta;
|
|
||||||
sizeDelta.y = rawDataOriginHeight;
|
|
||||||
rawDataRect.sizeDelta = sizeDelta;
|
|
||||||
RawDataFoldButton.localRotation = Quaternion.Euler(0, 0, 0);
|
|
||||||
isRawDataFoldOn = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Vector2 sizeDelta = rawDataRect.sizeDelta;
|
|
||||||
sizeDelta.y = rawDataFoldHeight;
|
|
||||||
rawDataRect.sizeDelta = sizeDelta;
|
|
||||||
RawDataFoldButton.localRotation = Quaternion.Euler(0f, 0f, 180f);
|
|
||||||
isRawDataFoldOn = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ namespace XED
|
|||||||
public class RJHTest : MonoBehaviour
|
public class RJHTest : MonoBehaviour
|
||||||
{
|
{
|
||||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||||
private StudioService tt;
|
|
||||||
private int aa;
|
private int aa;
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@ namespace XED
|
|||||||
TextMeshProUGUI buttonName;
|
TextMeshProUGUI buttonName;
|
||||||
|
|
||||||
string baseDataKey;
|
string baseDataKey;
|
||||||
StudioEntityWithState<object> apiDataValue;
|
StudioEntityWithState<object> dataValue;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
@@ -28,13 +28,13 @@ namespace XED
|
|||||||
|
|
||||||
void OnClickButton()
|
void OnClickButton()
|
||||||
{
|
{
|
||||||
panel_Repository.ShowInformation_APIData(apiDataValue);
|
panel_Repository.ShowInformation_APIData(dataValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetButtonData(string name, StudioEntityWithState<object> data)
|
public void SetButtonData(string name, StudioEntityWithState<object> data)
|
||||||
{
|
{
|
||||||
baseDataKey = name;
|
baseDataKey = name;
|
||||||
apiDataValue = data;
|
dataValue = data;
|
||||||
|
|
||||||
buttonName.text = name;
|
buttonName.text = name;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
using Studio.Setting.Connect;
|
using Studio.Setting.Connect;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
@@ -15,7 +17,8 @@ namespace XED
|
|||||||
TextMeshProUGUI buttonName;
|
TextMeshProUGUI buttonName;
|
||||||
|
|
||||||
string baseDataKey;
|
string baseDataKey;
|
||||||
StudioEntityWithState<object> baseDataValue;
|
Dictionary<string, Dictionary<string, string>> dataValue;
|
||||||
|
TimeSpan elapsedTime;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
@@ -27,13 +30,14 @@ namespace XED
|
|||||||
|
|
||||||
void OnClickButton()
|
void OnClickButton()
|
||||||
{
|
{
|
||||||
panel_Repository.ShowInformation_MQTTData();
|
panel_Repository.ShowInformation_MQTTData(dataValue, elapsedTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetButtonData(string name, StudioEntityWithState<object> data)
|
public void SetButtonData(string name, Dictionary<string, Dictionary<string, string>> data, TimeSpan elapsedTime)
|
||||||
{
|
{
|
||||||
baseDataKey = name;
|
baseDataKey = name;
|
||||||
baseDataValue = data;
|
dataValue = data;
|
||||||
|
this.elapsedTime = elapsedTime;
|
||||||
|
|
||||||
buttonName.text = name;
|
buttonName.text = name;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user