using System;
|
using Shared;
|
using Shared.Common;
|
using Shared.R;
|
|
namespace Shared.Phone.Device.Logic
|
{
|
public class CustomText:FrameLayout
|
{
|
|
public void Show()
|
{
|
this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
|
|
var topFrameLayout = new FrameLayout
|
{
|
Height = Application.GetRealHeight(140),
|
Y = Application.GetRealHeight(80),
|
};
|
AddChidren(topFrameLayout);
|
|
var titleName = new Button
|
{
|
//TextID = MyInternationalizationString.selection,
|
Text = "自定义推送",
|
TextSize = 17,
|
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
|
};
|
topFrameLayout.AddChidren(titleName);
|
|
var back = new Button
|
{
|
Width = Application.GetRealWidth(110),
|
Height = Application.GetRealHeight(110),
|
X = Application.GetRealWidth(20),
|
Gravity = Gravity.CenterVertical,
|
UnSelectedImagePath = "ZigeeLogic/Back.png",
|
};
|
topFrameLayout.AddChidren(back);
|
back.MouseDownEventHandler += (sender, e) => {
|
RemoveFromParent();
|
};
|
|
|
var middle = new FrameLayout();
|
middle.Y = topFrameLayout.Bottom;
|
middle.Height = Application.GetRealHeight(1920 - 220);
|
middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
|
this.AddChidren(middle);
|
|
var textBox = new EditText
|
{
|
Width = Application.GetRealWidth(900),
|
Height = Application.GetRealHeight(600),
|
X = Application.GetRealWidth(90),
|
Y = Application.GetRealHeight(90),
|
TextAlignment = TextAlignment.CenterLeft,
|
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
|
Radius = (uint)Application.GetRealHeight(40),
|
BorderColor = ZigbeeColor.Current.LogicLineColor,
|
BorderWidth = 2,
|
//Text = Common.Logic.CurrentLogic.LogicName,
|
//TextID=MyInternationalizationString.automation1,
|
};
|
middle.AddChidren(textBox);
|
|
var btnsave = new Button
|
{
|
Height = Application.GetRealHeight(150),
|
Y = textBox.Bottom + Application.GetRealHeight(300),
|
//Text = "保存",
|
Width = Application.GetRealWidth(500),
|
Radius = (uint)Application.GetRealHeight(50),
|
BackgroundColor = ZigbeeColor.Current.LogicButtonBlueColor,
|
X = Application.GetRealWidth(290),
|
TextID = MyInternationalizationString.Save,
|
};
|
middle.AddChidren(btnsave);
|
btnsave.MouseUpEventHandler += (sender, e) =>
|
{
|
RemoveFromParent();
|
};
|
}
|
}
|
}
|