//Проверяем поставленные чекбоксы (если remember me == true то авторизируем пользователя) private void Page_Initialized(object sender, EventArgs e) { if (!File.Exists(Evennote.ConfigFile)) { if (Evennote.AutoLogin) { Evennote.SetConfigurateFile(); } return; } else { checkBox.IsChecked = true; string config = Evennote.ReadConfigFile("3v3nn0t3"); if (config.Equals("")) { return; } try { if (Evennote.Authorization(config.Split(' ').First(), config.Split(' ').Last())) { (Application.Current.MainWindow as MainWindow).ChangePage("pages/menu_page.xaml"); Evennote.SetUserDirectory(config.Split(' ').First()); Evennote.user.online = true; //Считываем с диска существующие заметки Notebook.LoadNotes(); } else { MessageBox.Show("Login or password incorrect."); } } catch (Exception ex) { MessageBox.Show(ex.Message); return; } } }