using HDL_ON.Stan;
using Shared;
using System;
using System.Collections.Generic;
using System.Text;
namespace HDL_ON.UI
{
///
/// 添加Evoyo的Mini智能遥控器步骤1界面
///
public class AddMiniRemoteControlDirection1Page : EditorCommonForm
{
#region ■ 变量声明___________________________
#endregion
#region ■ 初始化_____________________________
///
/// 画面显示(底层会固定调用此方法,借以完成画面创建)
///
public void ShowForm()
{
//设置头部信息
base.SetTitleText(Language.StringByID(StringId.AddInfraredRemoteControl));
//这个界面的背景需要白色
bodyFrameLayout.BackgroundColor = UI.CSS.CSS_Color.MainBackgroundColor;
//初始化中部信息
this.InitMiddleFrame();
}
///
/// 初始化中部信息
///
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) =>
{
#if __IOS__
#endif
#if __Android__
//检测蓝牙需要的东西
HdlAndroidBluetoothLogic.Current.CheckCanScanBluetooth((result) =>
{
if (result == true)
{
this.CloseForm();
var form = new AddMiniRemoteControlDirection2Page();
//wifi和密码都为空
form.AddForm();
}
});
#endif
};
}
#endregion
}
}