From 3291885285dfd5d4f665c20676307878dc3163bc Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 20 十二月 2019 16:28:53 +0800
Subject: [PATCH] 请合并最新代码(优化设备不支持的功能)
---
ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs | 283 ++++++++++++++++++++++++++++++++------------------------
1 files changed, 161 insertions(+), 122 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs
index 3ca4d22..1db0408 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs
@@ -25,7 +25,6 @@
Button clicktextcolcrbutton = new Button();
public void Show()
{
-
UserView.HomePage.Instance.ScrollEnabled = false;
this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
#region 鏈�涓婇潰鐨勫竷灞�浠g爜
@@ -39,7 +38,7 @@
var titleName = new Button
{
- TextSize = 16,
+ TextSize = 17,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
X = Application.GetRealWidth(160),
@@ -47,6 +46,7 @@
Height = Application.GetRealHeight(69),
Y = Application.GetRealHeight(92),
TextID = MyInternationalizationString.devicestate,
+ IsBold = true,
};
topRowLayout.AddChidren(titleName);
@@ -89,6 +89,7 @@
Y = Application.GetRealHeight(92),
//TextID = MyInternationalizationString.customroom,
Text = Config.Instance.Home.GetCurrentFloorName,
+ TextSize = 14,
};
topRowLayout.AddChidren(foolrname);
var dropdown = new Button
@@ -120,16 +121,6 @@
};
this.AddChidren(roomhorizontalScrol);
-
- var devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
- {
- Width = Application.GetRealWidth(1080 - 58-200),
- Height = Application.GetRealHeight(280),
- Y = roomhorizontalScrol.Bottom,
- BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- X = Application.GetRealWidth(58+200),
- };
- this.AddChidren(devicetypehorizontalScrol1);
///璁惧绫诲瀷婊戝姩鎺т欢
var devicetypehorizontalScrol = new HorizontalScrolViewLayout()
{
@@ -138,18 +129,20 @@
Y = roomhorizontalScrol.Bottom,
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
X = Application.GetRealWidth(58),
- Radius = (uint)Application.GetRealHeight(50),
+ // Radius = (uint)Application.GetRealHeight(50),
};
this.AddChidren(devicetypehorizontalScrol);
+ devicetypehorizontalScrol.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerBottomLeft);
middle = new VerticalScrolViewLayout();
middle.Y = devicetypehorizontalScrol.Bottom + Application.GetRealHeight(40);
middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
middle.X = Application.GetRealWidth(58);
- middle.Radius = (uint)Application.GetRealHeight(50);
+ //middle.Radius = (uint)Application.GetRealHeight(50);
this.AddChidren(middle);
+ middle.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
///鐩墠鏀寔鐨勮澶�
List<DeviceType> deviceTypeList = new List<DeviceType> {
@@ -191,6 +184,7 @@
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
X = Application.GetRealWidth(80),
TextID = MyInternationalizationString.selecfoolr,
+ TextSize = 14,
};
foolrbjicon.AddChidren(btnfoolrtext);
@@ -232,6 +226,7 @@
TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
Tag = foolr.Key,
X = btnfoolricon.Right + Application.GetRealWidth(12),
+ TextSize = 14,
};
foolrRowLayout.AddChidren(btnfoolrname);
if (foolrname.Text == foolr.Value)
@@ -347,6 +342,16 @@
}
list.Add(device);
}
+ if (list.Count == 0)
+ {
+ devicetypehorizontalScrol.Height = 0;
+ middle.Height = 0;
+ }
+ else
+ {
+ devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
+ middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
+ }
AllDeviceTypeView(list, devicetypehorizontalScrol);
}
@@ -373,6 +378,16 @@
continue;
}
list.Add(device);
+ }
+ if (list.Count == 0)
+ {
+ devicetypehorizontalScrol.Height = 0;
+ middle.Height = 0;
+ }
+ else
+ {
+ devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
+ middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
}
AllDeviceTypeView(list, devicetypehorizontalScrol);
@@ -586,6 +601,7 @@
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
SelectedTextColor = ZigbeeColor.Current.LogicAddColor,
+ TextSize = 14,
};
deviceRow.AddChidren(devicename);
switch (common.CommonDevice.Type)
@@ -664,14 +680,6 @@
{
flMain.RemoveFromParent();
};
- var devicefra1 = new FrameLayout
- {
- Width = Application.GetRealWidth(1080),
- Height = Application.GetRealHeight(100),
- Y = Application.GetRealHeight(1920 - 100),
- BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- };
- flMain.AddChidren(devicefra1);
var devicefra = new FrameLayout
{
@@ -680,9 +688,10 @@
Height = Application.GetRealHeight(530 + 160),
Y = Application.GetRealHeight(1920 - 530 - 160),
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- Radius = (uint)Application.GetRealHeight(60),
+ //Radius = (uint)Application.GetRealHeight(60),
};
flMain.AddChidren(devicefra);
+ devicefra.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
#region -------鍙栨秷 瀹屾垚
var timetype = new RowLayout
@@ -699,6 +708,8 @@
Width = Application.GetRealWidth(200),
X = Application.GetRealWidth(80),
TextAlignment = TextAlignment.CenterLeft,
+ TextSize = 14,
+
};
timetype.AddChidren(Btncancel);
Btncancel.MouseUpEventHandler += (sender16, e16) =>
@@ -727,6 +738,7 @@
Width = Application.GetRealWidth(200),
TextAlignment = TextAlignment.CenterRight,
X = Btntitle.Right + Application.GetRealWidth(50),
+ TextSize = 14,
};
timetype.AddChidren(Btncomplete);
@@ -811,6 +823,7 @@
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
openrowlayout.AddChidren(btnopen);
@@ -841,6 +854,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
closerowlayout.AddChidren(btnclose);
@@ -871,6 +885,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
takebackrowlayout.AddChidren(btntakeback);
@@ -1021,10 +1036,11 @@
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
openrowlayout.AddChidren(btnopen);
- var openBtnSelected = new SelectedButton();
+ var openBtnSelected = new SelectedButton();
openrowlayout.AddChidren(openBtnSelected);
var horizontalSeekBarRow = new RowLayout
@@ -1033,25 +1049,27 @@
Width = Application.GetRealWidth(920),
Height = Application.GetRealHeight(160),
X = Application.GetRealWidth(80),
- LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
openframelayout.AddChidren(horizontalSeekBarRow);
- var horizontalSeekBarVol = new HorizontalSeekBar
+ var horizontalSeekBarVol = new DiyImageSeekBar
{
+ Y = openrowlayout.Bottom,
+ X = Application.GetRealWidth(80),
Width = Application.GetRealWidth(920),
- Height = Application.GetRealHeight(80),
- Radius = (uint)Application.GetRealHeight(25),
- Y = Application.GetRealHeight(25),
- //Gravity = Gravity.CenterVertical,
- ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected,
- Max = 100,
- SleepTime = 1000,
- ThumbRadius = 9,
- IsCanMove = false
- };
- horizontalSeekBarRow.AddChidren(horizontalSeekBarVol);
+ Height = Application.GetRealHeight(160),
+ IsProgressTextShow = true,//鏄剧ず鐧惧垎姣�
+ IsClickable = false,//杩涘害鏉℃槸鍚︽粦鍔�
+ ProgressBarColor = ZigbeeColor.Current.LogicProgressColorSelected,//閫変腑杩涘害鏉¢鑹�
+ ThumbImagePath = "ZigeeLogic/progressbtn2.png",//杩涘害鏉℃寜閽浘鏍�
+ ThumbImageHeight = Application.GetRealHeight(56),//杩涘害鏉℃寜閽浘鏍囩殑楂樺害锛堥粯璁ゆ鏂瑰舰锛氬鍜岄珮涓�鏍凤級
+ ProgressTextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ ProgressTextSize = 13,//鏄剧ず鐧惧垎姣斿瓧浣撳ぇ灏�
+ SeekBarViewHeight = Application.GetRealHeight(10),//杩涘害鏉$殑楂樺害
- #endregion
+ };
+ openframelayout.AddChidren(horizontalSeekBarVol);
+ #endregion
#region 鍏�
var closeframelayout = new FrameLayout
@@ -1077,6 +1095,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
closerowlayout.AddChidren(btnclose);
@@ -1108,6 +1127,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
takebackrowlayout.AddChidren(btntakeback);
@@ -1120,30 +1140,33 @@
#endregion
int Progressvalue = 100;
- horizontalSeekBarVol.ProgressChanged += (sender, e) =>
- {
- SelectedDeviceStatusaction = "yes";
- Progressvalue = horizontalSeekBarVol.Progress;
- if (switchdictionary.ContainsKey("TaskType"))
- {
- switchdictionary.Remove("TaskType");
- }
- if (switchdictionary.ContainsKey("Data1"))
- {
- switchdictionary.Remove("Data1");
- }
- switchdictionary.Add("TaskType", "3");
+ EventHandler<int> progressclick = (sender, e) =>
+ {
+ Console.WriteLine("12345");
+ SelectedDeviceStatusaction = "yes";
+ Progressvalue = horizontalSeekBarVol.Progress;
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("TaskType", "3");
//鏈�澶т寒搴﹀�兼槸254闇�瑕佽浆鎹紱
var lightbrightnessvalue = (254 * horizontalSeekBarVol.Progress) / 100;
- switchdictionary.Add("Data1", lightbrightnessvalue.ToString());
+ switchdictionary.Add("Data1", lightbrightnessvalue.ToString());
- };
+ };
+ horizontalSeekBarVol.OnProgressChangedEvent += progressclick;
+ horizontalSeekBarVol.OnStopTrackingTouchEvent += progressclick;
///纭浜嬩欢
EventHandler<MouseEventArgs> openclick = (sender, e) =>
{
SelectedDeviceStatusaction = "yes";
- horizontalSeekBarVol.IsCanMove = true;
- horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected;
+ horizontalSeekBarVol.IsClickable = true;
+ horizontalSeekBarVol.ProgressBarColor = ZigbeeColor.Current.LogicProgressColorSelected;
openBtnSelected.Visible = true;
closeBtnSelected.Visible = false;
takebackBtnSelected.Visible = false;
@@ -1170,8 +1193,8 @@
EventHandler<MouseEventArgs> closeclick = (sender, e) =>
{
SelectedDeviceStatusaction = "yes";
- horizontalSeekBarVol.IsCanMove = false;
- horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
+ horizontalSeekBarVol.IsClickable = false;
+ horizontalSeekBarVol.ProgressBarColor = ZigbeeColor.Current.LogicProgressColor;
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
takebackBtnSelected.Visible = false;
@@ -1195,8 +1218,8 @@
EventHandler<MouseEventArgs> takebackclick = (sender, e) =>
{
SelectedDeviceStatusaction = "yes";
- horizontalSeekBarVol.IsCanMove = false;
- horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
+ horizontalSeekBarVol.IsClickable = false;
+ horizontalSeekBarVol.ProgressBarColor = ZigbeeColor.Current.LogicProgressColor;
openBtnSelected.Visible = false;
closeBtnSelected.Visible = false;
takebackBtnSelected.Visible = true;
@@ -1238,8 +1261,8 @@
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
takebackBtnSelected.Visible = false;
- horizontalSeekBarVol.IsCanMove = false;
- horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
+ horizontalSeekBarVol.IsClickable = false;
+ horizontalSeekBarVol.ProgressBarColor = ZigbeeColor.Current.LogicProgressColor;
}
else if (value["Data1"] == "2")
{
@@ -1247,8 +1270,8 @@
openBtnSelected.Visible = false;
closeBtnSelected.Visible = false;
takebackBtnSelected.Visible = true;
- horizontalSeekBarVol.IsCanMove = false;
- horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
+ horizontalSeekBarVol.IsClickable = false;
+ horizontalSeekBarVol.ProgressBarColor = ZigbeeColor.Current.LogicProgressColor;
}
}
@@ -1259,8 +1282,8 @@
openBtnSelected.Visible = true;
closeBtnSelected.Visible = false;
takebackBtnSelected.Visible = false;
- horizontalSeekBarVol.IsCanMove = true;
- horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected;
+ horizontalSeekBarVol.IsClickable = true;
+ horizontalSeekBarVol.ProgressBarColor = ZigbeeColor.Current.LogicProgressColorSelected;
horizontalSeekBarVol.Progress = int.Parse(value["Data1"])*100/254;
Progressvalue = horizontalSeekBarVol.Progress;
@@ -1315,6 +1338,7 @@
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
openrowlayout.AddChidren(btnopen);
@@ -1331,20 +1355,22 @@
LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
openframelayout.AddChidren(horizontalSeekBarRow);
- var horizontalSeekBarVol = new HorizontalSeekBar
+ var horizontalSeekBarVol = new DiyImageSeekBar
{
+ X = Application.GetRealWidth(80),
+ Y = openrowlayout.Bottom,
Width = Application.GetRealWidth(920),
- Height = Application.GetRealHeight(80),
- Radius = (uint)Application.GetRealHeight(25),
- Y = Application.GetRealHeight(25),
- //Gravity = Gravity.CenterVertical,
- ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected,
- Max = 100,
- SleepTime = 1000,
- ThumbRadius = 9,
- IsCanMove = false
+ Height = Application.GetRealHeight(160),
+ IsProgressTextShow = true,//鏄剧ず鐧惧垎姣�
+ IsClickable = false,//杩涘害鏉℃槸鍚︽粦鍔�
+ ProgressBarColor = ZigbeeColor.Current.LogicProgressColorSelected,//閫変腑杩涘害鏉¢鑹�
+ ThumbImagePath = "ZigeeLogic/progressbtn2.png",//杩涘害鏉℃寜閽浘鏍�
+ ThumbImageHeight = Application.GetRealHeight(56),//杩涘害鏉℃寜閽浘鏍囩殑楂樺害锛堥粯璁ゆ鏂瑰舰锛氬鍜岄珮涓�鏍凤級
+ ProgressTextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ ProgressTextSize = 14,//鏄剧ず鐧惧垎姣斿瓧浣撳ぇ灏�
+ SeekBarViewHeight = Application.GetRealHeight(10),//杩涘害鏉$殑楂樺害
};
- horizontalSeekBarRow.AddChidren(horizontalSeekBarVol);
+ openframelayout.AddChidren(horizontalSeekBarVol);
#endregion
@@ -1372,6 +1398,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
closerowlayout.AddChidren(btnclose);
@@ -1383,7 +1410,8 @@
#endregion
int Progressvalue = 100;
- horizontalSeekBarVol.ProgressChanged += (sender, e) =>
+
+ EventHandler<int> progressclick = (sender, e) =>
{
SelectedDeviceStatusaction = "yes";
Progressvalue = horizontalSeekBarVol.Progress;
@@ -1399,12 +1427,14 @@
switchdictionary.Add("Data2", horizontalSeekBarVol.Progress.ToString());
};
+ horizontalSeekBarVol.OnProgressChangedEvent += progressclick;
+ horizontalSeekBarVol.OnStopTrackingTouchEvent += progressclick;
///纭浜嬩欢
- EventHandler<MouseEventArgs> openclick = (sender, e) =>
+ EventHandler <MouseEventArgs> openclick = (sender, e) =>
{
SelectedDeviceStatusaction = "yes";
- horizontalSeekBarVol.IsCanMove = true;
- horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected;
+ horizontalSeekBarVol.IsClickable = true;
+ horizontalSeekBarVol.ProgressBarColor = ZigbeeColor.Current.LogicProgressColorSelected;
openBtnSelected.Visible = true;
closeBtnSelected.Visible = false;
horizontalSeekBarVol.Progress = Progressvalue;
@@ -1428,8 +1458,8 @@
EventHandler<MouseEventArgs> closeclick = (sender, e) =>
{
SelectedDeviceStatusaction = "yes";
- horizontalSeekBarVol.IsCanMove = false;
- horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
+ horizontalSeekBarVol.IsClickable = false;
+ horizontalSeekBarVol.ProgressBarColor = ZigbeeColor.Current.LogicProgressColor;
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
@@ -1470,8 +1500,8 @@
}
switchdictionary.Add("Data1", "5");
switchdictionary.Add("Data2", value["Data2"]);
- horizontalSeekBarVol.IsCanMove = true;
- horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected;
+ horizontalSeekBarVol.IsClickable = true;
+ horizontalSeekBarVol.ProgressBarColor = ZigbeeColor.Current.LogicProgressColorSelected;
openBtnSelected.Visible = true;
closeBtnSelected.Visible = false;
horizontalSeekBarVol.Progress = int.Parse(value["Data2"]);
@@ -1486,8 +1516,8 @@
switchdictionary.Add("Data1", "1");
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
- horizontalSeekBarVol.IsCanMove = false;
- horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
+ horizontalSeekBarVol.IsClickable = false;
+ horizontalSeekBarVol.ProgressBarColor = ZigbeeColor.Current.LogicProgressColor;
}
}
@@ -1548,6 +1578,7 @@
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
openrowlayout.AddChidren(btnopen);
@@ -1578,6 +1609,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
closerowlayout.AddChidren(btnclose);
@@ -1608,6 +1640,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
takebackrowlayout.AddChidren(btntakeback);
@@ -1719,22 +1752,9 @@
{
#region ----鍒濆鍖栬澶囧姛鑳芥暟鎹�----
- Dictionary<string, string> switchdictionary = new Dictionary<string, string>();
- Dictionary<string, string> temperaturedictionary = new Dictionary<string, string>();
- Dictionary<string, string> modedictionary = new Dictionary<string, string>();
- Dictionary<string, string> speeddictionary = new Dictionary<string, string>();
- taskListInfo.Add(switchdictionary);
- taskListInfo.Add(temperaturedictionary);
- taskListInfo.Add(modedictionary);
- taskListInfo.Add(speeddictionary);
- dictionary(switchdictionary, "TaskType", "1");
- dictionary(switchdictionary, "Data2", "0");
- dictionary(temperaturedictionary, "TaskType", "5");
- dictionary(modedictionary, "TaskType", "5");
- dictionary(modedictionary, "Data1", "3");
- dictionary(speeddictionary, "TaskType", "5");
- dictionary(speeddictionary, "Data1", "6");
-
+ var temperaturedictionary = new Dictionary<string, string>();
+ var modedictionary = new Dictionary<string, string>();
+ var speeddictionary = new Dictionary<string, string>();
#endregion
#region 绌鸿皟View
@@ -1767,6 +1787,7 @@
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
openrowlayout.AddChidren(btnopen);
@@ -1854,6 +1875,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
closerowlayout.AddChidren(btnclose);
@@ -1881,31 +1903,32 @@
}
};
- #endregion
+ #endregion
//榛樿26,鑷姩,涓
int indextemperature = 10, indexmode = 2, indexspeed = 1;
if (edit && TaskList != null)
{
foreach (var value in TaskList)
{
- if (value["TaskType"] == "1")
+ if (TaskList.Count == 1)
{
- dictionary(switchdictionary, "Data1", value["Data1"]);
- if (value["Data1"] == "1")
- {
- openBtnSelected.Visible = true;
- closeBtnSelected.Visible = false;
- pausePickerViewfra.Height = Application.GetRealHeight(0);
- }
- else if (value["Data1"] == "0")
- {
- openBtnSelected.Visible = false;
- closeBtnSelected.Visible = true;
- pausePickerViewfra.Height = Application.GetRealHeight(600);
- }
+ //鏁扮粍鍙湁涓�涓厓绱犺鏄庡綋鍓嶇┖璋冪姸鎬佷负鍏筹紱
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ pausePickerViewfra.Height = Application.GetRealHeight(600);
+ //濡傛灉绌鸿皟鐘舵�佹槸鍏筹紱鐩存帴璺冲嚭for寰潖锛�
+ break;
}
- else if (value["TaskType"] == "5")
+ else
+ {
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ pausePickerViewfra.Height = Application.GetRealHeight(0);
+ }
+
+
+ if (value["TaskType"] == "5")
{
if (value["Data1"] == "3")
{//3---璁剧疆宸ヤ綔妯″紡(1:鑷姩;3:鍒跺喎;4:鍒剁儹;7:閫侀;8:闄ゆ箍)
@@ -1993,11 +2016,21 @@
///纭浜嬩欢
EventHandler<MouseEventArgs> openclick = (sender, e) =>
{
+ //娓呴櫎涔嬪墠鏁版嵁锛�
+ taskListInfo.Clear();
+ //鍔犺浇鏂版暟鎹紱
+ dictionary(temperaturedictionary, "TaskType", "5");
+ dictionary(modedictionary, "TaskType", "5");
+ dictionary(modedictionary, "Data1", "3");
+ dictionary(speeddictionary, "TaskType", "5");
+ dictionary(speeddictionary, "Data1", "6");
+ taskListInfo.Add(temperaturedictionary);
+ taskListInfo.Add(modedictionary);
+ taskListInfo.Add(speeddictionary);
pausePickerViewfra.Height = Application.GetRealHeight(0);
SelectedDeviceStatusaction = "yes";
openBtnSelected.Visible = true;
closeBtnSelected.Visible = false;
- dictionary(switchdictionary, "Data1", "1");
var temperature = mList1[indextemperature].Split(' ')[0];
var modestring = mList2[indexmode].Split(' ')[0];
var speedstring = mList3[indexspeed].Split(' ')[0];
@@ -2016,12 +2049,18 @@
///鍙栨秷浜嬩欢
EventHandler<MouseEventArgs> closeclick = (sender, e) =>
{
+ //娓呴櫎涔嬪墠鏁版嵁锛�
+ taskListInfo.Clear();
+ dictionary(modedictionary, "TaskType", "5");
+ dictionary(modedictionary, "Data1", "3");
+ dictionary(modedictionary, "Data2", "0");
+ //鍔犺浇鏂版暟鎹紱
+ taskListInfo.Add(modedictionary);
pausePickerViewfra.Height = Application.GetRealHeight(600);
-
SelectedDeviceStatusaction = "yes";
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
- dictionary(switchdictionary, "Data1", "0");
+
};
closerowlayout.MouseUpEventHandler += closeclick;
btnclose.MouseUpEventHandler += closeclick;
@@ -2046,7 +2085,7 @@
{
var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
- Language.StringByID(MyInternationalizationString.complete));
+ Language.StringByID(MyInternationalizationString.confrim));
alert.Show();
return;
}
--
Gitblit v1.8.0