| | |
| | | } |
| | | title.Text = curtainmodel.Name; |
| | | Button btnOpenCurtain = new Button () { |
| | | Width = Application.GetRealWidth (124), |
| | | Height = Application.GetRealHeight (125), |
| | | Width = Application.GetMinRealAverage (124), |
| | | Height = Application.GetMinRealAverage (124), |
| | | UnSelectedImagePath = "Curtain/CurtainOpen.png", |
| | | SelectedImagePath = "Curtain/CurtainOpenSelected.png", |
| | | X = Application.GetRealWidth (20), |
| | |
| | | }; |
| | | dialogBodyLayout.AddChidren (btnOpenLbl); |
| | | Button btnStopCurtain = new Button () { |
| | | Width = Application.GetRealWidth (124), |
| | | Height = Application.GetRealHeight (125), |
| | | Width = Application.GetMinRealAverage (124), |
| | | Height = Application.GetMinRealAverage (124), |
| | | X = Application.GetRealWidth ((480 - 124) / 2), |
| | | Y = btnOpenCurtain.Y, |
| | | UnSelectedImagePath = "Curtain/CurtainTimeOut.png", |
| | |
| | | }; |
| | | dialogBodyLayout.AddChidren (btnStopLbl); |
| | | Button btnCloseCurtain = new Button () { |
| | | Width = Application.GetRealWidth (124), |
| | | Height = Application.GetRealHeight (125), |
| | | Width = Application.GetMinRealAverage (124), |
| | | Height = Application.GetMinRealAverage (124), |
| | | X = Application.GetRealWidth (480 - 124 - 35), |
| | | Y = btnOpenCurtain.Y, |
| | | UnSelectedImagePath = "Curtain/CurtainClose.png", |
| | |
| | | btnOpenCurtain.IsSelected = false; |
| | | btnStopCurtain.IsSelected = false; |
| | | curtainmodel.Status = (CurtainStatus)2; |
| | | Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainmodel.SubnetID, curtainmodel.DeviceID, |
| | | new byte [] { curtainmodel.LoopID, (byte)curtainmodel.Status }); |
| | | }; |
| | | btnOpenCurtain.MouseUpEventHandler += (sender3, e3) => { |
| | | btnCloseCurtain.IsSelected = false; |
| | | btnOpenCurtain.IsSelected = true; |
| | | btnStopCurtain.IsSelected = false; |
| | | curtainmodel.Status = (CurtainStatus)1; |
| | | Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainmodel.SubnetID, curtainmodel.DeviceID, |
| | | new byte [] { curtainmodel.LoopID, (byte)curtainmodel.Status }); |
| | | }; |
| | | btnStopCurtain.MouseUpEventHandler += (sender3, e3) => { |
| | | btnCloseCurtain.IsSelected = false; |
| | | btnOpenCurtain.IsSelected = false; |
| | | btnStopCurtain.IsSelected = true; |
| | | curtainmodel.Status = (CurtainStatus)0; |
| | | Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainmodel.SubnetID, curtainmodel.DeviceID, |
| | | new byte [] { curtainmodel.LoopID, (byte)curtainmodel.Status }); |
| | | }; |
| | | if (curtainmodel.Status == 0) { |
| | | btnStopCurtain.IsSelected = true; |
| | |
| | | }; |
| | | |
| | | Button btnOpenCurtain = new Button () { |
| | | Width = Application.GetRealWidth (124), |
| | | Height = Application.GetRealHeight (125), |
| | | Width = Application.GetMinRealAverage (124), |
| | | Height = Application.GetMinRealAverage (124), |
| | | UnSelectedImagePath = "Curtain/CurtainOpen.png", |
| | | SelectedImagePath = "Curtain/CurtainOpenSelected.png", |
| | | X = Application.GetRealWidth (20), |
| | |
| | | }; |
| | | dialogBodyLayout.AddChidren (btnOpenLbl); |
| | | Button btnStopCurtain = new Button () { |
| | | Width = Application.GetRealWidth (124), |
| | | Height = Application.GetRealHeight (125), |
| | | Width = Application.GetMinRealAverage (124), |
| | | Height = Application.GetMinRealAverage (124), |
| | | X = Application.GetRealWidth ((480 - 124) / 2), |
| | | Y = btnOpenCurtain.Y, |
| | | UnSelectedImagePath = "Curtain/CurtainTimeOut.png", |
| | |
| | | }; |
| | | //dialogBodyLayout.AddChidren (btnStopLbl); |
| | | Button btnCloseCurtain = new Button () { |
| | | Width = Application.GetRealWidth (124), |
| | | Height = Application.GetRealHeight (125), |
| | | Width = Application.GetMinRealAverage (124), |
| | | Height = Application.GetMinRealAverage (124), |
| | | X = Application.GetRealWidth (480 - 124 - 35), |
| | | Y = btnOpenCurtain.Y, |
| | | UnSelectedImagePath = "Curtain/CurtainClose.png", |
| | |
| | | |
| | | |
| | | Button btnOpenCurtain = new Button () { |
| | | Width = Application.GetRealWidth (124), |
| | | Height = Application.GetRealHeight (125), |
| | | Width = Application.GetMinRealAverage (124), |
| | | Height = Application.GetMinRealAverage (124), |
| | | UnSelectedImagePath = "Curtain/CurtainRollerUp.png", |
| | | SelectedImagePath = "Curtain/CurtainRollerUpOn.png", |
| | | X = Application.GetRealWidth (20), |
| | | Y = tempSeekBarFrame.Bottom + Application.GetRealHeight (40), |
| | | }; |
| | | dialogBodyLayout.AddChidren (btnOpenCurtain); |
| | | btnOpenCurtain.MouseUpEventHandler += (sender, e) => { |
| | | Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainroller.SubnetID, curtainroller.DeviceID, new byte [] { 17, 100 }); |
| | | horizontalSeekBar.Progress = 100; |
| | | btnMaxBrightness.Text = "100%"; |
| | | }; |
| | | //btnOpenCurtain.MouseUpEventHandler += (sender, e) => { |
| | | // Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainroller.SubnetID, curtainroller.DeviceID, new byte [] { 17, 100 }); |
| | | // horizontalSeekBar.Progress = 100; |
| | | // btnMaxBrightness.Text = "100%"; |
| | | //}; |
| | | Button btnOpenLbl = new Button () { |
| | | Width = Application.GetRealWidth (124), |
| | | Height = Application.GetRealHeight (30), |
| | |
| | | }; |
| | | dialogBodyLayout.AddChidren (btnOpenLbl); |
| | | Button btnStopCurtain = new Button () { |
| | | Width = Application.GetRealWidth (124), |
| | | Height = Application.GetRealHeight (125), |
| | | Width = Application.GetMinRealAverage (124), |
| | | Height = Application.GetMinRealAverage (124), |
| | | X = Application.GetRealWidth ((480 - 124) / 2), |
| | | Y = btnOpenCurtain.Y, |
| | | UnSelectedImagePath = "Curtain/CurtainTimeOut.png", |
| | |
| | | }; |
| | | //dialogBodyLayout.AddChidren (btnStopLbl); |
| | | Button btnCloseCurtain = new Button () { |
| | | Width = Application.GetRealWidth (124), |
| | | Height = Application.GetRealHeight (125), |
| | | Width = Application.GetMinRealAverage (124), |
| | | Height = Application.GetMinRealAverage (124), |
| | | X = Application.GetRealWidth (480 - 124 - 35), |
| | | Y = btnOpenCurtain.Y, |
| | | UnSelectedImagePath = "Curtain/CurtainRollerDown.png", |
| | | SelectedImagePath = "Curtain/CurtainRollerDownOn.png", |
| | | }; |
| | | dialogBodyLayout.AddChidren (btnCloseCurtain); |
| | | btnCloseCurtain.MouseUpEventHandler += (sender, e) => { |
| | | Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainroller.SubnetID, curtainroller.DeviceID, new byte [] { 17, 0 }); |
| | | horizontalSeekBar.Progress = 0; |
| | | btnMaxBrightness.Text = "0%"; |
| | | }; |
| | | //btnCloseCurtain.MouseUpEventHandler += (sender, e) => { |
| | | // Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainroller.SubnetID, curtainroller.DeviceID, new byte [] { 17, 0 }); |
| | | // horizontalSeekBar.Progress = 0; |
| | | // btnMaxBrightness.Text = "0%"; |
| | | //}; |
| | | Button btnCloseLbl = new Button () { |
| | | Width = Application.GetRealWidth (124), |
| | | Height = Application.GetRealHeight (30), |
| | |
| | | }; |
| | | dialogBodyLayout.AddChidren (btnCloseLbl); |
| | | btnCloseCurtain.MouseUpEventHandler += (sender3, e3) => { |
| | | Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainroller.SubnetID, curtainroller.DeviceID, new byte [] { 17, 0 }); |
| | | horizontalSeekBar.Progress = 0; |
| | | btnMaxBrightness.Text = "0%"; |
| | | btnCloseCurtain.IsSelected = true; |
| | | btnOpenCurtain.IsSelected = false; |
| | | btnStopCurtain.IsSelected = false; |
| | | curtainroller.Status = (CurtainStatus)2; |
| | | |
| | | }; |
| | | btnOpenCurtain.MouseUpEventHandler += (sender3, e3) => { |
| | | Control.ControlBytesSend (Command.UpdataCurtainModelStutas, curtainroller.SubnetID, curtainroller.DeviceID, new byte [] { 17, 100 }); |
| | | horizontalSeekBar.Progress = 100; |
| | | btnMaxBrightness.Text = "100%"; |
| | | btnCloseCurtain.IsSelected = false; |
| | | btnOpenCurtain.IsSelected = true; |
| | | btnStopCurtain.IsSelected = false; |
| | | curtainroller.Status = (CurtainStatus)1; |
| | | |
| | | }; |
| | | btnStopCurtain.MouseUpEventHandler += (sender3, e3) => { |
| | | btnCloseCurtain.IsSelected = false; |
| | |
| | | dialogBodyLayout.AddChidren (btnSetTemperature); |
| | | |
| | | Button btnReduceTemperature = new Button () { |
| | | Width = Application.GetRealWidth (94), |
| | | Height = Application.GetRealHeight (94), |
| | | Width = Application.GetMinRealAverage (94), |
| | | Height = Application.GetMinRealAverage (94), |
| | | X = Application.GetRealWidth (20), |
| | | Y = btnSetTemperature.Bottom + Application.GetRealHeight (20), |
| | | UnSelectedImagePath = "AC/AC-.png", |
| | |
| | | dialogBodyLayout.AddChidren (btnReduceTemperature); |
| | | |
| | | Button btnSwitchAC = new Button () { |
| | | Width = Application.GetRealWidth (94), |
| | | Height = Application.GetRealHeight (94), |
| | | Width = Application.GetMinRealAverage (94), |
| | | Height = Application.GetMinRealAverage (94), |
| | | X = Application.GetRealWidth ((480 - 94) / 2), |
| | | Y = btnReduceTemperature.Y, |
| | | UnSelectedImagePath = "AC/ACClose.png", |
| | |
| | | } |
| | | |
| | | Button btnAddTemperature = new Button () { |
| | | Width = Application.GetRealWidth (94), |
| | | Height = Application.GetRealHeight (94), |
| | | Width = Application.GetMinRealAverage (94), |
| | | Height = Application.GetMinRealAverage (94), |
| | | X = Application.GetRealWidth (480 - 20 - 94), |
| | | Y = btnReduceTemperature.Y, |
| | | UnSelectedImagePath = "AC/AC+.png", |
| | |
| | | dialogBodyLayout.AddChidren (acModeView); |
| | | |
| | | Button btnACModeLeft = new Button () { |
| | | Width = Application.GetRealWidth (129), |
| | | Height = Application.GetRealHeight (129), |
| | | Width = Application.GetMinRealAverage (129), |
| | | Height = Application.GetMinRealAverage (129), |
| | | X = btnReduceTemperature.X - Application.GetRealWidth (17), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "AC/ACLeft.png", |
| | |
| | | }; |
| | | acModeView.AddChidren (btnModeIcon); |
| | | Button btnACModeRight = new Button () { |
| | | Width = Application.GetRealWidth (129), |
| | | Height = Application.GetRealHeight (129), |
| | | Width = Application.GetMinRealAverage (129), |
| | | Height = Application.GetMinRealAverage (129), |
| | | X = btnAddTemperature.X - Application.GetRealWidth (17), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "AC/ACRight.png", |
| | |
| | | dialogBodyLayout.AddChidren (acWindView); |
| | | |
| | | Button btnACWindLeft = new Button () { |
| | | Width = Application.GetRealWidth (129), |
| | | Height = Application.GetRealHeight (129), |
| | | Width = Application.GetMinRealAverage (129), |
| | | Height = Application.GetMinRealAverage (129), |
| | | X = btnReduceTemperature.X - Application.GetRealWidth (17), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "AC/ACLeft.png", |
| | |
| | | acWindView.AddChidren (btnWindIcon); |
| | | |
| | | Button btnACWindRight = new Button () { |
| | | Width = Application.GetRealWidth (129), |
| | | Height = Application.GetRealHeight (129), |
| | | Width = Application.GetMinRealAverage (129), |
| | | Height = Application.GetMinRealAverage (129), |
| | | X = btnAddTemperature.X - Application.GetRealWidth (17), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "AC/ACRight.png", |
| | |
| | | title.Text = fh.Name; |
| | | |
| | | Button FH_Heat = new Button () { |
| | | Width = Application.GetRealWidth (120), |
| | | Height = Application.GetRealHeight (120), |
| | | Width = Application.GetMinRealAverage (120), |
| | | Height = Application.GetMinRealAverage (120), |
| | | X = Application.GetRealWidth (20), |
| | | Y = Application.GetRealHeight (120), |
| | | UnSelectedImagePath = "FH/FH_Heat_on.png", |
| | |
| | | }; |
| | | |
| | | Button btnFHSwitch = new Button () { |
| | | Width = Application.GetRealWidth (80), |
| | | Height = Application.GetRealHeight (80), |
| | | Width = Application.GetMinRealAverage (80), |
| | | Height = Application.GetMinRealAverage (80), |
| | | X = Application.GetRealWidth (480 - 40 - 80), |
| | | Y = Application.GetRealHeight (140), |
| | | UnSelectedImagePath = "AC/ACClose.png", |
| | |
| | | dialogBodyLayout.AddChidren (fhTemperatureView); |
| | | |
| | | Button btnReduceTemperature = new Button () { |
| | | Width = Application.GetRealWidth (90), |
| | | Height = Application.GetRealHeight (90), |
| | | Width = Application.GetMinRealAverage (90), |
| | | Height = Application.GetMinRealAverage (90), |
| | | X = Application.GetRealWidth (40), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "AC/AC-.png", |
| | |
| | | }; |
| | | fhTemperatureView.AddChidren (btnSetTemperature); |
| | | Button BtnAddTemperature = new Button () { |
| | | Width = Application.GetRealWidth (90), |
| | | Height = Application.GetRealHeight (90), |
| | | Width = Application.GetMinRealAverage (90), |
| | | Height = Application.GetMinRealAverage (90), |
| | | X = Application.GetRealWidth (480 - 90 - 40), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "AC/AC+.png", |
| | |
| | | Button btnWindSpeedReduce = new Button () { |
| | | X = Application.GetRealWidth (100), |
| | | Y = btnWindSpeedTitle.Bottom, |
| | | Width = Application.GetRealWidth (64), |
| | | Height = Application.GetRealHeight (62), |
| | | Width = Application.GetMinRealAverage (64), |
| | | Height = Application.GetMinRealAverage (62), |
| | | UnSelectedImagePath = "Light/Light-.png", |
| | | SelectedImagePath = "Light/Light-On.png", |
| | | }; |
| | |
| | | windBodyView.AddChidren (btnWindSpeedText); |
| | | |
| | | Button btnWindSpeedAdd = new Button () { |
| | | Width = Application.GetRealWidth (64), |
| | | Height = Application.GetRealHeight (62), |
| | | Width = Application.GetMinRealAverage (64), |
| | | Height = Application.GetMinRealAverage (62), |
| | | UnSelectedImagePath = "Light/Light+.png", |
| | | SelectedImagePath = "Light/Light+On.png", |
| | | X = btnWindSpeedText.Right, |