using System; using System.Collections.Generic; using System.IO; namespace Shared.SimpleControl.Phone { public static class UserSettingView { public static void InitUserSettingView () { FrameLayout topView = new FrameLayout () { Y = Application.GetRealHeight (36), Height = Application.GetRealHeight (90), Width = Application.GetRealWidth (640), BackgroundColor = SkinStyle.Current.MainColor, }; UserMiddle.SettingBodyView.AddChidren (topView); Button LogoButton = new Button () { Width = Application.GetRealWidth (154), Height = Application.GetRealHeight (90), UnSelectedImagePath = MainPage.LogoString, }; topView.AddChidren (LogoButton); Button NameButton = new Button () { Width = Application.GetRealWidth (400), Height = Application.GetMinReal (90), TextID = R.MyInternationalizationString.Setting, TextColor = SkinStyle.Current.TextColor1, Gravity = Gravity.CenterHorizontal, TextAlignment = TextAlignment.Center, TextSize = 20, //FontName = "TitilliumText25L" }; topView.AddChidren (NameButton); if(MainPage.LoginUser.AccountString == "464027401@qq.com" ) { NameButton.MouseUpEventHandler += (sender, e) => { new Alert ("", UserConfig.Instance.tokenID, "close").Show(); }; } FrameLayout topUserMsgView = new FrameLayout () { Y = Application.GetRealHeight (126), Height = Application.GetRealHeight (175), BackgroundColor = SkinStyle.Current.ViewColor }; UserMiddle.SettingView.AddChidren (topUserMsgView); Button btnUserIcon = new Button () { X = Application.GetRealWidth (27), Width = Application.GetMinRealAverage (96), Height = Application.GetMinRealAverage (96), Gravity = Gravity.CenterVertical, Radius = 5, BorderColor = SkinStyle.Current.Transparent, BorderWidth = 0, UnSelectedImagePath = "AccountSettings/User.png", }; topUserMsgView.AddChidren (btnUserIcon); Button btnUserName = new Button () { X = btnUserIcon.Right + Application.GetRealWidth (20), Y = Application.GetRealHeight (40), Width = Application.GetRealWidth (400), Height = Application.GetRealHeight (50), TextAlignment = TextAlignment.CenterLeft, TextColor = SkinStyle.Current.TextColor1, TextID = R.MyInternationalizationString.Account }; topUserMsgView.AddChidren (btnUserName); Button btnUserAccount = new Button () { X = btnUserName.X, Y = btnUserName.Bottom, Width = btnUserName.Width, Height = btnUserName.Height, TextAlignment = TextAlignment.CenterLeft, Text = "", TextColor = SkinStyle.Current.TextColor1 }; topUserMsgView.AddChidren (btnUserAccount); if (MainPage.LoginUser != null) { btnUserAccount.Text += MainPage.LoginUser.AccountString; } Button btnTopUserMsgRight = new Button () { X = Application.GetRealWidth (570), Width = Application.GetRealWidth (28), Height = Application.GetRealHeight (40), Gravity = Gravity.CenterVertical, UnSelectedImagePath = "Item/Right.png", SelectedImagePath = "Item/RightSelected.png", }; topUserMsgView.AddChidren (btnTopUserMsgRight); Button btTopNull = new Button () { BackgroundColor = SkinStyle.Current.MainColor, Height = Application.GetRealHeight (50), }; UserMiddle.SettingView.AddChidren (btTopNull); Button btnNullSkin = new Button () { Height = Application.GetRealHeight (5), BackgroundColor = SkinStyle.Current.MainColor }; UserMiddle.SettingView.AddChidren (btnNullSkin); } } }