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

Commit

Permalink
修正了Net下不会自动刷新的Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Berrysoft committed May 6, 2018
1 parent c203033 commit 5e956d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion TsinghuaNet/MainViewModel.vb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Class MainViewModel
End Property

Public Event StateChanged As EventHandler(Of NetState)
Public Shared ReadOnly StateProperty As DependencyProperty = DependencyProperty.Register(NameOf(State), GetType(NetState), GetType(MainViewModel), New PropertyMetadata(NetState.Net, AddressOf StatePropertyChangedCallback))
Public Shared ReadOnly StateProperty As DependencyProperty = DependencyProperty.Register(NameOf(State), GetType(NetState), GetType(MainViewModel), New PropertyMetadata(NetState.Unknown, AddressOf StatePropertyChangedCallback))
Public Property State As NetState
Get
Return GetValue(StateProperty)
Expand Down Expand Up @@ -156,6 +156,7 @@ Class MainViewModel
End Class

Enum NetState
Unknown
Auth4
Auth6
Net
Expand Down
2 changes: 2 additions & 0 deletions TsinghuaNet/MainWindow.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ Class MainWindow
Select Case e
Case NetState.Auth4
Auth4.IsChecked = True
Case NetState.Auth6
Auth6.IsChecked = True
Case NetState.Net
Net.IsChecked = True
End Select
Expand Down

0 comments on commit 5e956d0

Please sign in to comment.