@@ -95,14 +95,19 @@ private void CreatePassword(object sender, RoutedEventArgs e)
9595
9696 private void Window_Loaded ( object sender , RoutedEventArgs e )
9797 {
98- using var sw = new StreamWriter ( "Build.txt" ) ;
99- sw . Write ( "1.2.0.230 " ) ;
98+ // using var sw = new StreamWriter("Build.txt");
99+ // sw.Write("1.2.0.233 ");
100100
101101 User . UsersList = new List < User > ( ) ;
102102
103103 System . Windows . Threading . DispatcherTimer timer = new System . Windows . Threading . DispatcherTimer ( ) ;
104104
105105 if ( Additional . GlobalSettings . AppGlobalString != null )
106+ {
107+ UnlockMenuItem . IsEnabled = true ;
108+ UnlockNotifyIcon . IsEnabled = true ;
109+ }
110+ else
106111 {
107112 UnlockMenuItem . IsEnabled = false ;
108113 UnlockNotifyIcon . IsEnabled = false ;
@@ -145,8 +150,8 @@ private void Save(bool b)
145150 catch
146151 {
147152 if ( b )
148- MessageBox . Show ( ( string ) Application . Current . Resources [ "MB1" ] ,
149- ( string ) Application . Current . Resources [ "Error" ] , MessageBoxButton . OK , MessageBoxImage . Error ) ;
153+ MessageBox . Show ( ( string ) FindResource ( "MB1" ) ,
154+ ( string ) FindResource ( "Error" ) , MessageBoxButton . OK , MessageBoxImage . Error ) ;
150155 }
151156 }
152157
@@ -227,14 +232,14 @@ private async void CheckUpdate(bool b)
227232 var current = float . Parse ( Assembly . GetExecutingAssembly ( ) . GetName ( ) . Version . ToString ( ) . Replace ( "." , "" ) ) ;
228233 if ( ! ( latest > current ) && b )
229234 {
230- MessageBox . Show ( ( string ) Application . Current . Resources [ "MB8" ] ,
231- ( string ) Application . Current . Resources [ "Message" ] , MessageBoxButton . OK ,
235+ MessageBox . Show ( ( string ) FindResource ( "MB8" ) ,
236+ ( string ) FindResource ( "Message" ) , MessageBoxButton . OK ,
232237 MessageBoxImage . Information ) ;
233238 return ;
234239 }
235240 if ( ! ( latest > current ) ) return ;
236- if ( MessageBox . Show ( ( string ) Application . Current . Resources [ "MB4" ] ,
237- ( string ) Application . Current . Resources [ "Message" ] , MessageBoxButton . YesNo ,
241+ if ( MessageBox . Show ( ( string ) FindResource ( "MB4" ) ,
242+ ( string ) FindResource ( "Message" ) , MessageBoxButton . YesNo ,
238243 MessageBoxImage . Information ) != MessageBoxResult . Yes ) return ;
239244 var psi = new ProcessStartInfo
240245 {
@@ -247,8 +252,8 @@ private async void CheckUpdate(bool b)
247252 {
248253 if ( b )
249254 {
250- MessageBox . Show ( ( string ) Application . Current . Resources [ "MB5" ] ,
251- ( string ) Application . Current . Resources [ "Error" ] , MessageBoxButton . OK ,
255+ MessageBox . Show ( ( string ) FindResource ( "MB5" ) ,
256+ ( string ) FindResource ( "Error" ) , MessageBoxButton . OK ,
252257 MessageBoxImage . Error ) ;
253258 }
254259 }
@@ -395,6 +400,8 @@ private void LockPasswordBase()
395400
396401 FrameWindow . NavigationService . Navigate ( new Uri ( "/Pages/StartScreen.xaml" , UriKind . Relative ) ) ;
397402
403+ AddButton . IsEnabled = false ;
404+
398405 SaveMenuItem . IsEnabled = false ;
399406 ChangeMenuItem . IsEnabled = false ;
400407 NewLoginMenuItem . IsEnabled = false ;
0 commit comments