@@ -30,6 +30,8 @@ public partial class HikVisions
3030 private bool _logoutStatus = true ;
3131 private bool _startRealPlayStatus = true ;
3232 private bool _stopRealPlayStatus = true ;
33+ private bool _openSoundStatus = true ;
34+ private bool _closeSoundStatus = true ;
3335
3436 private List < SelectedItem > _analogChannels = [ ] ;
3537 private int _channelId = 1 ;
@@ -56,6 +58,8 @@ private async Task OnLogout()
5658 _logoutStatus = true ;
5759 _startRealPlayStatus = true ;
5860 _stopRealPlayStatus = true ;
61+ _openSoundStatus = true ;
62+ _closeSoundStatus = true ;
5963 await _hikVision . Logout ( ) ;
6064 }
6165
@@ -70,6 +74,8 @@ private async Task OnStopRealPlay()
7074 {
7175 _startRealPlayStatus = true ;
7276 _stopRealPlayStatus = true ;
77+ _openSoundStatus = true ;
78+ _closeSoundStatus = true ;
7379 await _hikVision . StopRealPlay ( ) ;
7480 }
7581
@@ -78,6 +84,8 @@ private async Task OnOpenSound()
7884 var result = await _hikVision . OpenSound ( ) ;
7985 if ( result )
8086 {
87+ _openSoundStatus = true ;
88+ _closeSoundStatus = false ;
8189 await ToastService . Success ( "消息通知" , "打开声音成功" ) ;
8290 }
8391 else
@@ -91,6 +99,8 @@ private async Task OnCloseSound()
9199 var result = await _hikVision . CloseSound ( ) ;
92100 if ( result )
93101 {
102+ _openSoundStatus = false ;
103+ _closeSoundStatus = true ;
94104 await ToastService . Success ( "消息通知" , "关闭声音成功" ) ;
95105 }
96106 else
0 commit comments