| | |
| | | public void Show(CommonDevice common, bool edit,string str_if,Dictionary<string, object> editdeviceActionInfo = null) |
| | | { |
| | | #region 布局界面 |
| | | actionsInfo = editdeviceActionInfo; |
| | | |
| | | |
| | | this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor; |
| | | TopView view = new TopView(); |
| | | this.AddChidren(view.TopRowView()); |
| | |
| | | //保存点击事件 |
| | | saveView.clickviewBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (selectedDeviceStatus != "" && actionsInfo != null) |
| | | if (selectedDeviceStatus != ""&& TaskList.Count!=0) |
| | | { |
| | | LogicIfon.AddDeviceActions(common, actionsInfo); |
| | | } |
| | |
| | | actionsInfo.Add("DeviceAddr", common.DeviceAddr); |
| | | actionsInfo.Add("Epoint", common.DeviceEpoint); |
| | | actionsInfo.Add("Time", 0); |
| | | actionsInfo.Add("TaskList", TaskList); |
| | | } |
| | | if (actionsInfo.ContainsKey("TaskList")) |
| | | { |
| | | actionsInfo.Remove("TaskList"); |
| | | } |
| | | actionsInfo.Add("TaskList", TaskList); |
| | | |
| | | } |
| | | public void CurrentDeviceView(string if_str, CommonDevice common, bool edit, Button button) |
| | | { |
| | |
| | | |
| | | string status = ""; |
| | | Dictionary<string, string> dictionaryLight = new Dictionary<string, string>(); |
| | | dictionaryLight.Clear(); |
| | | switch (if_str) |
| | | { |
| | | case "夜灯开关": |
| | | { |
| | | |
| | | Send.dictionary(dictionaryLight, "TaskType", "1"); |
| | | Send.dictionary(dictionaryLight, "Data2", "0"); |
| | | |
| | | mFunView openView = new mFunView(); |
| | | openView.frameLayout.Y = Application.GetRealHeight(140 + 20); |
| | | openView.titleBtn.TextID = MyInternationalizationString.open; |
| | |
| | | break; |
| | | case "亮度": |
| | | { |
| | | Send.dictionary(dictionaryLight, "TaskType", "3"); |
| | | Send.dictionary(dictionaryLight, "Data2", "0"); |
| | | var horizontalSeekBarVol = new DiyImageSeekBar |
| | | { |
| | | Y = Application.GetRealHeight(140),//进度条父控件Y坐标 |
| | |
| | | break; |
| | | case "色温": |
| | | { |
| | | Send.dictionary(dictionaryLight, "TaskType", "8"); |
| | | Send.dictionary(dictionaryLight, "Data2", "0"); |
| | | Button seekIconBtn = new Button |
| | | { |
| | | Y = Application.GetRealHeight(140 + 160), |
| | |
| | | break; |
| | | case "蜂鸣器": |
| | | { |
| | | Send.dictionary(dictionaryLight, "TaskType", "7"); |
| | | Send.dictionary(dictionaryLight, "Data2", "0"); |
| | | |
| | | |
| | | mFunView openView = new mFunView(); |
| | | openView.frameLayout.Y = Application.GetRealHeight(140 + 20); |
| | |
| | | } |
| | | completeView.Btncomplete.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (selectedDeviceStatus != "") |
| | | if (dictionaryLight.Count!=0) |
| | | { |
| | | Send.dictionary(dictionaryLight, "TaskType", selectedDeviceStatus); |
| | | Send.dictionary(dictionaryLight, "Data2", "0"); |
| | | flMain.RemoveFromParent(); |
| | | DicValue(selectedDeviceStatus, dictionaryLight); |
| | | button.Text = status; |