From 98ceb6bd2021f9ff136cda27eef28676dd7b5d92 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 21 五月 2020 13:24:02 +0800
Subject: [PATCH] 最后的版本
---
ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs | 36 +++++++++++++++++++++++-------------
1 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs
index de15ae1..1204b2f 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs
@@ -72,8 +72,8 @@
//褰╃伅鎺т欢
this.waveSeekBar = new WaveSeekBar();
waveSeekBar.Y = Application.GetRealHeight(377);
- waveSeekBar.Width = Application.GetMinRealAverage(271);
- waveSeekBar.Height = Application.GetMinRealAverage(533);
+ waveSeekBar.Width = this.GetPictrueRealSize(271);
+ waveSeekBar.Height = this.GetPictrueRealSize(533);
waveSeekBar.Gravity = Gravity.CenterHorizontal;
waveSeekBar.WavePadding = Application.GetRealWidth(8);
waveSeekBar.MaxValue = 100;
@@ -154,7 +154,15 @@
//鍙樻洿杩涘害鐧惧垎姣旂殑鏄剧ず
btnProgress.Y = progressY + waveSeekBar.NowProgressY;
btnProgress.Text = value + "%";
- nowProgressValue = value;
+ if (Common.Config.Instance.Home.IsVirtually == false)
+ {
+ nowProgressValue = value;
+ }
+ else
+ {
+ //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鐩存帴鏀圭紦瀛�
+ ((DimmableLight)this.device).Level = value;
+ }
};
if (this.hadInitControl == true)
@@ -193,6 +201,15 @@
/// <param name="isOpen"></param>
private void SetSwitchCommand(bool isOpen)
{
+ //濡傛灉浣忓畢鏄櫄鎷熶綇瀹�
+ if (Common.Config.Instance.Home.IsVirtually == true)
+ {
+ ((LightBase)this.device).OnOffStatus = isOpen == true ? 1 : 0;
+ //鍒锋柊寮�鍏崇姸鎬�
+ this.RefreshSwitchStatu(isOpen);
+ return;
+ }
+
//褰撴寜涓嬪紑鍏虫寜閽椂,涓嶈兘鍐嶅彂閫佽繘搴﹀��
this.canSetProgressValue = false;
@@ -216,27 +233,20 @@
});
});
- //鐘舵�佸彇鍙�
- listControl[0].IsSelected = !listControl[0].IsSelected;
//鍙戦�佺瓑寰呯殑鏃堕棿鍐�,涓嶈兘婊戝姩褰╃伅鎺т欢
waveSeekBar.IsClickable = false;
+ //鐘舵�佸彇鍙�
+ listControl[0].IsSelected = !listControl[0].IsSelected;
if (isOpen == true)
{
waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarColor_Start, ZigbeeColor.Current.GXCWaveSeekBarColor_End);
- }
- else
- {
- waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor);
- }
-
- if (isOpen == true)
- {
//鎵撳紑
this.SetStatuText(Language.StringByID(R.MyInternationalizationString.uOpen1));
this.device.SwitchControl(1);
}
else
{
+ waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor);
//鍏抽棴
this.SetStatuText(Language.StringByID(R.MyInternationalizationString.Close));
this.device.SwitchControl(0);
--
Gitblit v1.8.0