void CPasskeyEntry::OnOK() { UpdateData(TRUE); if (m_filespec.IsEmpty()) { m_status = TAR_OPEN_NODB; CPWDialog::OnCancel(); return; } CGeneralMsgBox gmb; if (m_passkey.IsEmpty()) { gmb.AfxMessageBox(IDS_CANNOTBEBLANK); m_pctlPasskey->SetFocus(); return; } if (!pws_os::FileExists(m_filespec.GetString())) { gmb.AfxMessageBox(IDS_FILEPATHNOTFOUND); if (m_MRU_combo.IsWindowVisible()) m_MRU_combo.SetFocus(); return; } ProcessPhrase(); }
void CSafeCombinationPrompt::OnOkClick( wxCommandEvent& /* evt */ ) { if (Validate() && TransferDataFromWindow()) { if (m_password.empty()) { wxMessageDialog err(this, _("The combination cannot be blank."), _("Error"), wxOK | wxICON_EXCLAMATION); err.ShowModal(); return; } if (!pws_os::FileExists(tostdstring(m_filename))) { wxMessageDialog err(this, _("File or path not found."), _("Error"), wxOK | wxICON_EXCLAMATION); err.ShowModal(); return; } ProcessPhrase(); } }
void CSafeCombinationPrompt::OnYubibtnClick( wxCommandEvent& /* event */ ) { m_scctrl->AllowEmptyCombinationOnce(); // Allow blank password when Yubi's used if (Validate() && TransferDataFromWindow()) { if (!pws_os::FileExists(tostdstring(m_filename))) { wxMessageDialog err(this, _("File or path not found."), _("Error"), wxOK | wxICON_EXCLAMATION); err.ShowModal(); return; } StringX response; bool oldYubiChallenge = ::wxGetKeyState(WXK_SHIFT); // for pre-0.94 databases if (PerformChallengeResponse(this, m_password, response, oldYubiChallenge)) { m_password = response; ProcessPhrase(); UpdateStatus(); } } }
void CSafeCombinationEntry::OnOk( wxCommandEvent& ) { if (Validate() && TransferDataFromWindow()) { if (m_password.empty()) { wxMessageDialog err(this, _("The combination cannot be blank."), _("Error"), wxOK | wxICON_EXCLAMATION); err.ShowModal(); FindWindow(ID_COMBINATION)->SetFocus(); return; } if (!pws_os::FileExists(tostdstring(m_filename))) { wxMessageDialog err(this, _("File or path not found."), _("Error"), wxOK | wxICON_EXCLAMATION); err.ShowModal(); m_filenameCB->SetFocus(); return; } ProcessPhrase(); } // Validate && TransferDataFromWindow }
void CLibraryDictionary::ProcessFile(CLibraryFile& oFile, bool bAdd, bool bCanUpload) { ProcessPhrase( oFile, oFile.GetSearchName(), bAdd, bCanUpload ); ProcessPhrase( oFile, oFile.GetMetadataWords(), bAdd, bCanUpload ); }