void ItemAttributeMgr::DeleteEx(bool notify) { // save & set notify state bool old_notify = GetNotify(); SetNotify(notify); // delete the attributes EVEAdvancedAttributeMgr::Delete(); // restore old notify state SetNotify(old_notify); }
void pawsFingeringWindow::ShowDialog(pawsFingeringReceiver * receiver, const char * editedCmd) { SetNotify(receiver); SetupGUIForDetection(editedCmd); Show(); PawsManager::GetSingleton().SetModalWidget(this); }
LRESULT CH3CDlg::OnInterrupted(WPARAM, LPARAM) { m_isConnect=FALSE; SetCtrls(m_isConnect); SetNotify(m_isConnect); //tnd.hIcon=LoadIcon(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDI_DISCON)); //Shell_NotifyIcon(NIM_MODIFY,&tnd); //UpdateData(FALSE); return 0; }
bool ItemAttributeMgr::Load(bool notify) { // save & set notify state bool old_notify = GetNotify(); SetNotify(notify); // save & set save state bool old_save = GetSave(); SetSave(false); // delete old contents EVEAdvancedAttributeMgr::Delete(); // load the new contents bool res = m_factory.db().LoadItemAttributes(item().itemID(), *this); // restore save state SetSave(old_save); // restore notify state SetNotify(old_notify); return res; }
LRESULT CH3CDlg::OnInfo(WPARAM wParam,LPARAM lParam) { m_infoDisplay+=(char*)lParam; m_infoDisplay+="\r\n"; if(!strcmp((char*)lParam,"登录成功!")) { m_isConnect = TRUE; SetNotify(m_isConnect); } if(!strcmp((char*)lParam,"连接断开")||!strcmp((char*)lParam,"连接失败...")) { m_isConnect = FALSE; SetCtrls(m_isConnect); SetNotify(m_isConnect); } UpdateData(FALSE); CEdit * edit=(CEdit *)GetDlgItem(IDC_EDIT1); edit->LineScroll(edit->GetLineCount()); //((CEdit*)GetDlgItem(IDC_EDIT1))->Sc return 0; }
CEMSocket::~CEMSocket() { // need to be locked here to know that the other methods // won't be in the middle of things { wxMutexLocker lock(m_sendLocker); byConnected = ES_DISCONNECTED; } // now that we know no other method will keep adding to the queue // we can remove ourself from the queue if (theApp->uploadBandwidthThrottler) { theApp->uploadBandwidthThrottler->RemoveFromAllQueues(this); } ClearQueues(); SetNotify(0); Notify(FALSE); }
bool CProxySocket::Start(const wxIPaddress &peerAddress) { SaveState(); // Important note! SaveState()/RestoreState() DO NOT save/restore // the event handler. The method SaveEventHandler() has been created // for that. SaveEventHandler(); SetEventHandler(g_proxyEventHandler, ID_PROXY_SOCKET_EVENT); SetNotify( wxSOCKET_CONNECTION_FLAG | wxSOCKET_INPUT_FLAG | wxSOCKET_OUTPUT_FLAG | wxSOCKET_LOST_FLAG); Notify(true); Connect(m_proxyAddress, false); SetFlags(wxSOCKET_NONE); bool ok = m_proxyStateMachine->Start(peerAddress, this); return ok; }
bool pawsYesNoBox::OnButtonReleased( int mouseButton, int keyModifier, pawsWidget* widget ) { // The parent is responsible for handling the button presses. if ( notify ) { bool result = notify->OnButtonReleased(mouseButton, keyModifier, widget); SetNotify(0); Hide(); return result; } else if ( handler ) { if ( widget == yesButton ) handler( true , owner ); else handler( false, owner ); Hide(); return true; } return false; }
CListenSocket::CListenSocket(wxIPaddress &addr, const CProxyData *ProxyData) : // wxSOCKET_NOWAIT - means non-blocking i/o // wxSOCKET_REUSEADDR - means we can reuse the socket imediately (wx-2.5.3) CSocketServerProxy(addr, wxSOCKET_NOWAIT|wxSOCKET_REUSEADDR, ProxyData) { // 0.42e - vars not used by us bListening = false; shutdown = false; m_OpenSocketsInterval = 0; m_nPendingConnections = 0; totalconnectionchecks = 0; averageconnections = 0.0; // Set the listen socket event handler -- The handler is written in amule.cpp if (IsOk()) { SetEventHandler(*theApp, ID_LISTENSOCKET_EVENT); SetNotify(wxSOCKET_CONNECTION_FLAG); Notify(true); AddLogLineNS(_("ListenSocket: Ok.")); } else { AddLogLineCS(_("ERROR: Could not listen to TCP port.") ); } }