From 9a4b76398009cf76c508d61f7e48fb6f5cb7ac2d Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期二, 21 七月 2020 09:46:53 +0800
Subject: [PATCH] 请合并最新多功能面板代码
---
ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs | 74 +++++++++++++++++++++++++++++++-----
1 files changed, 63 insertions(+), 11 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs
index 8fb999c..9c67d14 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs
@@ -83,6 +83,22 @@
btnOpen.Y = Application.GetRealHeight(994) - btnOpen.YOffset;
btnOpen.ButtonClickEvent += (sender, e) =>
{
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+ if (Common.Config.Instance.Home.IsVirtually == true)
+ {
+ ((Rollershade)device).WcdCurrentPositionLiftPercentage = 100;
+ if (this.WcdType == 0)
+ {
+ SeekBarSiphonateCurtain.Progress = 100;
+ }
+ else
+ {
+ SeekBarOpenCurtain.Progress = 100;
+ }
+ //璁剧疆鐘舵�佹枃瀛�
+ this.SetStatuText(HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device));
+ return;
+ }
//鍙戦�佺獥甯樺懡浠�
this.SetCurtainCommand(0);
};
@@ -98,6 +114,11 @@
btnStop.Y = btnOpen.Y;
btnStop.ButtonClickEvent += (sender, e) =>
{
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+ if (Common.Config.Instance.Home.IsVirtually == true)
+ {
+ return;
+ }
//鍙戦�佺獥甯樺懡浠�
this.SetCurtainCommand(2);
};
@@ -111,6 +132,22 @@
btnClose.Y = btnOpen.Y;
btnClose.ButtonClickEvent += (sender, e) =>
{
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+ if (Common.Config.Instance.Home.IsVirtually == true)
+ {
+ ((Rollershade)device).WcdCurrentPositionLiftPercentage = 0;
+ if (this.WcdType == 0)
+ {
+ SeekBarSiphonateCurtain.Progress = 0;
+ }
+ else
+ {
+ SeekBarOpenCurtain.Progress = 0;
+ }
+ //璁剧疆鐘舵�佹枃瀛�
+ this.SetStatuText(HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device));
+ return;
+ }
//鍙戦�佺獥甯樺懡浠�
this.SetCurtainCommand(1);
};
@@ -143,8 +180,8 @@
//鍗峰笜鎺т欢
this.SeekBarSiphonateCurtain = new CurtainRollSeekBar();
SeekBarSiphonateCurtain.Y = Application.GetRealHeight(300);
- SeekBarSiphonateCurtain.Width = Application.GetMinRealAverage(438);
- SeekBarSiphonateCurtain.Height = Application.GetMinRealAverage(576);
+ SeekBarSiphonateCurtain.Width = this.GetPictrueRealSize(438);
+ SeekBarSiphonateCurtain.Height = this.GetPictrueRealSize(576);
SeekBarSiphonateCurtain.Gravity = Gravity.CenterHorizontal;
SeekBarSiphonateCurtain.Progress = (device as Rollershade).WcdCurrentPositionLiftPercentage;
frameWhiteBack.AddChidren(SeekBarSiphonateCurtain);
@@ -193,7 +230,16 @@
//鍙樻洿杩涘害鐧惧垎姣旂殑鏄剧ず
btnProgress.Y = progressY + SeekBarSiphonateCurtain.NowProgressY;
btnProgress.Text = value + "%";
- nowProgressValue = value;
+
+ if (Common.Config.Instance.Home.IsVirtually == false)
+ {
+ nowProgressValue = value;
+ }
+ else
+ {
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鐩存帴鏀圭紦瀛�
+ (device as Rollershade).WcdCurrentPositionLiftPercentage = value;
+ }
};
if (this.hadInitControl == true)
@@ -233,8 +279,8 @@
//寮�鍚堝笜鎺т欢
this.SeekBarOpenCurtain = new CurtainSeekBar();
SeekBarOpenCurtain.Y = Application.GetRealHeight(334);
- SeekBarOpenCurtain.Width = Application.GetMinRealAverage(570);
- SeekBarOpenCurtain.Height = Application.GetMinRealAverage(513);
+ SeekBarOpenCurtain.Width = this.GetPictrueRealSize(570);
+ SeekBarOpenCurtain.Height = this.GetPictrueRealSize(513);
SeekBarOpenCurtain.Gravity = Gravity.CenterHorizontal;
SeekBarOpenCurtain.IsProgressTextShow = false;
SeekBarOpenCurtain.Progress = (device as Rollershade).WcdCurrentPositionLiftPercentage;
@@ -280,7 +326,16 @@
{
btnProgress.X = progressX + SeekBarOpenCurtain.NowProgressX - Application.GetMinReal(5);
btnProgress.Text = value + "%";
- nowProgressValue = value;
+
+ if (Common.Config.Instance.Home.IsVirtually == false)
+ {
+ nowProgressValue = value;
+ }
+ else
+ {
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鐩存帴淇敼缂撳瓨
+ (device as Rollershade).WcdCurrentPositionLiftPercentage = value;
+ }
};
//寮�涓�涓嚎绋�,鐩戣鏄惁婊戝姩鐨勬粦鍔ㄦ潯,姣忕妫�娴嬩竴娆�
@@ -340,11 +395,7 @@
/// <returns></returns>
public override bool CheckResponeResultStatu(ReceiveComandDiv comandDiv, CommonDevice report)
{
- if (comandDiv == ReceiveComandDiv.A鑺傜偣鎺у埗鍙嶉)
- {
- return true;
- }
- else if (comandDiv == ReceiveComandDiv.A璁惧灞炴�т笂鎶�)
+ if (comandDiv == ReceiveComandDiv.A璁惧灞炴�т笂鎶�)
{
HdlThreadLogic.Current.RunMain(() =>
{
@@ -363,6 +414,7 @@
}
}
});
+ return true;
}
return false;
}
--
Gitblit v1.8.0