private void logoout_btn_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { RegisteryMgr rMgr = new RegisteryMgr(); rMgr.setUserRegisteryValue("CheerUp", "AutoLogin", "false"); rMgr.setUserRegisteryValue("CheerUp", "LID", "null"); rMgr.setUserRegisteryValue("CheerUp", "LALP", "null"); System.Diagnostics.Process.Start(Application.ResourceAssembly.Location); Application.Current.Shutdown(); }
private void button_Click(object sender, RoutedEventArgs e) { string inputId = ((User)this.DataContext).Id; string inputPw = ((User)this.DataContext).Password; //자동 로그인 정보 등록 if (AutoLogin_Checkbox.IsChecked == true) { RegisteryMgr rMgr = new RegisteryMgr(); rMgr.setUserRegisteryValue("CheerUp", "AutoLogin", "true"); rMgr.setUserRegisteryValue("CheerUp", "LID", id_textbox.Text); rMgr.setUserRegisteryValue("CheerUp", "LALP", password_textbox.Password); } if (inputId != string.Empty && inputPw != string.Empty) { login(inputId, inputPw); } else { MessageBox.Show("로그인에 실패했습니다.\n" + "입력 양식을 확인해주세요."); } }