From ec5a167e0366a75642e45dbd30817c1c8ae57e79 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 11 九月 2023 15:34:29 +0800
Subject: [PATCH] 备份
---
OnPro/HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPageBLL.cs | 182 +++++++++++++--------------------------------
1 files changed, 53 insertions(+), 129 deletions(-)
diff --git a/OnPro/HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPageBLL.cs b/OnPro/HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPageBLL.cs
index 1c3653b..d1a4db5 100644
--- a/OnPro/HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPageBLL.cs
+++ b/OnPro/HDL_ON/UI/UI2/FuntionControlView/Curtain/VenetianBlindsPageBLL.cs
@@ -149,16 +149,6 @@
{
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);
@@ -178,19 +168,11 @@
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
{
- if (!function.isOnline())
+ new System.Threading.Thread(() =>
{
- 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);
- Application.RunOnMainThread(() => {
+ Application.RunOnMainThread(() =>
+ {
btnCurtainStop.IsSelected = false;
});
})
@@ -204,16 +186,6 @@
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);
@@ -231,110 +203,62 @@
//CurtainAnimation(0);
};
- //btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
- //{
- // controlBar.Progress -= 1;
- // function.SetAttrState(FunctionAttributeKey.Percent, controlBar.Progress);
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add(FunctionAttributeKey.Percent, controlBar.Progress.ToString());
- // DriverLayer.Control.Ins.SendWriteCommand(function, d);
- //};
-
- //btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
- //{
- // controlBar.Progress += 1;
- // function.SetAttrState(FunctionAttributeKey.Percent, controlBar.Progress);
- // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
- // d.Add(FunctionAttributeKey.Percent, controlBar.Progress.ToString());
- // DriverLayer.Control.Ins.SendWriteCommand(function, d);
- //};
-
- if (function.isOnline())
+ btnCurtainStop.MouseDownEventHandler = (sender, e) =>
{
-
- 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.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;
+ };
- //curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
- //{
- // 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) =>
+ //curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
+ //{
+ // 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) =>
+ {
+ //controlBar.Progress = curtainSeekBar.Progress;
+ btnProgress.Text = curtainSeekBar.Progress + "%";
+ new System.Threading.Thread(() =>
{
- //controlBar.Progress = curtainSeekBar.Progress;
- btnProgress.Text = 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();
+ };
- curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
- {
- btnProgress.Text = 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.OnProgressChangedEvent = (sender, e) =>
+ {
+ btnProgress.Text = curtainSeekBar.Progress + "%";
+ };
- //controlBar.OnStopTrackingTouchEvent = (sender, e) =>
- //{
- // curtainSeekBar.Progress = controlBar.Progress;
- // btnProgress.Text = 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("percent", e.ToString());
- // DriverLayer.Control.Ins.SendWriteCommand(function, d);
- // })
- // { IsBackground = true }.Start();
- //};
- }
}
}
}
--
Gitblit v1.8.0