New file |
| | |
| | | using HDL_ON.Stan; |
| | | using Shared; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// 添加Evoyo的Mini智能遥控器步骤1界面 |
| | | /// </summary> |
| | | public class AddMiniRemoteControlDirection1Page : EditorCommonForm |
| | | { |
| | | #region ■ 变量声明___________________________ |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 初始化_____________________________ |
| | | |
| | | /// <summary> |
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建) |
| | | /// </summary> |
| | | public void ShowForm() |
| | | { |
| | | //设置头部信息 |
| | | base.SetTitleText(Language.StringByID(StringId.AddInfraredRemoteControl)); |
| | | //这个界面的背景需要白色 |
| | | bodyFrameLayout.BackgroundColor = UI.CSS.CSS_Color.MainBackgroundColor; |
| | | |
| | | //初始化中部信息 |
| | | this.InitMiddleFrame(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化中部信息 |
| | | /// </summary> |
| | | private void InitMiddleFrame() |
| | | { |
| | | //图片 |
| | | var btnPic = new PicViewControl(149, 95); |
| | | btnPic.Y = Application.GetRealHeight(99); |
| | | btnPic.Gravity = Gravity.CenterHorizontal; |
| | | btnPic.UnSelectedImagePath = "PersonalCenter/AddDevice/MiniRemoteControlBigPictrue.png"; |
| | | bodyFrameLayout.AddChidren(btnPic); |
| | | |
| | | //长按红外遥控器按钮10秒,指示灯蓝色快闪 |
| | | var strMsg = Language.StringByID(StringId.AddInfraredRemoteControlMsg1); |
| | | var intYY = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS.CSS_FontSize.TextFontSize, |
| | | CSS.CSS_Color.FirstLevelTitleColor, Application.GetRealHeight(20), Application.GetRealHeight(408)); |
| | | |
| | | //请确保您的蓝牙已开启并处于可以被搜索状态 |
| | | strMsg = Language.StringByID(StringId.AddInfraredRemoteControlMsg2); |
| | | this.AddListMsgControls(bodyFrameLayout, strMsg, CSS.CSS_FontSize.PromptFontSize_FirstLevel, |
| | | CSS.CSS_Color.PromptingColor1, Application.GetRealHeight(18), intYY + Application.GetRealHeight(4)); |
| | | |
| | | //下一步 |
| | | var btnNext = this.AddBottomClickButton(Language.StringByID(StringId.Next)); |
| | | btnNext.ButtonClickEvent += (sender, e) => |
| | | { |
| | | //检测蓝牙需要的东西 |
| | | btnNext.CanClick = false; |
| | | HdlBluetoothLogic.Current.CheckCanScanBluetooth((result) => |
| | | { |
| | | btnNext.CanClick = true; |
| | | if (result == true) |
| | | { |
| | | this.CloseForm(); |
| | | var form = new AddMiniRemoteControlDirection2Page(); |
| | | //初始wifi和密码为空 |
| | | form.AddForm(string.Empty, string.Empty); |
| | | } |
| | | }); |
| | | }; |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |