using System;
|
using System.Collections.Generic;
|
using System.Text;
|
using Shared;
|
using Shared.SimpleControl;
|
using Shared.SimpleControl.Phone;
|
using Shared.SimpleControl.R;
|
|
namespace SmartHome.UI.SimpleControl.Phone.Music
|
{
|
class A31SetInformation : FrameLayout
|
{
|
public void show(A31MusicModel a31)
|
{
|
AddChidren(new Button
|
{
|
Height = Application.GetRealHeight(30),
|
BackgroundColor = SkinStyle.Current.MainColor,
|
});
|
|
var topFrameLayout = new FrameLayout
|
{
|
Height = Application.GetRealHeight (Application.DesignHeight - 30),
|
Y = Application.GetRealHeight(30),
|
BackgroundColor = 0xff181818,
|
};
|
AddChidren(topFrameLayout);
|
|
//重命名
|
var renamelayout = new FrameLayout
|
{
|
Height = Application.GetRealHeight(100),
|
Y = Application.GetRealHeight(500),
|
};
|
topFrameLayout.AddChidren(renamelayout);
|
|
var renamehoto = new Button
|
{
|
Width = Application.GetRealWidth(61),
|
Height = Application.GetRealHeight(81),
|
UnSelectedImagePath = "MusicIcon/rename.png",
|
SelectedImagePath = "MusicIcon/renameselected.png",
|
TextAlignment = TextAlignment.CenterLeft,
|
X = Application.GetRealWidth(30),
|
};
|
renamelayout.AddChidren(renamehoto);
|
|
var rename = new Button
|
{
|
Height = Application.GetRealHeight(100),
|
TextAlignment = TextAlignment.CenterLeft,
|
X = Application.GetRealWidth(130),
|
//Text = "重命名",
|
TextID=MyInternationalizationString.rename,
|
TextSize = 18,
|
|
};
|
renamelayout.AddChidren(rename);
|
EventHandler<MouseEventArgs> renamesource = (sender, e) =>
|
{
|
A31Rename Rename = new A31Rename();
|
MainPage.MainFrameLayout.AddChidren(Rename);
|
Rename.show(a31);
|
};
|
rename.MouseUpEventHandler += renamesource;
|
renamehoto.MouseUpEventHandler += renamesource;
|
|
#region 设备信息 设备内容 闹钟设置 定时关闭
|
/*
|
//设备信息
|
var equipmenlayout = new FrameLayout
|
{
|
Height = Application.GetRealHeight(100),
|
Y = renamelayout.Bottom,
|
};
|
topFrameLayout.AddChidren(equipmenlayout);
|
|
|
|
var equipmenthoto = new Button
|
{
|
Width = Application.GetRealWidth(61),
|
Height = Application.GetRealHeight(81),
|
UnSelectedImagePath = "MusicIcon/content.png",
|
SelectedImagePath = "MusicIcon/contentselected.png",
|
TextAlignment = TextAlignment.CenterLeft,
|
Gravity = Gravity.CenterVertical,
|
X = Application.GetRealWidth(30),
|
};
|
equipmenlayout.AddChidren(equipmenthoto);
|
|
var equipmen = new Button
|
{
|
Height = Application.GetRealHeight(100),
|
TextAlignment = TextAlignment.CenterLeft,
|
X = Application.GetRealWidth(130),
|
Text = "设备信息",
|
TextSize = 18,
|
|
};
|
equipmenlayout.AddChidren(equipmen);
|
|
//设备内容
|
var contenlayout = new FrameLayout
|
{
|
Height = Application.GetRealHeight(100),
|
Y = equipmenlayout.Bottom,
|
};
|
topFrameLayout.AddChidren(contenlayout);
|
|
var contenthoto = new Button
|
{
|
Width = Application.GetRealWidth(61),
|
Height = Application.GetRealHeight(81),
|
UnSelectedImagePath = "MusicIcon/information.png",
|
SelectedImagePath = "MusicIcon/informationselected.png",
|
TextAlignment = TextAlignment.CenterLeft,
|
Gravity = Gravity.CenterVertical,
|
X = Application.GetRealWidth(30),
|
};
|
contenlayout.AddChidren(contenthoto);
|
|
var content = new Button
|
{
|
Height = Application.GetRealHeight(100),
|
TextAlignment = TextAlignment.CenterLeft,
|
X = Application.GetRealWidth(130),
|
Text = "设备内容",
|
TextSize = 18,
|
|
};
|
contenlayout.AddChidren(content);
|
|
//闹钟设置
|
var clocklayout = new FrameLayout
|
{
|
Height = Application.GetRealHeight(100),
|
Y = contenlayout.Bottom,
|
};
|
topFrameLayout.AddChidren(clocklayout);
|
|
var clockhoto = new Button
|
{
|
Width = Application.GetRealWidth(61),
|
Height = Application.GetRealHeight(81),
|
UnSelectedImagePath = "MusicIcon/clock.png",
|
SelectedImagePath = "MusicIcon/clockselected.png",
|
TextAlignment = TextAlignment.CenterLeft,
|
Gravity = Gravity.CenterVertical,
|
X = Application.GetRealWidth(30),
|
};
|
clocklayout.AddChidren(clockhoto);
|
|
var clock = new Button
|
{
|
Height = Application.GetRealHeight(100),
|
TextAlignment = TextAlignment.CenterLeft,
|
X = Application.GetRealWidth(130),
|
Text = "闹钟设置",
|
TextSize = 18,
|
};
|
clocklayout.AddChidren(clock);
|
|
//定时关闭
|
var timinglayout = new FrameLayout
|
{
|
Height = Application.GetRealHeight(100),
|
Y = clocklayout.Bottom,
|
};
|
topFrameLayout.AddChidren(timinglayout);
|
|
var timingclosurehoto = new Button
|
{
|
Width = Application.GetRealWidth(61),
|
Height = Application.GetRealHeight(81),
|
UnSelectedImagePath = "MusicIcon/timing.png",
|
SelectedImagePath = "MusicIcon/timingselected.png",
|
TextAlignment = TextAlignment.CenterLeft,
|
Gravity = Gravity.CenterVertical,
|
X = Application.GetRealWidth(30),
|
};
|
timinglayout.AddChidren(timingclosurehoto);
|
|
var timingclosure = new Button
|
{
|
Height = Application.GetRealHeight(100),
|
TextAlignment = TextAlignment.CenterLeft,
|
X = Application.GetRealWidth(130),
|
Text = "定时关闭",
|
TextSize = 18,
|
};
|
timinglayout.AddChidren(timingclosure);
|
*/
|
#endregion
|
|
FrameLayout backframeLayout = new FrameLayout
|
{
|
Height = Application.GetRealHeight(100),
|
Y = Application.GetRealWidth(1000),
|
};
|
topFrameLayout.AddChidren(backframeLayout);
|
var back = new Button
|
{
|
Height = Application.GetRealHeight(100),
|
//Text = "返回",
|
TextID=MyInternationalizationString.back,
|
Gravity = Gravity.Center,
|
TextSize = 18,
|
};
|
backframeLayout.AddChidren(back);
|
back.MouseUpEventHandler += (sender, e) =>
|
{
|
RemoveFromParent();
|
};
|
|
}
|
|
}
|
}
|