| | |
| | | /// <param name="sender">Sender.</param> |
| | | /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param> |
| | | private void AutomationBtn_MouseUpEventHandler(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | {
|
| | | Common.Logic.LogicDviceList.Clear();
|
| | | if (Common.Logic.LogicDviceList.Count == 0)
|
| | | {
|
| | | Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
|
| | | } |
| | | functionBtn.IsSelected = false; |
| | | sceneBtn.IsSelected = false; |
| | | automationBtn.IsSelected = true; |
| | |
| | | } |
| | | else |
| | | { |
| | | Common.Logic.LogicDviceList.Clear(); |
| | | if (Common.Logic.LogicDviceList.Count == 0) |
| | | { |
| | | Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray()); |
| | | } |
| | | Common.Logic.CurrentLogic.LogicType = 2; |
| | | |
| | | Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text; |
| | | Logic.TemplatePage templatePage = new Logic.TemplatePage(); |
| | | Logic.TemplatePage.s = logiciocnBtn.Tag.ToString(); |
| | |
| | | Yheight = 0; |
| | | } |
| | | logicScrolView.Y = scenehorizontalScrol.Bottom + Yheight; |
| | | logicScrolView.Height = functionSceneBodyView.Height - bjFrameLayout.Height - bjFrameLayout.Y - scenehorizontalScrol.Height - Application.GetRealHeight(30) - Yheight; |
| | | logicScrolView.Height = functionSceneAutoBodyView.Height - bjFrameLayout.Height - bjFrameLayout.Y - scenehorizontalScrol.Height - Application.GetRealHeight(30) - Yheight; |
| | | Automationview(logicScrolView); |
| | | }; |
| | | |
| | |
| | | //自动化 |
| | | Automationview(logicScrolView); |
| | | CommonPage.Loading.Hide(); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | refresview.RemoveAll(); |
| | | foreach (var logic in Common.Logic.LogicList) |
| | | { |
| | | var bjRow = new RowLayout |
| | | { |
| | | Width = Application.GetRealWidth(1080 - 58), |
| | | Height = Application.GetRealHeight(220), |
| | | LineColor = ZigbeeColor.Current.LogicBackgroundColor, |
| | | BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor, |
| | | |
| | | }; |
| | | refresview.AddChidren(bjRow); |
| | | |
| | | var logicRowlayout = new RowLayout |
| | | { |
| | | Y = Application.GetRealHeight(220 - 190), |
| | | Height = Application.GetRealHeight(190), |
| | | Width = Application.GetRealWidth(1080 - 58 - 46), |
| | | LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor, |
| | | X = Application.GetRealWidth(46), |
| | | Height = Application.GetRealHeight(190 + 30), |
| | | Width = Application.GetRealWidth(1080), |
| | | LineColor = ZigbeeColor.Current.LogicBackgroundColor, |
| | | BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor, |
| | | }; |
| | | bjRow.AddChidren(logicRowlayout); |
| | | refresview.AddChidren(logicRowlayout); |
| | | |
| | | |
| | | |
| | | var logicnameBtn = new Button |
| | | { |
| | | Height = Application.GetRealHeight(58), |
| | | Width = Application.GetRealWidth(350), |
| | | Text = logic.LogicName, |
| | | X = Application.GetRealWidth(12), |
| | | X = Application.GetRealWidth(12 + 46), |
| | | Y = Application.GetRealHeight(30), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | }; |
| | |
| | | Height = Application.GetMinRealAverage(63), |
| | | UnSelectedImagePath = "ZigeeLogic/logicclose.png", |
| | | SelectedImagePath = "ZigeeLogic/logicopen.png", |
| | | X = logicRowlayout.Width - Application.GetRealWidth(104 + 58), |
| | | Y = Application.GetRealHeight(58 + 30 + 9), |
| | | X = logicRowlayout.Width - Application.GetRealWidth(104 + 58 + 58), |
| | | Y = Application.GetRealHeight(58 + 30 + 9 + 30), |
| | | }; |
| | | logicRowlayout.AddChidren(logicswitchBtn); |
| | | |
| | |
| | | logicRowlayout.AddRightView(edit); |
| | | edit.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | Common.Logic.LogicDviceList.Clear(); |
| | | if (Common.Logic.LogicDviceList.Count == 0) |
| | | { |
| | | Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray()); |
| | | } |
| | | Common.Logic.CurrentLogic = logic; |
| | | var logicCommunalPage = new Logic.LogicCommunalPage(); |
| | | HomePage.Instance.AddChidren(logicCommunalPage); |
| | |
| | | alert.Show(); |
| | | |
| | | }; |
| | | |
| | | var line = new Button |
| | | { |
| | | Y = Application.GetRealHeight(215), |
| | | Height = Application.GetRealHeight(5), |
| | | Width = Application.GetRealWidth(1080 - 58), |
| | | BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor, |
| | | X = Application.GetRealWidth(58), |
| | | }; |
| | | logicRowlayout.AddChidren(line); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示图标的颜色 |
| | | /// </summary> |
| | | /// <param name="logic"></param> |
| | | /// <param name="logicRowlayout"></param> |
| | | /// <param name="intvalue"></param> |
| | | private void StatusColor(Common.Logic logic, RowLayout logicRowlayout, int intvalue) |
| | | { |
| | | |
| | | var logictimeBtn = new Button |
| | | { |
| | | Height = Application.GetRealHeight(58), |
| | | Width = logicRowlayout.Width - Application.GetRealWidth(58 + 12 + 350), |
| | | Width = logicRowlayout.Width - Application.GetRealWidth(58 + 12 + 350 + 58), |
| | | Y = Application.GetRealHeight(30), |
| | | X = Application.GetRealWidth(365), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = ZigbeeColor.Current.LogicListWeekTextColor, |
| | |
| | | { |
| | | Width = Application.GetRealWidth(82), |
| | | Height = Application.GetRealHeight(82), |
| | | X = Application.GetRealWidth(12 + (12 + 82 + 45 + 12) * i), |
| | | Y = Application.GetRealHeight(58 + 30), |
| | | X = Application.GetRealWidth(58) + Application.GetRealWidth(12 + (12 + 82 + 45 + 12) * i), |
| | | Y = Application.GetRealHeight(58 + 30 + 30), |
| | | Radius = (uint)Application.GetRealHeight(41), |
| | | BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, |
| | | }; |
| | |
| | | var connectIconBtn = new Button |
| | | { |
| | | Y = typebjBtn.Y + Application.GetRealHeight(35), |
| | | X = Application.GetRealWidth((12 + 82 + 12) + (12 + 45 + 82 + 12) * i), |
| | | X = Application.GetRealWidth(58) + Application.GetRealWidth((12 + 82 + 12) + (12 + 45 + 82 + 12) * i), |
| | | Width = Application.GetRealWidth(48), |
| | | Height = Application.GetRealHeight(15), |
| | | UnSelectedImagePath = "ZigeeLogic/connect.png", |
| | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | } |