Merge branch 'WJC' into NewFilePath
| | |
| | | 7076=目标不能为空。 |
| | | 7077=时间未设置,请设置时间。 |
| | | 7078=条件或者目标为空。 |
| | | 7079=网关不在线 |
| | | |
| | | 9000=请使用新的手机账号登录APP |
| | | 9001=请使用新的邮箱账号登录APP |
| | |
| | | 7076=目标不能为空。 |
| | | 7077=时间未设置,请设置时间。 |
| | | 7078=条件或者目标为空。 |
| | | 7079=网关不在线 |
| | | |
| | | 9000=请使用新的手机账号登录APP |
| | | 9001=请使用新的邮箱账号登录APP |
| | |
| | | public const int targetNull = 7076; |
| | | public const int timeNoSet = 7077; |
| | | public const int conditioncNullOrtargetNull = 7078; |
| | | |
| | | public const int gatewayNotOnline = 7079; |
| | | |
| | | |
| | | |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\ImageUtlis.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\ConditionDeviceFunList.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\TargetDeviceFunList.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\brightnessView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\FunTypeView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\CheckView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\FileUtlis.cs" />
|
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Light\ColorTureLampPageBLL.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\Utlis\FloorRoomSelectPopupView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\Widget\DiySelectPopupDialog.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicView\BrightnessView.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\" />
|
| | |
| | | LogicMethod.RemoveAllView(); |
| | | MainView.MainShow(); |
| | | } |
| | | else if (responsePackNew != null && responsePackNew.Code == "14005") |
| | | { |
| | | new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline)); |
| | | } |
| | | else |
| | | { |
| | | new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail)); |
| | |
| | | LogicMethod.RemoveAllView(); |
| | | MainView.MainShow(); |
| | | } |
| | | else |
| | | else if (responsePackNew != null && responsePackNew.Code == "14005") |
| | | { |
| | | new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline)); |
| | | } |
| | | else |
| | | { |
| | | new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail)); |
| | | } |
| | |
| | | } |
| | | break; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | #region 保存 |
| | | ///保存View |
| | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 移除控件 |
| | | /// 开关功能展开界面 |
| | | /// </summary> |
| | | /// <param name="frame"></param> |
| | | private void RemView(FrameLayout frame) |
| | | /// <param name="device"></param> |
| | | /// <param name="button"></param> |
| | | /// <param name="len"></param> |
| | | public void SwitchViewMethod(FrameLayout frame, Entity.Function device, Button button, int len) |
| | | { |
| | | frame.RemoveFromParent(); |
| | | |
| | | LogicView.SwitchView switchView = new LogicView.SwitchView(); |
| | | switchView.FLayoutView(frame, len, button.Text, (strValue) => |
| | | { |
| | | int id = 0; |
| | | switch (strValue) |
| | | { |
| | | case "on": |
| | | { |
| | | id = StringId.onLogic; |
| | | } |
| | | break; |
| | | case "off": |
| | | { |
| | | id = StringId.offLogic; |
| | | } |
| | | break; |
| | | } |
| | | button.TextID = id; |
| | | keyVlaue = "on_off"; |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | LogicMethod.dictionary(dic, "key", "on_off"); |
| | | LogicMethod.dictionary(dic, "comparator", "="); |
| | | LogicMethod.dictionary(dic, "data_type", "string"); |
| | | LogicMethod.dictionary(dic, "value", strValue); |
| | | AddDictionaryData(dicSateteList, keyVlaue, dic); |
| | | selectedState = device.functionType + "_" + strValue; |
| | | |
| | | }); |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 显示编辑之前的设备状态 |
| | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 开关功能展开界面 |
| | | /// 移除控件 |
| | | /// </summary> |
| | | /// <param name="frame"></param> |
| | | /// <param name="device"></param> |
| | | /// <param name="button"></param> |
| | | /// <param name="len"></param> |
| | | public void SwitchViewMethod(FrameLayout frame, Entity.Function device, Button button, int len) |
| | | private void RemView(FrameLayout frame) |
| | | { |
| | | |
| | | LogicView.SwitchView switchView = new LogicView.SwitchView(); |
| | | switchView.FLayoutView(frame, len); |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | LogicMethod.dictionary(dic, "key", "on_off"); |
| | | LogicMethod.dictionary(dic, "comparator", "="); |
| | | LogicMethod.dictionary(dic, "data_type", "string"); |
| | | keyVlaue = "on_off"; |
| | | switchView.btnOn.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | LogicMethod.dictionary(dic, "value", "on"); |
| | | button.TextID = StringId.onLogic; |
| | | selectedState = device.functionType + "_on"; |
| | | AddDictionaryData(dicSateteList, keyVlaue, dic); |
| | | RemView(frame); |
| | | }; |
| | | switchView.btnOff.MouseUpEventHandler += (sender3, e3) => |
| | | { |
| | | LogicMethod.dictionary(dic, "value", "off"); |
| | | button.TextID = StringId.offLogic; |
| | | selectedState = device.functionType + "_off"; |
| | | AddDictionaryData(dicSateteList, keyVlaue, dic); |
| | | RemView(frame); |
| | | }; |
| | | if (button.Text != "") |
| | | { |
| | | if (button.Text == switchView.btnOn.Text) |
| | | { |
| | | switchView.btnOn.TextColor = CSS.CSS_Color.textConfirmColor; |
| | | } |
| | | else if (button.Text == switchView.btnOff.Text) |
| | | { |
| | | switchView.btnOff.TextColor = CSS.CSS_Color.textConfirmColor; |
| | | } |
| | | } |
| | | frame.RemoveFromParent(); |
| | | } |
| | | } |
| | | } |
| | |
| | | namespace HDL_ON.UI.UI2.Intelligence.Automation |
| | | { |
| | | |
| | | public class LogicMethod |
| | | public class LogicMethod |
| | | { |
| | | /// <summary> |
| | | /// 表示是条件 |
| | |
| | | Width = Application.GetRealWidth(343), |
| | | }; |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// View的方法 |
| | | /// </summary> |
| | | /// <param name="frame">父控件</param> |
| | | /// <param name="i">显示选择View数量</param> |
| | | ///<param name="stateVuale">之前的状态值</param> |
| | | /// <param name="action">返回回调</param> |
| | | /// <returns></returns> |
| | | public void FLayoutView(FrameLayout frame, int i) |
| | | public void FLayoutView(FrameLayout frame, int i,string stateVuale,Action<string>action) |
| | | { |
| | | frameLayout.Y = Application.GetRealHeight(603 - (44 * i)); |
| | | frameLayout.Height = Application.GetRealHeight(44 * i); |
| | |
| | | frameLayout.AddChidren(btnLine1); |
| | | frameLayout.AddChidren(btnStop); |
| | | } |
| | | //取消点击事件 |
| | | btnCancel.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | | frame.RemoveFromParent(); |
| | | }; |
| | | |
| | | |
| | | ///显示之前状态 |
| | | if (stateVuale != "") |
| | | { |
| | | if (stateVuale ==btnOn.Text) |
| | | { |
| | | btnOn.TextColor = CSS.CSS_Color.textConfirmColor; |
| | | } |
| | | else if (stateVuale == btnOff.Text) |
| | | { |
| | | btnOff.TextColor = CSS.CSS_Color.textConfirmColor; |
| | | } |
| | | else if (stateVuale == btnStop.Text) |
| | | { |
| | | btnStop.TextColor = CSS.CSS_Color.textConfirmColor; |
| | | } |
| | | } |
| | | |
| | | //开-点击事件 |
| | | btnOn.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | action("on"); |
| | | frame.RemoveFromParent(); |
| | | }; |
| | | //关-点击事件 |
| | | btnOff.MouseUpEventHandler += (sender3, e3) => |
| | | { |
| | | action("off"); |
| | | frame.RemoveFromParent(); |
| | | }; |
| | | //暂停-点击事件 |
| | | btnStop.MouseUpEventHandler += (sender3, e3) => |
| | | { |
| | | action("stop"); |
| | | frame.RemoveFromParent(); |
| | | }; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | ///// <summary> |
| | | ///// View的方法 |
| | | ///// </summary> |
| | | ///// <param name="frame">父控件</param> |
| | | ///// <param name="i">显示选择View数量</param> |
| | | ///// <returns></returns> |
| | | //public void FLayoutView(FrameLayout frame, int i) |
| | | //{ |
| | | // frameLayout.Y = Application.GetRealHeight(603 - (44 * i)); |
| | | // frameLayout.Height = Application.GetRealHeight(44 * i); |
| | | // frame.AddChidren(frameLayout); |
| | | // frame.AddChidren(btnCancel); |
| | | // frameLayout.AddChidren(btnOn); |
| | | // frameLayout.AddChidren(btnLine); |
| | | // frameLayout.AddChidren(btnOff); |
| | | // if (i > 2) |
| | | // { |
| | | // /// 判断是否要是显示"暂停"按钮 |
| | | // frameLayout.AddChidren(btnLine1); |
| | | // frameLayout.AddChidren(btnStop); |
| | | // } |
| | | // btnCancel.MouseUpEventHandler += (sender1, e1) => |
| | | // { |
| | | // frame.RemoveFromParent(); |
| | | // }; |
| | | //} |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | public Button btn_subtract_click = new Button |
| | | { |
| | | Width = Application.GetMinRealAverage(24+20), |
| | | Width = Application.GetMinRealAverage(24 + 20), |
| | | Height = Application.GetMinRealAverage(24), |
| | | X = Application.GetRealWidth(26-20), |
| | | X = Application.GetRealWidth(26 - 20), |
| | | Y = Application.GetRealHeight(118), |
| | | |
| | | }; |
| | | public DiyImageSeekBar seekBarVol = new DiyImageSeekBar |
| | | { |
| | | Y = Application.GetRealHeight(103),//进度条父控件Y坐标 |
| | | X = Application.GetRealWidth(62-10),//进度条X坐标 |
| | | SeekBarPadding=Application.GetRealHeight(10),//进度条实际长度=244-10*2(内边距); |
| | | X = Application.GetRealWidth(62 - 10),//进度条X坐标 |
| | | SeekBarPadding = Application.GetRealHeight(10),//进度条实际长度=244-10*2(内边距); |
| | | Width = Application.GetRealWidth(240),//进度条的长度 |
| | | Height = Application.GetRealHeight(54),//进度条父控件高度 |
| | | IsProgressTextShow = true,//显示百分比 |
| | | IsClickable = true,//进度条是否滑动 |
| | | ProgressBarColor =CSS.CSS_Color.textConfirmColor,//选中进度条颜色 |
| | | ProgressBarColor = CSS.CSS_Color.textConfirmColor,//选中进度条颜色 |
| | | ThumbImagePath = "LogicIcon/point.png",//进度条按钮图标 |
| | | ThumbImageHeight = Application.GetRealHeight(54),//进度条按钮图标的高度(默认正方形:宽和高一样) |
| | | ProgressTextColor = CSS.CSS_Color.textColor, |
| | |
| | | /// </summary> |
| | | public Button btn_add_click = new Button |
| | | { |
| | | Width = Application.GetMinRealAverage(24+20), |
| | | Width = Application.GetMinRealAverage(24 + 20), |
| | | Height = Application.GetMinRealAverage(24), |
| | | X = Application.GetRealWidth(294), |
| | | Y = Application.GetRealHeight(118), |
| | | }; |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// View的方法 |
| | | /// </summary> |
| | | /// <param name="fLayout"></param> |
| | | public void FLayoutView(FrameLayout fLayout) |
| | | /// <param name="fLayout">父控件</param> |
| | | /// <param name="titleName">标题名称</param> |
| | | /// <param name="stateValue">之前状态值</param> |
| | | /// <param name="action">返回回调</param> |
| | | public void FLayoutView(FrameLayout fLayout, string titleName,string stateValue, Action<string> action) |
| | | { |
| | | fLayout.AddChidren(frameLayout); |
| | | frameLayout.AddChidren(btnTitle); |
| | |
| | | frameLayout.AddChidren(seekBarVol); |
| | | frameLayout.AddChidren(btn_add); |
| | | frameLayout.AddChidren(btn_add_click); |
| | | //第一个变化记录选中值 |
| | | int brightnesValue = 0; |
| | | if (stateValue != "") |
| | | { |
| | | try |
| | | { |
| | | //进来的状态 |
| | | brightnesValue = int.Parse(stateValue); |
| | | seekBarVol.Progress = int.Parse(stateValue); |
| | | } |
| | | catch { } |
| | | } |
| | | //—点击事件 |
| | | btn_subtract_click.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | if (brightnesValue > 0) |
| | | { |
| | | brightnesValue -= 1; |
| | | seekBarVol.Progress = brightnesValue; |
| | | } |
| | | }; |
| | | //+点击事件 |
| | | btn_add_click.MouseUpEventHandler += (sende2, e2) => |
| | | { |
| | | if (brightnesValue < 100) |
| | | { |
| | | brightnesValue += 1; |
| | | seekBarVol.Progress = brightnesValue; |
| | | |
| | | } |
| | | }; |
| | | //进度条滑动点击事件 |
| | | EventHandler<int> progressclick = (sender2, e2) => |
| | | { |
| | | brightnesValue = seekBarVol.Progress; |
| | | }; |
| | | seekBarVol.OnProgressChangedEvent += progressclick; |
| | | seekBarVol.OnStopTrackingTouchEvent += progressclick; |
| | | //取消点击事件 |
| | | btnCancel.MouseUpEventHandler += (sender, e1) => |
| | | { |
| | | //移除fLayout界面 |
| | | fLayout.RemoveFromParent(); |
| | | }; |
| | | //确定点击事件 |
| | | btnConfirm.MouseUpEventHandler += (sender, e1) => |
| | | { |
| | | //if (brightnesValue == 0) |
| | | //{ |
| | | // return; |
| | | //} |
| | | action(brightnesValue.ToString()); |
| | | //移除fLayout界面 |
| | | fLayout.RemoveFromParent(); |
| | | }; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | ///// <summary> |
| | | ///// View的方法 |
| | | ///// </summary> |
| | | ///// <param name="fLayout"></param> |
| | | //public void FLayoutView(FrameLayout fLayout) |
| | | //{ |
| | | // fLayout.AddChidren(frameLayout); |
| | | // frameLayout.AddChidren(btnTitle); |
| | | // frameLayout.AddChidren(btnCancel); |
| | | // frameLayout.AddChidren(btnConfirm); |
| | | // frameLayout.AddChidren(btn_subtract); |
| | | // frameLayout.AddChidren(btn_subtract_click); |
| | | // frameLayout.AddChidren(seekBarVol); |
| | | // frameLayout.AddChidren(btn_add); |
| | | // frameLayout.AddChidren(btn_add_click); |
| | | // //取消点击事件 |
| | | // btnCancel.MouseUpEventHandler += (sender, e1) => |
| | | // { |
| | | // //移除fLayout界面 |
| | | // fLayout.RemoveFromParent(); |
| | | // }; |
| | | |
| | | //} |
| | | } |
| | | } |
| | |
| | | MainView.MainShow(); |
| | | //发送删除逻辑命令; |
| | | } |
| | | else if (responsePackNew != null && responsePackNew.Code == "14005") |
| | | { |
| | | new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline)); |
| | | } |
| | | else |
| | | { |
| | | new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.delFail)); |
| | |
| | | string keyVlaue = "set_temp"; |
| | | string set_temp_value = temperature.Replace("℃", ""); |
| | | LogicMethod.dictionary(dic, "value", set_temp_value); |
| | | selectedState = device.functionType + "_set_temp"; |
| | | AddDictionaryData(dicSateteList, keyVlaue, dic); |
| | | selectedState = device.functionType + "_set_temp"; |
| | | RemView(frame); |
| | | temperatureView.btnState.Text = temperature; |
| | | |
| | | |
| | | }; |
| | | }; |
| | |
| | | }; |
| | | this.AddChidren(frame); |
| | | LogicView.SwitchView switchView = new LogicView.SwitchView(); |
| | | switchView.FLayoutView(frame, len); |
| | | switchView.FLayoutView(frame, len, button.Text, (strValue) => |
| | | { |
| | | int id = 0; |
| | | switch (strValue) { |
| | | case "on": { |
| | | id = StringId.onLogic; |
| | | } |
| | | break; |
| | | case "off": { |
| | | id = StringId.offLogic; |
| | | } break; |
| | | case "stop": { |
| | | id = StringId.stop; |
| | | } break; |
| | | } |
| | | button.TextID = id; |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | LogicMethod.dictionary(dic, "key", "on_off"); |
| | | string keyVlaue = "on_off"; |
| | | LogicMethod.dictionary(dic, "value", strValue); |
| | | AddDictionaryData(dicSateteList, keyVlaue, dic); |
| | | selectedState = device.functionType + "_" + strValue; |
| | | |
| | | }); |
| | | #endregion |
| | | |
| | | #region 点击事件 |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | LogicMethod.dictionary(dic, "key", "on_off"); |
| | | string keyVlaue = "on_off"; |
| | | //开-点击事件 |
| | | switchView.btnOn.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | LogicMethod.dictionary(dic, "value", "on"); |
| | | button.TextID = StringId.onLogic; |
| | | selectedState = device.functionType + "_on"; |
| | | AddDictionaryData(dicSateteList, keyVlaue, dic); |
| | | RemView(frame); |
| | | }; |
| | | //关-点击事件 |
| | | switchView.btnOff.MouseUpEventHandler += (sender3, e3) => |
| | | { |
| | | LogicMethod.dictionary(dic, "value", "off"); |
| | | button.TextID = StringId.offLogic; |
| | | selectedState = device.functionType + "_off"; |
| | | AddDictionaryData(dicSateteList, keyVlaue, dic); |
| | | RemView(frame); |
| | | |
| | | }; |
| | | //暂停-点击事件 |
| | | switchView.btnStop.MouseUpEventHandler += (sender3, e3) => |
| | | { |
| | | LogicMethod.dictionary(dic, "value", "stop"); |
| | | button.TextID = StringId.stop; |
| | | selectedState = device.functionType + "_stop"; |
| | | AddDictionaryData(dicSateteList, keyVlaue, dic); |
| | | RemView(frame); |
| | | |
| | | }; |
| | | ///显示之前状态 |
| | | if (button.Text != "") |
| | | { |
| | | if (button.Text == switchView.btnOn.Text) |
| | | { |
| | | switchView.btnOn.TextColor = CSS.CSS_Color.textConfirmColor; |
| | | } |
| | | else if (button.Text == switchView.btnOff.Text) |
| | | { |
| | | switchView.btnOff.TextColor = CSS.CSS_Color.textConfirmColor; |
| | | } |
| | | else if (button.Text == switchView.btnStop.Text) |
| | | { |
| | | switchView.btnOff.TextColor = CSS.CSS_Color.textConfirmColor; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 亮度/百分比=功能下一级界面 |
| | |
| | | }; |
| | | this.AddChidren(frame); |
| | | LogicView.BrightnessView brightness = new LogicView.BrightnessView(); |
| | | brightness.btnTitle.Text = titleName; |
| | | brightness.FLayoutView(frame); |
| | | #endregion |
| | | #region 点击事件 |
| | | int brightnesValue = 0; |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | string keyVlaue = ""; |
| | | |
| | | switch (device.functionType) |
| | | brightness.FLayoutView(frame, titleName, button.Text, (brightnesValue) => |
| | | { |
| | | //开关灯光 light.Switch |
| | | case FunctionType.Dimmer: |
| | | case FunctionType.RGB: |
| | | case FunctionType.RGBW: |
| | | case FunctionType.ColorTemperature: |
| | | { |
| | | LogicMethod.dictionary(dic, "key", "brightness"); |
| | | keyVlaue = "brightness"; |
| | | } |
| | | break; |
| | | |
| | | case FunctionType.MotorCurtain: |
| | | case FunctionType.RollingShutter: |
| | | { |
| | | LogicMethod.dictionary(dic, "key", "percent"); |
| | | keyVlaue = "percent"; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | //—点击事件 |
| | | brightness.btn_subtract_click.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | if (brightnesValue > 0) |
| | | button.Text = brightnesValue; |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | string keyVlaue = ""; |
| | | switch (device.functionType) |
| | | { |
| | | brightnesValue -= 1; |
| | | brightness.seekBarVol.Progress = brightnesValue; |
| | | //开关灯光 light.Switch |
| | | case FunctionType.Dimmer: |
| | | case FunctionType.RGB: |
| | | case FunctionType.RGBW: |
| | | case FunctionType.ColorTemperature: |
| | | { |
| | | LogicMethod.dictionary(dic, "key", "brightness"); |
| | | keyVlaue = "brightness"; |
| | | } |
| | | break; |
| | | case FunctionType.MotorCurtain: |
| | | case FunctionType.RollingShutter: |
| | | { |
| | | LogicMethod.dictionary(dic, "key", "percent"); |
| | | keyVlaue = "percent"; |
| | | } |
| | | break; |
| | | } |
| | | }; |
| | | //+点击事件 |
| | | brightness.btn_add_click.MouseUpEventHandler += (sende2, e2) => |
| | | { |
| | | if (brightnesValue < 100) |
| | | { |
| | | brightnesValue += 1; |
| | | brightness.seekBarVol.Progress = brightnesValue; |
| | | |
| | | } |
| | | }; |
| | | //进度条滑动点击事件 |
| | | EventHandler<int> progressclick = (sender2, e2) => |
| | | { |
| | | brightnesValue = brightness.seekBarVol.Progress; |
| | | }; |
| | | brightness.seekBarVol.OnProgressChangedEvent += progressclick; |
| | | brightness.seekBarVol.OnStopTrackingTouchEvent += progressclick; |
| | | //确定点击事件 |
| | | brightness.btnConfirm.MouseUpEventHandler += (sende2, e2) => |
| | | { |
| | | if (brightnesValue == 0) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | LogicMethod.dictionary(dic, "value", brightnesValue.ToString()); |
| | | selectedState = device.functionType + brightnesValue.ToString(); |
| | | AddDictionaryData(dicSateteList, keyVlaue, dic); |
| | | button.Text = brightnesValue.ToString(); |
| | | RemView(frame); |
| | | |
| | | }; |
| | | //显示之前状态 |
| | | if (button.Text != "") |
| | | { |
| | | brightnesValue = int.Parse(button.Text); |
| | | brightness.seekBarVol.Progress = brightnesValue; |
| | | } |
| | | selectedState = device.functionType + brightnesValue.ToString(); |
| | | }); |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | /// <summary> |