| | |
| | | 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; |
| | |
| | | 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), |
| | |
| | | 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; |