wxr
2020-03-05 0bdc0a135dbe31761b53f432ed34f347f0a4e36b
HDL_ON/UI/UI2/FuntionControlView/Light/RelayPage.cs
File was renamed from HDL_ON/UI/UI2/FuntionControlView/Light/RelayFragment.cs
@@ -5,7 +5,7 @@
namespace HDL_ON.UI
{
    public partial class RelayFragment : FrameLayout
    public partial class RelayPage : FrameLayout
    {
        #region 控件集合
@@ -37,19 +37,19 @@
        #endregion
        #region 区域变量
        Function function;
        Light light;
        #endregion
        public RelayFragment(Function func)
        public RelayPage(Light func)
        {
            bodyView = this;
            function = func;
            light = func;
        }
        public void LoadPage()
        {
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.Lights), function);
            new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.Lights), light);
            controlView = new FrameLayout()
            {
@@ -70,7 +70,7 @@
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel,
                Text = function.name,
                Text = light.name,
            };
            controlView.AddChidren(btnFunctionName);
@@ -83,7 +83,7 @@
                TextColor = CSS_Color.PromptingColor1,
                TextAlignment = TextAlignment.CenterLeft,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                Text = function.GetRoomListName()
                Text = light.GetRoomListName()
            };
            controlView.AddChidren(btnFromFoorAndRoom);
@@ -93,12 +93,12 @@
                Y = Application.GetRealHeight(14),
                Width = Application.GetMinRealAverage(40),
                Height = Application.GetMinRealAverage(40),
                UnSelectedImagePath = "Collection/CollectionIcon.png",
                SelectedImagePath = "Collection/CollectionGrayIcon.png",
                SelectedImagePath = "Collection/CollectionIcon.png",
                UnSelectedImagePath = "Collection/CollectionGrayIcon.png",
                IsSelected = light.collection
            };
            controlView.AddChidren(btnCollection);
            
            btnSwitchIcon = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
@@ -106,7 +106,8 @@
                Width = Application.GetRealWidth(168),
                Height = Application.GetRealHeight(288),
                UnSelectedImagePath = "FunctionIcon/Light/RelayCloseIcon.png",
                SelectedImagePath = "FunctionIcon/Light/RelayOpenIcon.png"
                SelectedImagePath = "FunctionIcon/Light/RelayOpenIcon.png",
                IsSelected = light.state != 0
            };
            controlView.AddChidren(btnSwitchIcon);
@@ -116,8 +117,9 @@
                Y = Application.GetRealHeight(462),
                Width = Application.GetMinRealAverage(40),
                Height = Application.GetMinRealAverage(40),
                UnSelectedImagePath = "Public/SwitchClose.png",
                SelectedImagePath = "Public/SwitchOn.png",
                UnSelectedImagePath = "Public/PowerClose.png",
                SelectedImagePath = "Public/PowerOpen.png",
                IsSelected = light.state != 0
            };
            controlView.AddChidren(btnSwitch);