@@ -139,11 +139,12 @@ private void Textbox_Clicked(Base sender, ClickedEventArgs arguments)
139139 //Methods
140140 public void Update ( )
141141 {
142+ // ReSharper disable once InvertIf
142143 if ( ! Networking . Network . IsConnected )
143144 {
144145 Hide ( ) ;
145146 mMainMenu . Show ( ) ;
146- Interface . MsgboxErrors . Add ( new KeyValuePair < string , string > ( "" , Strings . Errors . lostconnection ) ) ;
147+ Interface . ShowError ( Strings . Errors . lostconnection ) ;
147148 }
148149 }
149150
@@ -195,29 +196,25 @@ public void TrySendCode()
195196
196197 if ( ! Networking . Network . IsConnected )
197198 {
198- Interface . MsgboxErrors . Add ( new KeyValuePair < string , string > ( "" , Strings . Errors . notconnected ) ) ;
199-
199+ Interface . ShowError ( Strings . Errors . notconnected ) ;
200200 return ;
201201 }
202202
203203 if ( string . IsNullOrEmpty ( mCodeInputTextbox ? . Text ) )
204204 {
205- Interface . MsgboxErrors . Add ( new KeyValuePair < string , string > ( "" , Strings . ResetPass . inputcode ) ) ;
206-
205+ Interface . ShowError ( Strings . ResetPass . inputcode ) ;
207206 return ;
208207 }
209208
210209 if ( mPasswordTextbox . Text != mPasswordTextbox2 . Text )
211210 {
212- Interface . MsgboxErrors . Add ( new KeyValuePair < string , string > ( "" , Strings . Registration . passwordmatch ) ) ;
213-
211+ Interface . ShowError ( Strings . Registration . passwordmatch ) ;
214212 return ;
215213 }
216214
217215 if ( ! FieldChecking . IsValidPassword ( mPasswordTextbox . Text , Strings . Regex . password ) )
218216 {
219- Interface . MsgboxErrors . Add ( new KeyValuePair < string , string > ( "" , Strings . Errors . passwordinvalid ) ) ;
220-
217+ Interface . ShowError ( Strings . Errors . passwordinvalid ) ;
221218 return ;
222219 }
223220
0 commit comments