+ //================================================================
+ //================================================================
+
+ RemoveAlertDlg::RemoveAlertDlg(wxWindow *parent,
+ wxString title,
+ const wxSize& size)
+ : wxDialog( parent,
+ wxID_ANY,
+ title,
+ wxDefaultPosition,
+ size,
+ wxDEFAULT_DIALOG_STYLE)
+ {
+ wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL);
+
+ //std::string out("To reload deleted patient, you should synchronize your database before."); // JPR
+ //wxTextCtrl *text = new wxTextCtrl(this, wxID_ANY,crea::std2wx(out),wxDefaultPosition, wxSize(500,20));
+ wxTextCtrl *text = new wxTextCtrl(this, wxID_ANY,
+ _T("To reload deleted patient, you should synchronize your database before."),
+ wxDefaultPosition, wxSize(500,20));
+ mcheck = new wxCheckBox(this, 5478, _T("Do not display this warning again!"));
+ Connect( mcheck->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED , (wxObjectEventFunction) &RemoveAlertDlg::onCheck );
+ wxSizer* buttonsSizer = this->CreateSeparatedButtonSizer(wxOK|wxCANCEL);
+
+ topsizer->Add(text);
+ topsizer->Add(mcheck,0,wxGROW);
+ topsizer->Add(buttonsSizer,0,wxGROW);
+ SetSizer(topsizer, true);
+ mSave = false;
+ Layout();
+ }
+ RemoveAlertDlg::~RemoveAlertDlg(){};
+ bool RemoveAlertDlg::isChecked()
+ {
+ return mSave;
+ }
+ void RemoveAlertDlg::onCheck(wxCommandEvent &Event)
+ {
+ mSave = mcheck->IsChecked();
+ }
+