public override void ViewDidLoad() { base.ViewDidLoad(); App.SeekiosChanged += App_SeekiosChanged; App.RemainingRequestChanged += OnRemainingRequestChanged; App.Locator.ModeDontMove.SeekiosMovedNotified += ModeDontMove_SeekiosMovedNotified; App.Locator.ModeZone.OnSeekiosOutOfZoneNotified += ModeZone_OnSeekiosOutOfZoneNotified; RefreshBatteryButton.TouchUpInside += RefreshBatteryButton_TouchUpInside; HelpCreditCostButton.TouchDown += HelpCreditCostButton_TouchDown; NeedUpdateButton.TouchDown += NeedUpdateButton_TouchDown; HeadView.AddGestureRecognizer(new UITapGestureRecognizer(() => { App.Locator.DetailSeekios.GoToMap(_seekiosSelected); })); }
void ReleaseDesignerOutlets() { if (AddSeekiosButton != null) { AddSeekiosButton.Dispose(); AddSeekiosButton = null; } if (AddSeekiosLabel != null) { AddSeekiosLabel.Dispose(); AddSeekiosLabel = null; } if (AllSeekiosMapLabel != null) { AllSeekiosMapLabel.Dispose(); AllSeekiosMapLabel = null; } if (CreditsLabel != null) { CreditsLabel.Dispose(); CreditsLabel = null; } if (CreditsTitleLabel != null) { CreditsTitleLabel.Dispose(); CreditsTitleLabel = null; } if (EmailUser != null) { EmailUser.Dispose(); EmailUser = null; } if (FeedbackButton != null) { FeedbackButton.Dispose(); FeedbackButton = null; } if (FeedbackLabel != null) { FeedbackLabel.Dispose(); FeedbackLabel = null; } if (Head2View != null) { Head2View.Dispose(); Head2View = null; } if (HeadView != null) { HeadView.Dispose(); HeadView = null; } if (HistoriqueConsommationButton != null) { HistoriqueConsommationButton.Dispose(); HistoriqueConsommationButton = null; } if (MapButton != null) { MapButton.Dispose(); MapButton = null; } if (MyConsoLabel != null) { MyConsoLabel.Dispose(); MyConsoLabel = null; } if (NameUser != null) { NameUser.Dispose(); NameUser = null; } if (ParameterButton != null) { ParameterButton.Dispose(); ParameterButton = null; } if (ParametersLabel != null) { ParametersLabel.Dispose(); ParametersLabel = null; } if (SeekiosTutorialButton != null) { SeekiosTutorialButton.Dispose(); SeekiosTutorialButton = null; } if (SettingsImageView != null) { SettingsImageView.Dispose(); SettingsImageView = null; } if (UserGuideLabel != null) { UserGuideLabel.Dispose(); UserGuideLabel = null; } if (UserImageView != null) { UserImageView.Dispose(); UserImageView = null; } }
void ReleaseDesignerOutlets() { if (AlertImage != null) { AlertImage.Dispose(); AlertImage = null; } if (AlertLabel != null) { AlertLabel.Dispose(); AlertLabel = null; } if (BatteryBackgroundImage != null) { BatteryBackgroundImage.Dispose(); BatteryBackgroundImage = null; } if (BatteryIndicator != null) { BatteryIndicator.Dispose(); BatteryIndicator = null; } if (BatteryLabel != null) { BatteryLabel.Dispose(); BatteryLabel = null; } if (CreditsFreeLabel != null) { CreditsFreeLabel.Dispose(); CreditsFreeLabel = null; } if (CreditsLabel != null) { CreditsLabel.Dispose(); CreditsLabel = null; } if (CreditsTitleLabel != null) { CreditsTitleLabel.Dispose(); CreditsTitleLabel = null; } if (DateReloadSeekiosCredit != null) { DateReloadSeekiosCredit.Dispose(); DateReloadSeekiosCredit = null; } if (HeadView != null) { HeadView.Dispose(); HeadView = null; } if (HelpCreditCostButton != null) { HelpCreditCostButton.Dispose(); HelpCreditCostButton = null; } if (LastRefreshBatteryLabel != null) { LastRefreshBatteryLabel.Dispose(); LastRefreshBatteryLabel = null; } if (ModeImage != null) { ModeImage.Dispose(); ModeImage = null; } if (ModeLabel != null) { ModeLabel.Dispose(); ModeLabel = null; } if (NeedUpdateButton != null) { NeedUpdateButton.Dispose(); NeedUpdateButton = null; } if (NextRefillLabel != null) { NextRefillLabel.Dispose(); NextRefillLabel = null; } if (PowerSavingImage != null) { PowerSavingImage.Dispose(); PowerSavingImage = null; } if (RefreshBatteryButton != null) { RefreshBatteryButton.Dispose(); RefreshBatteryButton = null; } if (SeekiosImageView != null) { SeekiosImageView.Dispose(); SeekiosImageView = null; } if (SeekiosLastPositionLabel != null) { SeekiosLastPositionLabel.Dispose(); SeekiosLastPositionLabel = null; } if (SeekiosNameLabel != null) { SeekiosNameLabel.Dispose(); SeekiosNameLabel = null; } if (Tableview != null) { Tableview.Dispose(); Tableview = null; } }
/// <summary> /// 循环检测是否登录了 /// </summary> private void LoopLoginCheck(IEventAggregator ea, IRegion region, QRCodeView qrView, HeadView headView, ErrorView errorView) { LoginService ls = new LoginService(); object login_result = null; //循环判断手机扫描二维码结果 while (true) { login_result = ls.LoginCheck(); //已扫描 未登录 if (login_result is ImageSource) { ea.GetEvent <UpdateHeadImageEvent>().Publish(login_result as ImageSource); Application.Current.Dispatcher.BeginInvoke(new Action(() => { region.Activate(headView); })); } //已完成登录 if (login_result is string) { //访问登录跳转URL if (ls.GetSidUid(login_result as string, out string errorMsg)) { Application.Current.Dispatcher.BeginInvoke(new Action(() => { region.RemoveAll(); ea.GetEvent <LoginSuccessfulEvent>().Publish(); })); break; } else { ea.GetEvent <ShowErrorMsgEvent>().Publish(errorMsg); Application.Current.Dispatcher.BeginInvoke(new Action(() => { region.Activate(errorView); })); break; } } ////超时 if (login_result is int) { ea.GetEvent <UpdateQRCodeEvent>().Publish(); } } }