55using System . Threading . Tasks ;
66using System . Windows ;
77using System . Windows . Input ;
8- using MahApps . Metro . Controls . Dialogs ;
98using NETworkManager . Localization . Resources ;
109using NETworkManager . Models . TigerVNC ;
1110using NETworkManager . Settings ;
@@ -29,8 +28,6 @@ private void TigerVNCGrid_SizeChanged(object sender, SizeChangedEventArgs e)
2928 private bool _initialized ;
3029 private bool _closed ;
3130
32- private readonly IDialogCoordinator _dialogCoordinator ;
33-
3431 private readonly Guid _tabId ;
3532 private readonly TigerVNCSessionInfo _sessionInfo ;
3633
@@ -76,8 +73,6 @@ public TigerVNCControl(Guid tabId, TigerVNCSessionInfo sessionInfo)
7673 InitializeComponent ( ) ;
7774 DataContext = this ;
7875
79- _dialogCoordinator = DialogCoordinator . Instance ;
80-
8176 ConfigurationManager . Current . TigerVNCTabCount ++ ;
8277
8378 _tabId = tabId ;
@@ -209,16 +204,8 @@ private async Task Connect()
209204 catch ( Exception ex )
210205 {
211206 if ( ! _closed )
212- {
213- var settings = AppearanceManager . MetroDialog ;
214- settings . AffirmativeButtonText = Strings . OK ;
215- ConfigurationManager . OnDialogOpen ( ) ;
216-
217- await _dialogCoordinator . ShowMessageAsync ( this , Strings . Error ,
218- ex . Message , MessageDialogStyle . Affirmative , settings ) ;
219-
220- ConfigurationManager . OnDialogClose ( ) ;
221- }
207+ // Use built-in message box because we have visual issues in the dragablz window
208+ MessageBox . Show ( ex . Message , Strings . Error , MessageBoxButton . OK , MessageBoxImage . Error ) ;
222209 }
223210
224211 IsConnecting = false ;
0 commit comments