Skip to content
This repository has been archived by the owner on May 8, 2019. It is now read-only.

Commit

Permalink
修复“网络异常”的显示
Browse files Browse the repository at this point in the history
  • Loading branch information
Berrysoft committed May 15, 2018
1 parent 4eabc86 commit 3b5a59d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions TsinghuaNet/MainWindow.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,17 @@ Class MainWindow
Dim result As FluxUser = Nothing
Try
result = Await helper.GetFluxAsync()
If Not token.IsCancellationRequested Then
If result IsNot Nothing Then
SetFlux(result.Username, result.Flux, result.OnlineTime, result.Balance)
Else
SetFlux(My.Resources.Disconnected)
End If
End If
Catch ex As Exception
SetFlux(My.Resources.NoNetwork)
End Try
If Not token.IsCancellationRequested Then
If result IsNot Nothing Then
SetFlux(result.Username, result.Flux, result.OnlineTime, result.Balance)
Else
SetFlux(My.Resources.Disconnected)
End If
If usereg IsNot Nothing Then
Try
Await usereg.LoginAsync()
Expand Down

0 comments on commit 3b5a59d

Please sign in to comment.