GLFWEngine::GLFWEngine(WindowSettings& w) : BasicEngine(new GLFWTimerProvider()), currentSettings(new WindowSettings()), Window(*currentSettings) { if (!InitWindow(w)) printf("Could not open window"); KeyInit(); MouseInit(); InitListen(); }
TcpGateDialog::TcpGateDialog(QDialog *parent) : QDialog(parent), ui(new Ui::TcpGateDialog) { ui->setupUi(this); connect(ui->btnClear, SIGNAL(clicked()), this, SLOT(onClkBtnClear())); connect(ui->btnAbout, SIGNAL(clicked()), this, SLOT(onClkBtnAbout())); connect(ui->btnHome, SIGNAL(clicked()), this, SLOT(onClkBtnHome())); connect(&m_timer, SIGNAL(timeout()), this, SLOT(onTimer())); InitListen(); InitConnect(); }
BOOL CSetVorlagen::UpdateVorlage() { BOOL result = FALSE; BOOL found = FALSE; CString key, name, pfad; long typ; key = m_Kode; name = m_Name; pfad = m_Pfad; typ = m_Typ; try { Open(); while ( !IsEOF()) { if ( found = ( key == m_Kode )) break; MoveNext(); } if ( found ) Edit(); else AddNew(); m_Kode = key; m_Name = name; m_Pfad = pfad; m_Typ = typ; Update(); Close(); result = TRUE; } catch ( CDBException *e ) { AfxMessageBox( e -> m_strError ); } catch ( CMemoryException *e) { AfxMessageBox( g_cbMemoryException ); e -> Delete(); } catch (...) { AfxMessageBox( g_cbUnhandeledException ); } if ( result ) InitListen(); return result; }
BOOL CSetVorlagen::SelectVorlage( const char id ) { BOOL result = FALSE; CString key, name; InitListen(); m_Kode = id; m_Name = ""; m_Pfad = ""; m_Typ = 0; key = id; if ( m_mapNamen.Lookup( key, name )) { m_Name = name; m_mapPfade.Lookup( key, m_Pfad ); m_mapType.Lookup( key, name ); m_Typ = atoi( name ); m_NurLesen = ( "O" == name.Right( 1 )); result = TRUE; } return result; }