using System;
//using Android.Icu.Lang;
namespace Shared.Phone.UserCenter.DoorLock
{
public class DoorlockDialog : FrameLayout
{
public DoorlockDialog(Dialog dialog, string title)
{
this.dialog = dialog;
this.title = title;
}
public string title = string.Empty;
public Dialog dialog;
///
/// 弹窗取消按键
///
public Button dialogBtnCancel = new Button
{
Width = Application.GetRealWidth(397),
Height = Application.GetRealHeight(127),
Y = Application.GetRealHeight(380),
TextID = R.MyInternationalizationString.Cancel,
TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
BackgroundColor = Shared.Common.ZigbeeColor.Current.XMMidFrameLayout,
};
///
/// 弹窗确认按键
///
public Button dialogBtnConfirm = new Button
{
Width = Application.GetRealWidth(398),
Height = Application.GetRealHeight(128),
X = Application.GetRealWidth(397),
Y = Application.GetRealHeight(380),
TextID = R.MyInternationalizationString.confrim,
TextColor = Shared.Common.ZigbeeColor.Current.XMWhite,
BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack,
};
///
/// 弹窗中部布局
///
public FrameLayout dialogMidFraFrameLayout = new FrameLayout
{
Width = Application.GetRealWidth(415),
Height = Application.GetRealHeight(58),
X = Application.GetRealWidth(190),
Y = Application.GetRealHeight(202),
};
///
/// 弹窗中部文本
///
public Button dialogMidText = new Button
{
TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
};
///
/// 阴影部分
///
public FrameLayout flMain = new FrameLayout
{
BackgroundColor = 0x00000000,
};
public void Show()
{
dialog.Show();
dialog.AddChidren(flMain);
flMain.MouseUpEventHandler += (sender11, e11) =>
{
dialog.Close();
};
var dialogFrameLayout = new FrameLayout()
{
Height = Application.GetRealHeight(380 + 127),
Width = Application.GetRealWidth(792),
Y = Application.GetRealHeight(691 - 184),
X = Application.GetRealWidth(144),
BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
};
flMain.AddChidren(dialogFrameLayout);
var dialogTitle = new Button()
{
Width = Application.GetRealWidth(492),
Height = Application.GetRealHeight(63),
X = Application.GetRealWidth(150),
Y = Application.GetRealHeight(69),
Text = title,
TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
};
dialogFrameLayout.AddChidren(dialogTitle);
dialogFrameLayout.AddChidren(dialogMidFraFrameLayout);
dialogFrameLayout.AddChidren(dialogBtnConfirm);
dialogFrameLayout.AddChidren(dialogBtnCancel);
}
}
}