46个文件已添加
5个文件已删除
52个文件已修改
3 文件已重命名
| | |
| | | void init() |
| | | { |
| | | //ææºåç§° Android.OS.Build.Manufacturer; |
| | | OnAppConfig.Instance.PhoneName = Android.OS.Build.Manufacturer; |
| | | } |
| | | void checkSomeInfo() |
| | | { |
| | |
| | | 14=Register |
| | | 42=Network anomaly |
| | | |
| | | 10001=Failed to request the server, please try again later! |
| | | 10002=System maintenance, please try again later! |
| | | 10003=Login failed, please add a home first! |
| | | 10004=Account already exists |
| | | |
| | | |
| | | [Chinese] |
| | | 1=ç»å½ |
| | | 2=ææºå·ç»å½ |
| | |
| | | 285=ç»å®ææºå· |
| | | 286=ç»å®ææºæå |
| | | 287=ç»å®ææºå¤±è´¥ |
| | | 288=ææºå·ä¿®æ¹ |
| | | 289=è§£ç»ææºå· |
| | | 288=ä¿®æ¹ç»å®ææº |
| | | 289=è§£é¤ææºç»å® |
| | | 290=读åå岿°æ®å¤±è´¥ |
| | | 291=ææ å·²æ¶èçåºæ¯ |
| | | 292=å
³äºON |
| | |
| | | 355=å
³äº |
| | | 356=çæ¬å· |
| | | 357=æ¤åè½ææªå¼æ¾ï¼ |
| | | 358=çµè¯: |
| | | 359=é®ç®±: |
| | | 360=颿¿åºæ¯ |
| | | 361=æªæ·»å |
| | | 362=å
¨é |
| | | |
| | | 5000=é³ä¹ |
| | | 5001=ç»å |
| | |
| | | 5046=è°èé³é |
| | | 5047=ä½ ææºææªå®è£
"QQé³ä¹"{\r\n}请å徿æºååºå®è£
|
| | | |
| | | 9000=è¯·ä½¿ç¨æ°çææºè´¦å·ç»å½APP |
| | | 9001=è¯·ä½¿ç¨æ°çé®ç®±è´¦å·ç»å½APP |
| | | 9002=ç»å½ææºä¿®æ¹å®æ |
| | | 9003=ç»å½ææºç»å®å®æ |
| | | 9004=ç»å½é®ç®±ä¿®æ¹å®æ |
| | | 9005=ç»å½é®ç®±ç»å®å®æ |
| | | 9006=éªè¯ç å¯è½ä¼å»¶è¿ï¼è¯·åçä¸ä¼ |
| | | 9007=åçä¸ä¼ |
| | | 9008=è¿å |
| | | 9009=䏿¿æéé²å§åçç¨æ· |
| | | 9010=æ°å¯ç |
| | | 9011=忬¡è¾å
¥æ°å¯ç |
| | | 9012=åæ |
| | | 9013=ç¨æ·åè®® |
| | | 9014=éç§æ¿ç |
| | | 9015=å |
| | | 9016=请å
é
读并åæãç¨æ·åè®®ãåãéç§æ¿çã |
| | | 9017=确认éåºç»å½ï¼ |
| | | 9018=è¯·éæ©å½å®¶/åºå |
| | | 9019=ç«å³æ´æ° |
| | | 9020=以åå说 |
| | | 9021=å½å®¶/å°åº |
| | | 9022=æå¡å¨ä¿¡æ¯ |
| | | 9023=å½åè´¦å·æå¡å¨æå±ï¼ |
| | | 9024=*æå¡å¨æ¯æ¨å½åäºç«¯æ°æ®åå¨çæå¨åºå,æ éå¿
è¦,æä»¬ä¸å»ºè®®åçè¿ç§» |
| | | 9025=è¥éè¦è¿ç§»æå¡å¨,è¯·æ¨æ |
| | | 9026=åè½ä»ç» |
| | | 9027=æè¯ |
| | | 9028=çæ¬æ´æ° |
| | | 9029=(æ é¢è¯·å¸¦æè¯åæ ·ï¼æä»¬ä¼ä¼å
å¤ç) |
| | | 9030=å¤å¶æå |
| | | 9031=空空å¦ä¹ |
| | | 9032=åç°æ°çæ¬ |
| | | 9033=å·²ç»æ¯ææ°çæ¬ |
| | | 9034=æä»¬è½ä¸ºä½ æä¾ä»ä¹å¸®å©ï¼ |
| | | 9035=åè½é®é¢ |
| | | 9036=åºæ¯é®é¢ |
| | | 9037=APP使ç¨è¾
å© |
| | | 9038=常è§é®é¢ |
| | | |
| | | |
| | | |
| | | 10000=æ æç»å½å¯é¥ï¼è¯·éæ°ç»å½ï¼ |
| | | 10001=è¯·æ±æå¡å¨å¤±è´¥ï¼è¯·ç¨ååè¯ï¼ |
| | | 10002=ç³»ç»ç»´æ¤ä¸,请ç¨ååè¯! |
| | | 10003=ç»å½å¤±è´¥ï¼è¯·å
æ·»å ä½å®
ï¼ |
| | | 10004=è´¦å·å·²åå¨ |
| | | 10005=éªè¯ç åéé¢ç¹ï¼è¯·ç¨ååè¯ï¼ |
| | | 10006=ç¾åé误 |
| | |
| | | <DebugType>portable</DebugType> |
| | | <Optimize>False</Optimize> |
| | | <OutputPath>bin\Debug\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <DefineConstants>DEBUG;TRACE;__Android__</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | <EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk> |
| | |
| | | <DebugType>portable</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\Release\</OutputPath> |
| | | <DefineConstants>TRACE</DefineConstants> |
| | | <DefineConstants>TRACE;__Android__;</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | <AndroidManagedSymbols>true</AndroidManagedSymbols> |
| | |
| | | <AndroidAsset Include="Assets\Phone\OnIcon.png" /> |
| | | <AndroidAsset Include="Assets\Phone\TipNot.png" /> |
| | | <AndroidAsset Include="Assets\Phone\DeviceIcon\VoicePanelIcon.png" /> |
| | | <AndroidAsset Include="Assets\Phone\Public\Dialog\DialogTipTitleIcon_3.png" /> |
| | | <AndroidAsset Include="Assets\Phone\Public\Dialog\DialogTipTitleIcon_2.png" /> |
| | | <AndroidAsset Include="Assets\Phone\Public\Dialog\DialogTipTitleIcon_1.png" /> |
| | | <AndroidAsset Include="Assets\Phone\LoginIcon\Server.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\ServerInfo.png" /> |
| | | <AndroidAsset Include="Assets\Phone\Public\Search.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\Support\Function.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\Support\Search.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\Support\Menu.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\Support\Help.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\Support\Telephone.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\Support\SendMessage.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\Support\Scene.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\Support\Close.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\Head.png" /> |
| | | <AndroidAsset Include="Assets\Phone\PersonalCenter\Transfer.png" /> |
| | | </ItemGroup> |
| | | <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" /> |
| | | <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> |
| | |
| | | string userPhoneName = UIDevice.CurrentDevice.Name; |
| | | |
| | | OnAppConfig.Instance.PushDeviceToken = DeviceToken; |
| | | //UserConfig.Instance.phoneName = userPhoneName; |
| | | //UserConfig.Instance.SaveUserConfig(); |
| | | OnAppConfig.Instance.PhoneName = userPhoneName; |
| | | OnAppConfig.Instance.SaveUserConfig(); |
| | | } |
| | | if (OnAppConfig.Instance.PushDeviceToken != DeviceToken) |
| | | { |
| | | string userPhoneName = UIDevice.CurrentDevice.Name; |
| | | OnAppConfig.Instance.PushDeviceToken = DeviceToken; |
| | | //UserConfig.Instance.phoneName = userPhoneName; |
| | | //UserConfig.Instance.SaveUserConfig(); |
| | | OnAppConfig.Instance.PhoneName = userPhoneName; |
| | | OnAppConfig.Instance.SaveUserConfig(); |
| | | } |
| | | } |
| | | |
| | |
| | | //NSString* nsCount = [[NSLocale currentLocale] objectForKey: NSLocaleCountryCode]; |
| | | application.StatusBarStyle = UIStatusBarStyle.DarkContent; |
| | | |
| | | string nsCount = NSLocale.CurrentLocale.CountryCode; |
| | | //string nsCount = NSLocale.CurrentLocale.CountryCode; |
| | | |
| | | if ( UserInfo.Current != null && nsCount != UserInfo.Current.areaCode.ToString()) |
| | | { |
| | | //int.TryParse(nsCount,out UserInfo.Current.areaCode); |
| | | //2020-11-18 |
| | | UserInfo.Current.areaCode = nsCount; |
| | | OnAppConfig.Instance.SaveUserConfig(); |
| | | } |
| | | //if ( UserInfo.Current != null && nsCount != UserInfo.Current.areaCode.ToString()) |
| | | //{ |
| | | // //int.TryParse(nsCount,out UserInfo.Current.areaCode); |
| | | // //2020-11-18 |
| | | // UserInfo.Current.areaCode = nsCount; |
| | | // OnAppConfig.Instance.SaveUserConfig(); |
| | | //} |
| | | application.IdleTimerDisabled = true; |
| | | application.RegisterForRemoteNotificationTypes(UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound); |
| | | |
| | |
| | | <BundleResource Include="Resources\Phone\OnIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\TipNot.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\DeviceIcon\VoicePanelIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\Public\Dialog\DialogTipTitleIcon_3.png" /> |
| | | <BundleResource Include="Resources\Phone\Public\Dialog\DialogTipTitleIcon_2.png" /> |
| | | <BundleResource Include="Resources\Phone\Public\Dialog\DialogTipTitleIcon_1.png" /> |
| | | <BundleResource Include="Resources\Phone\LoginIcon\Server.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\ServerInfo.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\Support\Function.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\Support\Search.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\Support\Menu.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\Support\Help.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\Support\Telephone.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\Support\SendMessage.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\Support\Scene.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\Support\Close.png" /> |
| | | <BundleResource Include="Resources\Phone\Public\Search.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\Head.png" /> |
| | | <BundleResource Include="Resources\Phone\PersonalCenter\Transfer.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ITunesArtwork Include="iTunesArtwork" /> |
| | |
| | | 9015=å |
| | | 9016=请å
é
读并åæãç¨æ·åè®®ãåãéç§æ¿çã |
| | | 9017=确认éåºç»å½ï¼ |
| | | 9018=éæ©å½å®¶æåºå |
| | | 9019=æ´æ° |
| | | 9020=å¿½ç¥ |
| | | 9021=æçäºç»´ç |
| | | 9018=è¯·éæ©å½å®¶/åºå |
| | | 9019=ç«å³æ´æ° |
| | | 9020=以åå说 |
| | | 9021=å½å®¶/å°åº |
| | | 9022=æå¡å¨ä¿¡æ¯ |
| | | 9023=å½åè´¦å·æå¡å¨æå±ï¼ |
| | | 9024=*æå¡å¨æ¯æ¨å½åäºç«¯æ°æ®åå¨çæå¨åºå,æ éå¿
è¦,æä»¬ä¸å»ºè®®åçè¿ç§» |
| | | 9025=è¥éè¦è¿ç§»æå¡å¨,è¯·æ¨æ |
| | | 9026=åè½ä»ç» |
| | | 9027=æè¯ |
| | | 9028=çæ¬æ´æ° |
| | | 9029=(æ é¢è¯·å¸¦æè¯åæ ·ï¼æä»¬ä¼ä¼å
å¤ç) |
| | | 9030=å¤å¶æå |
| | | 9031=空空å¦ä¹ |
| | | 9032=åç°æ°çæ¬ |
| | | 9033=å·²ç»æ¯ææ°çæ¬ |
| | | 9034=æä»¬è½ä¸ºä½ æä¾ä»ä¹å¸®å©ï¼ |
| | | 9035=åè½é®é¢ |
| | | 9036=åºæ¯é®é¢ |
| | | 9037=APP使ç¨è¾
å© |
| | | 9038=常è§é®é¢ |
| | | |
| | | |
| | | |
| | | 10000=æ æç»å½å¯é¥ï¼è¯·éæ°ç»å½ï¼ |
| | |
| | | /// <summary> |
| | | /// ç¨æ·åè®® |
| | | /// </summary> |
| | | public const string URL_UserAgreement = "https://developer.hdlcontrol.com/HDLOnPlusUserAgreement.html"; |
| | | public const string URL_USERAGREEMENT = "https://developer.hdlcontrol.com/HDLOnPlusUserAgreement.html"; |
| | | /// <summary> |
| | | /// éç§æ¿ç |
| | | /// </summary> |
| | | public const string URL_PrivacyPolicy = "https://developer.hdlcontrol.com/HDLOnPlusPrivacyPolicy.html"; |
| | | public const string URL_PRIVACYPOLICY = "https://developer.hdlcontrol.com/HDLOnPlusPrivacyPolicy.html"; |
| | | /// <summary> |
| | | /// ææ¯æ¯æçµè¯å·ç |
| | | /// </summary> |
| | | public const string SUPPORT_TELEPHONENUMBER = "4008558535"; |
| | | /// <summary> |
| | | /// ææ¯æ¯æé®ç®±å°å |
| | | /// </summary> |
| | | public const string SUPPORT_EMAIL = "hdltickets@hdlautomation.com"; |
| | | /// <summary> |
| | | /// è¹æååºå°å |
| | | /// </summary> |
| | | public const string URL_APPSTORE = "https://apps.apple.com/cn/app/on/id1532353432"; |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region â å
¨å±æä¸¾ ____________________________ |
| | | /// <summary> |
| | | /// 客æ·ç«¯ç±»å å¦HdlOnãEvoyoHomeãè°è¯å® |
| | | /// </summary> |
| | | public enum APIClientType |
| | | { |
| | | HDL_ON, |
| | | EvoyoHome, |
| | | è°è¯å®, |
| | | HDL_ON_PRO |
| | | } |
| | | ///// <summary> |
| | | ///// 客æ·ç«¯ç±»å å¦HdlOnãEvoyoHomeãè°è¯å® |
| | | ///// </summary> |
| | | //public enum APIClientType |
| | | //{ |
| | | // HDL_ON, |
| | | // EvoyoHome, |
| | | // è°è¯å®, |
| | | // HDL_ON_PRO |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// å¤ä»½ç±»å |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public enum PhoneDeviceType |
| | | { |
| | | /// <summary> |
| | | /// Android |
| | | /// </summary> |
| | | Android = 0, |
| | | /// <summary> |
| | | /// IOS |
| | | /// </summary> |
| | | IOS = 1, |
| | | /// <summary> |
| | | /// WinPhone |
| | | /// </summary> |
| | | WinPhone, |
| | | } |
| | | |
| | | /// <summary> |
| | | /// APP ç±»å |
| | | /// </summary> |
| | | public enum SoftwareType |
| | | { |
| | | /// <summary> |
| | | /// EvoyoãONãON_Plus |
| | | /// </summary> |
| | | Evoyo = 0, |
| | | /// <summary> |
| | | /// IOS |
| | | /// </summary> |
| | | ON = 1, |
| | | /// <summary> |
| | | /// WinPhone |
| | | /// </summary> |
| | | ON_Plus, |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | |
| | | using HDL_ON; |
| | | using HDL_ON.UI.CSS; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.UI; |
| | | |
| | | namespace HDL_ON |
| | | { |
| | |
| | | /// </summary> |
| | | public void CheckIfNeedForceUpdate() |
| | | { |
| | | // //return; |
| | | System.Threading.Tasks.Task.Run(() => |
| | | { |
| | | try |
| | | { |
| | | var requestObj = new ForceUpdateObj() |
| | | { |
| | | |
| | | |
| | | LanguageType = Utlis.GetPostLanguageType() |
| | | }; |
| | | #if Android |
| | | requestObj.DeviceType = 1; |
| | | #if __IOS__ |
| | | requestObj.DeviceType = PhoneDeviceType.IOS.ToString(); |
| | | #endif |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj); |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_CheckAppVersion, requestJson); |
| | |
| | | |
| | | }); |
| | | |
| | | |
| | | //ForceUpdateInfo mForceUpdateInfo = new ForceUpdateInfo () { |
| | | // IsNeedForceUpdate = true, |
| | | // AndroidUrl = "https://shouji.baidu.com/software/26667787.html", |
| | | // AndroidUrl_En = "https://shouji.baidu.com/software/26667787.html", |
| | | // IosUrl = "https://apps.apple.com/cn/app/hdl-on/id1029839624", |
| | | // ReasonStr = "1.åç°æ°çæ¬App,å½åçæ¬å·²åç¨,马䏿´æ°!\n2.请ä¸è½½åå®è£
æ°çæ¬!", |
| | | // ReasonStr_En = "1. Discover the new version of the App, the current version is disabled, update now! \n2. Please download and install the new version!" |
| | | //}; |
| | | |
| | | //ShowForceUpdateDialog (mForceUpdateInfo); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public void ShowForceUpdateDialog(ForceUpdateInfo mForceUpdateInfo) |
| | | { |
| | | |
| | | //if (!mForceUpdateInfo.IsNeedForceUpdate) return; |
| | | |
| | | // 1.1 æ²¡ææ´æ° è¿å |
| | | if (mForceUpdateInfo.UpdateType == 0) return; |
| | | |
| | | // 1.2 ææ°çæ¬ä½æ¯å¿½ç¥è¿ è¿å |
| | | if (mForceUpdateInfo.UpdateType == 1 && (UserInfo.Current.IgnoreUpdateVersion == mForceUpdateInfo.NewVersion)) return; |
| | | |
| | | Dialog dialog = new Dialog(); |
| | | |
| | | FrameLayout dialogBodyView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.Center, |
| | | Width = Application.GetRealWidth(500), |
| | | Height = Application.GetRealHeight(500), |
| | | BackgroundColor = 0xFF000000, |
| | | Radius = (uint)Application.GetRealWidth(10), |
| | | //BorderColor = SkinStyle.Current.Transparent, |
| | | BorderWidth = 0, |
| | | }; |
| | | dialog.AddChidren(dialogBodyView); |
| | | |
| | | Button btnTitle = new Button() |
| | | { |
| | | Height = Application.GetRealHeight(80), |
| | | BackgroundColor = 0x00000000, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextID = StringId.Tip, |
| | | TextColor = 0xFFFFFFFF |
| | | }; |
| | | dialogBodyView.AddChidren(btnTitle); |
| | | |
| | | |
| | | FrameLayout centerView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(80), |
| | | Height = Application.GetRealHeight(340), |
| | | BackgroundColor = 0xFFFFFFFF, |
| | | }; |
| | | dialogBodyView.AddChidren(centerView); |
| | | |
| | | Button btnMessage = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(20), |
| | | Width = Application.GetRealWidth(400), |
| | | //Height = Application.GetRealHeight (300), |
| | | //Text = mForceUpdateInfo.ReasonStr, |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | //TextColor = SkinStyle.Current.TextColor, |
| | | IsMoreLines = true |
| | | }; |
| | | centerView.AddChidren(btnMessage); |
| | | |
| | | |
| | | FrameLayout bottomView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(420), |
| | | Height = Application.GetRealHeight(80), |
| | | BackgroundColor = 0xFFFFFFFF, |
| | | |
| | | }; |
| | | dialogBodyView.AddChidren(bottomView); |
| | | |
| | | var mAndroidUrl = mForceUpdateInfo.AndroidUrl; |
| | | if (Language.CurrentLanguage == "Chinese") |
| | | { |
| | | btnMessage.Text = mForceUpdateInfo.ReasonStr; |
| | | |
| | | } |
| | | else |
| | | { |
| | | btnMessage.Text = mForceUpdateInfo.ReasonStr_En; |
| | | mAndroidUrl = mForceUpdateInfo.AndroidUrl_En; |
| | | } |
| | | |
| | | |
| | | // 2.1 ææ°çæ¬æ²¡æå¿½ç¥è¿ æç¤ºæ´æ° |
| | | if (mForceUpdateInfo.UpdateType == 1) |
| | | { |
| | | #region æç¤ºæ´æ° |
| | | Button btnNext = new Button() |
| | | Action okAction = () => |
| | | { |
| | | Width = Application.GetRealWidth(249), |
| | | TextID = StringId.Ignore, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = 0xFFFFFFFF, |
| | | BackgroundColor = 0xFF000000, |
| | | //Text = "忽ç¥" |
| | | }; |
| | | bottomView.AddChidren(btnNext); |
| | | btnNext.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | //UserConfig.Instance.IfIgnoreUpdate = true; |
| | | UserInfo.Current.IgnoreUpdateVersion = mForceUpdateInfo.NewVersion; |
| | | UserInfo.Current.SaveUserInfo(); |
| | | dialog.Close(); |
| | | if (string.IsNullOrEmpty(mForceUpdateInfo.NewVersionUrl)) return; |
| | | |
| | | HDLUtils.OpenUrl(mForceUpdateInfo.NewVersionUrl); |
| | | }; |
| | | |
| | | Button btnSave = new Button() |
| | | Action cancelAction = () => |
| | | { |
| | | X = btnNext.Right + 1, |
| | | Width = Application.GetRealWidth(250), |
| | | TextID = StringId.Update, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = 0xFFFFFFFF, |
| | | BackgroundColor = 0xFF000000, |
| | | //Text = "æ´æ°" |
| | | }; |
| | | bottomView.AddChidren(btnSave); |
| | | |
| | | btnSave.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | dialog.Close(); |
| | | try |
| | | { |
| | | |
| | | #if __IOS__ |
| | | HDLUtils.OpenUrl(mForceUpdateInfo.IosUrl); |
| | | //UIApplication.SharedApplication.OpenUrl (new Foundation.NSUrl ("https://apps.apple.com/cn/app/hdl-on/id1029839624")); |
| | | |
| | | #elif Android |
| | | HDLUtils.OpenUrl(mAndroidUrl); |
| | | SharedMethod.SharedMethod.OpenUrl (mAndroidUrl); |
| | | //SharedMethod.SharedMethod.OpenUrl ("https://shouji.baidu.com/software/26667787.html"); |
| | | |
| | | #endif |
| | | } |
| | | catch |
| | | { |
| | | //跳转ä¸è½½å°å失败 |
| | | Utlis.WriteLine("open url error"); |
| | | } |
| | | //UserInfo.Current.IgnoreUpdateVersion = mForceUpdateInfo.NewVersion; |
| | | //UserInfo.Current.SaveUserInfo(); |
| | | }; |
| | | |
| | | #endregion |
| | | //1æç¤ºæ´æ° |
| | | var dialog = new UpdateTipDialog(); |
| | | var tipStr = Language.StringByID(StringId.VersionNumber) + mForceUpdateInfo.NewVersion; |
| | | dialog.ShowUpdateDialog(Language.StringByID(StringId.DiscoverNewVersion), tipStr, mForceUpdateInfo.ReasonStr, okAction, cancelAction); |
| | | |
| | | } |
| | | else if (mForceUpdateInfo.UpdateType == 2) |
| | | else if (mForceUpdateInfo.UpdateType == 2) //2.2 éè¦å¼ºå¶æ´æ° |
| | | { |
| | | #region å¼ºå¶æ´æ° |
| | | Button btnSave = new Button() |
| | | //2å¼ºå¶æ´æ° |
| | | //"1.åç°æ°çæ¬App,å½åçæ¬å·²åç¨,马䏿´æ°!\n2.请ä¸è½½åå®è£
æ°çæ¬!....." |
| | | Action okAction = () => |
| | | { |
| | | Width = Application.GetRealWidth(500), |
| | | TextID = StringId.Confirm, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = 0xFFFFFFFF, |
| | | BackgroundColor = 0xFF000000, |
| | | if (string.IsNullOrEmpty(mForceUpdateInfo.NewVersionUrl)) { |
| | | Utlis.ShowTip(Language.StringByID(StringId.DataExceptionPleaseTryAgain)); |
| | | return; |
| | | }; |
| | | |
| | | HDLUtils.OpenUrl(mForceUpdateInfo.NewVersionUrl); |
| | | }; |
| | | bottomView.AddChidren(btnSave); |
| | | |
| | | //var mAndroidUrl = mForceUpdateInfo.AndroidUrl; |
| | | //if (Language.CurrentLanguage == "Chinese") { |
| | | // btnMessage.Text = mForceUpdateInfo.ReasonStr; |
| | | |
| | | //} else { |
| | | // btnMessage.Text = mForceUpdateInfo.ReasonStr_En; |
| | | // mAndroidUrl = mForceUpdateInfo.AndroidUrl_En; |
| | | //} |
| | | |
| | | btnSave.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | try |
| | | { |
| | | |
| | | #if __IOS__ |
| | | HDLUtils.OpenUrl(mForceUpdateInfo.IosUrl); |
| | | //UIApplication.SharedApplication.OpenUrl (new Foundation.NSUrl ("https://apps.apple.com/cn/app/hdl-on/id1029839624")); |
| | | |
| | | #elif Android |
| | | HDLUtils.OpenUrl(mAndroidUrl); |
| | | //SharedMethod.SharedMethod.OpenUrl ("https://shouji.baidu.com/software/26667787.html"); |
| | | |
| | | #endif |
| | | } |
| | | catch |
| | | { |
| | | //跳转ä¸è½½å°å失败 |
| | | Utlis.WriteLine("open url error"); |
| | | } |
| | | }; |
| | | #endregion |
| | | |
| | | //1æç¤ºæ´æ° |
| | | var dialog = new UpdateTipDialog(); |
| | | var tipStr = Language.StringByID(StringId.VersionNumber) + mForceUpdateInfo.NewVersion; |
| | | dialog.ShowForcedUpdateDialog(Language.StringByID(StringId.DiscoverNewVersion), tipStr, mForceUpdateInfo.ReasonStr, okAction); |
| | | } |
| | | else |
| | | else //3. åªéæç¤º |
| | | { |
| | | #region æç¤ºéç¥ |
| | | Button btnSave = new Button() |
| | | //3æç¤ºéç¥ |
| | | Action okAction = () => |
| | | { |
| | | Width = Application.GetRealWidth(500), |
| | | TextID = StringId.Close, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = 0xFFFFFFFF, |
| | | BackgroundColor = 0xFF000000, |
| | | |
| | | }; |
| | | bottomView.AddChidren(btnSave); |
| | | |
| | | btnSave.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | #endregion |
| | | var dialog = new UpdateTipDialog(); |
| | | dialog.ShowTipDialog(Language.StringByID(StringId.Tip), mForceUpdateInfo.ReasonStr, okAction); |
| | | } |
| | | dialog.Show(); |
| | | |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | public const int IfConfirmLogout = 9017; |
| | | /// <summary> |
| | | /// éæ©å½å®¶æåºå |
| | | /// è¯·éæ©å½å®¶/åºå |
| | | /// </summary> |
| | | public const int SelectCountryOrRegion = 9018; |
| | | public const int PleaseSelectCountryOrRegion = 9018; |
| | | /// <summary> |
| | | /// æ´æ° |
| | | /// ç«å³æ´æ° |
| | | /// </summary> |
| | | public const int Update = 9019; |
| | | /// <summary> |
| | | /// å¿½ç¥ |
| | | /// 以åå说 |
| | | /// </summary> |
| | | public const int Ignore = 9020; |
| | | /// <summary> |
| | | /// æçäºç»´ç |
| | | /// å½å®¶/å°åº |
| | | /// </summary> |
| | | public const int MyQRCode = 9021; |
| | | |
| | | public const int CountryOrRegion = 9021; |
| | | /// <summary> |
| | | /// æå¡å¨ä¿¡æ¯ |
| | | /// </summary> |
| | | public const int ServerInformation = 9022; |
| | | /// <summary> |
| | | /// å½åè´¦å·æå¡å¨æå±ï¼ |
| | | /// </summary> |
| | | public const int CurrentAccountServerOwnership = 9023; |
| | | /// <summary> |
| | | /// *æå¡å¨æ¯æ¨å½åäºç«¯æ°æ®åå¨çæå¨åºåï¼æ éå¿
è¦ï¼æä»¬ä¸å»ºè®®åçè¿ç§» |
| | | /// </summary> |
| | | public const int CurrentAccountServerOwnershipTip = 9024; |
| | | /// <summary> |
| | | /// è¥éè¦è¿ç§»æå¡å¨ï¼è¯·æ¨æ |
| | | /// </summary> |
| | | public const int ToMigrateTheServerPleaseCall = 9025; |
| | | /// <summary> |
| | | /// åè½ä»ç» |
| | | /// </summary> |
| | | public const int FunctionIntroduced = 9026; |
| | | /// <summary> |
| | | /// æè¯ |
| | | /// </summary> |
| | | public const int Complaints = 9027; |
| | | /// <summary> |
| | | /// çæ¬æ´æ° |
| | | /// </summary> |
| | | public const int VersionUpdate = 9028; |
| | | /// <summary> |
| | | /// (æ é¢è¯·å¸¦æè¯åæ ·ï¼æä»¬ä¼ä¼å
å¤ç) |
| | | /// </summary> |
| | | public const int WillGivePriorityToTheTreatmen = 9029; |
| | | /// <summary> |
| | | /// å¤å¶æå |
| | | /// </summary> |
| | | public const int CopySuccess = 9030; |
| | | /// <summary> |
| | | /// 空空å¦ä¹ |
| | | /// </summary> |
| | | public const int ContentIsEmpty = 9031; |
| | | /// <summary> |
| | | /// åç°æ°çæ¬ |
| | | /// </summary> |
| | | public const int DiscoverNewVersion = 9032; |
| | | /// <summary> |
| | | /// å·²ç»æ¯ææ°çæ¬ |
| | | /// </summary> |
| | | public const int IsLatestVersion = 9033; |
| | | /// <summary> |
| | | /// æä»¬è½ä¸ºä½ æä¾ä»ä¹å¸®å©ï¼ |
| | | /// </summary> |
| | | public const int WhatCanWeDoForYou = 9034; |
| | | /// <summary> |
| | | /// åè½é®é¢ |
| | | /// </summary> |
| | | public const int FunctionalQuestion = 9035; |
| | | /// <summary> |
| | | /// åºæ¯é®é¢ |
| | | /// </summary> |
| | | public const int SceneQuestion = 9036; |
| | | /// <summary> |
| | | /// APP使ç¨è¾
å© |
| | | /// </summary> |
| | | public const int AppUsageAssistance = 9037; |
| | | /// <summary> |
| | | /// 常è§é®é¢ |
| | | /// </summary> |
| | | public const int CommonQuestion = 9038; |
| | | |
| | | |
| | | #region ç½ç»è¯·æ±ååºé误æç¤ºä¿¡æ¯ |
| | | /// <summary> |
| | |
| | | using System; |
| | | using Shared; |
| | | using System.Text.RegularExpressions; |
| | | using System.Text; |
| | | |
| | | namespace HDL_ON |
| | | { |
| | |
| | | #endif |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// çæéæºå符串 |
| | | /// </summary> |
| | | /// <param name="length">å符串çé¿åº¦</param> |
| | | /// <returns></returns> |
| | | public static string CreateRandomString(int length) |
| | | { |
| | | // å建ä¸ä¸ªStringBuilder对象åå¨å¯ç |
| | | StringBuilder sb = new StringBuilder(); |
| | | //使ç¨forå¾ªç¯æå个å符填å
è¿StringBuilder对象éé¢åæ14ä½å¯ç å符串 |
| | | for (int i = 0; i < length; i++) |
| | | { |
| | | Random random = new Random(Guid.NewGuid().GetHashCode()); |
| | | //éæºéæ©éé¢å
¶ä¸çä¸ç§åç¬¦çæ |
| | | switch (random.Next(3)) |
| | | { |
| | | case 0: |
| | | //è°ç¨çæçæéæºæ°åçæ¹æ³ |
| | | sb.Append(createNum()); |
| | | break; |
| | | case 1: |
| | | //è°ç¨çæçæéæºå°ååæ¯çæ¹æ³ |
| | | sb.Append(createSmallAbc()); |
| | | break; |
| | | case 2: |
| | | //è°ç¨çæçæéæºå¤§ååæ¯çæ¹æ³ |
| | | sb.Append(createBigAbc()); |
| | | break; |
| | | } |
| | | } |
| | | return sb.ToString(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// çæåä¸ªéæºæ°å |
| | | /// </summary> |
| | | static int createNum() |
| | | { |
| | | Random random = new Random(Guid.NewGuid().GetHashCode()); |
| | | int num = random.Next(10); |
| | | return num; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// çæå个大åéæºåæ¯ |
| | | /// </summary> |
| | | static string createBigAbc() |
| | | { |
| | | //A-Zç ASCIIå¼ä¸º65-90 |
| | | Random random = new Random(Guid.NewGuid().GetHashCode()); |
| | | int num = random.Next(65, 91); |
| | | string abc = Convert.ToChar(num).ToString(); |
| | | return abc; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// çæå个å°åéæºåæ¯ |
| | | /// </summary> |
| | | static string createSmallAbc() |
| | | { |
| | | //a-zç ASCIIå¼ä¸º97-122 |
| | | Random random = new Random(Guid.NewGuid().GetHashCode()); |
| | | int num = random.Next(97, 123); |
| | | string abc = Convert.ToChar(num).ToString(); |
| | | return abc; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="unixTimeStamp"></param> |
| | | /// <returns></returns> |
| | | public static DateTime UnixToDateTime(long unixTimeStamp) |
| | | { |
| | | DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); // å½å°æ¶åº |
| | | return startTime.AddSeconds(unixTimeStamp); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="unixTimeStamp"></param> |
| | | /// <returns></returns> |
| | | public static long DateTimeToUnix(DateTime dateTime) |
| | | { |
| | | DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); // å½å°æ¶åº |
| | | return (long)(dateTime - startTime).TotalSeconds; // ç¸å·®ç§æ° |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åè¯·æ±æäº¤çè¯è¨åæ° |
| | | /// </summary> |
| | | public static string GetPostLanguageType() |
| | | { |
| | | return Language.CurrentLanguage == "Chinese" ? LanguageTypeEnum.CHINESE.ToString() : LanguageTypeEnum.ENGLISH.ToString(); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | using System;
|
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Net;
|
| | | using System.Net; |
| | | using System.Text; |
| | | using HDL_ON.DAL.Mqtt; |
| | | using HDL_ON.DAL.Net; |
| | | using HDL_ON.Entity; |
| | | using Newtonsoft.Json.Linq; |
| | | using Shared; |
| | |
| | | |
| | | } |
| | | |
| | | public string GetRequestResultMsg(string resultCode) |
| | | { |
| | | string result = ""; |
| | | switch (resultCode.ToUpper()) |
| | | { |
| | | case "USERNAMEORPWDERROR": |
| | | result = Language.StringByID(StringId.LoginFailed_AccountOrPasswordError); |
| | | break; |
| | | case "ACCOUNTNOEXISTS": |
| | | result = Language.StringByID(StringId.ACCOUNTNOEXISTS); |
| | | break; |
| | | case "SENDFAIL": |
| | | result = Language.StringByID(StringId.FailedToSendVerificationCode); |
| | | break; |
| | | case "EXIST": |
| | | result = Language.StringByID(StringId.AccountAlreadyUse); |
| | | break; |
| | | case "Self:Net_Error": |
| | | result = Language.StringByID(StringId.NetworkAnomaly); |
| | | break; |
| | | } |
| | | return result; |
| | | } |
| | | //public string GetRequestResultMsg(string resultCode) |
| | | //{ |
| | | // string result = ""; |
| | | // switch (resultCode.ToUpper()) |
| | | // { |
| | | // case "USERNAMEORPWDERROR": |
| | | // result = Language.StringByID(StringId.LoginFailed_AccountOrPasswordError); |
| | | // break; |
| | | // case "ACCOUNTNOEXISTS": |
| | | // result = Language.StringByID(StringId.ACCOUNTNOEXISTS); |
| | | // break; |
| | | // case "SENDFAIL": |
| | | // result = Language.StringByID(StringId.FailedToSendVerificationCode); |
| | | // break; |
| | | // case "EXIST": |
| | | // result = Language.StringByID(StringId.AccountAlreadyUse); |
| | | // break; |
| | | // case "Self:Net_Error": |
| | | // result = Language.StringByID(StringId.NetworkAnomaly); |
| | | // break; |
| | | // } |
| | | // return result; |
| | | //} |
| | | |
| | | #region â éç¨è¯·æ±æ¥å£_______________________ |
| | | /// <summary> |
| | |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new RefreshTokenObj() |
| | | { |
| | | refreshToken = UserInfo.Current.refreshToken, |
| | | refreshToken = UserInfo.Current.refreshToken, |
| | | }); |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_Login, requestJson); |
| | | if (revertObj.Code.ToUpper() == StateCode.SUCCESS) |
| | | { |
| | | var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<UserLoginRes>(revertObj.Data.ToString()); |
| | | |
| | | UserInfo.Current.LoginTokenString = revertData.headerPrefix + revertData.accessToken; |
| | | UserInfo.Current.LastTime = DateTime.Now; |
| | | UserInfo.Current.SaveUserInfo(); |
| | | |
| | | |
| | | UserInfo.Current.refreshToken = revertData.refreshToken; |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | |
| | | |
| | | #region 注åãç»å½é¨å |
| | | /// <summary> |
| | | /// è·åè¯·æ±æäº¤çè¯è¨åæ° |
| | | /// </summary> |
| | | public string GetPostLanguageType() |
| | | { |
| | | return Language.CurrentLanguage == "Chinese" ? LanguageTypeEnum.CHINESE.ToString() : LanguageTypeEnum.ENGLISH.ToString(); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// éç¨ åééªè¯ç æ¹æ³ |
| | |
| | | var requestObj = new VerifyCodeSendObj() |
| | | { |
| | | verifyType = (int)verifyType, |
| | | languageType = GetPostLanguageType() |
| | | languageType = Utlis.GetPostLanguageType() |
| | | }; |
| | | // æ¯å¦æ¯ææº |
| | | if (isPhone) |
| | |
| | | /// <returns></returns> |
| | | public ResponsePackNew ValidatorCode(VerifyType verifyType, string account, string code, bool isPhone, bool verifySuccessFail = true) |
| | | { |
| | | var requestObj = new VerifyCodeCheckObj() { verifyCode = code, verifyType = (int)verifyType , verifySuccessFail = verifySuccessFail }; |
| | | var requestObj = new VerifyCodeCheckObj() { verifyCode = code, verifyType = (int)verifyType, verifySuccessFail = verifySuccessFail }; |
| | | if (isPhone) |
| | | { |
| | | //ææº |
| | |
| | | if (resultObj.Code == StateCode.SUCCESS) |
| | | { |
| | | var info = Newtonsoft.Json.JsonConvert.DeserializeObject<MemberInfoRes>(resultObj.Data.ToString()); |
| | | UserInfo.Current.userEmailInfo = info.memberEmail; |
| | | UserInfo.Current.userMobileInfo = info.memberPhone; |
| | | UserInfo.Current.userName = info.memberName; |
| | | UserInfo.Current.areaCode = info.memberPhonePrefix; |
| | | UserInfo.Current.userEmailInfo = info.memberEmail; |
| | | UserInfo.Current.userMobileInfo = info.memberPhone; |
| | | UserInfo.Current.userName = info.memberName; |
| | | if (!string.IsNullOrEmpty(info.memberPhonePrefix)) |
| | | { |
| | | UserInfo.Current.areaCode = info.memberPhonePrefix; |
| | | } |
| | | //æ¯å¦éè¦è·å头å |
| | | if (bGetHeadImage) |
| | | { |
| | | var headImageBytes = DownHeadImage(); |
| | | if (headImageBytes != null) |
| | | if (headImageBytes != null && headImageBytes.Length > 0) |
| | | { |
| | | UserInfo.Current.headImagePageBytes = headImageBytes; |
| | | UserInfo.Current.headImagePageBytes = headImageBytes; |
| | | FileStream fs = null; |
| | | try |
| | | { |
| | | UserInfo.Current.headImagePageBytes = headImageBytes; |
| | | UserInfo.Current.headImagePageBytes = headImageBytes; |
| | | var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/", "headImage.png"); |
| | | fs = new FileStream(filePath, FileMode.Create, FileAccess.Write); |
| | | fs.Write(headImageBytes, 0, headImageBytes.Length); |
| | | fs.Flush(); |
| | | UserInfo.Current.headImagePagePath = filePath; |
| | | UserInfo.Current.headImagePagePath = filePath; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | UserInfo.Current.SaveUserInfo(); |
| | | UserInfo.Current.SaveUserInfo(); |
| | | MainPage.Log("è·åç¨æ·ä¿¡æ¯æåã"); |
| | | } |
| | | |
| | |
| | | /// <returns></returns> |
| | | public ResponsePackNew EditUserName(string userName) |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new UpdateMemberNameRes() { |
| | | memberName = userName |
| | | }); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.API_POST_Member_UpdateMemberInfo, requestJson); |
| | | var requestJson = HttpUtil.GetSignRequestJson(new UpdateMemberNameRes() |
| | | { |
| | | memberName = userName |
| | | }); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.API_POST_Member_UpdateMemberInfo, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <returns></returns> |
| | | public string BindAccount(string account, string code = "", bool isPhone = false) |
| | | { |
| | | var requestObj = new BindWithAccountObj() { verifyCode = code}; |
| | | var requestObj = new BindWithAccountObj() { verifyCode = code }; |
| | | if (isPhone) |
| | | { |
| | | //ææº |
| | |
| | | /// <returns></returns> |
| | | public string UnBindAccount(bool isPhone) |
| | | { |
| | | var requestObj = new UnBindAccountObj() { unBindLabel = isPhone ? "PHONE": "EMAIL" }; |
| | | var requestObj = new UnBindAccountObj() { unBindLabel = isPhone ? "PHONE" : "EMAIL" }; |
| | | var requestJson = HttpUtil.GetSignRequestJson(requestObj); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.API_POST_Member_UnbindWithAccount, requestJson).Code; |
| | | } |
| | |
| | | { |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(new GetHomeListObj() { homeType = homeType.ToString() }); |
| | | var resultObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_Gethomepager, requestJson); |
| | | if(resultObj.Code == StateCode.SUCCESS) |
| | | if (resultObj.Code == StateCode.SUCCESS) |
| | | { |
| | | var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoResNew>>(resultObj.Data.ToString()); |
| | | if (homeList == null || homeList.Count == 0) { |
| | | if (homeList == null || homeList.Count == 0) |
| | | { |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | UserInfo.Current.regionList = new List<RegionInfoRes>(); |
| | | |
| | | UserInfo.Current.regionList = new List<RegionInfoRes>(); |
| | | |
| | | foreach (var mHome in homeList) |
| | | { |
| | | var home = new RegionInfoRes() |
| | |
| | | { |
| | | continue; |
| | | } |
| | | UserInfo.Current.regionList.Add(home); |
| | | if (string.IsNullOrEmpty(DB_ResidenceData.residenceData.CurReginID)) |
| | | { |
| | | DB_ResidenceData.residenceData.CurReginID = UserInfo.Current.regionList[0].RegionID; |
| | | } |
| | | UserInfo.Current.regionList.Add(home); |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(DB_ResidenceData.residenceData.CurReginID)) |
| | | { |
| | | DB_ResidenceData.residenceData.CurReginID = UserInfo.Current.regionList[0].RegionID; |
| | | } |
| | | DB_ResidenceData.residenceData.SaveResidenceData(); |
| | | UserInfo.Current.SaveUserInfo(); |
| | | UserInfo.Current.SaveUserInfo(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | return resultObj.Code; |
| | | |
| | | //string jsonString = "{" +
|
| | | //string jsonString = "{" + |
| | | // "\"RequestVersion\":" + "\"" + MainPage.VersionString + "\"" + "," + |
| | | // "\"RequestSource\":" + "\"" + "2" + "\"" + "," + |
| | | // "\"HomeType\":" + "\"" + "1" + "\"" + "," + |
| | |
| | | homeId = DB_ResidenceData.residenceData.residecenInfo.RegionID, |
| | | }; |
| | | |
| | | if(editId == 0) |
| | | if (editId == 0) |
| | | { |
| | | requestObj.homeName = editName; |
| | | } |
| | | else if(editId == 1) |
| | | else if (editId == 1) |
| | | { |
| | | requestObj.Address = editName; |
| | | } |
| | |
| | | var mHomeGatewayRes = Newtonsoft.Json.JsonConvert.DeserializeObject<List<HomeGatewayInfo>>(revertObj.Data.ToString()); |
| | | if (nowhomeId == DB_ResidenceData.residenceData.residecenInfo.RegionID) |
| | | { |
| | | if(mHomeGatewayRes != null) |
| | | if (mHomeGatewayRes != null) |
| | | { |
| | | if (mHomeGatewayRes.Count > 0) |
| | | { |
| | |
| | | } |
| | | DB_ResidenceData.residenceData.SaveResidenceData(); |
| | | } |
| | | |
| | | |
| | | if (mHomeGatewayRes != null) |
| | | { |
| | | //Utlis.WriteLine ("è·å¾å½åä½å®
ç½å
³ä¸ªæ°ï¼" + mHomeGatewayRes.content.Count); |
| | |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetResidenceMemberAccount() |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new HomeIdObj() { homeId = DB_ResidenceData.residenceData.residecenInfo.RegionID }); |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(new HomeIdObj() { homeId = DB_ResidenceData.residenceData.residecenInfo.RegionID }); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_FindAll, requestJson); |
| | | } |
| | | |
| | |
| | | childAccountId = subaccount.childAccountId, |
| | | homeId = subaccount.homeId |
| | | }; |
| | | var requestJson = HttpUtil.GetSignRequestJson(requestObj); |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Delete, requestJson); |
| | | } |
| | | |
| | |
| | | /// <returns></returns> |
| | | public ResponsePackNew EditSubAccountNickName(string nickName, string childAccountId) |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new UpdateChildNickNameObj() |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(new UpdateChildNickNameObj() |
| | | { |
| | | homeId = DB_ResidenceData.residenceData.residecenInfo.RegionID, |
| | | childAccountId = childAccountId, |
| | |
| | | /// <returns></returns> |
| | | public ResponsePackNew ChangeCreateSceneState(bool isAllow, string childAccountId) |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new UpdateChildAllowCreateSceneObj() |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(new UpdateChildAllowCreateSceneObj() |
| | | { |
| | | homeId = DB_ResidenceData.residenceData.residecenInfo.RegionID, |
| | | childAccountId = childAccountId, |
| | |
| | | //string jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d); |
| | | //return RequestHttps($"{severAddress}/ZigbeeDataShare/GetShareDataBySubAccount", jsonString, true); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(new HomeShareFindAll() |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(new HomeShareFindAll() |
| | | { |
| | | homeId = DB_ResidenceData.residenceData.residecenInfo.RegionID, |
| | | childAccountId = childAccountId |
| | | }); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Home_Share_FindAll, requestJson); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Home_Share_FindAll, requestJson); |
| | | |
| | | } |
| | | |
| | |
| | | homeId = shareData.homeId, |
| | | homeShareId = shareData.id |
| | | }); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Home_Share_Delete, requestJson); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Home_Share_Delete, requestJson); |
| | | //Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | //d.Add("DistributedMark", shareData.DistributedMark); |
| | | //d.Add("HouseDistributedMark", shareData.HouseDistributedMark); |
| | |
| | | { |
| | | //æ·»å åè´¦å· |
| | | var requestObj = new ChildAddObj() { homeId = DB_ResidenceData.residenceData.residecenInfo.RegionID, account = subAccount, nickName = nickName }; |
| | | var requestJson = HttpUtil.GetSignRequestJson(requestObj); |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Add, requestJson); |
| | | |
| | | } |
| | |
| | | d.Add("Account", account); |
| | | string jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d); |
| | | return RequestHttps($"{severAddress}/ZigbeeUsers/GetSubAccountInfo", jsonString, true); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¸è½½åè´¦å·ç¨æ·å¤´å |
| | | /// </summary> |
| | | /// <param name="subaccoun"></param> |
| | | /// <returns></returns> |
| | | public byte[] DownChildHeadImage(ResidenceMemberInfo subaccount) |
| | | { |
| | | var requestObj = new ChildBaseObj() |
| | | { |
| | | childAccountId = subaccount.childAccountId, |
| | | homeId = subaccount.homeId |
| | | }; |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj); |
| | | var replaceToken = ""; |
| | | if (DB_ResidenceData.residenceData.residecenInfo.IsOthreShare) |
| | | { |
| | | replaceToken = DB_ResidenceData.residenceData.MasterToken; |
| | | } |
| | | return HttpUtil.RequestHttpsDownload(NewAPI.API_POST_Child_DownloadHeadImage, requestJson,null); |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | /// <summary> |
| | | /// è·åMQTTè¿ç¨è¿æ¥ä¿¡æ¯æ¥å£ |
| | | /// </summary> |
| | | public MqttInfo GetMqttRemoteInfo(string attachClientId) |
| | | { |
| | | try |
| | | { |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(new GetMqttRemoteInfoObj() |
| | | { |
| | | attachClientId = attachClientId, |
| | | homeType = HomeTypeEnum.BUSPRO.ToString() |
| | | }); |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_GetMqttRemoteInfo, requestJson, DB_ResidenceData.residenceData.residecenInfo.regionUrl); |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | | { |
| | | return Newtonsoft.Json.JsonConvert.DeserializeObject<MqttInfo>(revertObj.Data.ToString()); |
| | | } |
| | | else |
| | | { |
| | | Utlis.WriteLine("GetMqttRemoteInfo error"); |
| | | return null; |
| | | } |
| | | } |
| | | catch |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | #region æ¨é |
| | | /// <summary> |
| | | /// æäº¤æ¨ééè¦çå
³é®æ è¯ä¿¡æ¯ |
| | | /// </summary> |
| | | public bool PushSerivceAddPushInfo() |
| | | { |
| | | try |
| | | { |
| | | string deviceType = PhoneDeviceType.Android.ToString(); |
| | | #if __IOS__ |
| | | deviceType = PhoneDeviceType.IOS.ToString(); |
| | | #endif |
| | | //æ¯å¦çææ¨¡å¼ |
| | | bool isProduce = true; |
| | | #if DEBUG |
| | | isProduce = false; |
| | | #endif |
| | | |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushDeviceToken)) return false; |
| | | |
| | | var mAddpushinfoObj = new AddpushinfoObj() |
| | | { |
| | | pushToken = OnAppConfig.Instance.PushDeviceToken, |
| | | deviceName = OnAppConfig.Instance.PhoneName, |
| | | deviceType = deviceType, |
| | | produce = isProduce, |
| | | |
| | | }; |
| | | var mAddpushinfoJson = Newtonsoft.Json.JsonConvert.SerializeObject(mAddpushinfoObj); |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_AddToken, mAddpushinfoJson); |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | | { |
| | | if (revertObj.Data != null) |
| | | { |
| | | var pushId = revertObj.Data.ToString(); |
| | | if (!string.IsNullOrEmpty(pushId)) |
| | | { |
| | | OnAppConfig.Instance.PushId = pushId; |
| | | OnAppConfig.Instance.SaveUserConfig(); |
| | | return true; |
| | | } |
| | | } |
| | | Utlis.WriteLine("AddToken æå"); |
| | | } |
| | | else |
| | | { |
| | | Utlis.WriteLine("AddToken 失败"); |
| | | } |
| | | return false; |
| | | } |
| | | catch |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢æ¨éä¿¡æ¯å表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResponsePackNew PushSerivceGetpushmessagelist() |
| | | { |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(new GetMessageListObj() |
| | | { |
| | | pushId = OnAppConfig.Instance.PushId |
| | | }); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Getpushmessagelist, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¸
ç©ºæ¶æ¯è®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public bool PushSerivceClearmessagelist() |
| | | { |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false; |
| | | |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(new PushIdObj() |
| | | { |
| | | pushId = OnAppConfig.Instance.PushId |
| | | }); |
| | | |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Clearmessagelist, requestJson); |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | | { |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éåºç»å½ï¼æ¸
空æ¨éæ è¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public bool PushSerivceSignOut() |
| | | { |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false; |
| | | try |
| | | { |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(new PushIdObj() { |
| | | pushId = OnAppConfig.Instance.PushId |
| | | }); |
| | | |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_DeleteToken, requestJson); |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | | { |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | |
| | | } |
| | | return false; |
| | | } |
| | | catch |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ è®°æ¶æ¯å
¨é¨å·²è¯» |
| | | /// </summary> |
| | | /// <param name="msgId"></param> |
| | | /// <returns></returns> |
| | | public bool PushSerivceMarkAllMessageRead() |
| | | { |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false; |
| | | |
| | | try |
| | | { |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(new PushIdObj() |
| | | { |
| | | pushId = OnAppConfig.Instance.PushId |
| | | }); |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_ALLMarkread, requestJson); |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | | { |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | |
| | | } |
| | | return false; |
| | | } |
| | | catch |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ è®°æå®æ¶æ¯å·²è¯» |
| | | /// </summary> |
| | | /// <param name="msgId"></param> |
| | | /// <returns></returns> |
| | | public bool PushSerivceMarkMessageRead(string msgId) |
| | | { |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false; |
| | | |
| | | try |
| | | { |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(new PushMsgIdObj() |
| | | { |
| | | msgId = msgId |
| | | }); |
| | | |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Markread, requestJson); |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | | { |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | |
| | | } |
| | | return false; |
| | | } |
| | | catch |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éè¿ä¸»é®idå é¤ä¸æ¡æ¨éè®°å½ |
| | | /// </summary> |
| | | /// <param name="msgId"></param> |
| | | /// <returns></returns> |
| | | public bool PushSerivceDeleteMessage(string msgId) |
| | | { |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false; |
| | | |
| | | try |
| | | { |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(new PushMsgIdObj() |
| | | { |
| | | msgId = msgId |
| | | }); |
| | | |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Deletepushinfo, requestJson); |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | | { |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | |
| | | } |
| | | return false; |
| | | } |
| | | catch |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ£æµæ´æ° |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResponsePackNew CheckAppVersion() |
| | | { |
| | | var requestObj = new ForceUpdateObj() |
| | | { |
| | | LanguageType = Utlis.GetPostLanguageType() |
| | | }; |
| | | #if __IOS__ |
| | | requestObj.DeviceType = PhoneDeviceType.IOS.ToString(); |
| | | #endif |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.API_POST_CheckAppVersion, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetAppVersion() |
| | | { |
| | | var requestObj = new ForceUpdateObj() |
| | | { |
| | | |
| | | }; |
| | | #if __IOS__ |
| | | requestObj.DeviceType = PhoneDeviceType.IOS.ToString(); |
| | | #endif |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.API_POST_GetAppVersion, requestJson); |
| | | } |
| | | |
| | | #endregion |
| | |
| | | #endregion |
| | | |
| | | #region å¤ä»½é¨å |
| | | /// <summary> |
| | | /// è·åä½å®
å¤ä»½å表 |
| | | /// </summary> |
| | | public Dictionary<int, string> GetRegionLastBackupId() |
| | | { |
| | | //Dialog dialog = new Dialog(); |
| | | //dialog.Show(); |
| | | ///// <summary> |
| | | ///// è·åä½å®
å¤ä»½å表 |
| | | ///// </summary> |
| | | //public Dictionary<int, string> GetRegionLastBackupId() |
| | | //{ |
| | | // //Dialog dialog = new Dialog(); |
| | | // //dialog.Show(); |
| | | |
| | | Dictionary<int, string> backupList = new Dictionary<int, string>(); |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("LevelID", DB_ResidenceData.residenceData.residecenInfo.RegionID);// 199200); |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(d); |
| | | var revertObj = RequestHttps("https://developer.hdlcontrol.com/api/GetUserFolder", requestJson, true); |
| | | if (revertObj == null || revertObj.ResponseData == null) |
| | | { |
| | | return new Dictionary<int, string>(); |
| | | } |
| | | var jt = Newtonsoft.Json.JsonConvert.DeserializeObject<List<JObject>>(revertObj.ResponseData.ToString()); |
| | | foreach (var j in jt) |
| | | { |
| | | var folderId = (int)j.GetValue("FolderID"); |
| | | var folderName = j.GetValue("FolderName").ToString(); |
| | | backupList.Add(folderId, folderName); |
| | | } |
| | | return backupList; |
| | | } |
| | | // Dictionary<int, string> backupList = new Dictionary<int, string>(); |
| | | // Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | // d.Add("LevelID", DB_ResidenceData.residenceData.residecenInfo.RegionID);// 199200); |
| | | // var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(d); |
| | | // var revertObj = RequestHttps("https://developer.hdlcontrol.com/api/GetUserFolder", requestJson, true); |
| | | // if (revertObj == null || revertObj.ResponseData == null) |
| | | // { |
| | | // return new Dictionary<int, string>(); |
| | | // } |
| | | // var jt = Newtonsoft.Json.JsonConvert.DeserializeObject<List<JObject>>(revertObj.ResponseData.ToString()); |
| | | // foreach (var j in jt) |
| | | // { |
| | | // var folderId = (int)j.GetValue("FolderID"); |
| | | // var folderName = j.GetValue("FolderName").ToString(); |
| | | // backupList.Add(folderId, folderName); |
| | | // } |
| | | // return backupList; |
| | | //} |
| | | |
| | | /* 2020-09-01 å¼ç¨ æ¢å¤æ§æ°æ®åè½å¨bus软件ä¸å®ç° |
| | | /// <summary> |
| | | /// è·åå¤ä»½æä»¶å表 |
| | |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | namespace Shared.Securitys |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public partial class EncryptionService |
| | | { |
| | | #region å å¯ |
| | | /// <summary> |
| | | /// å å¯ä¸»é¢ä¸ºBase64 |
| | | /// </summary> |
| | | /// <param name="pToEncrypt"></param> |
| | | /// <param name="key"></param> |
| | | /// <returns></returns> |
| | | public static string AesEncryptTopic(string pToEncrypt, string key) |
| | | { |
| | | if (string.IsNullOrEmpty(pToEncrypt)) return null; |
| | | if (string.IsNullOrEmpty(key)) return pToEncrypt; |
| | | //éè¦å å¯å
å®¹çæææµ |
| | | Byte[] toEncryptArray = Encoding.UTF8.GetBytes(pToEncrypt); |
| | | |
| | | //é
ç½®AESå å¯Key(å¯é¥ãåéãæ¨¡å¼ãå¡«å
) |
| | | RijndaelManaged rm = new RijndaelManaged |
| | | { |
| | | Key = Encoding.UTF8.GetBytes(key), |
| | | IV = Encoding.UTF8.GetBytes(key), |
| | | Mode = CipherMode.CBC, |
| | | Padding = PaddingMode.PKCS7 |
| | | }; |
| | | |
| | | //å建AESå å¯å¨å¯¹è±¡ |
| | | ICryptoTransform cTransform = rm.CreateEncryptor(); |
| | | |
| | | //使ç¨AESå°æææµè½¬æå¯æåèæ°ç» |
| | | Byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length); |
| | | |
| | | //å°AESçæç坿åèæ°ç»è½¬æBase64å符串 |
| | | return Convert.ToBase64String(resultArray, 0, resultArray.Length); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// å å¯è´è½½ä¸ºäºè¿å¶æµ |
| | | /// </summary> |
| | | /// <param name="toEncryptArray"></param> |
| | | /// <param name="key"></param> |
| | | /// <returns></returns> |
| | | public static byte[] AesEncryptPayload(byte[] toEncryptArray, string key) |
| | | { |
| | | if (string.IsNullOrEmpty(key)) return toEncryptArray; |
| | | //é
ç½®AESå å¯Key(å¯é¥ãåéãæ¨¡å¼ãå¡«å
) |
| | | var rm = new RijndaelManaged |
| | | { |
| | | Key = Encoding.UTF8.GetBytes(key), |
| | | IV = Encoding.UTF8.GetBytes(key), |
| | | Mode = CipherMode.CBC, |
| | | Padding = PaddingMode.PKCS7 |
| | | }; |
| | | |
| | | //å建AESå å¯å¨å¯¹è±¡ |
| | | var cTransform = rm.CreateEncryptor(); |
| | | //使ç¨AESå°æææµè½¬æå¯æåèæ°ç» |
| | | return cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region è§£å¯ |
| | | /// <summary> |
| | | /// è§£å¯ä¸»é¢æ°æ® |
| | | /// </summary> |
| | | /// <param name="pToDecrypt"></param> |
| | | /// <param name="key"></param> |
| | | /// <returns></returns> |
| | | public static string AesDecryptTopic(string pToDecrypt, string key) |
| | | { |
| | | //AES坿Base64转æå符串 |
| | | Byte[] toEncryptArray = Convert.FromBase64String(pToDecrypt); |
| | | |
| | | //é
ç½®AESå å¯Key(å¯é¥ãåéãæ¨¡å¼ãå¡«å
) |
| | | RijndaelManaged rm = new RijndaelManaged |
| | | { |
| | | Key = Encoding.UTF8.GetBytes(key), |
| | | IV = Encoding.UTF8.GetBytes(key), |
| | | Mode = CipherMode.CBC, |
| | | Padding = PaddingMode.PKCS7 |
| | | }; |
| | | |
| | | //å建AESè§£å¯å¨å¯¹è±¡ |
| | | ICryptoTransform cTransform = rm.CreateDecryptor(); |
| | | |
| | | //使ç¨AESå°å¯ææµè½¬æææçåèæ°ç» |
| | | Byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length); |
| | | |
| | | //转æå符串 |
| | | return Encoding.UTF8.GetString(resultArray); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éç¨Aesè§£å¯è´è½½æ°æ® |
| | | /// </summary> |
| | | /// <param name="toEncryptArray"></param> |
| | | /// <param name="key"></param> |
| | | /// <returns></returns> |
| | | public static byte[] AesDecryptPayload(byte[] toEncryptArray, string key) |
| | | { |
| | | //é
ç½®AESå å¯Key(å¯é¥ãåéãæ¨¡å¼ãå¡«å
) |
| | | var rm = new RijndaelManaged |
| | | { |
| | | Key = Encoding.UTF8.GetBytes(key), |
| | | IV = Encoding.UTF8.GetBytes(key), |
| | | Mode = CipherMode.CBC, |
| | | Padding = PaddingMode.PKCS7 |
| | | }; |
| | | |
| | | //å建AESè§£å¯å¨å¯¹è±¡ |
| | | var cTransform = rm.CreateDecryptor(); |
| | | |
| | | //使ç¨AESå°å¯ææµè½¬æææçåèæ°ç» |
| | | return cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | public class IMessageCommon |
| | | { |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ¥å£ç±»çè¿åä¿¡æ¯ |
| | | /// </summary> |
| | |
| | | return m_Current; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦å¨è·åtoken |
| | | /// </summary> |
| | | public bool isGetingToken; |
| | | |
| | | /// <summary> |
| | | /// æ è§é误(访é®äºç«¯æ¶ï¼æ¤æä½å°ä¸ä¼å¼¹åºé误) |
| | | /// </summary> |
| | |
| | | //éªè¯ç åéé¢ç¹ï¼è¯·ç¨ååè¯ï¼ |
| | | stateCodeDic["15"] = HDL_ON.StringId.VerificationCodeSentFrequently; |
| | | //ä¼è¯è¶
æ¶ï¼è¯·æ´æ°token |
| | | stateCodeDic["10001"] = HDL_ON.StringId.NotLogin; |
| | | stateCodeDic[StateCode.TOKEN_EXPIRED] = HDL_ON.StringId.NotLogin; |
| | | ////ç»å½å¤±è´¥ï¼è´¦å·æè
å¯ç é误 |
| | | stateCodeDic["10008"] = HDL_ON.StringId.LoginFailed_AccountOrPasswordError; |
| | | //è´¦å·ä¸åå¨ |
| | |
| | | { |
| | | try |
| | | { |
| | | string mes = GetMsgByRequestName(statuCode); |
| | | if (mes == null) return; |
| | | if (!string.IsNullOrEmpty(tipStr)) |
| | | //妿æ¯tokenè¿æåå·æ°token |
| | | if (statuCode == StateCode.TOKEN_EXPIRED) |
| | | { |
| | | mes = tipStr + "\n" + mes; |
| | | } |
| | | if (isTipStyle) |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | var tip = new Tip() |
| | | { |
| | | Text = mes, |
| | | CloseTime = closeTime, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(MainPage.BaseView); |
| | | }); |
| | | StartRefreshToken(); |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | new Alert("", mes, Language.StringByID(HDL_ON.StringId.Close)).Show(); |
| | | }); |
| | | string mes = GetMsgByRequestName(statuCode); |
| | | if (mes == null) return; |
| | | if (!string.IsNullOrEmpty(tipStr)) |
| | | { |
| | | mes = tipStr + "\n" + mes; |
| | | } |
| | | if (isTipStyle) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var tip = new Tip() |
| | | { |
| | | Text = mes, |
| | | CloseTime = closeTime, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(MainPage.BaseView); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Alert("", mes, Language.StringByID(HDL_ON.StringId.Close)).Show(); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | catch { } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// StartRefreshToken |
| | | /// </summary> |
| | | public void StartRefreshToken() |
| | | { |
| | | if (isGetingToken) return; |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | isGetingToken = true; |
| | | |
| | | try |
| | | { |
| | | var success = new HttpServerRequest().RefreshToken(); |
| | | if (success) { |
| | | Utlis.WriteLine("RefreshToken success"); |
| | | } |
| | | } |
| | | catch |
| | | { |
| | | } |
| | | finally |
| | | { |
| | | isGetingToken = false; |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | /// </summary> |
| | | public const string SUCCESS = "0"; |
| | | /// <summary> |
| | | /// ä¼è¯è¶
æ¶ï¼è¯·æ´æ°token |
| | | /// </summary> |
| | | public const string TOKEN_EXPIRED = "10001"; |
| | | /// <summary> |
| | | /// è´¦å·ä¸åå¨çé误ç |
| | | /// </summary> |
| | | public const string ACCOUNT_NOT_EXIST = "10010"; |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | /// åè´¦å·ç®¡çåè·åä¸»è´¦å·ææToken |
| | | /// </summary> |
| | | public const string API_POST_Child_GetMasterToken = "/home-wisdom/child/account/masterToken/get"; |
| | | |
| | | /// <summary> |
| | | /// ä¸è½½åè´¦å·å¤´å |
| | | /// </summary> |
| | | public const string API_POST_Child_DownloadHeadImage = "/home-wisdom/child/account/getHeadPortrait"; |
| | | #region æ°æ®å享 |
| | | /// <summary> |
| | | /// å享æå®æä»¶ç»æå®æå |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region â pushserivce -- æ¨éæå¡æ¥å£___________________________ |
| | | #region â PushSerivce -- æ¨éæå¡æ¥å£___________________________ |
| | | /// <summary> |
| | | /// æ·»å æ¨éæ¶æ¯ |
| | | /// æ·»å æ¨éToken |
| | | /// </summary> |
| | | public const string API_POST_Pushserivce_Addpushinfo = "/pushserivce/V1/addpushinfo"; |
| | | |
| | | public const string API_POST_PushSerivce_AddToken = "/smart-footstone/app/push-information/add"; |
| | | /// <summary> |
| | | /// æ¸
空æ¨éçæ¶æ¯è®°å½ |
| | | /// å 餿¨éToken |
| | | /// </summary> |
| | | public const string API_DELETE_Pushserivce_Clearmessagelist = "/pushserivce/V1/clearmessagelist/{pushId}"; |
| | | |
| | | /// <summary> |
| | | /// å 餿¨éæ¶æ¯ |
| | | /// </summary> |
| | | public const string API_DELETE_Pushserivce_Deletepushinfo = "/pushserivce/V1/deletepushinfo/{pushId}"; |
| | | |
| | | public const string API_POST_PushSerivce_DeleteToken = "/smart-footstone/app/push-information/delete"; |
| | | /// <summary> |
| | | /// è·åæ¨éæ¶æ¯è®°å½ |
| | | /// </summary> |
| | | public const string API_GET_Pushserivce_Getpushmessagelist = "/pushserivce/V1/getpushmessagelist/{pushId}"; |
| | | |
| | | public const string API_POST_PushSerivce_Getpushmessagelist = "/smart-footstone/app/message/list"; |
| | | /// <summary> |
| | | /// æ¸
空æ¨éçæ¶æ¯è®°å½ |
| | | /// </summary> |
| | | public const string API_POST_PushSerivce_Clearmessagelist = "/smart-footstone/app/message/clear"; |
| | | /// <summary> |
| | | /// æ è®°æ¶æ¯å·²è¯» |
| | | /// </summary> |
| | | public const string API_PUT_Pushserivce_Markread = "/pushserivce/V1/markread/{pushId}"; |
| | | public const string API_POST_PushSerivce_Markread = "/smart-footstone/app/message/read"; |
| | | /// <summary> |
| | | /// æ è®°æ¶æ¯å
¨é¨å·²è¯» |
| | | /// </summary> |
| | | public const string API_POST_PushSerivce_ALLMarkread = "/smart-footstone/app/message/read_all"; |
| | | /// <summary> |
| | | /// éè¿ä¸»é®idå é¤ä¸æ¡æ¨éè®°å½ |
| | | /// </summary> |
| | | public const string API_POST_PushSerivce_Deletepushinfo = "/smart-footstone/app/message/delete_by_id"; |
| | | #endregion |
| | | |
| | | #region â -- æ£æµæ´æ°æ¥å£___________________________ |
| | | /// <summary> |
| | | /// æ£æµæ´æ° |
| | | /// æ£æµæ´æ°,æ¯å¦éè¦å¼ºå¶æ´æ° |
| | | /// </summary> |
| | | public const string API_POST_CheckAppVersion= "/speakerservices/BatchEdit_V2"; |
| | | |
| | | public const string API_POST_CheckAppVersion= "/smart-footstone/app/checkAppVersion"; |
| | | /// <summary> |
| | | /// æ¥è¯¢APPææ°çæ¬ |
| | | /// </summary> |
| | | public const string API_POST_GetAppVersion = "/smart-footstone/app/getAppVersion"; |
| | | #endregion |
| | | |
| | | |
| | |
| | | /// æ¥è¯¢æä½å®
æåè´¦å·çå享æä»¶ä¿¡æ¯ |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class HomeShareFindAll |
| | | public class HomeShareFindAll : ChildBaseObj |
| | | { |
| | | /// <summary> |
| | | /// ä½å®
ID |
| | | /// </summary> |
| | | public string homeId; |
| | | /// <summary> |
| | | /// åè´¦å·id |
| | | /// </summary> |
| | | public string childAccountId; |
| | | |
| | | } |
| | | |
| | |
| | | /// </summary> |
| | | public string deviceName; |
| | | /// <summary> |
| | | /// |
| | | /// AndroidãIOSãWinPhone |
| | | /// </summary> |
| | | public string deviceType; |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// æ¨éID |
| | | /// </summary> |
| | | public string pushid; |
| | | public string pushToken; |
| | | /// <summary> |
| | | /// 1æ¯HDL_ONã2HDL_Zigbee |
| | | /// è½¯ä»¶æ¥æºï¼EvoyoãONãON_Plus |
| | | /// </summary> |
| | | //public string software = MainPage.RequestSource; |
| | | public string software = "HDL_ON"; |
| | | public string software = SoftwareType.ON_Plus.ToString(); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class PushserivceIdObj |
| | | public class PushIdObj |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string id; |
| | | public string pushId; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class GetMessageListObj: PushIdObj |
| | | { |
| | | /// <summary> |
| | | /// ä½å®
主é®id |
| | | /// 1ãä¼ ç©ºæ¥è¯¢å
¨é¨ï¼éè¦æ ¹æ®ç¨æ·ååæ¥è¯¢ï¼ 2ãä¼ æå®ä½å®
IDæ¥è¯¢æå®è®°å½ ï¼éè¦æ ¹æ®ä½å®
ååæ¥è¯¢ï¼ |
| | | /// </summary> |
| | | public string homeId; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¶æ¯è®°å½Id |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class PushMsgIdObj |
| | | { |
| | | /// <summary> |
| | | /// æ¶æ¯è®°å½Id |
| | | /// </summary> |
| | | public string msgId; |
| | | } |
| | | |
| | | |
| | | ///// <summary> |
| | | ///// æ¨éæ¶æ¯å表 |
| | |
| | | { |
| | | /// <summary> |
| | | /// ææºç±»å |
| | | /// |
| | | /// 0æ¯iOS |
| | | /// 1æ¯Android |
| | | /// 2æ¯Android æ°çå
åçæ¬ |
| | | /// AndroidãIOSãWinPhone |
| | | /// </summary> |
| | | public int DeviceType = 0; |
| | | public string DeviceType = PhoneDeviceType.Android.ToString(); |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string RequestVersion = MainPage.VersionString; |
| | | /// <summary> |
| | | /// |
| | | /// è½¯ä»¶æ¥æºï¼EvoyoãONãON_Plus |
| | | /// </summary> |
| | | public string RequestSource = MainPage.ClientType; |
| | | public string Software = SoftwareType.ON_Plus.ToString(); |
| | | /// <summary> |
| | | /// è¯è¨ |
| | | /// </summary> |
| | | public string languageType; |
| | | public string LanguageType; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | public class ForceUpdateInfo |
| | | { |
| | | |
| | | ///// <summary> |
| | | ///// éè¦å¼ºå¶æ´æ° |
| | | ///// </summary> |
| | | //public bool IsNeedForceUpdate; |
| | | /// <summary> |
| | | /// éè¦å¼ºå¶æ´æ° |
| | | /// </summary> |
| | | public bool IsNeedForceUpdate; |
| | | |
| | | /// <summary> |
| | | /// å¼ºå¶æ´æ°åå |
| | | /// 1.æç¤ºæ´æ°çå
容 |
| | | /// 2.å¼ºå¶æ´æ°åå |
| | | /// 3.æç¤ºçéç¥å
容 |
| | | /// </summary> |
| | | public string ReasonStr; |
| | | /// <summary> |
| | | /// å¼ºå¶æ´æ°åå |
| | | /// </summary> |
| | | public string ReasonStr_En; |
| | | |
| | | /// <summary> |
| | | /// æ°çæ¬iOS App Storeä¸è½½å°å |
| | | /// </summary> |
| | | public string IosUrl; |
| | | |
| | | /// <summary> |
| | | /// æ°çæ¬Androidåºç¨å¸åºä¸è½½å°å |
| | | /// </summary> |
| | | public string AndroidUrl; |
| | | |
| | | /// <summary> |
| | | /// æ°çæ¬Android è±æåºç¨å¸åºä¸è½½å°å Google Play |
| | | /// </summary> |
| | | public string AndroidUrl_En; |
| | | |
| | | /// <summary> |
| | | /// O ä¸éè¦æ´æ° |
| | | /// 1 æç¤ºæ´æ° |
| | |
| | | /// 3 æç¤ºéç¥å
容 |
| | | /// </summary> |
| | | public int UpdateType; |
| | | |
| | | /// <summary> |
| | | /// å½åæ°çæ¬å· |
| | | /// </summary> |
| | | public string NewVersion; |
| | | /// <summary> |
| | | /// å½åæ°çæ¬å· |
| | | /// </summary> |
| | | public string NewVersionUrl; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ£æµAPPçæ¬ ååºåæ° |
| | | /// 妿æ¯iOSè¿åiOSçææ°çæ¬åUrlä¸è½½å°å |
| | | /// 妿æ¯Androidè¿åiOSçææ°çæ¬åUrlä¸è½½å°å |
| | | /// </summary> |
| | | public class APPVersion |
| | | { |
| | | /// <summary> |
| | | /// å½åææ°ççæ¬å· |
| | | /// </summary> |
| | | public string NewVersion; |
| | | |
| | | /// <summary> |
| | | /// å½åææ°çæ¬ä¸è½½å°å |
| | | /// </summary> |
| | | public string NewVersionUrl; |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | |
| | | /// ä¿¡æ¯æ¨éæ è®° |
| | | /// </summary> |
| | | public string PushDeviceToken; |
| | | /// <summary> |
| | | /// phoneName |
| | | /// </summary> |
| | | public string PhoneName; |
| | | /// <summary> |
| | | /// æ·»å æ¨éTokenæåæ¶è¿åçId |
| | | /// </summary> |
| | | public string PushId; |
| | | |
| | | public string SetLanguage = ""; |
| | | |
| | |
| | | /// ä½å®
åºååå |
| | | /// </summary> |
| | | public string homeRegionName; |
| | | ///// <summary> |
| | | ///// æ¯å¦ç»å®ç½å
³ |
| | | ///// </summary> |
| | | //public bool isBindGateway; |
| | | /// <summary> |
| | | /// æ¯å¦ç»å®ç½å
³ |
| | | /// </summary> |
| | | public bool isBindGateway; |
| | | /// <summary> |
| | | /// ä½å®
å°å |
| | | /// </summary>
|
| | |
| | | /// </summary> |
| | | public string createTime; |
| | | /// <summary> |
| | | /// ç¨æ·è´¦å· |
| | | /// </summary> |
| | | public string Account = ""; |
| | | /// <summary> |
| | | /// ç¨æ·åå |
| | | /// </summary> |
| | | public string UserName = ""; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string childAccountEmail; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string childAccountPhone; |
| | | /// <summary> |
| | | /// ç¨æ·è´¦å· |
| | | /// ä¼å
æ¾ç¤ºææºå·ï¼å¦æææºå·ä¸ºç©ºåæ¾ç¤ºé®ç®±å°å |
| | | /// </summary> |
| | | public string Account |
| | | { |
| | | get |
| | | { |
| | | if (!string.IsNullOrEmpty(childAccountPhone)) |
| | | { |
| | | return childAccountPhone; |
| | | } |
| | | else |
| | | { |
| | | if (!string.IsNullOrEmpty(childAccountEmail)) |
| | | { |
| | | return childAccountEmail; |
| | | } |
| | | else |
| | | { |
| | | return ""; |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public class ShareData |
| | |
| | | /// <summary> |
| | | /// UserType Bç«¯è´¦å· Cç«¯è´¦å· |
| | | /// </summary> |
| | | public string userType = "C"; |
| | | public string userType = "USER_C"; |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\SetSceneLocationPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\AutomationMenuPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\GetSupportPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)DriverLayer\Control_TcpClient.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)DriverLayer\Control_TcpServer.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Panel\PanelPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\SearchDevice\SearchDevicePage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\SearchDevice\VoicePanelScenePage.cs" />
|
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AccountBindInfo\NewBindAccountPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AccountBindInfo\NewBindVerificationCodePage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\HDLCommon.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\LineView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\ConfirmDialog.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\WebViewDialog.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Common\Constant.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\Widget\TextButton.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI1-Login\SelectServerDialog.cs" />
|
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)DAL\DriverLayer\UdpSocket.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)DAL\DriverLayer\A_Protocol_Common.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)DAL\Mqtt\MqttClient.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\MyQRCodePage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\Widget\ListCellView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\Widget\UpdateTipDialog.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\MyServerInfoPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AboutOn\AboutOnPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AboutOn\FunctionIntroductionPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AboutOn\ComplaintsPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\Widget\EmptyTipView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\Widget\LineView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\Widget\ConfirmDialog.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\Widget\WebViewDialog.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\GetSupport\FAQHelpPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\Widget\ListIconCellView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\GetSupport\QuestionListPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\GetSupport\GetSupportPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\Transfer\TransferConfirmPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\Widget\ConfirmButton.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\" />
|
| | |
| | | <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI0-Public\Widget\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)DAL\DriverLayer\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AboutOn\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\GetSupport\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\Transfer\" />
|
| | | </ItemGroup>
|
| | | </Project> |
| | | </Project>
|
| | |
| | | using System; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.DAL; |
| | | using HDL_ON.UI; |
| | |
| | | /// çæ¬å· |
| | | /// </summary> |
| | | public static string VersionString = "1.0.0924"; |
| | | /// <summary> |
| | | /// 客æ·ç«¯ç±»å |
| | | /// </summary> |
| | | public static string ClientType = APIClientType.HDL_ON_PRO.ToString(); |
| | | ///// <summary> |
| | | ///// 客æ·ç«¯ç±»å |
| | | ///// </summary> |
| | | //public static string ClientType = APIClientType.HDL_ON_PRO.ToString(); |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | } |
| | | else |
| | | { |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var pm = new DAL.Server.HttpServerRequest(); |
| | | pm.RefreshToken();//å·æ°Token |
| | | pm.GetHomePager();//å·æ°ä½å®
ä¿¡æ¯ |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var pm =new DAL.Server.HttpServerRequest(); |
| | | pm.GetUserInfo();//å·æ°ä¸ªäººä¿¡æ¯ |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var pm = new DAL.Server.HttpServerRequest(); |
| | | pm.GetHomePager();//å·æ°ä½å®
ä¿¡æ¯ |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | GoUserPage(); |
| | | //å¯å¨å¯ç éªè¯ |
| | | new AppUnlockPage().LoadPage(); |
| | |
| | | Y = Application.GetRealHeight(401), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Radius = (uint)Application.GetRealHeight(22), |
| | | Height = Application.GetRealWidth(44), |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(30), |
| | | Width = Application.GetRealWidth(150), |
| | | Width = Application.GetRealWidth(270), |
| | | Height = Application.GetRealHeight(25), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.HeadlineFontSize, |
New file |
| | |
| | | using System; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// éç¨ç¡®è®¤æé® |
| | | /// </summary> |
| | | public class ConfirmButton : Button |
| | | { |
| | | public ConfirmButton() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal; |
| | | Width = Application.GetRealWidth(220); |
| | | Height = Application.GetRealWidth(44); |
| | | BackgroundColor = CSS_Color.MainColor; |
| | | TextAlignment = TextAlignment.Center; |
| | | TextColor = CSS_Color.MainBackgroundColor; |
| | | TextSize = CSS_FontSize.SubheadingFontSize; |
| | | IsBold = true; |
| | | Radius = (uint)Application.GetRealWidth(22); |
| | | BorderColor = 0x00000000; |
| | | BorderWidth = 0; |
| | | |
| | | } |
| | | } |
| | | } |
File was renamed from HDL_ON/UI/UI0-Public/ConfirmDialog.cs |
| | |
| | | { |
| | | /// <summary> |
| | | /// éç¨äºæ¬¡ç¡®è®¤çé¢ |
| | | /// å¯ä»¥èªå®ä¹æé®æå |
| | | /// å¯ä»¥èªå®ä¹æé®æåãæç¤ºå
å®¹æ¯æå¤è¡æ¾ç¤º |
| | | /// </summary> |
| | | public class ConfirmDialog : Dialog |
| | | { |
| | |
| | | /// </summary> |
| | | public ConfirmDialog() |
| | | { |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åå§åDialog |
| | | /// </summary> |
| | | /// <param name="titleId"></param> |
| | | /// <param name="msgId"></param> |
| | | /// <param name="titleStr"></param> |
| | | /// <param name="msgStr"></param> |
| | | /// <param name="okAction"></param> |
| | | /// <param name="cancelAction"></param> |
| | | /// <param name="cancelID"></param> |
| | | /// <param name="confirmID"></param> |
| | | void ShowDialogBase(int titleId, int msgId, Action okAction, Action cancelAction, int cancelID = StringId.Cancel, int confirmID = StringId.Confirm) |
| | | void ShowDialogBase(string titleStr, string msgStr, Action okAction, Action cancelAction, int cancelID = StringId.Cancel, int confirmID = StringId.Confirm) |
| | | { |
| | | |
| | | this.BackgroundColor = CSS_Color.DialogTransparentColor1; |
| | | |
| | | FrameLayout contentView = new FrameLayout() |
| | |
| | | |
| | | Button btnTitle = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(16), |
| | | Height = Application.GetRealHeight(30), |
| | | Y = Application.GetRealHeight(20), |
| | | Height = Application.GetRealHeight(22), |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextAlignment = TextAlignment.Center, |
| | | IsBold = true, |
| | | TextID = titleId, |
| | | Text = titleStr, |
| | | }; |
| | | contentView.AddChidren(btnTitle); |
| | | |
| | | //æç¤ºå
容æé® |
| | | Button btnMsg = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Height = Application.GetRealHeight(25), |
| | | Y = btnTitle.Bottom, |
| | | Width = Application.GetRealHeight(200), |
| | | Y = btnTitle.Bottom + Application.GetRealHeight(4), |
| | | X = Application.GetRealWidth(6), |
| | | Height = Application.GetRealHeight(46), |
| | | Width = Application.GetRealWidth(258), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextID = msgId, |
| | | Text = msgStr, |
| | | IsMoreLines = true, |
| | | }; |
| | | contentView.AddChidren(btnMsg); |
| | | |
| | |
| | | //ä¾ï¼å³ä¸åè§ å¤§å°ä¸º50 |
| | | int mRectCornerID = HDLUtils.RectCornerBottomRight; |
| | | btnConfirm.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(10), mRectCornerID); |
| | | |
| | | |
| | | btnCancel.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | this.Close(); |
| | |
| | | /// <param name="callBackAction"></param> |
| | | public void ShowDialog(int titleId, int msgId, Action okAction, Action cancelAction = null) |
| | | { |
| | | this.ShowDialogBase(titleId, msgId, okAction, cancelAction); |
| | | this.ShowDialogBase(Language.StringByID(titleId), Language.StringByID(msgId), okAction, cancelAction); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="confirmID"></param> |
| | | public void ShowDialog(int titleId, int msgId, Action okAction, Action cancelAction, int cancelID, int confirmID) |
| | | { |
| | | this.ShowDialogBase(titleId, msgId, okAction, cancelAction, cancelID, confirmID); |
| | | this.ShowDialogBase(Language.StringByID(titleId), Language.StringByID(msgId), okAction, cancelAction, cancelID, confirmID); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å è½½æç¤ºDialog |
| | | /// </summary> |
| | | /// <param name="titleId"></param> |
| | | /// <param name="msgId"></param> |
| | | /// <param name="callBackAction"></param> |
| | | public void ShowDialog(string titleStr, string msgStr, Action okAction, Action cancelAction = null) |
| | | { |
| | | this.ShowDialogBase(titleStr, msgStr, okAction, cancelAction); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å è½½æç¤ºDialog |
| | | /// å¯ä»¥èªå®ä¹æé®æå |
| | | /// </summary> |
| | | /// <param name="titleStr"></param> |
| | | /// <param name="msgStr"></param> |
| | | /// <param name="okAction"></param> |
| | | /// <param name="cancelAction"></param> |
| | | /// <param name="cancelID"></param> |
| | | /// <param name="confirmID"></param> |
| | | public void ShowDialog(string titleStr, string msgStr, Action okAction, Action cancelAction, int cancelID, int confirmID) |
| | | { |
| | | this.ShowDialogBase(titleStr, msgStr, okAction, cancelAction, cancelID, confirmID); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using System; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// éç¨æç¤ºView--å
容为空 |
| | | /// 空空å¦ä¹ |
| | | /// </summary> |
| | | public class EmptyTipView : FrameLayout |
| | | { |
| | | /// <summary> |
| | | /// æç¤ºæå |
| | | /// </summary> |
| | | public Button BtnTipNotText; |
| | | |
| | | /// <summary> |
| | | /// æç¤ºå¾ç |
| | | /// </summary> |
| | | public Button BtnTipNot; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public EmptyTipView() |
| | | { |
| | | int tipHeight = Application.GetRealWidth(180); |
| | | |
| | | this.Height = tipHeight + Application.GetRealHeight(17); |
| | | |
| | | BtnTipNot = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = tipHeight, |
| | | Height = tipHeight, |
| | | UnSelectedImagePath = "TipNot.png", |
| | | }; |
| | | this.AddChidren(BtnTipNot); |
| | | |
| | | //空空å¦ä¹ |
| | | Button btnTipNotText = new Button() |
| | | { |
| | | Y = tipHeight, |
| | | Height = Application.GetRealHeight(17), |
| | | TextID = StringId.ContentIsEmpty, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | }; |
| | | this.AddChidren(btnTipNotText); |
| | | } |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using Shared; |
| | | using HDL_ON.UI.CSS; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// éç¨LineView |
| | | /// åå²çº¿View |
| | | /// </summary> |
| | | public class LineView : FrameLayout |
| | | { |
| | | //public LineView() |
| | | //{ |
| | | // X = Application.GetRealWidth(16); |
| | | // Height = Application.GetRealHeight(1); |
| | | // Width = Application.GetRealWidth(343); |
| | | // BackgroundColor = CSS_Color.DividingLineColor; |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="parentHeight"></param> |
| | | public LineView(int parentHeight) |
| | | { |
| | | X = Application.GetRealWidth(16); |
| | | Height = Application.GetRealHeight(1); |
| | | Width = Application.GetRealWidth(343); |
| | | BackgroundColor = CSS_Color.DividingLineColor; |
| | | Y = parentHeight - Height; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// éç¨ListCellView |
| | | /// æ¯æå®ä¹ 主æ é¢ã坿 é¢ãgo徿 ãä¸å线ãç¹å»äºä»¶ |
| | | /// </summary> |
| | | public class ListCellView : FrameLayout |
| | | { |
| | | /// <summary> |
| | | /// æ é¢ |
| | | /// </summary> |
| | | public Button BtnTilte; |
| | | /// <summary> |
| | | /// 坿 é¢ |
| | | /// </summary> |
| | | public Button BtnSubtitle; |
| | | /// <summary> |
| | | /// ç®å¤´å¾æ |
| | | /// </summary> |
| | | public Button BtnGo; |
| | | /// <summary> |
| | | /// åå²çº¿ |
| | | /// </summary> |
| | | public LineView LineView; |
| | | /// <summary> |
| | | /// ç¹å»è§¦å对äºä»¶ |
| | | /// </summary> |
| | | public Action GoAction; |
| | | |
| | | |
| | | /// <summary> |
| | | /// ListCellView é»è®¤ |
| | | /// </summary> |
| | | public ListCellView() |
| | | { |
| | | ShowView(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ListCellView æå®åæ° |
| | | /// </summary> |
| | | /// <param name="tilteText"></param> |
| | | /// <param name="subtitleText"></param> |
| | | /// <param name="action"></param> |
| | | /// <param name="isShowImageBtn"></param> |
| | | public ListCellView(string tilteText, string subtitleText, Action action, bool isShowImageBtn = true) |
| | | { |
| | | |
| | | ShowView(tilteText, subtitleText, action, isShowImageBtn); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="tilteText"></param> |
| | | /// <param name="subtitleText"></param> |
| | | /// <param name="action"></param> |
| | | /// <param name="isShowImageBtn"></param> |
| | | void ShowView(string tilteText = "", string subtitleText = "", Action action = null, bool isShowImageBtn = true) |
| | | { |
| | | this.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | this.Height = Application.GetRealHeight(50); |
| | | this.GoAction = action; |
| | | /// <summary> |
| | | /// æ é¢ |
| | | /// </summary> |
| | | BtnTilte = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(120), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | Text = tilteText, |
| | | }; |
| | | this.AddChidren(BtnTilte); |
| | | /// <summary> |
| | | /// 坿 é¢ |
| | | /// </summary> |
| | | BtnSubtitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(100), |
| | | Width = Application.GetRealWidth(230), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = subtitleText, |
| | | |
| | | }; |
| | | this.AddChidren(BtnSubtitle); |
| | | |
| | | /// <summary> |
| | | /// åè¿å¾æ |
| | | /// </summary> |
| | | BtnGo = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/Right.png", |
| | | }; |
| | | |
| | | if (isShowImageBtn) |
| | | { |
| | | this.AddChidren(BtnGo); |
| | | } |
| | | |
| | | LineView = new LineView(this.Height); |
| | | this.AddChidren(LineView); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | GoAction?.Invoke(); |
| | | }; |
| | | BtnTilte.MouseUpEventHandler = eventHandler; |
| | | BtnSubtitle.MouseUpEventHandler = eventHandler; |
| | | BtnGo.MouseUpEventHandler = eventHandler; |
| | | |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// éç¨ListIconCellView |
| | | /// æ¯æå®ä¹ 徿 ã主æ é¢ãgo徿 ãä¸å线ãç¹å»äºä»¶ |
| | | /// </summary> |
| | | public class ListIconCellView : FrameLayout |
| | | { |
| | | /// <summary> |
| | | /// 徿 æé® |
| | | /// </summary> |
| | | public Button BtnIcon; |
| | | /// <summary> |
| | | /// æ é¢ |
| | | /// </summary> |
| | | public Button BtnTilte; |
| | | /// <summary> |
| | | /// ç®å¤´å¾æ æé® |
| | | /// </summary> |
| | | public Button BtnGo; |
| | | /// <summary> |
| | | /// åå²çº¿ |
| | | /// </summary> |
| | | public LineView LineView; |
| | | |
| | | /// <summary> |
| | | /// ç¹å»è§¦å对äºä»¶ |
| | | /// </summary> |
| | | public Action GoAction; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public ListIconCellView() |
| | | { |
| | | ShowView(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | void ShowView() |
| | | { |
| | | this.Height = Application.GetRealHeight(50); |
| | | this.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | |
| | | BtnIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealWidth(24), |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | this.AddChidren(BtnIcon); |
| | | |
| | | /// <summary> |
| | | /// æ é¢ |
| | | /// </summary> |
| | | BtnTilte = new Button() |
| | | { |
| | | X = Application.GetRealWidth(52), |
| | | Width = Application.GetRealWidth(278), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | }; |
| | | |
| | | this.AddChidren(BtnTilte); |
| | | |
| | | /// <summary> |
| | | /// åè¿å¾æ |
| | | /// </summary> |
| | | BtnGo = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/Right.png", |
| | | }; |
| | | this.AddChidren(BtnGo); |
| | | |
| | | LineView = new LineView(this.Height); |
| | | this.AddChidren(LineView); |
| | | //LineView.Y = this.Height - LineView.Height; |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | GoAction?.Invoke(); |
| | | }; |
| | | BtnTilte.MouseUpEventHandler = eventHandler; |
| | | BtnGo.MouseUpEventHandler = eventHandler; |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using Shared; |
| | | |
| | | #if __IOS__ |
| | | using UIKit; |
| | | using Foundation; |
| | | #endif |
| | | |
| | | namespace HDL_ON.UI |
| | |
| | | /// <summary> |
| | | /// TextButton |
| | | /// è§£å³iOS ææ¬å°è¾¹æ¡æè¾¹è·é®é¢ |
| | | /// |
| | | /// </summary> |
| | | public class TextButton : Button |
| | | { |
| | |
| | | #endif |
| | | |
| | | } |
| | | } |
| | | |
| | | int _lineSpacing; |
| | | /// <summary> |
| | | /// 设置è¡é´è· |
| | | /// </summary> |
| | | public int LineSpacing |
| | | { |
| | | set |
| | | { |
| | | _lineSpacing = value; |
| | | SetButtonLineSpacing(_lineSpacing); |
| | | } |
| | | } |
| | | |
| | | |
| | | #if __IOS__ |
| | | /// <summary> |
| | | /// æé®è®¾ç½®è¡è·æ¹æ³ |
| | | /// </summary> |
| | | /// <param name="spacing"></param> |
| | | void SetButtonLineSpacing(int spacing) |
| | | { |
| | | UIStringAttributes stringAttributes = new UIStringAttributes |
| | | { |
| | | Font = (this.uiView as MyButton).TitleLabel.Font, |
| | | ForegroundColor = UIColor.Black, |
| | | ParagraphStyle = new NSMutableParagraphStyle() { LineSpacing = spacing } |
| | | }; |
| | | var AttributedText = new NSMutableAttributedString(Text); |
| | | AttributedText.AddAttributes(stringAttributes, new NSRange(0, Text.Length)); |
| | | (this.uiView as MyButton).TitleLabel.AttributedText = AttributedText; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¾ç¤ºå½åæåéè¦å è¡ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | int GetNeedLinesWithWidth() |
| | | { |
| | | return 0; |
| | | } |
| | | /** |
| | | |
| | | |
| | | // @param width ç»å®ä¸ä¸ªå®½åº¦ |
| | | // @return è¿åè¡æ° |
| | | // */ |
| | | //- (NSInteger) needLinesWithWidth:(CGFloat) width |
| | | // { |
| | | // //å建ä¸ä¸ªlabe |
| | | // UILabel * label = [[UILabel alloc] |
| | | // init]; |
| | | // //fontåå½ålabelä¿æä¸è´ |
| | | // label.font = self.font; |
| | | // NSString* text = self.text; |
| | | // NSInteger sum = 0; |
| | | // //æ»è¡æ°åæ¢è¡ç¬¦å½±åï¼æä»¥è¿éè®¡ç®æ»è¡æ°ï¼éè¦ç¨æ¢è¡ç¬¦åéè¿æ®µæåï¼ç¶åè®¡ç®æ¯æ®µæåçè¡æ°ï¼ç¸å 峿¯æ»è¡æ°ã |
| | | // NSArray* splitText = [text componentsSeparatedByString: @"\n"]; |
| | | // for (NSString* sText in splitText) |
| | | // { |
| | | // label.text = sText; |
| | | // //è·åè¿æ®µæåä¸è¡éè¦çsize |
| | | // CGSize textSize = [label systemLayoutSizeFittingSize: CGSizeZero]; |
| | | // //size.width/æéè¦çwidth åä¸åæ´å°±æ¯è¿æ®µæåå çè¡æ° |
| | | // NSInteger lines = ceilf(textSize.width / width); |
| | | // //彿¯0çæ¶åï¼è¯´æè¿æ¯æ¢è¡ï¼éè¦æä¸è¡ç®ã |
| | | // lines = lines == 0 ? 1 : lines; |
| | | // sum += lines; |
| | | // } |
| | | // return sum; |
| | | // } |
| | | |
| | | //#elif __Android__ |
| | | #else |
| | | |
| | | /// <summary> |
| | | /// æé®è®¾ç½®è¡è·æ¹æ³ |
| | | /// </summary> |
| | | /// <param name="spacing"></param> |
| | | void SetButtonLineSpacing(int spacing) |
| | | { |
| | | (this.AndroidView as Android.Widget.Button).SetLineSpacing(spacing, 1); |
| | | } |
| | | |
| | | #endif |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | using System; |
| | | using Shared; |
| | | using HDL_ON.UI.CSS; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// UpdateTipDialog |
| | | /// </summary> |
| | | public class UpdateTipDialog : Dialog |
| | | { |
| | | |
| | | public UpdateTipDialog() |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åå§åDialog |
| | | /// </summary> |
| | | /// <param name="titleStr"></param> |
| | | /// <param name="tipStr"></param> |
| | | /// <param name="msgStr"></param> |
| | | /// <param name="okAction"></param> |
| | | /// <param name="cancelAction"></param> |
| | | /// <param name="cancelID"></param> |
| | | /// <param name="confirmID"></param> |
| | | void ShowDialogBase(string titleStr, string tipStr, string msgStr, Action okAction, Action cancelAction, bool isForceUpdate, int cancelID = StringId.Ignore, int confirmID = StringId.Update) |
| | | { |
| | | this.BackgroundColor = CSS_Color.DialogTransparentColor1; |
| | | |
| | | FrameLayout contentView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetMinRealAverage(223), |
| | | Width = Application.GetRealWidth(288), |
| | | Height = Application.GetRealHeight(302), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BorderWidth = 0, |
| | | BorderColor = 0x00000000, |
| | | }; |
| | | this.AddChidren(contentView); |
| | | |
| | | Button btnTitle = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetMinRealAverage(95), |
| | | Height = Application.GetMinRealAverage(30), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.EmphasisFontSize_Secondary, |
| | | Text = titleStr |
| | | }; |
| | | contentView.AddChidren(btnTitle); |
| | | |
| | | Button btnTip = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = btnTitle.Bottom, |
| | | Height = Application.GetMinRealAverage(17), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | Text = tipStr |
| | | }; |
| | | contentView.AddChidren(btnTip); |
| | | |
| | | int btnMesY = btnTip.Bottom + Application.GetMinRealAverage(5); |
| | | int lineY = Application.GetRealHeight(258); |
| | | |
| | | VerticalScrolViewLayout mesView = new VerticalScrolViewLayout() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = btnMesY, |
| | | Width = contentView.Width - Application.GetRealWidth(32), |
| | | Height = lineY - btnMesY - Application.GetMinRealAverage(5), |
| | | }; |
| | | contentView.AddChidren(mesView); |
| | | |
| | | Button btnMes = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = mesView.Width, |
| | | Height = mesView.Height, |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsMoreLines = true, |
| | | Text = msgStr, |
| | | //BackgroundColor = CSS_Color.AuxiliaryColor2 |
| | | |
| | | }; |
| | | mesView.AddChidren(btnMes); |
| | | |
| | | Button btnLine = new Button() |
| | | { |
| | | Y = lineY, |
| | | Height = Application.GetRealHeight(1), |
| | | Width = contentView.Width, |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }; |
| | | contentView.AddChidren(btnLine); |
| | | |
| | | if (!isForceUpdate) |
| | | { |
| | | int Width144 = Application.GetRealWidth(144); |
| | | Button btnCancel = new Button() |
| | | { |
| | | Y = btnLine.Bottom, |
| | | Width = Width144, |
| | | Height = Application.GetRealHeight(44), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = cancelID, |
| | | }; |
| | | contentView.AddChidren(btnCancel); |
| | | |
| | | Button btnConfirm = new Button() |
| | | { |
| | | X = contentView.Width - Width144, |
| | | Y = btnLine.Y, |
| | | Width = Width144, |
| | | Height = Application.GetRealHeight(44), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextID = confirmID, |
| | | }; |
| | | contentView.AddChidren(btnConfirm); |
| | | //ä¾ï¼å³ä¸åè§ å¤§å°ä¸º50 |
| | | int mRectCornerID = HDLUtils.RectCornerBottomRight; |
| | | btnConfirm.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(10), mRectCornerID); |
| | | |
| | | btnCancel.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | this.Close(); |
| | | cancelAction?.Invoke(); |
| | | }; |
| | | |
| | | btnConfirm.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | this.Close(); |
| | | okAction?.Invoke(); |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | Button btnConfirm = new Button() |
| | | { |
| | | Y = btnLine.Y, |
| | | Width = contentView.Width, |
| | | Height = Application.GetRealHeight(44), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextID = confirmID, |
| | | }; |
| | | contentView.AddChidren(btnConfirm); |
| | | //ä¾ï¼å³ä¸åè§ å¤§å°ä¸º50 |
| | | int mRectCornerID = HDLUtils.RectCornerBottomRight | HDLUtils.RectCornerBottomLeft; |
| | | btnConfirm.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(10), mRectCornerID); |
| | | |
| | | btnConfirm.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //dialogç¦æ¢å
³é |
| | | okAction?.Invoke(); |
| | | }; |
| | | } |
| | | |
| | | Button btnHeadImage = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetMinRealAverage(152), |
| | | Width = Application.GetMinRealAverage(160), |
| | | Height = Application.GetMinRealAverage(160), |
| | | BorderColor = 0x00000000, |
| | | BorderWidth = 0, |
| | | UnSelectedImagePath = "Public/Dialog/DialogTipTitleIcon_3.png", |
| | | }; |
| | | this.AddChidren(btnHeadImage); |
| | | |
| | | this.Show(); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// å è½½æç¤ºæ´æ°Dialog |
| | | /// </summary> |
| | | /// <param name="titleStr"></param> |
| | | /// <param name="tipStr"></param> |
| | | /// <param name="msgStr"></param> |
| | | /// <param name="okAction"></param> |
| | | /// <param name="cancelAction"></param> |
| | | public void ShowUpdateDialog(string titleStr, string tipStr, string msgStr, Action okAction, Action cancelAction = null) |
| | | { |
| | | this.ShowDialogBase(titleStr, tipStr, msgStr, okAction, cancelAction, false); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å è½½å¼ºå¶æ´æ°Dialog |
| | | /// Dialogä¸å
³é |
| | | /// </summary> |
| | | /// <param name="titleStr"></param> |
| | | /// <param name="tipStr"></param> |
| | | /// <param name="msgStr"></param> |
| | | /// <param name="okAction"></param> |
| | | /// <param name="cancelAction"></param> |
| | | public void ShowForcedUpdateDialog(string titleStr, string tipStr, string msgStr, Action okAction) |
| | | { |
| | | this.ShowDialogBase(titleStr, tipStr, msgStr, okAction, null, true); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åå§åDialog |
| | | /// </summary> |
| | | /// <param name="titleStr"></param> |
| | | /// <param name="tipStr"></param> |
| | | /// <param name="msgStr"></param> |
| | | /// <param name="okAction"></param> |
| | | /// <param name="cancelAction"></param> |
| | | /// <param name="cancelID"></param> |
| | | /// <param name="confirmID"></param> |
| | | void ShowTipDialogBase(string titleStr, string msgStr, Action okAction, int confirmID = StringId.Close) |
| | | { |
| | | this.BackgroundColor = CSS_Color.DialogTransparentColor1; |
| | | |
| | | FrameLayout contentView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetMinRealAverage(223), |
| | | Width = Application.GetRealWidth(288), |
| | | Height = Application.GetRealHeight(302), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BorderWidth = 0, |
| | | BorderColor = 0x00000000, |
| | | }; |
| | | this.AddChidren(contentView); |
| | | |
| | | Button btnTitle = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetMinRealAverage(95), |
| | | Height = Application.GetMinRealAverage(30), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.EmphasisFontSize_Secondary, |
| | | Text = titleStr |
| | | }; |
| | | contentView.AddChidren(btnTitle); |
| | | |
| | | int btnMesY = btnTitle.Bottom + Application.GetMinRealAverage(5); |
| | | int lineY = Application.GetRealHeight(258); |
| | | |
| | | VerticalScrolViewLayout mesView = new VerticalScrolViewLayout() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = btnMesY, |
| | | Width = contentView.Width - Application.GetRealWidth(32), |
| | | Height = lineY - btnMesY - Application.GetMinRealAverage(5), |
| | | }; |
| | | contentView.AddChidren(mesView); |
| | | |
| | | Button btnMes = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = mesView.Width, |
| | | Height = mesView.Height, |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsMoreLines = true, |
| | | Text = msgStr, |
| | | BackgroundColor = CSS_Color.AuxiliaryColor2 |
| | | |
| | | }; |
| | | mesView.AddChidren(btnMes); |
| | | |
| | | Button btnLine = new Button() |
| | | { |
| | | Y = lineY, |
| | | Height = Application.GetRealHeight(1), |
| | | Width = contentView.Width, |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }; |
| | | contentView.AddChidren(btnLine); |
| | | |
| | | |
| | | Button btnConfirm = new Button() |
| | | { |
| | | Y = btnLine.Y, |
| | | Width = contentView.Width, |
| | | Height = Application.GetRealHeight(44), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextID = confirmID, |
| | | }; |
| | | contentView.AddChidren(btnConfirm); |
| | | //ä¾ï¼å³ä¸åè§ å¤§å°ä¸º50 |
| | | int mRectCornerID = HDLUtils.RectCornerBottomRight | HDLUtils.RectCornerBottomLeft; |
| | | btnConfirm.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(10), mRectCornerID); |
| | | |
| | | btnConfirm.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | this.Close(); |
| | | okAction?.Invoke(); |
| | | }; |
| | | |
| | | Button btnHeadImage = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetMinRealAverage(152), |
| | | Width = Application.GetMinRealAverage(160), |
| | | Height = Application.GetMinRealAverage(160), |
| | | BorderColor = 0x00000000, |
| | | BorderWidth = 0, |
| | | UnSelectedImagePath = "Public/Dialog/DialogTipTitleIcon_3.png", |
| | | }; |
| | | this.AddChidren(btnHeadImage); |
| | | |
| | | this.Show(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å è½½æç¤ºéç¥Dialog |
| | | /// </summary> |
| | | /// <param name="titleStr"></param> |
| | | /// <param name="tipStr"></param> |
| | | /// <param name="msgStr"></param> |
| | | /// <param name="okAction"></param> |
| | | /// <param name="cancelAction"></param> |
| | | public void ShowTipDialog(string titleStr, string msgStr, Action okAction) |
| | | { |
| | | this.ShowTipDialogBase(titleStr, msgStr, okAction); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
File was renamed from HDL_ON/UI/UI0-Public/WebViewDialog.cs |
| | |
| | | /// </summary> |
| | | public class WebViewDialog : Dialog |
| | | { |
| | | /// <summary> |
| | | /// bodyView |
| | | /// </summary> |
| | | FrameLayout bodyView; |
| | | |
| | | /// <summary> |
| | | /// WebViewDialog |
| | | /// </summary> |
| | | public WebViewDialog() |
| | | { |
| | | bodyView = new FrameLayout(); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// å è½½é¡µé¢ |
| | | /// </summary> |
| | | /// <param name="titleStr"></param> |
| | | /// <param name="url"></param> |
| | | public void LoadPage(string titleStr, string url) |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | this.AddChidren(bodyView); |
| | | new TopViewDiv(this, bodyView, titleStr).LoadTopView(); |
| | | |
| | |
| | | var webView = new WebView() { |
| | | Y = Application.GetRealHeight(64), |
| | | Height = bodyView.Height - Application.GetRealHeight(64), |
| | | X = Application.GetRealWidth(16), |
| | | Width = bodyView.Width - Application.GetRealWidth(32) |
| | | }; |
| | | bodyView.AddChidren(webView); |
| | | |
| | | //å è½½ç½å |
| | | webView.LoadRequest(url); |
| | | this.Show(); |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(421), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Radius = (uint)Application.GetRealHeight(22), |
| | | Height = Application.GetRealWidth(44), |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | BackgroundColor = CSS_Color.PromptingColor1, |
| | | TextID = StringId.ConfirmReset, |
| | |
| | | Width = Application.GetRealWidth(288), |
| | | Height = Application.GetRealHeight(206), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | Radius = (uint)Application.GetRealHeight(12), |
| | | BorderWidth = 0, |
| | | BorderColor = 0x00000000, |
| | | }; |
| | |
| | | Y = Application.GetRealHeight(150), |
| | | Width = Application.GetRealWidth(84), |
| | | Height = Application.GetRealWidth(84), |
| | | Radius = (uint)Application.GetRealWidth(42), |
| | | Radius = (uint)Application.GetRealHeight(42), |
| | | BorderColor = 0x00000000, |
| | | BorderWidth = 0, |
| | | UnSelectedImagePath = "LoginIcon/2.png", |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(403), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Radius = (uint)Application.GetRealHeight(22), |
| | | Height = Application.GetRealWidth(44), |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | BackgroundColor = CSS_Color.PromptingColor1, |
| | | TextID = StringId.Login, |
| | |
| | | /// <param name="isOpenPrivacyPolicy">æ¯å¦éç§æ¿ç</param> |
| | | private void OpenWebViewPage(bool isOpenPrivacyPolicy) |
| | | { |
| | | string url = isAgreePrivacyPolicy ? Constant.URL_PrivacyPolicy : Constant.URL_UserAgreement; |
| | | string titleStr = isAgreePrivacyPolicy ? Language.StringByID(StringId.PrivacyPolicy) : Language.StringByID(StringId.UserAgreement); |
| | | string url = isOpenPrivacyPolicy ? Constant.URL_PRIVACYPOLICY : Constant.URL_USERAGREEMENT; |
| | | string titleStr = isOpenPrivacyPolicy ? Language.StringByID(StringId.PrivacyPolicy) : Language.StringByID(StringId.UserAgreement); |
| | | new WebViewDialog().LoadPage(titleStr, url); |
| | | } |
| | | |
| | |
| | | using System; |
| | | using System; |
| | | using System.Text.RegularExpressions; |
| | | using System.Threading; |
| | | using System.Collections.Generic; |
| | |
| | | if (result.Code != StateCode.SUCCESS) |
| | | { |
| | | IMessageCommon.Current.ShowErrorInfoAlter(result.Code); |
| | | ShowBtnAccountViewBottomLineError(); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | //æ£æµå½åé
ç½®å忝å¦ä¸è´ï¼ä¸ä¸è´åæ¿æ¢ |
| | | CheckAndSetUserRequestHost(result); |
| | | // |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnGetVerificationCode.IsSelected = false; |
| | | btnGetVerificationCode.TextColor = CSS_Color.PromptingColor1; |
| | | }); |
| | | new Thread(() => |
| | | { |
| | | while (time > 0) |
| | | { |
| | | time--; |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnGetVerificationCode.Text = time.ToString() + "s"; |
| | | }); |
| | | Thread.Sleep(1000); |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnGetVerificationCode.IsSelected = true; |
| | | btnGetVerificationCode.TextID = StringId.GetVerificationCode; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | //2.1请æ±è·åéªè¯ç |
| | | var resultObj = pm.VerificationCodeSend(VerifyType.VERIFY_LOGIN, account, true, phoneZoneCode); |
| | |
| | | // æç¤ºé误 |
| | | IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnGetVerificationCode.IsSelected = false; |
| | | btnGetVerificationCode.TextColor = CSS_Color.PromptingColor1; |
| | | }); |
| | | |
| | | new Thread(() => |
| | | { |
| | | while (time > 0) |
| | | { |
| | | time--; |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnGetVerificationCode.Text = time.ToString() + "s"; |
| | | }); |
| | | Thread.Sleep(1000); |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnGetVerificationCode.IsSelected = true; |
| | | btnGetVerificationCode.TextID = StringId.GetVerificationCode; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | } |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | // btnGetVerificationCode.IsSelected = false ; |
| | | // btnGetVerificationCode.TextColor = CSS_Color.PromptingColor1; |
| | | // int time = 60; |
| | | // new Thread(() => |
| | | // { |
| | | // while (time > 0) |
| | | // { |
| | | // time--; |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // btnGetVerificationCode.Text = time.ToString() + "s"; |
| | | // }); |
| | | // Thread.Sleep(1000); |
| | | // } |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // btnGetVerificationCode.IsSelected = true; |
| | | // btnGetVerificationCode.TextID = StringId.GetVerificationCode; |
| | | // }); |
| | | // }) |
| | | // { IsBackground = true }.Start(); |
| | | // new Thread(() => |
| | | // { |
| | | // //è·åéªè¯ç |
| | | // var result = pm.GetLoginVerCode(phoneNumber); |
| | | // if (result.StateCode.ToUpper() == StateCode.SUCCESS_CODE) |
| | | // { |
| | | // } |
| | | // //ç»å½å¤±è´¥ |
| | | // else |
| | | // { |
| | | // string tipStr = "Sever erorr"; |
| | | // switch (result.StateCode.ToUpper()) |
| | | // { |
| | | // case "USERNAMEORPWDERROR": |
| | | // tipStr = Language.StringByID(StringId.LoginFailed_AccountOrPasswordError); |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // btnPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | // btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); |
| | | // }); |
| | | // break; |
| | | // case "ACCOUNTNOEXISTS": |
| | | // tipStr = Language.StringByID(StringId.ACCOUNTNOEXISTS); |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | // btnAccountViewBottomLine.Height = Application.GetRealHeight(2); |
| | | // }); |
| | | // break; |
| | | // case "SENDFAIL": |
| | | // tipStr = Language.StringByID(StringId.FailedToSendVerificationCode); |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | // btnAccountViewBottomLine.Height = Application.GetRealHeight(2); |
| | | // }); |
| | | // break; |
| | | // case "Self:Net_Error": |
| | | // tipStr = Language.StringByID(StringId.NetworkAnomaly); |
| | | // break; |
| | | // } |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // //æç¤ºåå |
| | | // var tip = new Tip() |
| | | // { |
| | | // Text = tipStr, |
| | | // CloseTime = 1, |
| | | // Direction = AMPopTipDirection.None |
| | | // }; |
| | | // tip.Show(bodyView); |
| | | // }); |
| | | // } |
| | | // }) |
| | | // { IsBackground = true }.Start(); |
| | | } |
| | | }; |
| | | } |
| | |
| | | |
| | | //if (btnGetVerificationCode.Parent != null) |
| | | //{ |
| | | //btnGetVerificationCode.RemoveFromParent(); |
| | | btnGetVerificationCode.Visible = false; |
| | | //btnGetVerificationCode.RemoveFromParent(); |
| | | btnGetVerificationCode.Visible = false; |
| | | //} |
| | | //éèå¯ç |
| | | etPassword.SecureTextEntry = true; |
| | |
| | | btnPasswordIcon.IsSelected = false; |
| | | //if (btnGetVerificationCode.Parent != null) |
| | | //{ |
| | | //btnGetVerificationCode.RemoveFromParent(); |
| | | btnGetVerificationCode.Visible = false; |
| | | //btnGetVerificationCode.RemoveFromParent(); |
| | | btnGetVerificationCode.Visible = false; |
| | | //} |
| | | //éèå¯ç |
| | | etPassword.SecureTextEntry = true; |
| | |
| | | { |
| | | btnLogin.IsSelected = false; |
| | | } |
| | | if (Regex.IsMatch(account, @"^[1]+\d{10}") )//&& account.Length == 11) |
| | | if (Regex.IsMatch(account, @"^[1]+\d{10}"))//&& account.Length == 11) |
| | | { |
| | | btnGetVerificationCode.IsSelected = true; |
| | | btnGetVerificationCode.TextColor = CSS_Color.MainBackgroundColor; |
| | |
| | | if (result.Code != StateCode.SUCCESS) |
| | | { |
| | | IMessageCommon.Current.ShowErrorInfoAlter(result.Code); |
| | | ShowBtnAccountViewBottomLineError(); |
| | | return; |
| | | } |
| | | else |
| | |
| | | |
| | | //ç»å½ |
| | | var loginResult = LoadMethod_Login(); |
| | | if( !string.IsNullOrEmpty (verAccount))//éªè¯ç»å½è´¦å· |
| | | if (!string.IsNullOrEmpty(verAccount))//éªè¯ç»å½è´¦å· |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | OnAppConfig.Instance.RefreshUserConfig(); |
| | | DB_ResidenceData.InitRoomFunction(); |
| | | } |
| | | if ( UserInfo.Current.userEmailInfo == "464027401@qq.com") |
| | | if (UserInfo.Current.userEmailInfo == "464027401@qq.com") |
| | | { |
| | | DB_ResidenceData.residenceData.floors.Add(new Floor() { name = "1F", sid = "09888" }); |
| | | var r111 = new Room() { sid = "0001", name = "Room-1", floorId = "09888", backgroundImage = "Classification/Room/Roombg.png" }; |
| | |
| | | //ç»å½å¤±è´¥ |
| | | else |
| | | { |
| | | //2020-11-13 å¾
ä¿®æ¹ |
| | | string tipStr = "Sever erorr"; |
| | | switch (loginResult.Code) |
| | | { |
| | | case "ValidCodeAndPhoneNoEqual": |
| | | tipStr = Language.StringByID(StringId.VerificationCodeError); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); |
| | | }); |
| | | break; |
| | | case "USERNAMEORPWDERROR": |
| | | tipStr = Language.StringByID(StringId.LoginFailed_AccountOrPasswordError); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); |
| | | }); |
| | | break; |
| | | case "ACCOUNTNOEXISTS": |
| | | tipStr = Language.StringByID(StringId.ACCOUNTNOEXISTS); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | btnAccountViewBottomLine.Height = Application.GetRealHeight(2); |
| | | }); |
| | | break; |
| | | case "NoRecord": |
| | | tipStr = Language.StringByID(StringId.PlsGetTheVerificationCode); |
| | | break; |
| | | case "Self:Net_Error": |
| | | tipStr = Language.StringByID(StringId.NetworkAnomaly); |
| | | break; |
| | | } |
| | | //è´¦å·æè
å¯ç é误 |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | //æç¤ºåå |
| | | var tip = new Tip() |
| | | if (loginResult.Code == "10008") |
| | | { |
| | | Text = tipStr, |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(bodyView); |
| | | //ç¨æ·åæå¯ç é误 |
| | | btnPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); |
| | | } |
| | | else if (loginResult.Code == "10010") |
| | | { |
| | | //ç¨æ·ä¸åå¨ |
| | | btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | btnAccountViewBottomLine.Height = Application.GetRealHeight(2); |
| | | } |
| | | else if (loginResult.Code == "14") |
| | | { |
| | | btnPasswordViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); |
| | | } |
| | | waitPage.Hide(); |
| | | }); |
| | | |
| | | IMessageCommon.Current.ShowErrorInfoAlter(loginResult.Code); |
| | | } |
| | | return result; |
| | | } |
| | |
| | | if (responsePack == StateCode.SUCCESS) |
| | | { |
| | | //2020-11-13 å¾
ç¡®è®¤ï¼æ²¡æä½å®
ï¼ä¸ç®ç»å½æå |
| | | if ( UserInfo.Current.regionList != null && UserInfo.Current.regionList.Count > 0){ |
| | | if (UserInfo.Current.regionList != null && UserInfo.Current.regionList.Count > 0) |
| | | { |
| | | result = true; |
| | | } |
| | | //result = true; |
| | |
| | | // }); |
| | | //}; |
| | | |
| | | //夿æ¯å¦åæäºéç§æ¿ç |
| | | if (CheckPrivacyPolicy() == false) return; |
| | | |
| | | var registerPage = new RegisterPage(); |
| | | registerPage.Show(); |
| | | registerPage.ShowDialog(); |
| | |
| | | |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç¨æ·ä¸åå¨ |
| | | /// </summary> |
| | | void ShowBtnAccountViewBottomLineError() |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //ç¨æ·ä¸åå¨ |
| | | btnAccountViewBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | btnAccountViewBottomLine.Height = Application.GetRealHeight(2); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | /// éæ©é®ç®±ç»å½æé® |
| | | /// </summary> |
| | | Button btnEmailLogin; |
| | | #region æå¡å¨éæ© |
| | | /// <summary> |
| | | /// æå¡å¨åºå |
| | | /// </summary> |
| | | FrameLayout serverView; |
| | | /// <summary> |
| | | /// æå¡å¨Iconæé® |
| | | /// </summary> |
| | | Button btnServerIcon; |
| | | /// <summary> |
| | | /// æå¡å¨ææ¬æ¡ |
| | | /// </summary> |
| | | Button btnServerText; |
| | | ///// <summary> |
| | | ///// æå¡å¨ææ¬æ¡ |
| | | ///// </summary> |
| | | //EditText etServer; |
| | | ///// <summary> |
| | | ///// æå¡å¨ååºåéé¢çåå²çº¿1 |
| | | ///// </summary> |
| | | //Button btnLineVertical_server; |
| | | /// <summary> |
| | | ///æå¡å¨goæé® |
| | | /// </summary> |
| | | Button btnServerGo; |
| | | /// <summary> |
| | | /// æå¡å¨ååºååºé¨æ¨ªçº¿ |
| | | /// </summary> |
| | | Button btnServerBottomLine; |
| | | #endregion |
| | | /// <summary> |
| | | /// è´¦å·ååºå |
| | | /// </summary> |
| | |
| | | /// ææºåºå· |
| | | /// </summary> |
| | | string phoneZoneCode = "86"; |
| | | /// <summary> |
| | | /// æ¯å¦éæ©è¿æå¡å¨ |
| | | /// </summary> |
| | | bool isSelectServer; |
| | | |
| | | string registerPhone; |
| | | string registerEmail; |
| | |
| | | bodyView.AddChidren(btnEmailLogin); |
| | | #endregion |
| | | |
| | | #region æå¡å¨éæ© |
| | | serverView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(28), |
| | | Y = Application.GetRealHeight(167), |
| | | Width = Application.GetRealWidth(319), |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | | bodyView.AddChidren(serverView); |
| | | |
| | | btnServerIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(9), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(20), |
| | | Height = Application.GetMinRealAverage(20), |
| | | UnSelectedImagePath = "LoginIcon/Server.png", |
| | | |
| | | }; |
| | | serverView.AddChidren(btnServerIcon); |
| | | |
| | | btnServerText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(49), |
| | | Width = Application.GetRealWidth(319 - 78), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextID = StringId.PleaseSelectCountryOrRegion, |
| | | }; |
| | | serverView.AddChidren(btnServerText); |
| | | |
| | | #region å¯ç ç»å½-æ§ä»¶å è½½ |
| | | btnServerGo = new Button() |
| | | { |
| | | X = Application.GetRealWidth(303), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/Right.png", |
| | | }; |
| | | serverView.AddChidren(btnServerGo); |
| | | |
| | | #endregion |
| | | btnServerBottomLine = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(42), |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | Height = Application.GetRealHeight(1), |
| | | }; |
| | | serverView.AddChidren(btnServerBottomLine); |
| | | #endregion |
| | | |
| | | int topPadding = Application.GetRealHeight(12); |
| | | #region è´¦å·å¡«å |
| | | accountView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(28), |
| | | Y = Application.GetRealHeight(167), |
| | | Y = serverView.Bottom + topPadding, |
| | | Width = Application.GetRealWidth(319), |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | |
| | | passwordView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(28), |
| | | Y = Application.GetRealHeight(223), |
| | | Y = accountView.Bottom + topPadding, |
| | | Width = Application.GetRealWidth(319), |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | |
| | | repeatPasswordView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(28), |
| | | Y = Application.GetRealHeight(279), |
| | | Y = passwordView.Bottom + topPadding, |
| | | Width = Application.GetRealWidth(319), |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | |
| | | verificationCodeView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(28), |
| | | Y = Application.GetRealHeight(335), |
| | | Y = repeatPasswordView.Bottom + topPadding, |
| | | //Y = Application.GetRealHeight(335), |
| | | Width = Application.GetRealWidth(319), |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | |
| | | btnRegister = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(421), |
| | | Y = verificationCodeView.Bottom + Application.GetRealHeight(42), |
| | | //Y = Application.GetRealHeight(421), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Radius = (uint)Application.GetRealHeight(22), |
| | | Height = Application.GetRealWidth(44), |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | BackgroundColor = CSS_Color.PromptingColor1, |
| | | TextID = StringId.Register, |
| | |
| | | var responsePack = pm.GetHomePager(); |
| | | if (responsePack == StateCode.SUCCESS) |
| | | { |
| | | //2020-11-13 å¾
ç¡®è®¤ï¼æ²¡æä½å®
ï¼ä¸ç®ç»å½æå |
| | | if (UserInfo.Current.regionList != null && UserInfo.Current.regionList.Count > 0) |
| | | { |
| | | result = true; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | var tipStr = "Server erorr"; |
| | | switch (responsePack) |
| | | { |
| | | case "NoLogin": |
| | | tipStr = Language.StringByID(StringId.InvalidLoginCertificate); |
| | | break; |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //æç¤ºåå |
| | | var tip = new Tip() |
| | | { |
| | | Text = tipStr, |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(bodyView); |
| | | }); |
| | | |
| | | IMessageCommon.Current.ShowErrorInfoAlter(responsePack); |
| | | } |
| | | return result; |
| | | } |
| | |
| | | LoadEvent_Register(); |
| | | LoadEvent_LimtPasswordLength(); |
| | | LoadEvent_TextChange(); |
| | | LoadEvent_Server(); |
| | | //var areaCodeList = pm.GetAreaCode(); |
| | | } |
| | | /// <summary> |
| | |
| | | //éæ©ææºæ³¨å |
| | | btnPhoneLogin.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if(registerType == 0) |
| | | if (registerType == 0) |
| | | { |
| | | return; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | if(accountType ==0) |
| | | if (accountType == 0) |
| | | { |
| | | registerPhone = etAccount.Text.Trim(); |
| | | } |
| | |
| | | { |
| | | if ((sender as Button).IsSelected) |
| | | { |
| | | //夿æ¯å¦éæ©äºæå¡å¨ï¼éæ©äºæè½åééªè¯ç |
| | | if (CheckIfSelectServer() == false) return; |
| | | |
| | | string account = etAccount.Text.Trim(); |
| | | int time = 60; |
| | | new Thread(() => |
| | |
| | | { |
| | | //çä¿¡åéé´é60s |
| | | (sender as Button).IsSelected = false; |
| | | |
| | | |
| | | }); |
| | | //2.1 å¼å§åè®¡æ¶ |
| | | new Thread(() => |
| | |
| | | IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); |
| | | } |
| | | |
| | | }else if (result.Code.ToUpper() == StateCode.SUCCESS) |
| | | } |
| | | else if (result.Code.ToUpper() == StateCode.SUCCESS) |
| | | { |
| | | //3.æç¤ºè´¦å·å·²åå¨ï¼æ æ³é夿³¨å |
| | | Utlis.ShowAlertOnMainThread(Language.StringByID(StringId.AccountAlreadyUse)); |
| | | } else |
| | | } |
| | | else |
| | | { |
| | | //4.æç¤ºå
¶å®å¼å¸¸é误 |
| | | IMessageCommon.Current.ShowErrorInfoAlter(result.Code); |
| | |
| | | { |
| | | btnRegister.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if(etPassword.Text.Trim().Length > 13 || etPassword.Text.Trim().Length<6) |
| | | if (etPassword.Text.Trim().Length > 13 || etPassword.Text.Trim().Length < 6) |
| | | { |
| | | new Tip() |
| | | { |
| | |
| | | } |
| | | if (btnRegister.IsSelected) |
| | | { |
| | | //夿æ¯å¦éæ©äºæå¡å¨ï¼éæ©äºæè½åééªè¯ç |
| | | if (CheckIfSelectServer() == false) return; |
| | | |
| | | waitPage = new Loading(); |
| | | new PublicAssmebly().LoadPage_WaitPage(LoadMethod_RegisterThread(), bodyView, waitPage); |
| | | } |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å è½½æå¡å¨éæ©æé®äºä»¶ |
| | | /// </summary> |
| | | void LoadEvent_Server() |
| | | { |
| | | //夿ä¹åæ¯å¦éæ©è¿ |
| | | if (UserInfo.Current.GlobalRegion != null && !string.IsNullOrEmpty(UserInfo.Current.GlobalRegion.regionUrl)) |
| | | { |
| | | |
| | | SetServerText(); |
| | | } |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | Action selectAction = () => |
| | | { |
| | | //æå¡å¨éæ©è¿æ 记为true |
| | | SetServerText(); |
| | | }; |
| | | new SelectServerDialog(selectAction).LoadPage(); |
| | | |
| | | }; |
| | | |
| | | btnServerGo.MouseUpEventHandler = eventHandler; |
| | | btnServerText.MouseUpEventHandler = eventHandler; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ£æµæ¯å¦éæ©äºæå¡å¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private bool CheckIfSelectServer() |
| | | { |
| | | if (isSelectServer == false) |
| | | { |
| | | //请å
éæ©å½å®¶/åºå |
| | | Utlis.ShowTip(Language.StringByID(StringId.PleaseSelectCountryOrRegion)); |
| | | ShowServerBottomLineState(true); |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æå¡å¨ä¸åçº¿æ ·å¼ |
| | | /// </summary> |
| | | /// <param name="isError"></param> |
| | | void ShowServerBottomLineState(bool isError) |
| | | { |
| | | if (isError) |
| | | { |
| | | btnServerBottomLine.BackgroundColor = CSS_Color.AuxiliaryColor2; |
| | | btnServerBottomLine.Height = Application.GetRealHeight(2); |
| | | } |
| | | else |
| | | { |
| | | btnServerBottomLine.BackgroundColor = CSS_Color.DividingLineColor; |
| | | btnServerBottomLine.Height = Application.GetRealHeight(1); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | void SetServerText() |
| | | { |
| | | //æå¡å¨éæ©è¿æ 记为true |
| | | isSelectServer = true; |
| | | ShowServerBottomLineState(false); |
| | | btnServerText.TextColor = CSS_Color.FirstLevelTitleColor; |
| | | btnServerText.Text = UserInfo.Current.GlobalRegion.regionName; |
| | | } |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public SelectServerDialog() |
| | | public SelectServerDialog(Action selectAction) |
| | | { |
| | | bodyView = new FrameLayout(); |
| | | this.selectAction = selectAction; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public void LoadPage() |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | this.AddChidren(bodyView); |
| | | new TopViewDiv(this, bodyView, Language.StringByID(StringId.SelectCountryOrRegion)).LoadTopView(); |
| | | |
| | | //å 载顶é¨èåæ |
| | | new TopViewDiv(this, bodyView, Language.StringByID(StringId.PleaseSelectCountryOrRegion)).LoadTopView(); |
| | | //å è½½æå¡å¨åºåéæ© |
| | | AddRegionalSelectionView(); |
| | | //Show |
| | | this.Show(); |
| | | } |
| | | |
| | | |
| | |
| | | }; |
| | | bodyView.AddChidren(VerticalScrolViewMiddle); |
| | | |
| | | //var TipView = new Button() |
| | | //{ |
| | | // Y = bodyView.Height - Application.GetRealHeight(60), |
| | | // Width = LayoutParams.MatchParent, |
| | | // Height = Application.GetRealHeight(60), |
| | | // BackgroundColor = 0xFFFFFFE0, |
| | | // TextSize = 11, |
| | | // //Text = "è¯·éæ©æ³¨åçåºå", |
| | | // //TextID = R.MyInternationalizationString.SelectRegisteredArea, |
| | | // TextColor = 0xFF1F1F1F, |
| | | // IsMoreLines = true |
| | | //}; |
| | | //bodyView.AddChidren(TipView); |
| | | |
| | | var waitPage = new Loading(); |
| | | waitPage.Start("Please wait..."); |
| | | |
| | | System.Threading.Tasks.Task.Run(() => { |
| | | System.Threading.Tasks.Task.Run(() => |
| | | { |
| | | try |
| | | { |
| | | var dataList = new List<GlobalRegionListRes>(); |
| | |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_GlobalRegionList, requestJson, HttpUtil.GlobalRequestHttpsHost); |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var responseDataObj = Newtonsoft.Json.JsonConvert.DeserializeObject<List<GlobalRegionListRes>>(revertObj.Data.ToString()); |
| | | if (responseDataObj != null) |
| | | { |
| | |
| | | } |
| | | catch |
| | | { |
| | | |
| | | |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | }); |
| | | } |
| | |
| | | /// <param name="VerticalScrolViewMiddle"></param> |
| | | void AddRowView(GlobalRegionListRes mGlobalRegion, VerticalScrolViewLayout VerticalScrolViewMiddle) |
| | | { |
| | | var rowView = new RowLayout() |
| | | var rowView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | | VerticalScrolViewMiddle.AddChidren(rowView); |
| | | |
| | | var urlBtn = new Button() { |
| | | var urlBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Height = rowView.Height, |
| | | Width = Application.GetRealWidth(200), |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Gravity = Gravity.CenterLeft |
| | | TextAlignment = TextAlignment.CenterLeft |
| | | }; |
| | | rowView.AddChidren(urlBtn); |
| | | |
| | | var lineView = new LineView(); |
| | | rowView.AddChidren(lineView); |
| | | lineView.Y = rowView.Height - lineView.Height; |
| | | //var lineView = new LineView(); |
| | | //rowView.AddChidren(lineView); |
| | | //lineView.Y = rowView.Height - lineView.Height; |
| | | |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => { |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => |
| | | { |
| | | UserInfo.Current.RequestHttpsHost = mGlobalRegion.regionUrl; |
| | | UserInfo.Current.GlobalRegion = mGlobalRegion; |
| | | UserInfo.Current.SaveUserInfo(); |
| | |
| | | rowView.MouseUpEventHandler += eHandler; |
| | | urlBtn.MouseUpEventHandler += eHandler; |
| | | |
| | | urlBtn.Text = mGlobalRegion.regionName; |
| | | |
| | | if (mGlobalRegion.regionUrl == UserInfo.Current.RequestHttpsHost) |
| | | { |
New file |
| | |
| | | using System; |
| | | using Shared; |
| | | using HDL_ON.UI.CSS; |
| | | using System.Net; |
| | | using System.Text; |
| | | using HDL_ON.DAL.Server; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// å
³äºé¡µé¢ |
| | | /// </summary> |
| | | public class AboutOnPage : FrameLayout |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | FrameLayout bodyView; |
| | | /// <summary> |
| | | /// çæ¬æ´æ°ListCellView |
| | | /// </summary> |
| | | ListCellView versionUpdateView; |
| | | |
| | | /// <summary> |
| | | /// æ°çæ¬ççæ¬å·ï¼æ¥è¯¢å°æ°çæ¬æèµå¼ |
| | | /// </summary> |
| | | string newAppVersion; |
| | | /// <summary> |
| | | /// æ°çæ¬çä¸è½½å°å |
| | | /// iOS é»è®¤ä¸ºè¹æååºå°å |
| | | /// Android äºç«¯è¿åå°å |
| | | /// </summary> |
| | | string newAppVersionUrl = ""; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AboutOnPage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public void LoadPage() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.About)).LoadTopView(); |
| | | |
| | | Button btnOnIcon = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(106), |
| | | Width = Application.GetRealWidth(58), |
| | | Height = Application.GetRealWidth(58), |
| | | UnSelectedImagePath = "OnIcon.png", |
| | | }; |
| | | bodyView.AddChidren(btnOnIcon); |
| | | |
| | | Button btnOnTitle = new Button() |
| | | { |
| | | //Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(184), |
| | | Height = Application.GetRealWidth(28), |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = "ON+", |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.EmphasisFontSize_Secondary, |
| | | IsBold = true, |
| | | }; |
| | | bodyView.AddChidren(btnOnTitle); |
| | | |
| | | Button btnOnVersion = new Button() |
| | | { |
| | | Y = btnOnTitle.Bottom, |
| | | Height = Application.GetRealWidth(25), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | Text = Language.StringByID(StringId.VersionNumber) + " " + MainPage.VersionString, |
| | | }; |
| | | bodyView.AddChidren(btnOnVersion); |
| | | |
| | | |
| | | var lineView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(281), |
| | | Height = Application.GetRealHeight(1), |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }; |
| | | bodyView.AddChidren(lineView); |
| | | |
| | | #region åè½ä»ç» |
| | | var functionView = new ListCellView() |
| | | { |
| | | Y = lineView.Bottom, |
| | | }; |
| | | bodyView.AddChidren(functionView); |
| | | functionView.BtnTilte.TextID = StringId.FunctionIntroduced; |
| | | Action functionAction = () => |
| | | { |
| | | var mPage = new FunctionIntroductionPage(); |
| | | MainPage.BasePageView.AddChidren(mPage); |
| | | mPage.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | functionView.GoAction = functionAction; |
| | | #endregion |
| | | |
| | | #region æè¯ |
| | | var complaintsView = new ListCellView() |
| | | { |
| | | Y = functionView.Bottom, |
| | | }; |
| | | bodyView.AddChidren(complaintsView); |
| | | complaintsView.BtnTilte.TextID = StringId.Complaints; |
| | | Action complaintsAction = () => |
| | | { |
| | | var mPage = new ComplaintsPage(); |
| | | MainPage.BasePageView.AddChidren(mPage); |
| | | mPage.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | complaintsView.GoAction = complaintsAction; |
| | | #endregion |
| | | |
| | | #region çæ¬æ´æ° |
| | | versionUpdateView = new ListCellView() |
| | | { |
| | | Y = complaintsView.Bottom, |
| | | }; |
| | | bodyView.AddChidren(versionUpdateView); |
| | | versionUpdateView.BtnTilte.TextID = StringId.VersionUpdate; |
| | | Action versionUpdateAction = () => |
| | | { |
| | | //OpenUrl(); |
| | | |
| | | TestDDDDD(); |
| | | }; |
| | | versionUpdateView.GoAction = versionUpdateAction; |
| | | #endregion |
| | | |
| | | CheckIfNeedUpdateAsync(); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 夿æ¯å¦éè¦è°æ´æ°çæ¬ä¸è½½å°å |
| | | /// </summary> |
| | | void OpenUrl() |
| | | { |
| | | if (!string.IsNullOrEmpty(newAppVersion)) |
| | | { |
| | | HDLUtils.OpenUrl(newAppVersionUrl); |
| | | } |
| | | else |
| | | { |
| | | Utlis.ShowTip(Language.StringByID(StringId.IsLatestVersion)); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ£æµæ¯å¦éè¦æ´æ° |
| | | /// Androidçæ¥å£å®ç° |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | void CheckIfNeedUpdateAsync(bool isTip = false) |
| | | { |
| | | new System.Threading.Thread(() => |
| | | { |
| | | newAppVersion = CanUpdateAsync(); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (!string.IsNullOrEmpty(newAppVersion)) |
| | | { |
| | | //åç°æ°çæ¬ |
| | | versionUpdateView.BtnSubtitle.TextColor = CSS_Color.MainColor; |
| | | versionUpdateView.BtnSubtitle.Text = Language.StringByID(StringId.DiscoverNewVersion) + "(" + newAppVersion + ")"; |
| | | } |
| | | else |
| | | { |
| | | //å·²ç»æ¯ææ°çæ¬ |
| | | versionUpdateView.BtnSubtitle.TextColor = CSS_Color.PromptingColor1; |
| | | versionUpdateView.BtnSubtitle.Text = Language.StringByID(StringId.IsLatestVersion); |
| | | } |
| | | }); |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ£æ¥çæ¬ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | string CanUpdateAsync() |
| | | { |
| | | #if __IOS__ |
| | | try |
| | | { |
| | | var versionResult = RequestHttpsiOSAppVersionAsync(); |
| | | if (versionResult == null || versionResult.Results == null) |
| | | { |
| | | return ""; |
| | | } |
| | | var results = Newtonsoft.Json.Linq.JArray.Parse(versionResult.Results.ToString()); |
| | | if (results[0] == null) |
| | | { |
| | | return ""; |
| | | } |
| | | var newVersion = results[0]["version"]?.ToString(); |
| | | //var updateContent = results[0]["releaseNotes"]?.ToString(); |
| | | if (newVersion.CompareTo(MainPage.VersionString) > 0) |
| | | { |
| | | newAppVersionUrl = Constant.URL_APPSTORE; |
| | | return newVersion; |
| | | } |
| | | return ""; |
| | | } |
| | | catch |
| | | { |
| | | return ""; |
| | | } |
| | | |
| | | #else |
| | | try |
| | | { |
| | | var versionResult = GetAndroidAppVersion(); |
| | | if (versionResult == null) |
| | | { |
| | | return ""; |
| | | } |
| | | var newVersion = versionResult.NewVersion; |
| | | if (newVersion.CompareTo(MainPage.VersionString) > 0) |
| | | { |
| | | newAppVersionUrl = versionResult.NewVersionUrl; |
| | | return newVersion; |
| | | } |
| | | return ""; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ""; |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | |
| | | #if __IOS__ |
| | | /// <summary> |
| | | /// è·åiOS-APPçæ¬ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns>The https app version async.</returns> |
| | | ResultPack RequestHttpsiOSAppVersionAsync() |
| | | { |
| | | try |
| | | { |
| | | var webClient = new WebClient { }; |
| | | var result = webClient.DownloadData("https://itunes.apple.com/cn/lookup?id=1532353432"); |
| | | if (result == null) |
| | | { |
| | | return null; |
| | | } |
| | | return Newtonsoft.Json.JsonConvert.DeserializeObject<ResultPack>(Encoding.UTF8.GetString(result)); |
| | | } |
| | | catch |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | #else |
| | | |
| | | /// <summary> |
| | | /// è·å Android-APP çæ¬ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns>The https app version async.</returns> |
| | | private APPVersion GetAndroidAppVersion() |
| | | { |
| | | try |
| | | { |
| | | var result = new HttpServerRequest().GetAppVersion(); |
| | | if (result.Code == StateCode.SUCCESS) |
| | | { |
| | | if (result.Data == null) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | var responeData = Newtonsoft.Json.JsonConvert.DeserializeObject<APPVersion>(result.Data.ToString()); |
| | | return responeData; |
| | | } |
| | | return null; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | #endif |
| | | |
| | | int updateType = 0; |
| | | void TestDDDDD() |
| | | { |
| | | updateType = 1; |
| | | |
| | | ForceUpdateInfo forceUpdateInfo = new ForceUpdateInfo() |
| | | { |
| | | UpdateType = updateType, |
| | | NewVersionUrl = Constant.URL_APPSTORE, |
| | | NewVersion = "1.0.0925", |
| | | ReasonStr = "1ãé¦é¡µå
¨æ°æ¹ç设计ï¼UIæ´æ¸
æ° \n2ãä¿®å¤BUG \n3ãæ°å¢é³ç®±åè½ \n3ãæ°å¢é³ç®±åè½ \n3ãæ°å¢é³ç®±åè½ \n3ãæ°å¢é³ç®±åè½ \n3ãæ°å¢é³ç®±åè½ \n3ãæ°å¢é³ç®±åè½ \n3ãæ°å¢é³ç®±åè½ \n3ãæ°å¢é³ç®±åè½ \n3ãæ°å¢é³ç®±åè½ \n3ãæ°å¢é³ç®±åè½ \n3ãæ°å¢é³ç®±åè½ \n3ãæ°å¢é³ç®±åè½ \n3ãæ°å¢é³ç®±åè½" |
| | | }; |
| | | |
| | | HDLCommon.Current.ShowForceUpdateDialog(forceUpdateInfo); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¹æååºæ¥è¯¢ååºå
æ ¼å¼ |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class ResultPack |
| | | { |
| | | public int ResultCount { get; set; } |
| | | public object Results { get; set; } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using Shared; |
| | | using HDL_ON.UI.CSS; |
| | | using Xamarin.Essentials; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// æè¯é¡µé¢ |
| | | /// </summary> |
| | | public class ComplaintsPage : FrameLayout |
| | | { |
| | | FrameLayout bodyView; |
| | | |
| | | /// <summary> |
| | | /// å½å |
| | | /// </summary> |
| | | VerticalScrolViewLayout bodyScrolView; |
| | | |
| | | public ComplaintsPage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | public void LoadPage() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Complaints)).LoadTopView(); |
| | | |
| | | int bodyY = Application.GetRealHeight(64); |
| | | bodyScrolView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = bodyY, |
| | | Height = bodyView.Height - bodyY, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | |
| | | #region æè¯èç³» |
| | | FrameLayout phoneRow = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | Height = Application.GetRealHeight(50), |
| | | }; |
| | | bodyView.AddChidren(phoneRow); |
| | | |
| | | Button btnPhoneTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(48), |
| | | TextID = StringId.Telephone, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | }; |
| | | phoneRow.AddChidren(btnPhoneTitle); |
| | | |
| | | Button btnPhoneText = new Button() |
| | | { |
| | | X = btnPhoneTitle.Right, |
| | | Width = Application.GetRealWidth(200), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = "400 855 8535", |
| | | }; |
| | | phoneRow.AddChidren(btnPhoneText); |
| | | /// <summary> |
| | | /// åè¿å¾æ |
| | | /// </summary> |
| | | var btnImage = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/Right.png", |
| | | }; |
| | | phoneRow.AddChidren(btnImage); |
| | | phoneRow.AddChidren(new Button() { X = Application.GetRealWidth(16), Y = Application.GetRealWidth(49), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor }); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | PhoneDialer.Open(Constant.SUPPORT_TELEPHONENUMBER); |
| | | }; |
| | | |
| | | phoneRow.MouseUpEventHandler = eventHandler; |
| | | btnPhoneText.MouseUpEventHandler = eventHandler; |
| | | btnImage.MouseUpEventHandler = eventHandler; |
| | | #endregion |
| | | |
| | | #region èç³»é®ç®± |
| | | FrameLayout emailRow = new FrameLayout() |
| | | { |
| | | Y = phoneRow.Bottom, |
| | | Height = Application.GetRealHeight(54), |
| | | }; |
| | | bodyView.AddChidren(emailRow); |
| | | |
| | | Button btnEmailTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(48), |
| | | TextID = StringId.Email_, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | }; |
| | | emailRow.AddChidren(btnEmailTitle); |
| | | |
| | | Button btnEmailText = new Button() |
| | | { |
| | | X = btnEmailTitle.Right, |
| | | Y = Application.GetRealHeight(8), |
| | | Height = Application.GetRealHeight(20), |
| | | Width = Application.GetRealWidth(200), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = Constant.SUPPORT_EMAIL, |
| | | }; |
| | | emailRow.AddChidren(btnEmailText); |
| | | |
| | | Button btnEmailTipText = new Button() |
| | | { |
| | | X = btnEmailTitle.Right, |
| | | Y = btnEmailText.Bottom + Application.GetRealHeight(4), |
| | | Height = Application.GetRealHeight(20), |
| | | Width = Application.GetRealWidth(200), |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextID = StringId.WillGivePriorityToTheTreatmen, |
| | | }; |
| | | emailRow.AddChidren(btnEmailTipText); |
| | | /// <summary> |
| | | /// åè¿å¾æ |
| | | /// </summary> |
| | | var btnImage2 = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/Right.png", |
| | | }; |
| | | emailRow.AddChidren(btnImage2); |
| | | |
| | | emailRow.AddChidren(new Button() { X = Application.GetRealWidth(16), Y = emailRow.Height - Application.GetRealHeight(1), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor }); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler2 = (sender, e) => |
| | | { |
| | | CopyToClipboard(Constant.SUPPORT_EMAIL); |
| | | }; |
| | | |
| | | emailRow.MouseUpEventHandler = eventHandler2; |
| | | btnEmailText.MouseUpEventHandler = eventHandler2; |
| | | btnImage2.MouseUpEventHandler = eventHandler2; |
| | | #endregion |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// å¤å¶å°åªåæ¿ |
| | | /// </summary> |
| | | /// <param name="text"></param> |
| | | void CopyToClipboard(string text) |
| | | { |
| | | Clipboard.SetTextAsync(text); |
| | | Utlis.ShowTip(text + "\n" + Language.StringByID(StringId.CopySuccess)); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using System; |
| | | using Shared; |
| | | using HDL_ON.UI.CSS; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// åè½ä»ç» |
| | | /// </summary> |
| | | public class FunctionIntroductionPage : FrameLayout |
| | | { |
| | | FrameLayout bodyView; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | FrameLayout emptyTipFrameLayout; |
| | | /// <summary> |
| | | /// å½å |
| | | /// </summary> |
| | | VerticalScrolViewLayout bodyScrolView; |
| | | /// <summary> |
| | | /// å
容为空æç¤ºView |
| | | /// </summary> |
| | | EmptyTipView emptyTipView; |
| | | |
| | | public FunctionIntroductionPage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | public void LoadPage() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.FunctionIntroduced)).LoadTopView(); |
| | | |
| | | int bodyY = Application.GetRealHeight(64); |
| | | bodyScrolView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = bodyY, |
| | | Height = bodyView.Height - bodyY, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(bodyScrolView); |
| | | |
| | | AddEmptyTipView(); |
| | | |
| | | //TestLoad(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å å
容为空æç¤ºé¡µé¢ |
| | | /// </summary> |
| | | void AddEmptyTipView() |
| | | { |
| | | emptyTipView = new EmptyTipView() |
| | | { |
| | | Gravity = Gravity.Center |
| | | }; |
| | | bodyView.AddChidren(emptyTipView); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å è½½åºåéæ©RowView |
| | | /// </summary> |
| | | /// <param name="VerticalScrolViewMiddle"></param> |
| | | void AddRowView(VerticalScrolViewLayout VerticalScrolViewMiddle, HelpURLInfo functionInfo) |
| | | { |
| | | var rowView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(54), |
| | | }; |
| | | VerticalScrolViewMiddle.AddChidren(rowView); |
| | | |
| | | //æ é¢ |
| | | var btnTilte = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(8), |
| | | Width = Application.GetRealWidth(320), |
| | | Height = Application.GetRealHeight(20), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = functionInfo.Title |
| | | }; |
| | | rowView.AddChidren(btnTilte); |
| | | |
| | | //坿 é¢ |
| | | var btnSubtitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = btnTilte.Bottom + Application.GetRealHeight(4), |
| | | Width = Application.GetRealWidth(320), |
| | | Height = Application.GetRealHeight(14), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | Text = functionInfo.CreateTime |
| | | }; |
| | | |
| | | rowView.AddChidren(btnSubtitle); |
| | | |
| | | var btnGo = new Button() |
| | | { |
| | | X = Application.GetRealWidth(343), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/Right.png", |
| | | }; |
| | | |
| | | rowView.AddChidren(btnGo); |
| | | |
| | | var lineView = new LineView(rowView.Height); |
| | | rowView.AddChidren(lineView); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | new WebViewDialog().LoadPage(functionInfo.Title, functionInfo.Url); |
| | | }; |
| | | |
| | | btnTilte.MouseUpEventHandler = eventHandler; |
| | | btnSubtitle.MouseUpEventHandler = eventHandler; |
| | | btnGo.MouseUpEventHandler = eventHandler; |
| | | } |
| | | |
| | | #region æµè¯ |
| | | List<HelpURLInfo> list = new List<HelpURLInfo>(); |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | void TestLoad() |
| | | { |
| | | list.Add(new HelpURLInfo() |
| | | { |
| | | Title = "HDL ON PRO 1.0.10 ä¸»è¦æ´æ°", |
| | | CreateTime = "11æ26", |
| | | Url = Constant.URL_PRIVACYPOLICY, |
| | | }); |
| | | |
| | | list.Add(new HelpURLInfo() |
| | | { |
| | | Title = "HDL ON PRO 1.0.09 ä¸»è¦æ´æ°", |
| | | CreateTime = "10æ26", |
| | | Url = Constant.URL_PRIVACYPOLICY, |
| | | }); |
| | | |
| | | list.Add(new HelpURLInfo() |
| | | { |
| | | Title = "HDL ON PRO 1.0.08 ä¸»è¦æ´æ°", |
| | | CreateTime = "09æ26", |
| | | Url = Constant.URL_PRIVACYPOLICY, |
| | | }); |
| | | |
| | | foreach (var info in list) |
| | | { |
| | | AddRowView(bodyScrolView, info); |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 帮å©ç½é¡µå°å |
| | | /// </summary> |
| | | [System.Serializable] |
| | | public class HelpURLInfo |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string Title; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string CreateTime; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public string Url; |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | public partial class AccountBindInfoPage : FrameLayout |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | FrameLayout bodyView; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Action<string> action; |
| | | |
| | | /// <summary> |
| | | /// ä¿®å¤ä¿¡æ¯çç±»å |
| | | /// 1:é®ç®±ï¼2:ææº |
| | |
| | | /// ç颿 é¢ |
| | | /// </summary> |
| | | int titleId; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public AccountBindInfoPage() |
| | | { |
| | | bodyView = this; |
| | |
| | | Y = Application.GetRealHeight(213), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Height = Application.GetRealWidth(44), |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | var cbe = new ChangeBindAccountPage(); |
| | | cbe.isUnbind = false; |
| | | cbe.IsUnbind = false; |
| | | MainPage.BasePageView.AddChidren(cbe); |
| | | if (optionType == 1) |
| | | { |
| | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | var cbe = new ChangeBindAccountPage(); |
| | | cbe.isUnbind = true;//æ¯å¦ä¸ºè§£ç»æ è®° |
| | | cbe.IsUnbind = true;//æ¯å¦ä¸ºè§£ç»æ è®° |
| | | MainPage.BasePageView.AddChidren(cbe); |
| | | if (optionType == 1) |
| | | { |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Button btnTitle; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Button btnContent; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Action<string> action; |
| | | |
| | | /// <summary> |
| | | /// æä½ç®æ ç±»å 1:é®ç®±ï¼2:ææº |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// æ¯å¦ä¸ºè§£ç»éªè¯ |
| | | /// </summary> |
| | | public bool isUnbind; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Button btnTitle; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Button btnContent; |
| | | public bool IsUnbind; |
| | | |
| | | |
| | | /// <summary> |
| | | /// ChangeBindAccountPage |
| | |
| | | Y = Application.GetRealHeight(213), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Height = Application.GetRealWidth(44), |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | |
| | | { |
| | | if (optionType == 2) |
| | | { |
| | | btnTitle.TextID = isUnbind ? StringId.CurPhone : StringId.PhoneNumberVerification; |
| | | btnTitle.TextID = IsUnbind ? StringId.CurPhone : StringId.PhoneNumberVerification; |
| | | btnContent.Text = UserInfo.Current.userMobileInfo; |
| | | } |
| | | else |
| | | { |
| | | btnTitle.TextID = isUnbind ? StringId.CurrentEmail : StringId.EmailVerification; |
| | | btnTitle.TextID = IsUnbind ? StringId.CurrentEmail : StringId.EmailVerification; |
| | | btnContent.Text = UserInfo.Current.userEmailInfo; |
| | | } |
| | | } |
| | |
| | | { |
| | | button.BackgroundColor = CSS_Color.PromptingColor1; |
| | | var vcp = new ChangeBindVerificationCodePage(); |
| | | vcp.isUnbind = isUnbind; |
| | | vcp.IsUnbind = IsUnbind; |
| | | MainPage.BasePageView.AddChidren(vcp); |
| | | vcp.LoadPage(action, titleId, optionType, time); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | Button btnNum6Line; |
| | | |
| | | EditText et; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Button btnResend; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Button btnTip; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Action<string> action; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | /// åè®¡æ¶æ¶é´ |
| | | /// </summary> |
| | | int time = 0; |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ä¸ºè§£ç»éªè¯ |
| | | /// </summary> |
| | | public bool isUnbind; |
| | | public bool IsUnbind; |
| | | |
| | | /// <summary> |
| | | /// |
| | |
| | | Y = Application.GetRealHeight(276), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Height = Application.GetRealWidth(44), |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | BackgroundColor = CSS_Color.PromptingColor1, |
| | | TextAlignment = TextAlignment.Center, |
| | |
| | | FrameLayout bodyView; |
| | | Button btnBind; |
| | | EditText etContent; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Action<string> action; |
| | | |
| | | /// <summary> |
| | |
| | | /// æ¯å¦æ¢ç» |
| | | /// </summary> |
| | | bool isModifyBind; |
| | | |
| | | /// <summary> |
| | | /// ææºåºå· |
| | | /// </summary> |
| | |
| | | if (isModifyBind) |
| | | { |
| | | //ä¿®æ¹ç»å® |
| | | titleId = isPhone ? StringId.ModifyBindingPhone : StringId.ModifyBindingEmail; |
| | | titleId = isPhone ? StringId.EntryNewPhone : StringId.EntryNewEmail; |
| | | } |
| | | else |
| | | { |
| | |
| | | titleId = isPhone ? StringId.BoundMobileInfo : StringId.BoundEmailInfo; |
| | | } |
| | | |
| | | |
| | | |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView(); |
| | | |
| | | if (isPhone) |
| | | { |
| | | AddPhoneFrameLayout(); |
| | | } |
| | | else |
| | | { |
| | | AddEmailFrameLayout(); |
| | | } |
| | | |
| | | //ç¹å»è·åéªè¯ç |
| | | LoadEvent_GetVerification(btnBind); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | void AddPhoneFrameLayout() { |
| | | #region å¦ææ¯ææº |
| | | //ææºå½å®¶åºå·éæ©æé® |
| | | ListCellView codeView = new ListCellView() { |
| | | Y = Application.GetRealHeight(64), |
| | | }; |
| | | bodyView.AddChidren(codeView); |
| | | //跳转å½å®¶åºå·éæ©çé¢ |
| | | Action selectAction = () => |
| | | { |
| | | JLCountrycode.CountryCodeView.Current.Show((countryName, code) => { |
| | | if (!string.IsNullOrEmpty(code)) |
| | | { |
| | | phoneZoneCode = code; |
| | | codeView.BtnSubtitle.Text = "+" + phoneZoneCode; |
| | | } |
| | | }); |
| | | }; |
| | | codeView.GoAction = selectAction; |
| | | codeView.BtnTilte.Text = Language.StringByID(StringId.CountryOrRegion); |
| | | codeView.BtnSubtitle.Text = "+" + phoneZoneCode; |
| | | |
| | | //ææºå·è¾å
¥æ¡ |
| | | FrameLayout rowView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(72), |
| | | Y = codeView.Bottom, |
| | | Height = Application.GetRealHeight(50), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(rowView); |
| | | |
| | | //ç»å®é®ç®±æè
ç»å®ææºå· |
| | | //ç»å®ææºå· |
| | | Button btnTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | |
| | | Y = Application.GetRealHeight(213), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Height = Application.GetRealWidth(44), |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | |
| | | BorderWidth = 0, |
| | | }; |
| | | bodyView.AddChidren(btnBind); |
| | | |
| | | //ç¹å»è·åéªè¯ç |
| | | LoadEvent_GetVerification(btnBind); |
| | | |
| | | #endregion |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | void AddEmailFrameLayout() |
| | | { |
| | | #region 妿æ¯é®ç®± |
| | | FrameLayout rowView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(72), |
| | | Height = Application.GetRealHeight(50), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(rowView); |
| | | |
| | | //ç»å®é®ç®± |
| | | Button btnTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(180), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextID = titleId, |
| | | }; |
| | | rowView.AddChidren(btnTitle); |
| | | |
| | | etContent = new EditText() |
| | | { |
| | | Width = Application.GetRealWidth(359), |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | Foucs = true |
| | | }; |
| | | rowView.AddChidren(etContent); |
| | | |
| | | btnBind = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(213), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealWidth(44), |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextID = StringId.GetVerificationCode, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | IsBold = true, |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | BorderColor = 0x00000000, |
| | | BorderWidth = 0, |
| | | }; |
| | | bodyView.AddChidren(btnBind); |
| | | #endregion |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | Application.HideSoftInput(); |
| | | var account = etContent.Text.Trim(); |
| | | |
| | | //å¦ææ¯æ¢ç»æ£æµæ¯å¦ç¸åå¸å· |
| | | if (isModifyBind) |
| | | { |
| | | if (isPhone) |
| | | { |
| | | if(account == UserInfo.Current.userMobileInfo) |
| | | { |
| | | //æç¤ºæ¢ç»å¸å·ç¸å |
| | | Utlis.ShowTip(Language.StringByID(StringId.EntryNewPhone)); |
| | | return; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (account == UserInfo.Current.userEmailInfo) |
| | | { |
| | | //æç¤ºæ¢ç»å¸å·ç¸å |
| | | Utlis.ShowTip(Language.StringByID(StringId.EntryNewEmail)); |
| | | return; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | #region æ£åè¡¨è¾¾å¼ |
| | | //1.æ£æµè´¦å·æ¯å¦åæ³ |
| | | if (!isPhone) |
| | |
| | | { |
| | | button.BackgroundColor = CSS_Color.PromptingColor1; |
| | | var vcp = new NewBindVerificationCodePage(); |
| | | vcp.phoneZoneCode = phoneZoneCode; |
| | | vcp.PhoneZoneCode = phoneZoneCode; |
| | | MainPage.BasePageView.AddChidren(vcp); |
| | | vcp.LoadPage(action, titleId, account, isPhone, time, isModifyBind); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | /// <summary> |
| | | /// æ¯å¦ææº |
| | | /// </summary> |
| | | public bool isPhone; |
| | | bool isPhone; |
| | | /// <summary> |
| | | /// æ¯å¦æ¢ç» |
| | | /// </summary> |
| | | public bool isModifyBind; |
| | | bool isModifyBind; |
| | | |
| | | /// <summary> |
| | | /// æ°ç»å®çè´¦å· |
| | | /// </summary> |
| | | public string verAccount; |
| | | string verAccount; |
| | | /// <summary> |
| | | /// ææºåºå· |
| | | /// </summary> |
| | | public string phoneZoneCode = "86"; |
| | | public string PhoneZoneCode = "86"; |
| | | |
| | | |
| | | public NewBindVerificationCodePage() |
| | |
| | | Y = Application.GetRealHeight(276), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Height = Application.GetRealWidth(44), |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | BackgroundColor = CSS_Color.PromptingColor1, |
| | | TextAlignment = TextAlignment.Center, |
| | |
| | | } |
| | | else |
| | | { |
| | | resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, verAccount, true, phoneZoneCode); |
| | | resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, verAccount, true, PhoneZoneCode); |
| | | } |
| | | |
| | | |
New file |
| | |
| | | using System; |
| | | using Shared; |
| | | using HDL_ON.UI.CSS; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// è·åæ¯æ-常è§é®é¢é¡µé¢ |
| | | /// </summary> |
| | | public class FAQHelpPage : FrameLayout |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | FrameLayout bodyView; |
| | | /// <summary> |
| | | /// æç´¢é¡µé¢ |
| | | /// </summary> |
| | | FrameLayout searchView; |
| | | /// <summary> |
| | | /// èåæé® |
| | | /// </summary> |
| | | Button btnMenu; |
| | | /// <summary> |
| | | /// çµè¯æé® |
| | | /// </summary> |
| | | Button btnTelephone; |
| | | /// <summary> |
| | | /// åéä¿¡æ¯æé® |
| | | /// </summary> |
| | | Button btnSendMes; |
| | | |
| | | |
| | | /// <summary> |
| | | /// èåæé®æ¯å¦å±å¼ |
| | | /// </summary> |
| | | bool isbtnMenuOpen; |
| | | |
| | | public FAQHelpPage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | public void LoadPage() |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.GetSupport)).LoadTopView(); |
| | | |
| | | //æç´¢æé® |
| | | searchView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(76), |
| | | Height = Application.GetRealHeight(28), |
| | | Width = Application.GetRealWidth(343), |
| | | Radius = (uint)Application.GetRealHeight(6), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(searchView); |
| | | |
| | | ImageView searchImage = new ImageView() |
| | | { |
| | | Width = Application.GetRealWidth(20), |
| | | Height = Application.GetRealWidth(20), |
| | | Gravity = Gravity.Center, |
| | | ImagePath = "PersonalCenter/Support/Search.png" |
| | | }; |
| | | searchView.AddChidren(searchImage); |
| | | |
| | | #region Help |
| | | var helpView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(112), |
| | | Height = Application.GetRealHeight(208), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | |
| | | }; |
| | | bodyView.AddChidren(helpView); |
| | | |
| | | var helpTip = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(10), |
| | | Height = Application.GetRealHeight(28), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | Width = Application.GetRealWidth(200), |
| | | TextID = StringId.WhatCanWeDoForYou |
| | | }; |
| | | helpView.AddChidren(helpTip); |
| | | |
| | | #region åè½é®é¢ |
| | | var functionView = new ListIconCellView() |
| | | { |
| | | Y = Application.GetRealHeight(58), |
| | | }; |
| | | helpView.AddChidren(functionView); |
| | | functionView.BtnTilte.TextID = StringId.FunctionalQuestion; |
| | | functionView.BtnIcon.UnSelectedImagePath = "PersonalCenter/Support/Function.png"; |
| | | |
| | | Action functionAction = () => |
| | | { |
| | | OpenQuestionListPage(1); |
| | | }; |
| | | functionView.GoAction = functionAction; |
| | | #endregion |
| | | |
| | | #region åºæ¯é®é¢ |
| | | var sceneView = new ListIconCellView() |
| | | { |
| | | Y = functionView.Bottom, |
| | | }; |
| | | helpView.AddChidren(sceneView); |
| | | sceneView.BtnTilte.TextID = StringId.SceneQuestion; |
| | | sceneView.BtnIcon.UnSelectedImagePath = "PersonalCenter/Support/Scene.png"; |
| | | |
| | | Action sceneAction = () => |
| | | { |
| | | OpenQuestionListPage(2); |
| | | }; |
| | | sceneView.GoAction = functionAction; |
| | | #endregion |
| | | |
| | | #region APP使ç¨é®é¢ |
| | | var appUseView = new ListIconCellView() |
| | | { |
| | | Y = sceneView.Bottom, |
| | | }; |
| | | helpView.AddChidren(appUseView); |
| | | appUseView.BtnTilte.TextID = StringId.AppUsageAssistance; |
| | | appUseView.BtnIcon.UnSelectedImagePath = "PersonalCenter/Support/Help.png"; |
| | | appUseView.LineView.RemoveFromParent(); |
| | | |
| | | Action appUseAction = () => |
| | | { |
| | | OpenQuestionListPage(3); |
| | | }; |
| | | appUseView.GoAction = appUseAction; |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | #region question View |
| | | int qY = Application.GetRealHeight(328); |
| | | var questionView = new FrameLayout() |
| | | { |
| | | Y = qY, |
| | | Height = bodyView.Height - qY, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(questionView); |
| | | |
| | | var questionTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(10), |
| | | Height = Application.GetRealHeight(28), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | Width = Application.GetRealWidth(200), |
| | | Text = Language.StringByID(StringId.CommonQuestion) + ":" |
| | | }; |
| | | questionView.AddChidren(questionTitle); |
| | | #endregion |
| | | |
| | | #region åè½æé® |
| | | btnMenu = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(542), |
| | | X = Application.GetRealWidth(302), |
| | | Width = Application.GetRealWidth(58), |
| | | Height = Application.GetRealWidth(58), |
| | | UnSelectedImagePath = "PersonalCenter/Support/Menu.png", |
| | | SelectedImagePath = "PersonalCenter/Support/Close.png", |
| | | }; |
| | | bodyView.AddChidren(btnMenu); |
| | | |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | isbtnMenuOpen = !isbtnMenuOpen; |
| | | SetMenuButtonState(isbtnMenuOpen); |
| | | }; |
| | | btnMenu.MouseUpEventHandler = eventHandler; |
| | | |
| | | btnTelephone = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(494), |
| | | X = Application.GetRealWidth(274), |
| | | Width = Application.GetRealWidth(58), |
| | | Height = Application.GetRealWidth(58), |
| | | UnSelectedImagePath = "PersonalCenter/Support/Telephone.png", |
| | | Visible = false, |
| | | }; |
| | | bodyView.AddChidren(btnTelephone); |
| | | |
| | | btnTelephone.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | OpenGetSupportPage(); |
| | | }; |
| | | |
| | | btnSendMes = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(590), |
| | | X = Application.GetRealWidth(274), |
| | | Width = Application.GetRealWidth(58), |
| | | Height = Application.GetRealWidth(58), |
| | | UnSelectedImagePath = "PersonalCenter/Support/SendMessage.png", |
| | | Visible = false, |
| | | }; |
| | | bodyView.AddChidren(btnSendMes); |
| | | |
| | | btnSendMes.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | OpenGetSupportPage(); |
| | | }; |
| | | |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦å±å¼ |
| | | /// </summary> |
| | | /// <param name="isOpen"></param> |
| | | void SetMenuButtonState(bool isOpen) |
| | | { |
| | | btnMenu.IsSelected = isOpen; |
| | | btnTelephone.Visible = isOpen; |
| | | btnSendMes.Visible = isOpen; |
| | | |
| | | |
| | | if (isOpen) |
| | | { |
| | | //å±å¼ |
| | | |
| | | } |
| | | else |
| | | { |
| | | //å
³ééè |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æå¼é®é¢åè¡¨é¡µé¢ |
| | | /// </summary> |
| | | /// <param name="questionType">1:åè½é®é¢ 2:åºæ¯é®é¢ 3:APP使ç¨è¾
å©</param> |
| | | void OpenQuestionListPage(int questionType) |
| | | { |
| | | int titleId = 0; |
| | | if (questionType == 1) |
| | | { |
| | | titleId = StringId.FunctionalQuestion; |
| | | } |
| | | else if (questionType == 2) |
| | | { |
| | | titleId = StringId.SceneQuestion; |
| | | } |
| | | else if (questionType == 3) |
| | | { |
| | | titleId = StringId.AppUsageAssistance; |
| | | } |
| | | |
| | | var mPage = new QuestionListPage(); |
| | | MainPage.BasePageView.AddChidren(mPage); |
| | | mPage.LoadPage(titleId); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æå¼è·åæ¯æçµè¯é¡µé¢ |
| | | /// </summary> |
| | | void OpenGetSupportPage() |
| | | { |
| | | var mPage = new GetSupportPage(); |
| | | MainPage.BasePageView.AddChidren(mPage); |
| | | mPage.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | } |
| | | } |
File was renamed from HDL_ON/UI/UI2/4-PersonalCenter/GetSupportPage.cs |
| | |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// è·åæ¯æçµè¯é¡µé¢ |
| | | /// </summary> |
| | | public class GetSupportPage : FrameLayout |
| | | { |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | FrameLayout bodyView; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public GetSupportPage() |
| | | { |
| | | bodyView = this; |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = "hdltickets@hdlautomation.com", |
| | | Text = Constant.SUPPORT_EMAIL, |
| | | }; |
| | | emailRow.AddChidren(btnEmailText); |
| | | emailRow.AddChidren(new Button() { X = Application.GetRealWidth(16), Y = Application.GetRealWidth(49), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor }); |
New file |
| | |
| | | using System; |
| | | using Shared; |
| | | using HDL_ON.UI.CSS; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// é®é¢åè¡¨é¡µé¢ |
| | | /// åè½é®é¢ãåºæ¯é®é¢ãAPP使ç¨è¾
å© |
| | | /// </summary> |
| | | public class QuestionListPage : FrameLayout |
| | | { |
| | | /// <summary> |
| | | /// bodyView |
| | | /// </summary> |
| | | FrameLayout bodyView; |
| | | /// <summary> |
| | | /// å½å |
| | | /// </summary> |
| | | VerticalScrolViewLayout bodyScrolView; |
| | | /// <summary> |
| | | /// emptyTipView |
| | | /// </summary> |
| | | EmptyTipView emptyTipView; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public QuestionListPage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å è½½æ¾ç¤ºç½é¡µ |
| | | /// </summary> |
| | | /// <param name="titleId"></param> |
| | | public void LoadPage(int titleId) |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView(); |
| | | |
| | | int bodyY = Application.GetRealHeight(64); |
| | | bodyScrolView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = bodyY, |
| | | Height = bodyView.Height - bodyY, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(bodyScrolView); |
| | | |
| | | AddEmptyTipView(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å å
容为空æç¤ºé¡µé¢ |
| | | /// </summary> |
| | | void AddEmptyTipView() |
| | | { |
| | | emptyTipView = new EmptyTipView() |
| | | { |
| | | Gravity = Gravity.Center |
| | | }; |
| | | bodyView.AddChidren(emptyTipView); |
| | | } |
| | | } |
| | | } |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(244), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Height = Application.GetRealWidth(44), |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | BorderWidth = 0, |
| | | BorderColor = 0x00000000, |
| | |
| | | Y = Application.GetRealHeight(519 + 64), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Height = Application.GetRealWidth(44), |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | |
| | | Y = Application.GetRealHeight(519 + 64), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Height = Application.GetRealWidth(44), |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | |
| | | var responeObj = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ResidenceMemberInfo>>(responePack.Data.ToString()); |
| | | foreach (var mInfo in responeObj) |
| | | { |
| | | ResponsePack memberInfoResponePack = new HttpServerRequest().GetResidenceMemberAccountInfo(mInfo.childAccountId); |
| | | var dataStr = JObject.FromObject(memberInfoResponePack.ResponseData); |
| | | FileStream fs = null; |
| | | //ResponsePack memberInfoResponePack = new HttpServerRequest().GetResidenceMemberAccountInfo(mInfo.childAccountId); |
| | | //var dataStr = JObject.FromObject(memberInfoResponePack.ResponseData); |
| | | //FileStream fs = null; |
| | | try |
| | | { |
| | | var headImageString = dataStr.GetValue("HeadImage").ToString(); |
| | | if (!string.IsNullOrEmpty(headImageString)) |
| | | { |
| | | var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(headImageString); |
| | | var headImageBytes = Newtonsoft.Json.JsonConvert.DeserializeObject<byte[]>(jsonString); |
| | | var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/", mInfo.childAccountId + ".png"); |
| | | fs = new FileStream(filePath, FileMode.Create, FileAccess.Write); |
| | | fs.Write(headImageBytes, 0, headImageBytes.Length); |
| | | fs.Flush(); |
| | | mInfo.headImagePagePath = filePath; |
| | | } |
| | | //var headImageString = dataStr.GetValue("HeadImage").ToString(); |
| | | //if (!string.IsNullOrEmpty(headImageString)) |
| | | //{ |
| | | // var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(headImageString); |
| | | // var headImageBytes = Newtonsoft.Json.JsonConvert.DeserializeObject<byte[]>(jsonString); |
| | | // var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/", mInfo.childAccountId + ".png"); |
| | | // fs = new FileStream(filePath, FileMode.Create, FileAccess.Write); |
| | | // fs.Write(headImageBytes, 0, headImageBytes.Length); |
| | | // fs.Flush(); |
| | | // mInfo.headImagePagePath = filePath; |
| | | //} |
| | | if(string.IsNullOrEmpty(mInfo.nickName)) |
| | | { |
| | | mInfo.nickName = mInfo.UserName; |
| | |
| | | } |
| | | finally |
| | | { |
| | | if (fs != null) |
| | | { |
| | | fs.Close(); |
| | | } |
| | | //-----------è·åä½å®
ä¸åè´¦å·çå
±äº«æ°æ®å表 |
| | | //if (fs != null) |
| | | //{ |
| | | // fs.Close(); |
| | | //} |
| | | ////-----------è·åä½å®
ä¸åè´¦å·çå
±äº«æ°æ®å表 |
| | | LoadMethod_GetMemberSharedDataList(mInfo); |
| | | } |
| | | residenceMemberInfos.Add(mInfo); |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = memberInfo.nickName + "(" + memberInfo.UserName + ")", |
| | | Text = memberInfo.nickName + "(" + memberInfo.Account + ")", |
| | | }; |
| | | headPortraitView.AddChidren(btnMemberName); |
| | | |
| | |
| | | btnDelMember = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(617), |
| | | Height = MainPage.Increase ? Application.GetRealHeight(70) : Application.GetRealHeight(50), |
| | | //Height = MainPage.Increase ? Application.GetRealHeight(70) : Application.GetRealHeight(50), |
| | | Height = Application.GetRealHeight(50), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextColor = CSS_Color.WarningColor, |
New file |
| | |
| | | using System; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// æçäºç»´ç é¡µé¢ |
| | | /// </summary> |
| | | public class MyQRCodePage : FrameLayout |
| | | { |
| | | FrameLayout bodyView; |
| | | |
| | | public MyQRCodePage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | public void LoadPage() |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.MyQRcode)).LoadTopView(); |
| | | |
| | | int backViewHeight = Application.GetRealHeight(132) + Application.GetRealWidth(266); |
| | | FrameLayout backView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(144), |
| | | X = Application.GetRealWidth(20), |
| | | Height = backViewHeight, |
| | | Width = Application.GetRealWidth(335), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(8), |
| | | }; |
| | | bodyView.AddChidren(backView); |
| | | |
| | | #region 头åãæµç§°ãå¸å· |
| | | FrameLayout headView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(16), |
| | | Height = Application.GetRealHeight(60), |
| | | }; |
| | | backView.AddChidren(headView); |
| | | |
| | | ImageView headImage = new ImageView() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetMinRealAverage(60), |
| | | Height = Application.GetMinRealAverage(60), |
| | | Radius = (uint)Application.GetMinRealAverage(30), |
| | | ImagePath = UserInfo.Current.headImagePagePath, |
| | | }; |
| | | headView.AddChidren(headImage); |
| | | |
| | | //ç¨æ·åç§° |
| | | var btnUserName = new Button() |
| | | { |
| | | X = headImage.Right + Application.GetRealWidth(12), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(30), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.UsersWhoNameIsEmpty, |
| | | IsBold = true |
| | | }; |
| | | headView.AddChidren(btnUserName); |
| | | |
| | | if (!string.IsNullOrEmpty(UserInfo.Current.userName)) |
| | | { |
| | | btnUserName.Text = UserInfo.Current.userName; |
| | | } |
| | | |
| | | //ç¨æ·å¸å· |
| | | var btnEmail = new Button() |
| | | { |
| | | X = headImage.Right + Application.GetRealWidth(12), |
| | | Y = btnUserName.Bottom, |
| | | Height = Application.GetRealHeight(30), |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | Text = UserInfo.Current.accountString |
| | | }; |
| | | headView.AddChidren(btnEmail); |
| | | #endregion |
| | | |
| | | //äºç»´ç |
| | | int codeWidth = Application.GetRealWidth(266); |
| | | ImageView codeImage = new ImageView() |
| | | { |
| | | X = Application.GetRealWidth(35), |
| | | Y = Application.GetRealHeight(104), |
| | | Height = codeWidth, |
| | | Width = codeWidth, |
| | | ImageBytes = Scan.BytesFromText(UserInfo.Current.accountString, codeWidth, codeWidth), |
| | | }; |
| | | backView.AddChidren(codeImage); |
| | | |
| | | ////äºç»´ç ä¸å¿å¤´å |
| | | //int imageWidth = Application.GetMinRealAverage(60); |
| | | //int imageX = codeImage.X + (codeWidth - imageWidth) / 2; |
| | | //int imageY = codeImage.Y + (codeWidth - imageWidth) / 2; |
| | | //ImageView headImage2 = new ImageView() |
| | | //{ |
| | | // X = imageX, |
| | | // Y = imageY, |
| | | // Width = imageWidth, |
| | | // Height = imageWidth, |
| | | // ImagePath = UserInfo.Current.headImagePagePath, |
| | | // BorderColor = CSS_Color.MainBackgroundColor, |
| | | // BorderWidth = (uint)Application.GetRealWidth(2), |
| | | // Radius = (uint)Application.GetMinRealAverage(30), |
| | | //}; |
| | | //backView.AddChidren(headImage2); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | using Xamarin.Essentials; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// æçæå¡å¨ä¿¡æ¯é¡µé¢ |
| | | /// </summary> |
| | | public class MyServerInfoPage : FrameLayout |
| | | { |
| | | FrameLayout bodyView; |
| | | |
| | | public MyServerInfoPage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | public void LoadPage() |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | //æå¡å¨ä¿¡æ¯ |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.ServerInformation)).LoadTopView(); |
| | | |
| | | ImageView imageView = new ImageView() |
| | | { |
| | | Y = Application.GetMinRealAverage(88), |
| | | Width = Application.GetMinRealAverage(200), |
| | | Height = Application.GetMinRealAverage(180), |
| | | ImagePath = "PersonalCenter/ServerInfo.png", |
| | | Gravity = Gravity.CenterHorizontal |
| | | }; |
| | | bodyView.AddChidren(imageView); |
| | | |
| | | var serverBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(40), |
| | | Y = imageView.Bottom + Application.GetRealHeight(12), |
| | | Width = Application.GetRealWidth(295), |
| | | Height = Application.GetRealHeight(22), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | //Text = "å½åè´¦å·æå¡å¨æå±ï¼ä¸å½ï¼ä»£ç xxxx", |
| | | IsBold = true |
| | | |
| | | }; |
| | | bodyView.AddChidren(serverBtn); |
| | | |
| | | var tipBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(40), |
| | | Y = serverBtn.Bottom + Application.GetRealHeight(12), |
| | | Width = Application.GetRealWidth(295), |
| | | Height = Application.GetRealHeight(80), |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | //Text = "*æå¡å¨æ¯æ¨å½åäºç«¯æ°æ®åå¨çæå¨åºåï¼æ éå¿
è¦ï¼æä»¬ä¸å»ºè®®åçè¿ç§»", |
| | | TextID = StringId.CurrentAccountServerOwnershipTip, |
| | | IsMoreLines = true |
| | | |
| | | }; |
| | | bodyView.AddChidren(tipBtn); |
| | | |
| | | var callBtn = new TextButton() |
| | | { |
| | | X = Application.GetRealWidth(40), |
| | | Y = Application.GetRealHeight(606), |
| | | Width = Application.GetRealWidth(168), |
| | | Height = Application.GetRealHeight(22), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | //Text = "*è¥éè¦è¿ç§»æå¡å¨ï¼è¯·æ¨æ", |
| | | TextID = StringId.ToMigrateTheServerPleaseCall, |
| | | |
| | | }; |
| | | bodyView.AddChidren(callBtn); |
| | | callBtn.Width = callBtn.GetTextWidth() + Application.GetRealWidth(2); |
| | | |
| | | var phoneBtn = new TextButton() |
| | | { |
| | | X = callBtn.Right + Application.GetRealHeight(2), |
| | | Y = Application.GetRealHeight(606), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(22), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | Text = "400-855-8535", |
| | | IsBold = true |
| | | }; |
| | | bodyView.AddChidren(phoneBtn); |
| | | |
| | | phoneBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | PhoneDialer.Open(Constant.SUPPORT_TELEPHONENUMBER); |
| | | }; |
| | | |
| | | serverBtn.Text = Language.StringByID(StringId.CurrentAccountServerOwnership) + UserInfo.Current.GlobalRegion.regionName; |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | }; |
| | | dispalyView.AddChidren(contentView); |
| | | |
| | | if ( UserInfo.Current.regionList.Count < 3) |
| | | if (UserInfo.Current.regionList.Count < 3) |
| | | { |
| | | } |
| | | else if ( UserInfo.Current.regionList.Count < 4) |
| | | else if (UserInfo.Current.regionList.Count < 4) |
| | | { |
| | | dispalyView = new FrameLayout() |
| | | { |
| | |
| | | contentView.Height = Application.GetRealHeight(45 * 3); |
| | | dispalyView.AddChidren(contentView); |
| | | } |
| | | else if ( UserInfo.Current.regionList.Count < 5) |
| | | else if (UserInfo.Current.regionList.Count < 5) |
| | | { |
| | | dispalyView = new FrameLayout() |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | foreach (var home in UserInfo.Current.regionList) |
| | | foreach (var home in UserInfo.Current.regionList) |
| | | { |
| | | var btnHomeName = new Button() |
| | | { |
| | |
| | | }; |
| | | contentView.AddChidren(btnHomeName); |
| | | |
| | | if ( UserInfo.Current.regionList.IndexOf(home) < UserInfo.Current.regionList.Count - 1) |
| | | if (UserInfo.Current.regionList.IndexOf(home) < UserInfo.Current.regionList.Count - 1) |
| | | { |
| | | contentView.AddChidren(new Button() |
| | | { |
| | |
| | | var regionId = (string)btnHomeName.Tag; |
| | | dialog.Close(); |
| | | //DB_ResidenceData.residenceData.CurReginID = regionId; |
| | | LoadEvent_ChangeCurHome( UserInfo.Current.regionList.Find((obj) => obj.RegionID == regionId)); |
| | | LoadEvent_ChangeCurHome(UserInfo.Current.regionList.Find((obj) => obj.RegionID == regionId)); |
| | | LoadContentView(); |
| | | }; |
| | | } |
| | |
| | | } |
| | | //ååºæ°ä½å®
æ°æ® |
| | | FileUtils.RestoreRegionFiles(newRegionRootPath); |
| | | UserInfo.Current.SaveUserInfo(); |
| | | UserInfo.Current.SaveUserInfo(); |
| | | DB_ResidenceData.residenceData.EixtAccount(); |
| | | DB_ResidenceData.residenceData.CurReginID = homeTemp.RegionID; |
| | | OnAppConfig.Instance.SaveUserConfig(); |
| | |
| | | { |
| | | Action updataHeadImage = () => |
| | | { |
| | | userHeadImageView.ImagePath = UserInfo.Current.headImagePagePath; |
| | | userHeadImageView.ImagePath = UserInfo.Current.headImagePagePath; |
| | | }; |
| | | Action updataUserName = () => |
| | | { |
| | | btnUserName.Text = UserInfo.Current.userName; |
| | | btnUserName.Text = UserInfo.Current.userName; |
| | | }; |
| | | |
| | | var personalDataView = new PersonalDataPage(updataHeadImage, updataUserName); |
| | |
| | | #region æå管ç |
| | | void LoadEvent_GoMemberManagement() |
| | | { |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => { |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => |
| | | { |
| | | var mmp = new MemberManagementPage(); |
| | | MainPage.BasePageView.AddChidren(mmp); |
| | | mmp.LoadPage(); |
| | |
| | | #region æ·»å è®¾å¤ |
| | | void LoadEvent_SkipbtnAddFunctionPage() |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | var page = new SearchDevicePage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | |
| | | { |
| | | btnSupportText.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var getsupportPage = new GetSupportPage(); |
| | | //var getsupportPage = new GetSupportPage(); |
| | | //MainPage.BasePageView.AddChidren(getsupportPage); |
| | | //getsupportPage.LoadPage(); |
| | | //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | |
| | | var getsupportPage = new FAQHelpPage(); |
| | | MainPage.BasePageView.AddChidren(getsupportPage); |
| | | getsupportPage.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | /// </summary> |
| | | FrameLayout bodyView; |
| | | /// <summary> |
| | | /// å½å |
| | | /// </summary> |
| | | VerticalScrolViewLayout bodyScrolView; |
| | | |
| | | /// <summary> |
| | | /// 头ååºå |
| | | /// </summary> |
| | | FrameLayout headPortraitView; |
| | |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.PersonalCenter)).LoadTopView(); |
| | | |
| | | headPortraitView = new FrameLayout() |
| | | bodyScrolView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(64), |
| | | VerticalScrollBarEnabled = false, |
| | | Height = Application.GetRealHeight(551), |
| | | }; |
| | | bodyView.AddChidren(bodyScrolView); |
| | | |
| | | if (MainPage.Increase) |
| | | { |
| | | bodyScrolView.Height = Application.GetRealHeight(541); |
| | | } |
| | | |
| | | headPortraitView = new FrameLayout() |
| | | { |
| | | //Y = Application.GetRealHeight(64), |
| | | Height = Application.GetRealHeight(124), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(headPortraitView); |
| | | |
| | | bodyScrolView.AddChidren(headPortraitView); |
| | | |
| | | userHeadImageView = new ImageView() |
| | | { |
| | |
| | | Width = Application.GetMinRealAverage(84), |
| | | Height = Application.GetMinRealAverage(84), |
| | | Radius = (uint)Application.GetMinRealAverage(42), |
| | | ImagePath = UserInfo.Current.headImagePagePath, |
| | | ImagePath = UserInfo.Current.headImagePagePath, |
| | | }; |
| | | headPortraitView.AddChidren(userHeadImageView); |
| | | |
| | | #region 个人信æ¯é项åºå |
| | | var topPaddingView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(8) |
| | | }; |
| | | bodyScrolView.AddChidren(topPaddingView); |
| | | |
| | | /// <summary> |
| | | /// 个人信æ¯é项åºå |
| | | /// </summary> |
| | | optionListView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = headPortraitView.Bottom + Application.GetRealHeight(8), |
| | | //Y = headPortraitView.Bottom + Application.GetRealHeight(8), |
| | | Height = Application.GetRealHeight(51 * 6), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | ScrollEnabled = false, |
| | | }; |
| | | bodyView.AddChidren(optionListView); |
| | | bodyScrolView.AddChidren(optionListView); |
| | | #region 个人é项-åååºå |
| | | /// <summary> |
| | | /// 个人é项-åååºå |
| | |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = string.IsNullOrEmpty( UserInfo.Current.userName) ? Language.StringByID(StringId.UsersWhoNameIsEmpty) : UserInfo.Current.userName |
| | | Text = string.IsNullOrEmpty(UserInfo.Current.userName) ? Language.StringByID(StringId.UsersWhoNameIsEmpty) : UserInfo.Current.userName |
| | | }; |
| | | userNameView.AddChidren(btnUserName); |
| | | /// <summary> |
| | |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = GetBindAccountText( UserInfo.Current.userEmailInfo) |
| | | Text = GetBindAccountText(UserInfo.Current.userEmailInfo) |
| | | }; |
| | | userEmailInfoView.AddChidren(btnUserEmailInfo); |
| | | /// <summary> |
| | |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = GetBindAccountText( UserInfo.Current.userMobileInfo) |
| | | Text = GetBindAccountText(UserInfo.Current.userMobileInfo) |
| | | }; |
| | | userPhoneInfoView.AddChidren(btnUserPhoneInfo); |
| | | /// <summary> |
| | |
| | | #endregion |
| | | |
| | | #region è§£é设置åºå |
| | | var topPaddingView2 = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(8) |
| | | }; |
| | | bodyScrolView.AddChidren(topPaddingView2); |
| | | /// <summary> |
| | | /// è§£é设置åºå |
| | | /// </summary> |
| | | interpretationSettingsView = new FrameLayout() |
| | | { |
| | | Y = optionListView.Bottom + Application.GetRealHeight(8), |
| | | //Y = optionListView.Bottom + Application.GetRealHeight(8), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Height = Application.GetRealHeight(65), |
| | | Height = Application.GetRealHeight(66), |
| | | }; |
| | | bodyView.AddChidren(interpretationSettingsView); |
| | | bodyScrolView.AddChidren(interpretationSettingsView); |
| | | btnInterpretationSettingsTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | |
| | | TextID = StringId.InterpretationSettings, |
| | | }; |
| | | interpretationSettingsView.AddChidren(btnInterpretationSettingsTitle); |
| | | |
| | | btnInterpretationSettingsTip = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | |
| | | UnSelectedImagePath = "Public/Right.png", |
| | | }; |
| | | interpretationSettingsView.AddChidren(btnInterpretationSettingsRight); |
| | | interpretationSettingsView.AddChidren(new LineView(interpretationSettingsView.Height)); |
| | | #endregion |
| | | |
| | | #region æå¡å¨ä¿¡æ¯ |
| | | ListCellView myServerInfoCellView = new ListCellView() |
| | | { |
| | | }; |
| | | bodyScrolView.AddChidren(myServerInfoCellView); |
| | | //跳转æå¡å¨ä¿¡æ¯ |
| | | Action selectAction = () => |
| | | { |
| | | var myServerInfoPage = new MyServerInfoPage(); |
| | | MainPage.BasePageView.AddChidren(myServerInfoPage); |
| | | myServerInfoPage.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | myServerInfoCellView.GoAction = selectAction; |
| | | myServerInfoCellView.BtnTilte.Text = Language.StringByID(StringId.ServerInformation); |
| | | myServerInfoCellView.LineView.RemoveFromParent(); |
| | | |
| | | #endregion |
| | | |
| | | btnLogout = new Button() |
| | |
| | | LoadEvent_ChangeBindEmail(); |
| | | LoadEvent_ChangeBindPhone(); |
| | | LoadEvent_SkipModifyPassword(); |
| | | LoadEvent_MyQRcode(); |
| | | GetUserInfo(); |
| | | } |
| | | |
| | |
| | | btnEditUserNameIcon.MouseUpEventHandler = eventHandler; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å è½½æçäºç»´ç äºä»¶ |
| | | /// </summary> |
| | | void LoadEvent_MyQRcode() |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | //æçäºç»´ç |
| | | var aep = new MyQRCodePage(); |
| | | MainPage.BasePageView.AddChidren(aep); |
| | | aep.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | }; |
| | | _QRcodeView.MouseUpEventHandler = eventHandler; |
| | | btnQRcode.MouseUpEventHandler = eventHandler; |
| | | btnQRcodeIcon.MouseUpEventHandler = eventHandler; |
| | | btnQRcodeRight.MouseUpEventHandler = eventHandler; |
| | | } |
| | | |
| | | #region ä¿®æ¹ç»å®é®ç®± |
| | | /// <summary> |
| | | /// ä¿®æ¹ç»å®é®ç®± |
| | |
| | | Foucs = true |
| | | }; |
| | | rowView.AddChidren(etPassword); |
| | | var lineView = new LineView(); |
| | | var lineView = new LineView(rowView.Height); |
| | | rowView.AddChidren(lineView); |
| | | lineView.Y = rowView.Height - lineView.Height; |
| | | #endregion |
| | | |
| | | #region 忬¡è¾å
¥æ°å¯ç |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(224), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Radius = (uint)Application.GetRealHeight(22), |
| | | Height = Application.GetRealWidth(44), |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | BackgroundColor = CSS_Color.PromptingColor1, |
| | | TextID = StringId.Confirm, |
| | |
| | | Y = Application.GetRealHeight(276), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Height = Application.GetRealWidth(44), |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | BackgroundColor = CSS_Color.PromptingColor1, |
| | | TextAlignment = TextAlignment.Center, |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(582), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Radius = (uint)Application.GetRealHeight(22), |
| | | Height = Application.GetRealWidth(44), |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | BackgroundColor = CSS_Color .MainColor, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | |
| | | /// </summary> |
| | | Button btnCommissioningAuthoritySwitchIcon; |
| | | |
| | | #region è¿æ· |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | FrameLayout transferRow; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Button btnTransferTitle; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Button btnTrasferExplan; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Button btnTrasferSkinIcon; |
| | | #endregion |
| | | |
| | | #endregion |
| | | /// <summary> |
| | | /// æ´æ°ä½å®
åç§°çåè°å½æ° |
| | |
| | | #endregion |
| | | |
| | | #region è¿æ· |
| | | FrameLayout transferRow; |
| | | |
| | | transferRow = new FrameLayout() |
| | | { |
| | | Y = administratorPermissionMigrationRow.Bottom, |
| | |
| | | }; |
| | | bodyView.AddChidren(transferRow); |
| | | |
| | | var btnTransferTitle = new Button() |
| | | btnTransferTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(10), |
| | |
| | | }; |
| | | transferRow.AddChidren(btnTransferTitle); |
| | | |
| | | var btnTrasferExplan = new Button() |
| | | btnTrasferExplan = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = btnTransferTitle.Bottom, |
| | |
| | | }; |
| | | transferRow.AddChidren(btnTrasferExplan); |
| | | |
| | | Button btnTrasferSkinIcon; |
| | | btnTrasferSkinIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(343), |
| | |
| | | LoadEvent_SkipRoomsPage(); |
| | | LoadEvent_EditResidencName(); |
| | | LoadEvent_EditResidencAddress(); |
| | | //LoadEvent_SkipTransferConfirmPage(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | var responsePack = new HttpServerRequest().EditResidenceInfo(0, str); |
| | | |
| | | if (responsePack.Code.ToUpper() == StateCode.SUCCESS) |
| | | if (responsePack.Code == StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | btnResidenceName.MouseUpEventHandler = eventHandler; |
| | | btnEditResidenceNameIcon.MouseUpEventHandler = eventHandler; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å 载修æ¹ä½å®
å°åäºä»¶ |
| | | /// </summary> |
| | |
| | | //{ IsBackground = true }.Start(); |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·³è½¬è¿æ·é¡µé¢ |
| | | /// </summary> |
| | | void LoadEvent_SkipTransferConfirmPage() |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => { |
| | | var skipPage = new TransferConfirmPage(); |
| | | MainPage.BasePageView.AddChidren(skipPage); |
| | | skipPage.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | transferRow.MouseUpEventHandler = eventHandler; |
| | | btnTrasferExplan.MouseUpEventHandler = eventHandler; |
| | | btnTrasferSkinIcon.MouseUpEventHandler = eventHandler; |
| | | btnTransferTitle.MouseUpEventHandler = eventHandler; |
| | | } |
| | | } |
| | | } |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(582), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Radius = (uint)Application.GetRealHeight(22), |
| | | Height = Application.GetRealWidth(44), |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
New file |
| | |
| | | using System; |
| | | using Shared; |
| | | using HDL_ON.UI.CSS; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// è¿æ·ç¡®è®¤æéçé¢ |
| | | /// </summary> |
| | | public class TransferConfirmPage : FrameLayout |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | FrameLayout bodyView; |
| | | |
| | | public TransferConfirmPage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public void LoadPage() |
| | | { |
| | | BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Transfer)).LoadTopView(); |
| | | |
| | | #region 头å |
| | | FrameLayout headView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(72), |
| | | Height = Application.GetRealHeight(132), |
| | | }; |
| | | bodyView.AddChidren(headView); |
| | | |
| | | |
| | | ImageView myHeadImage = new ImageView() |
| | | { |
| | | X = Application.GetRealWidth(48), |
| | | Y = Application.GetRealHeight(96), |
| | | Width = Application.GetRealWidth(84), |
| | | Height = Application.GetRealWidth(84), |
| | | Radius = (uint)Application.GetRealWidth(42), |
| | | ImagePath = UserInfo.Current.headImagePagePath, |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | headView.AddChidren(myHeadImage); |
| | | |
| | | ImageView transferImage = new ImageView() |
| | | { |
| | | X = Application.GetRealWidth(144), |
| | | Y = Application.GetRealHeight(96), |
| | | Width = Application.GetRealWidth(84), |
| | | Height = Application.GetRealWidth(32), |
| | | ImagePath = "PersonalCenter/Transfer.png", |
| | | Gravity = Gravity.Center, |
| | | }; |
| | | headView.AddChidren(transferImage); |
| | | |
| | | ImageView otherHeadImage = new ImageView() |
| | | { |
| | | X = Application.GetRealWidth(231), |
| | | Y = Application.GetRealHeight(96), |
| | | Width = Application.GetRealWidth(101), |
| | | Height = Application.GetRealWidth(101), |
| | | ImagePath = "PersonalCenter/Head.png", |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | headView.AddChidren(otherHeadImage); |
| | | |
| | | #endregion |
| | | |
| | | var btnTip = new Button() |
| | | { |
| | | Y = headView.Bottom, |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(22), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | Text = "æ¨çä½å®
å°è¿æ·ç»å
¶ä»HDLè´¦å·", |
| | | }; |
| | | bodyView.AddChidren(btnTip); |
| | | |
| | | // |
| | | var btnConfirm = new ConfirmButton() |
| | | { |
| | | Y = Application.GetRealHeight(456), |
| | | Text = "ç¡®è®¤è¿æ·", |
| | | }; |
| | | bodyView.AddChidren(btnConfirm); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(582), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Radius = (uint)Application.GetRealHeight(22), |
| | | Height = Application.GetRealWidth(44), |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(582), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Radius = (uint)Application.GetRealHeight(22), |
| | | Height = Application.GetRealWidth(44), |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |