RestoreFrame::RestoreFrame(wxWindow* parent, DatabasePtr db) : BackupRestoreBaseFrame(parent, db) { setIdString(this, getFrameId(db)); wxString databaseName(db->getName_()); wxString serverName(db->getServer()->getName_()); SetTitle(wxString::Format(_("Restore Database \"%s:%s\""), serverName.c_str(), databaseName.c_str())); createControls(); layoutControls(); updateControls(); text_ctrl_filename->SetFocus(); }
//! MetadataItemPropertiesFrame class MetadataItemPropertiesFrame::MetadataItemPropertiesFrame(wxWindow* parent, MetadataItem* object) : BaseFrame(parent, wxID_ANY, wxEmptyString) { // we need to store this right now, since we might lose the object later setStorageName(object); wxStatusBar* sb = CreateStatusBar(); DatabasePtr db = object->getDatabase(); if (db) // server property page doesn't have a database, so don't crash sb->SetStatusText(db->getConnectionInfoString()); else sb->SetStatusText(object->getName_()); if (db && config().get("linksOpenInTabs", true)) { SetIcon(wxArtProvider::GetIcon(ART_DatabaseConnected, wxART_FRAME_ICON)); databaseNameM = db->getName_(); } else // when linksOpenInTabs, only the server node { SetIcon(getMetadataItemIcon(object->getType())); } notebookM = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_DEFAULT_STYLE | wxAUI_NB_WINDOWLIST_BUTTON | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER); auiManagerM.SetManagedWindow(this); auiManagerM.AddPane(notebookM, wxAuiPaneInfo().CenterPane().PaneBorder(false)); auiManagerM.Update(); Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler( MetadataItemPropertiesFrame::OnNotebookPageClose), NULL, this); Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( MetadataItemPropertiesFrame::OnNotebookPageChanged), NULL, this); }
EventWatcherFrame::EventWatcherFrame(wxWindow* parent, DatabasePtr db) : BaseFrame(parent, -1, wxEmptyString), databaseM(db), eventsM(0) { wxASSERT(db); timerM.SetOwner(this, ID_timer); setIdString(this, getFrameId(db)); // observe database object to close on disconnect / destruction db->attachObserver(this, false); SetTitle(wxString::Format(_("Event Monitor for Database: %s"), db->getName_().c_str())); createControls(); layoutControls(); updateControls(); button_add->SetFocus(); #include "new.xpm" wxBitmap bmp(new_xpm); wxIcon icon; icon.CopyFromBitmap(bmp); SetIcon(icon); }