void MainFrame::OnCloseConnection(wxCommandEvent &evt) { if (GetActivePanel() != NULL) { GetActivePanel()->CloseConnection(); } }
void MainFrame::OnAddKeyValuePair(wxCommandEvent &evt) { if (GetActivePanel() != NULL) { GetActivePanel()->AddKeyValue(); } }
void MainFrame::OnSelectDb(wxCommandEvent &evt) { if (GetActivePanel() != NULL) { GetActivePanel()->SelectDb(); } }
void MainFrame::OnExpireKey(wxCommandEvent &evt) { if (GetActivePanel() != NULL) { GetActivePanel()->ExpireKey(); } }
void MainFrame::OnEditKeyValue(wxCommandEvent &evt) { if (GetActivePanel() != NULL) { GetActivePanel()->EditKeyValue(); } }
//----------------------------------------------------------------------------- // Initialization //----------------------------------------------------------------------------- bool CResupplyControlPanel::Init( KeyValues* pKeyValues, VGuiScreenInitData_t* pInitData ) { // Grab ahold of certain well-known controls m_pBuyAmmoButton = new CBitmapButton( GetActivePanel(), "BuyAmmoButton", "" ); m_pBuyGrenadesButton = new CBitmapButton( GetActivePanel(), "BuyGrenadesButton", "" ); m_pBuyHealthButton = new CBitmapButton( GetActivePanel(), "BuyHealthButton", "" ); m_pBuyAllButton = new CBitmapButton( GetActivePanel(), "BuyAllButton", "" ); return BaseClass::Init( pKeyValues, pInitData ); }
static void k213_UpdateReadings (int panel, void *dev) { gpibioPtr my_dev = dev; k213Ptr quadsrc = my_dev->device; unsigned short statusbyte; char rsp[256]; int control, dim, bg, mode, m, active_panel, port; for (port = 0; port < 4; port++) { if (!util_TakingData() || !quadsrc->port[port].src->acqchan->acquire) k213_GetPortLevel (port+1, dev); } if (expG.acqstatus != utilG.acq.status) { m = GetPanelMenuBar (panel); for (port = 0; port < 4; port++) { dim = (util_TakingData() && quadsrc->port[port].src->inlist && (utilG.exp == EXP_SOURCE)); if (dim) { mode = VAL_INDICATOR; bg = VAL_PANEL_GRAY;} else { mode = VAL_HOT; bg = VAL_WHITE;} SetCtrlAttribute (quadsrc->port[port].panel, K213PORT_DISPLAY, ATTR_CTRL_MODE, mode); SetCtrlAttribute (quadsrc->port[port].panel, K213PORT_DISPLAY, ATTR_TEXT_BGCOLOR, bg); SetInputMode (quadsrc->port[port].panel, K213PORT_AUTORANGE, !dim); SetInputMode (quadsrc->port[port].panel, K213PORT_RANGE, !dim); } SetMenuBarAttribute (m, K213MENUS_FILE_LOAD, ATTR_DIMMED, dim); } k213_CheckforProblems (my_dev); active_panel = GetActivePanel(); control = GetActiveCtrl (active_panel); for (port = 0; port < 4; port++) { if (util_TakingData() || (control != K213PORT_DISPLAY)) SetCtrlVal (quadsrc->port[port].panel, K213PORT_DISPLAY, quadsrc->port[port].src->acqchan->reading); } }
void MainFrame::OnKeySelectedUpdateUI(wxUpdateUIEvent &evt) { ConnectionPanel *panel = GetActivePanel(); evt.Enable(panel != NULL && panel->GetSelectedKey() != wxEmptyString); }
void MainFrame::OnRedisConnectedUpdateUI(wxUpdateUIEvent &evt) { evt.Enable(GetActivePanel() != NULL); }