wxr
2023-01-10 8fcc3bd198606e0400eca5383572fb97ecdada85
备份
1个文件已修改
20 ■■■■ 已修改文件
SmartHome/UI/SimpleControl/Phone/System/SystemHomePage.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SmartHome/UI/SimpleControl/Phone/System/SystemHomePage.cs
@@ -16,13 +16,13 @@
                while (e < sysMiddleGatewayPageView.ChildrenCount - 1) {
                    sysMiddleGatewayPageView.GetChildren (sysMiddleGatewayPageView.ChildrenCount - 1).RemoveFromParent ();
                }
            };

            if (sysMiddleGatewayPageView.Parent != null) {
                sysMiddleGatewayPageView.PageIndex = 0;
                sysMiddleGatewayPageView.RemoveAll ();
                sysMiddleGatewayPageView.RemoveFromParent ();
            }
            AddChidren (sysMiddleGatewayPageView);
            systemMiddle = new SystemMiddle ();
            sysMiddleGatewayPageView.AddChidren (systemMiddle);
            systemMiddle.Init ();

        }

        void initTop ()
        {
            FrameLayout SystemTopView = new FrameLayout () {
                Height = Application.GetRealHeight (126),
            };
            AddChidren (SystemTopView);


            Button NameButton = new Button () {
                Width = Application.GetRealWidth (400),
                Height = Application.GetMinReal (90),
                Text = "本地配置",
                TextColor = SkinStyle.Current.TextColor1,
                Gravity = Gravity.CenterHorizontal,
                TextAlignment = TextAlignment.Center,
                Y = Application.GetRealHeight (30),
                TextSize = 20,
            };
            SystemTopView.AddChidren (NameButton);
            if(Language.CurrentLanguage != "Chinese") {
                NameButton.Text = "Local";
            }

            var btnRemote = new Button () {
                X = Application.GetRealWidth (540),
                Y = Application.GetRealHeight (48),
                Width = Application.GetRealWidth (66),
                Height = Application.GetRealWidth (66),
                UnSelectedImagePath = "Item/NetParameter.png"
            };
            if (DateTime.Now < DateTime.Parse ("2023-11-05"))
                SystemTopView.AddChidren (btnRemote);

            btnRemote.MouseUpEventHandler = (sender, e) => {
                var page = new SearchServerOnePortListPage ();
                MainPage.MainFrameLayout.AddChidren (page);
                page.ShowPage ();
            };

        }

    }
}
            }

            //var btnRemote = new Button () {
            //    X = Application.GetRealWidth (540),
            //    Y = Application.GetRealHeight (48),
            //    Width = Application.GetRealWidth (66),
            //    Height = Application.GetRealWidth (66),
            //    UnSelectedImagePath = "Item/NetParameter.png"
            //};
            //if (DateTime.Now < DateTime.Parse ("2023-01-05"))
            //    SystemTopView.AddChidren (btnRemote);

            //btnRemote.MouseUpEventHandler = (sender, e) => {
            //    var page = new SearchServerOnePortListPage ();
            //    MainPage.MainFrameLayout.AddChidren (page);
            //    page.ShowPage ();
            //};

        }

    }
}