From 6d55af8792cf8fbef0055e677b900fc352dba9a2 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 04 六月 2020 15:17:14 +0800
Subject: [PATCH] 2020-06-04 1.更新。
---
SmartHome/SmartHome/UI/SimpleControl/MainPage.cs | 70 ++++++++++++++++++++++++++--------
1 files changed, 53 insertions(+), 17 deletions(-)
diff --git a/SmartHome/SmartHome/UI/SimpleControl/MainPage.cs b/SmartHome/SmartHome/UI/SimpleControl/MainPage.cs
index 9b0d536..f76c0e7 100644
--- a/SmartHome/SmartHome/UI/SimpleControl/MainPage.cs
+++ b/SmartHome/SmartHome/UI/SimpleControl/MainPage.cs
@@ -48,9 +48,9 @@
public static string sendTime = "";
public static string recTime = "";
#if wallon
- public static string CodeIDString = "202005281";
+ public static string CodeIDString = "202006021";
#else
- public static string CodeIDString = "2.505281";
+ public static string CodeIDString = "2.506021";
#endif
public static UserInfo LoginUser;
public static string RequestSource = "1"; //0:Zigbee銆�1:HdlOn銆�2:GraphicsMonitor銆�3:BusproSoft銆�4:AgentWeb
@@ -146,34 +146,70 @@
}
}
- static Button btnTipMsg = new Button () {
- Height = Application.GetRealHeight (126), BackgroundColor = SkinStyle.Current.AddTipButtonColor,
- Y = Application.GetRealHeight(30),
- TextAlignment = TextAlignment.Center,
- };
+ static Button btnTipMsg;
public static void AddTip (string tip, int time = 3000)
{
+
if (MainFrameLayout == null) {
return;
}
Application.RunOnMainThread (() => {
- btnTipMsg.Text = tip;
- MainFrameLayout.AddChidren (btnTipMsg);
- btnTipMsg.MouseUpEventHandler += (sender, e) => {
- if (btnTipMsg.Parent != null)
- btnTipMsg.RemoveFromParent ();
- };
- System.Threading.Tasks.Task.Run (() => {
- System.Threading.Thread.Sleep (time);
- Application.RunOnMainThread (() => {
+ try {
+ if (btnTipMsg == null) {
+ btnTipMsg = new Button () {
+ Height = Application.GetRealHeight (90),
+ BackgroundColor = SkinStyle.Current.AddTipButtonColor,
+ Y = Application.GetRealHeight (36),
+ TextAlignment = TextAlignment.Center,
+ };
+ }
+
+ btnTipMsg.Text = tip;
+ MainFrameLayout.AddChidren (btnTipMsg);
+ btnTipMsg.MouseUpEventHandler += (sender, e) => {
if (btnTipMsg.Parent != null)
btnTipMsg.RemoveFromParent ();
+ };
+ System.Threading.Tasks.Task.Run (() => {
+ System.Threading.Thread.Sleep (time);
+ Application.RunOnMainThread (() => {
+ if (btnTipMsg.Parent != null)
+ btnTipMsg.RemoveFromParent ();
+ });
});
- });
+ } catch { }
});
}
+ //static Button btnTipMsg = new Button () {
+ // Height = Application.GetRealHeight (126), BackgroundColor = SkinStyle.Current.AddTipButtonColor,
+ // Y = Application.GetRealHeight(30),
+ // TextAlignment = TextAlignment.Center,
+ //};
+
+ //public static void AddTip (string tip, int time = 3000)
+ //{
+ // if (MainFrameLayout == null) {
+ // return;
+ // }
+ // Application.RunOnMainThread (() => {
+ // btnTipMsg.Text = tip;
+ // MainFrameLayout.AddChidren (btnTipMsg);
+ // btnTipMsg.MouseUpEventHandler += (sender, e) => {
+ // if (btnTipMsg.Parent != null)
+ // btnTipMsg.RemoveFromParent ();
+ // };
+ // System.Threading.Tasks.Task.Run (() => {
+ // System.Threading.Thread.Sleep (time);
+ // Application.RunOnMainThread (() => {
+ // if (btnTipMsg.Parent != null)
+ // btnTipMsg.RemoveFromParent ();
+ // });
+ // });
+ // });
+ //}
+
/// <summary>
/// 璇锋眰鏈嶅姟鍣ㄦ柟娉�
/// 鎸囧畾涓�涓猆rl,鍜岃姹傛柟娉曪紝鏁版嵁锛孋ookie锛屽緱鍒板搷搴旂殑鏁版嵁
--
Gitblit v1.8.0