| | |
| | | |
| | | public static FrameLayout UserPageView = new FrameLayout (); |
| | | |
| | | //public static Button LinkStatusTip = new Button () { |
| | | // Height = Application.GetRealHeight (36), |
| | | // Width = Application.GetRealWidth (640), |
| | | // BackgroundColor = SkinStyle.Current.LinkStatusTipColor |
| | | //}; |
| | | public static Button LinkStatusTip = new Button () { |
| | | Height = Application.GetRealHeight (Convert.ToInt32 (36 * MainPage.PixelScale)), |
| | | BackgroundColor = SkinStyle.Current.MainColor |
| | | }; |
| | | |
| | | public static PageLayout FavoritePageView = new PageLayout () { |
| | | IsShowPoint = false, |
| | | }; |
| | | public static FrameLayout FavoriteBodyView = new FrameLayout () { |
| | | Width = Application.GetRealWidth (640), |
| | | Height = Application.GetRealHeight (1136) |
| | | //Width = Application.GetRealWidth (Application.DesignWidth), |
| | | //Height = Application.GetRealHeight (Application.DesignHeight) |
| | | }; |
| | | public static UserRoom FavoriteRoom = new UserRoom () { |
| | | Width = Application.GetRealWidth (640), |
| | | Height = Application.GetRealHeight (1136 - 90) |
| | | //Width = Application.GetRealWidth (Application.DesignWidth), |
| | | Height = Application.GetRealHeight (Application.DesignHeight - userMenuItemHeight) |
| | | }; |
| | | |
| | | public static PageLayout DevicePageView = new PageLayout () { |
| | | IsShowPoint = false, |
| | | }; |
| | | public static FrameLayout DeviceBodyView = new FrameLayout () { |
| | | Width = Application.GetRealWidth (640), |
| | | Height = Application.GetRealHeight (1136) |
| | | //Width = Application.GetRealWidth (Application.DesignWidth), |
| | | Height = Application.GetRealHeight (Application.DesignHeight) |
| | | }; |
| | | public static VerticalScrolViewLayout DeviceView = new VerticalScrolViewLayout () { |
| | | Y = Application.GetRealHeight (126), |
| | | Width = Application.GetRealWidth (640), |
| | | Height = Application.GetRealHeight (1136 - 126 - 90), |
| | | //Width = Application.GetRealWidth (Application.DesignWidth), |
| | | Height = Application.GetRealHeight (Application.DesignHeight - 126 - userMenuItemHeight), |
| | | }; |
| | | |
| | | public static PageLayout RoomPageView = new PageLayout () { |
| | | IsShowPoint = false, |
| | | }; |
| | | public static FrameLayout RoomBodyView = new FrameLayout () { |
| | | Width = Application.GetRealWidth (640), |
| | | Height = Application.GetRealHeight (1136) |
| | | Width = Application.GetRealWidth (Application.DesignWidth), |
| | | Height = Application.GetRealHeight (Application.DesignHeight) |
| | | }; |
| | | |
| | | public static PageLayout SettingPageView = new PageLayout () { |
| | |
| | | }; |
| | | public static FrameLayout SettingBodyView = new FrameLayout () { |
| | | BackgroundColor = SkinStyle.Current.MainColor, |
| | | Height = Application.GetRealHeight (1136) |
| | | Height = Application.GetRealHeight (Application.DesignHeight) |
| | | }; |
| | | public static VerticalScrolViewLayout SettingView = new VerticalScrolViewLayout () { |
| | | Y = Application.GetRealHeight (126), |
| | | Width = Application.GetRealWidth (640), |
| | | Height = Application.GetRealHeight (1136 - 126 - 90 - 90), |
| | | Width = Application.GetRealWidth (Application.DesignWidth), |
| | | Height = Application.GetRealHeight (Application.DesignHeight - 126 - userMenuItemHeight - 90), |
| | | BackgroundColor = SkinStyle.Current.ViewColor, |
| | | //ScrollEnabled = true |
| | | }; |
| | | public static Button btnVersion = new Button () { |
| | | Y = Application.GetRealHeight (1136 - 90 - 90), |
| | | Width = Application.GetRealWidth (640), |
| | | Y = Application.GetRealHeight (Application.DesignHeight - userMenuItemHeight - 90), |
| | | Width = Application.GetRealWidth (Application.DesignWidth), |
| | | Height = Application.GetRealHeight (90), |
| | | Text = Language.StringByID (R.MyInternationalizationString.Version) + " : " + MainPage.RequestVersion, |
| | | TextColor = SkinStyle.Current.TextColor1, |
| | |
| | | }; |
| | | |
| | | public static FrameLayout UserMenuItem = new FrameLayout () { |
| | | Y = Application.GetRealHeight (Application.DesignHeight - 90), |
| | | Height = Application.GetRealHeight (95), |
| | | Y = Application.GetRealHeight (Application.DesignHeight - userMenuItemHeight), |
| | | Height = Application.GetMinRealAverage (userMenuItemHeight+5), |
| | | BackgroundColor = SkinStyle.Current.MainColor |
| | | }; |
| | | |
| | |
| | | |
| | | public static Button btnLinkStatus = new Button () { |
| | | Y = Application.GetRealHeight (10), |
| | | Width = Application.GetRealWidth (131), |
| | | Height = Application.GetRealHeight (80), |
| | | Width = Application.GetMinRealAverage (131), |
| | | Height = Application.GetMinRealAverage (80), |
| | | UnSelectedImagePath = MainPage.WiFiStatus, |
| | | }; |
| | | |
| | | #region ---Bottom Button---- |
| | | public static Button btnFavorite = new Button () { |
| | | Width = Application.GetRealWidth (160), |
| | | Height = MainPage.GetDesignHeight (90), |
| | | TextID = R.MyInternationalizationString.Favorite, |
| | | TextColor = SkinStyle.Current.TextColor1, |
| | | SelectedTextColor = SkinStyle.Current.SelectedColor, |
| | |
| | | public static Button btnDevice = new Button () { |
| | | X = Application.GetRealWidth (160), |
| | | Width = Application.GetRealWidth (160), |
| | | Height = MainPage.GetDesignHeight (90), |
| | | TextID = R.MyInternationalizationString.Category, |
| | | SelectedTextColor = SkinStyle.Current.SelectedColor, |
| | | TextColor = SkinStyle.Current.TextColor1, |
| | |
| | | public static Button btnRoom = new Button () { |
| | | X = Application.GetRealWidth (160 * 2), |
| | | Width = Application.GetRealWidth (160), |
| | | Height = MainPage.GetDesignHeight (90), |
| | | TextID = R.MyInternationalizationString.Rooms, |
| | | SelectedTextColor = SkinStyle.Current.SelectedColor, |
| | | TextColor = SkinStyle.Current.TextColor1, |
| | |
| | | public static Button btnSetting = new Button () { |
| | | X = Application.GetRealWidth (160 * 3), |
| | | Width = Application.GetRealWidth (160), |
| | | Height = MainPage.GetDesignHeight (90), |
| | | TextID = R.MyInternationalizationString.Setting, |
| | | SelectedTextColor = SkinStyle.Current.SelectedColor, |
| | | TextColor = SkinStyle.Current.TextColor1, |
| | |
| | | //2020-01-14 登录成功后,刷新一次当前住宅网关 |
| | | GetNowHomeGatewayAfterLoginSuccess (); |
| | | } else if (!string.IsNullOrEmpty (revertObj.StateCode)) { |
| | | MainPage.LoginUser.LastTime = DateTime.Now.AddDays (-30); |
| | | MainPage.LoginUser.SaveUserInfo (); |
| | | new AccountLogin ().Show (); |
| | | if (revertObj.StateCode != ErrorCode.NetworkError && revertObj.StateCode != "Data Exception") { |
| | | MainPage.LoginUser.LastTime = DateTime.Now.AddDays (-30); |
| | | MainPage.LoginUser.SaveUserInfo (); |
| | | new AccountLogin ().Show (); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | |
| | | //IO.FileUtils.SaveEquipmentMessage (mCurtainModel1, mCurtainModel1.LoopID.ToString ()); |
| | | ////var mCurtainModel2 = new CurtainModel () { LoopID = 2, DeviceID = 9, SubnetID = 42, Name = "窗帘2" }; |
| | | ////IO.FileUtils.SaveEquipmentMessage (mCurtainModel2, mCurtainModel2.LoopID.ToString ()); |
| | | ////var mCurtainModel3 = new CurtainModel () { LoopID = 1, DeviceID = 2, SubnetID = 42, Name = "窗帘3" }; |
| | | ////IO.FileUtils.SaveEquipmentMessage (mCurtainModel3, mCurtainModel3.LoopID.ToString ()); |
| | | //var mCurtainModel3 = new CurtainModel () { LoopID = 1, DeviceID = 2, SubnetID = 42, Name = "窗帘3" }; |
| | | //IO.FileUtils.SaveEquipmentMessage (mCurtainModel3, mCurtainModel3.LoopID.ToString ()); |
| | | |
| | | //var mCurtainRoller = new CurtainRoller () { LoopID = 1, DeviceID = 88, SubnetID = 42, Name = "窗帘CurtainRoller" }; |
| | | //IO.FileUtils.SaveEquipmentMessage (mCurtainRoller, mCurtainRoller.LoopID.ToString ()); |
| | |
| | | //IO.FileUtils.SaveEquipmentMessage (mCurtainTrietex, mCurtainTrietex.LoopID.ToString ()); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //var s1 = new LightEnergySocket () { LoopID = 1, DeviceID = 1, SubnetID = 44, Name = "EnergySocket" }; |
| | | //IO.FileUtils.SaveEquipmentMessage (s1, s1.LoopID.ToString ()); |
| | |
| | | //IO.FileUtils.SaveEquipmentMessage (ud3, "3"); |
| | | #endif |
| | | UserHomePage.FrameLayoutMain.AddChidren (UserPageView); |
| | | //UserHomePage.FrameLayoutMain.AddChidren (LinkStatusTip); |
| | | UserHomePage.FrameLayoutMain.AddChidren (LinkStatusTip); |
| | | |
| | | UserPageView.AddChidren (FavoritePageView); |
| | | FavoritePageView.AddChidren (FavoriteBodyView); |