| | |
| | | //bodyView.btnCurtainClose.IsSelected = percent == 0; |
| | | try |
| | | { |
| | | if (!bodyView.onCurtainAnimation) |
| | | { |
| | | bodyView.CurtainAnimation(Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent))); |
| | | } |
| | | var progress = Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent)); |
| | | bodyView.curtainSeekBar.Progress = progress; |
| | | bodyView.btnProgress.Text = progress + "%"; |
| | | |
| | | //if (!bodyView.onCurtainAnimation) |
| | | //{ |
| | | // bodyView.CurtainAnimation(Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent))); |
| | | //} |
| | | } |
| | | catch { } |
| | | } |
| | |
| | | { |
| | | if (runningDirection) |
| | | { |
| | | if (curtainSeekBar.Progress + 10 > progress) |
| | | if (curtainSeekBar.Progress + 5 > progress) |
| | | { |
| | | curtainSeekBar.Progress = progress; |
| | | } |
| | | else |
| | | { |
| | | curtainSeekBar.Progress = curtainSeekBar.Progress + 10; |
| | | curtainSeekBar.Progress = curtainSeekBar.Progress + 5; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (curtainSeekBar.Progress - 10 < progress) |
| | | if (curtainSeekBar.Progress - 5 < progress) |
| | | { |
| | | curtainSeekBar.Progress = progress; |
| | | } |
| | | else |
| | | { |
| | | curtainSeekBar.Progress = curtainSeekBar.Progress - 10; |
| | | curtainSeekBar.Progress = curtainSeekBar.Progress - 5; |
| | | } |
| | | } |
| | | curBarProgress = curtainSeekBar.Progress; |
| | |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString()); |
| | | DriverLayer.Control.Ins.SendWriteCommand(function, d); |
| | | CurtainAnimation(0); |
| | | //CurtainAnimation(100); |
| | | }; |
| | | |
| | | btnCurtainStop.MouseUpEventHandler = (sender, e) => |
| | |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString()); |
| | | DriverLayer.Control.Ins.SendWriteCommand(function, d); |
| | | CurtainAnimation(100); |
| | | //CurtainAnimation(0); |
| | | }; |
| | | |
| | | //btnMinusSignIcon.MouseUpEventHandler = (sender, e) => |