From e22fdb94322e6cec38e5e4a9aec13d431a133fde Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期二, 28 四月 2020 16:32:35 +0800 Subject: [PATCH] 上传合并后的代码 --- ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs | 67 ++++++++++++++++++++++++++++++--- 1 files changed, 61 insertions(+), 6 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceCurtainDetailCardForm.cs index 8fb999c..27098e8 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; + } }; //寮�涓�涓嚎绋�,鐩戣鏄惁婊戝姩鐨勬粦鍔ㄦ潯,姣忕妫�娴嬩竴娆� -- Gitblit v1.8.0