| | |
| | | fh.curTemp--; |
| | | arcBar.Progress = fh.curTemp; |
| | | btnTemp.Text = fh.curTemp.ToString(); |
| | | Control.Send(CommandType_A.write, fh); |
| | | //Control.Send(CommandType_A.write, fh); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("temp", fh.curTemp.ToString()); |
| | | Control.SendWriteCommand(fh, d); |
| | | }; |
| | | btnPlus.MouseUpEventHandler = (sender, e) => |
| | | { |
| | |
| | | fh.curTemp++; |
| | | arcBar.Progress = fh.curTemp; |
| | | btnTemp.Text = fh.curTemp.ToString(); |
| | | Control.Send(CommandType_A.write, fh); |
| | | //Control.Send(CommandType_A.write, fh); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("temp", fh.curTemp.ToString()); |
| | | Control.SendWriteCommand(fh, d); |
| | | }; |
| | | arcBar.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | | fh.curTemp = arcBar.Progress; |
| | | btnTemp.Text = fh.curTemp.ToString(); |
| | | Control.Send(CommandType_A.write, fh); |
| | | //Control.Send(CommandType_A.write, fh); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("temp", fh.curTemp.ToString()); |
| | | Control.SendWriteCommand(fh, d); |
| | | }; |
| | | arcBar.OnProgressChangedEvent = (sender, e) => |
| | | { |
| | |
| | | { |
| | | btnSwitch.IsSelected = !btnSwitch.IsSelected; |
| | | fh.on_off = btnSwitch.IsSelected ? "on" : "off"; |
| | | Control.Send(CommandType_A.write, fh); |
| | | //Control.Send(CommandType_A.write, fh); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", fh.on_off.ToString()); |
| | | Control.SendWriteCommand(fh, d); |
| | | }; |
| | | } |
| | | |
| | |
| | | { |
| | | btn1.IsSelected = btn2.IsSelected = true; |
| | | fh.curMode = curMode; |
| | | Control.Send(CommandType_A.write, fh); |
| | | //Control.Send(CommandType_A.write, fh); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("mode", fh.curModeIndex.ToString()); |
| | | Control.SendWriteCommand(fh, d); |
| | | dialog.Close(); |
| | | }; |
| | | btn1.MouseUpEventHandler = eventHandler1; |