From b562a582ac3a288193e6e4f57c5eff8a344305a4 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 27 九月 2024 13:52:17 +0800
Subject: [PATCH] Update AndroidManifest.xml
---
HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_InstantaneousValue.cs | 62 ++++++++++++++++---------------
1 files changed, 32 insertions(+), 30 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_InstantaneousValue.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_InstantaneousValue.cs
index 4abdef4..46c8fa3 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_InstantaneousValue.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/SocketPage_InstantaneousValue.cs
@@ -97,45 +97,47 @@
public static void UpdataView(Function updata)
{
- if(bodyView!=null)
+ if (bodyView != null)
{
- for (int i = 0; i < bodyView.instantaneousValueView.ChildrenCount; i++)
+ Application.RunOnMainThread(() =>
{
- var view = bodyView.instantaneousValueView.GetChildren(i);
- if(null != view.Tag )
+ for (int i = 0; i < bodyView.instantaneousValueView.ChildrenCount; i++)
{
- if (view.GetType() == typeof(InstantaneousValueView))
+ var view = bodyView.instantaneousValueView.GetChildren(i);
+ if (null != view.Tag)
{
- var view2 = view as InstantaneousValueView;
- switch (view.Tag.ToString())
+ if (view.GetType() == typeof(InstantaneousValueView))
{
- case "active_power":
- var attr = updata.GetAttribute("active_power");
- if (attr != null)
- {
- view2.btnValue.Text = attr.curValue.ToString();
- }
- break;
- case "voltage":
- var attr1 = updata.GetAttribute("voltage");
- if (attr1 != null)
- {
- view2.btnValue.Text = attr1.curValue.ToString();
- }
- break;
- case "current":
- var attr2 = updata.GetAttribute("current");
- if (attr2 != null)
- {
- view2.btnValue.Text = attr2.curValue.ToString();
- }
- break;
+ var view2 = view as InstantaneousValueView;
+ switch (view.Tag.ToString())
+ {
+ case "active_power":
+ var attr = updata.GetAttribute("active_power");
+ if (attr != null)
+ {
+ view2.btnValue.Text = attr.curValue.ToString();
+ }
+ break;
+ case "voltage":
+ var attr1 = updata.GetAttribute("voltage");
+ if (attr1 != null)
+ {
+ view2.btnValue.Text = attr1.curValue.ToString();
+ }
+ break;
+ case "current":
+ var attr2 = updata.GetAttribute("current");
+ if (attr2 != null)
+ {
+ view2.btnValue.Text = attr2.curValue.ToString();
+ }
+ break;
+ }
}
}
}
- }
+ });
}
-
}
}
--
Gitblit v1.8.0