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/Curtain/MotorCurtainPageBLL.cs | 223 ++++++++++++++++++++++++++++++++-----------------------
1 files changed, 128 insertions(+), 95 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
index 7638d01..39f76e8 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
@@ -31,7 +31,9 @@
{
if (!bodyView.onCurtainAnimation)
{
- bodyView.CurtainAnimation(Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent)));
+ bodyView.btnProgress.Text = updateTemp.GetAttrState(FunctionAttributeKey.Percent) + "%";
+ bodyView.curtainSeekBar.Progress = Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent));
+ //bodyView.CurtainAnimation(Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent)));
}
}
catch { }
@@ -137,6 +139,16 @@
{
btnCurtainClose.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.isOnline())
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
new System.Threading.Thread(() =>
{
System.Threading.Thread.Sleep(2000);
@@ -156,6 +168,16 @@
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.isOnline())
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
onCurtainAnimation = false;
new System.Threading.Thread(() =>
{
@@ -174,6 +196,16 @@
btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
{
+ if (!function.isOnline())
+ {
+ new Tip()
+ {
+ CloseTime = 1,
+ Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
+ Direction = AMPopTipDirection.None,
+ }.Show(MainPage.BaseView);
+ return;
+ }
new System.Threading.Thread(() =>
{
System.Threading.Thread.Sleep(2000);
@@ -191,107 +223,108 @@
CurtainAnimation(100);
};
+ if (function.isOnline())
+ {
+ btnCurtainStop.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainStop.IsSelected = true;
+ btnCurtainClose.IsSelected = false;
+ btnCurtainOpen.IsSelected = false;
+ };
+ btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainOpen.IsSelected = true;
+ btnCurtainClose.IsSelected = false;
+ btnCurtainStop.IsSelected = false;
+ };
+ btnCurtainClose.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainClose.IsSelected = true;
+ btnCurtainOpen.IsSelected = false;
+ btnCurtainStop.IsSelected = false;
+ };
- btnCurtainStop.MouseDownEventHandler = (sender, e) =>
- {
- btnCurtainStop.IsSelected = true;
- btnCurtainClose.IsSelected = false;
- btnCurtainOpen.IsSelected = false;
- };
- btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
- {
- btnCurtainOpen.IsSelected = true;
- btnCurtainClose.IsSelected = false;
- btnCurtainStop.IsSelected = false;
- };
- btnCurtainClose.MouseDownEventHandler = (sender, e) =>
- {
- btnCurtainClose.IsSelected = true;
- btnCurtainOpen.IsSelected = false;
- btnCurtainStop.IsSelected = false;
- };
+ //btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
+ //{
+ // function.percent--;
+ // controlBar.Progress = function.percent;
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add(FunctionAttributeKey.Percent, function.percent.ToString());
+ // DriverLayer.Control.Ins.SendWriteCommand(function, d);
+ //};
- //btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
- //{
- // function.percent--;
- // controlBar.Progress = function.percent;
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add(FunctionAttributeKey.Percent, function.percent.ToString());
- // DriverLayer.Control.Ins.SendWriteCommand(function, d);
- //};
+ //btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
+ //{
+ // function.percent++;
+ // controlBar.Progress = function.percent;
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add(FunctionAttributeKey.Percent, function.percent.ToString());
+ // DriverLayer.Control.Ins.SendWriteCommand(function, d);
+ //};
- //btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
- //{
- // function.percent++;
- // controlBar.Progress = function.percent;
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add(FunctionAttributeKey.Percent, function.percent.ToString());
- // DriverLayer.Control.Ins.SendWriteCommand(function, d);
- //};
-
- curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
- {
- btnProgress.Text = curtainSeekBar.Progress + "%";
- // controlBar.Progress = curtainSeekBar.Progress;
- // new System.Threading.Thread(() =>
- // {
- // if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
- // {
- // function.percent = e;
- // function.refreshTime = DateTime.Now;
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add("percent", function.percent.ToString());
- // Control.SendWriteCommand(function, d);
- // }
- // })
- // { IsBackground = true }.Start();
- };
- curtainSeekBar.OnStopTrackingTouchEvent = (sender, e) =>
- {
- btnProgress.Text = curtainSeekBar.Progress + "%";
+ curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
+ {
+ btnProgress.Text = curtainSeekBar.Progress + "%";
+ // controlBar.Progress = curtainSeekBar.Progress;
+ // new System.Threading.Thread(() =>
+ // {
+ // if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
+ // {
+ // function.percent = e;
+ // function.refreshTime = DateTime.Now;
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add("percent", function.percent.ToString());
+ // Control.SendWriteCommand(function, d);
+ // }
+ // })
+ // { IsBackground = true }.Start();
+ };
+ curtainSeekBar.OnStopTrackingTouchEvent = (sender, e) =>
+ {
+ btnProgress.Text = curtainSeekBar.Progress + "%";
//controlBar.Progress = curtainSeekBar.Progress;
new System.Threading.Thread(() =>
- {
- function.SetAttrState(FunctionAttributeKey.Percent, e);
- function.refreshTime = DateTime.Now;
- System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- d.Add(FunctionAttributeKey.Percent, e.ToString());
- DriverLayer.Control.Ins.SendWriteCommand(function, d);
- })
- { IsBackground = true }.Start();
- };
+ {
+ function.SetAttrState(FunctionAttributeKey.Percent, e);
+ function.refreshTime = DateTime.Now;
+ System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ d.Add(FunctionAttributeKey.Percent, e.ToString());
+ DriverLayer.Control.Ins.SendWriteCommand(function, d);
+ })
+ { IsBackground = true }.Start();
+ };
- //controlBar.OnProgressChangedEvent = (sender, e) =>
- //{
- // curtainSeekBar.Progress = controlBar.Progress;
- // new System.Threading.Thread(() =>
- // {
- // if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
- // {
- // function.percent = e;
- // function.refreshTime = DateTime.Now;
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add("percent", function.percent.ToString());
- // Control.SendWriteCommand(function, d);
- // }
- // })
- // { IsBackground = true }.Start();
- //};
+ //controlBar.OnProgressChangedEvent = (sender, e) =>
+ //{
+ // curtainSeekBar.Progress = controlBar.Progress;
+ // new System.Threading.Thread(() =>
+ // {
+ // if (controlBar.Progress == 0 || controlBar.Progress == 100 || (DateTime.Now - function.refreshTime).TotalMilliseconds > 300)
+ // {
+ // function.percent = e;
+ // function.refreshTime = DateTime.Now;
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add("percent", function.percent.ToString());
+ // Control.SendWriteCommand(function, d);
+ // }
+ // })
+ // { IsBackground = true }.Start();
+ //};
- //controlBar.OnStopTrackingTouchEvent = (sender, e) =>
- //{
- // curtainSeekBar.Progress = controlBar.Progress;
- // new System.Threading.Thread(() =>
- // {
- // function.percent = e;
- // function.refreshTime = DateTime.Now;
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add("percent", function.percent.ToString());
- // DriverLayer.Control.Ins.SendWriteCommand(function, d);
- // })
- // { IsBackground = true }.Start();
- //};
-
+ //controlBar.OnStopTrackingTouchEvent = (sender, e) =>
+ //{
+ // curtainSeekBar.Progress = controlBar.Progress;
+ // new System.Threading.Thread(() =>
+ // {
+ // function.percent = e;
+ // function.refreshTime = DateTime.Now;
+ // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ // d.Add("percent", function.percent.ToString());
+ // DriverLayer.Control.Ins.SendWriteCommand(function, d);
+ // })
+ // { IsBackground = true }.Start();
+ //};
+ }
}
}
}
--
Gitblit v1.8.0