void ContinueStart(BlockSyncInfo blockSyncInfo) { InitWalletSataus(); var accountResult = AccountsService.Default.GetDefaultAccount(); if (!accountResult.IsFail) { DefaultAccount = accountResult.Value; } Registers(); if (InitializedInvoke != null) { InitializedInvoke.Invoke(new InitMsgEvent(true)); } if (blockSyncInfo.BlockLeft > 0 && blockSyncInfo.Progress < 100) { StaticViewModel.GlobalViewModel.IsFirstShowProgress = false; Messenger.Default.Send(Pages.SynchroDataPage, MessageTopic.UpdatePopupView); PopUpParams popUpParams = new PopUpParams { IsOpen = true }; Messenger.Default.Send(popUpParams, MessageTopic.ChangedPopupViewState); } TxSettingMonitor.Default.Start(1000); TradeRecodesMonitor.Default.Start(10000); PayAddressBookMonitor.Default.Start(3000); ReceiveAddressBookMonitor.Default.Start(3000); }
protected void UpdatePage(string pageName, PageModel pageModel = PageModel.DialogPage) { switch (pageModel) { case PageModel.MainPage: Messenger.Default.Send(pageName, MessageTopic.UpdateMainView); break; case PageModel.DialogPage: Messenger.Default.Send(pageName, MessageTopic.UpdatePopupView); PopUpParams popUpParams = new PopUpParams { IsOpen = true }; Messenger.Default.Send(popUpParams, MessageTopic.ChangedPopupViewState); break; case PageModel.TabPage: Messenger.Default.Send(pageName, Pages.MainPage); break; case PageModel.MessagePage: break; default: break; } }
public virtual void OnClosePopup() { PopUpParams popUpParams = new PopUpParams { IsOpen = false }; Messenger.Default.Send(popUpParams, MessageTopic.ChangedPopupViewState); }
void OnClosePopupView(string pageName) { if (PopupShellView != null && PopupShellView.ToString().Contains(pageName)) { PopUpParams popUpParams = new PopUpParams { IsOpen = false }; Messenger.Default.Send(popUpParams, MessageTopic.ChangedPopupViewState); } }
void OnChangePopupView(PopUpParams p) { if (string.IsNullOrEmpty(p.ViewName)) { IsShowPopupView = p.IsOpen; } else if (PopupView != null && BootStrapService.Default.GetPage(p.ViewName) == PopupView) { IsShowPopupView = p.IsOpen; } }
void SetTaskInfos() { UpdateBlocksMonitor.Default.MonitorCallBack += x => { Application.Current.Dispatcher.Invoke(() => { if (x.IsSyncComplete()) { Messenger.Default.Send(Pages.SynchroDataPage, MessageTopic.ClosePopUpWindow); //UpdateBlocksMonitor.Default.Stop(); IsSyncComplete = true; IsShowProgress = false; PopUpParams popUpParams = new PopUpParams { IsOpen = false, ViewName = Pages.SynchroDataPage }; Messenger.Default.Send(popUpParams, MessageTopic.ChangedPopupViewState); AmountMonitor.Default.IsSyncComplete = true; AmountMonitor.Default.Start(3000); } else { IsSyncComplete = false; } BlockSyncInfo = x; if (x.ConnectCount < 1) { IsShowNoNet = true; IsShowProgress = false; } else { IsShowNoNet = false; if (x.BlockLeft > 10) { IsShowProgress = true; //if (StaticViewModel.GlobalViewModel.IsFirstShowProgress) //{ // UpdatePage(Pages.SynchroDataPage); // StaticViewModel.GlobalViewModel.IsFirstShowProgress = false; //} } } var formatter = LanguageService.Default.GetLanguageValue("netTooltipFormat"); var msg = string.Format(formatter, x.ConnectCount, Environment.NewLine); NetToolTip = msg; }); }; }