Beispiel #1
0
void CComSetDlg::OnBnClickedCancel()
{
	// TODO: 在此添加控件通知处理程序代码
	OnCancel();
}
Beispiel #2
0
void CDLGrename::OnBnClickedCancel()
{
	// TODO: Add your control notification handler code here
	OnCancel();
}
Beispiel #3
0
void CSaveDlg::OnBnClickedCancel()
{
	if(pMC) pMC->Stop();

	OnCancel();
}
Beispiel #4
0
void CChannelsDlg::cancel_clicked()
{
   OnCancel();
}
Beispiel #5
0
void CDailyOpsBS::OnClose() 
{
	OnCancel();
}
Beispiel #6
0
void CNetOption::OnBnClickedCancel()
{
	// TODO: 在此添加控件通知处理程序代码
	OnCancel();
}
Beispiel #7
0
void CVNOCLoginDlg::OnBnClickedCancel()
{
	OnCancel();
}
Beispiel #8
0
void CEventWizardDlg::OnBnClickedCancel()
{
	OnCancel();
}
Beispiel #9
0
void CInputBox::OnBnClickedCancel()
{
    // TODO: Add your control notification handler code here
    OnCancel();
}
RocketStorageSelectionDialog::RocketStorageSelectionDialog(RocketPlugin *plugin, MeshmoonStorage *storage, const QStringList &suffixFilters, 
                                                           bool allowChangingFolder, MeshmoonStorageItem &startDirectory, QWidget *parent) :
    QDialog(parent),
    plugin_(plugin),
    storage_(storage),
    suffixFilters_(suffixFilters),
    allowChangingFolder_(allowChangingFolder),
    startDirectory_(startDirectory),
    currentFolder_(0)
{
    // Setup UI
    ui_.setupUi(this);
    ui_.scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    ui_.lineEditFilter->installEventFilter(this);

    ui_.buttonSelect->setAutoDefault(false);
    ui_.buttonCancel->setAutoDefault(false);

    view_ = new RocketStorageListWidget(this, plugin_);
    view_->SetPreviewFileOnMouse(true);
    view_->setSelectionMode(QAbstractItemView::SingleSelection);

    QVBoxLayout *l = new QVBoxLayout(ui_.scrollAreaWidgetContents);
    l->setSpacing(0);
    l->setContentsMargins(0,0,0,0);
    l->addWidget(view_);
    ui_.scrollAreaWidgetContents->setLayout(l);

    // Connections
    connect(view_, SIGNAL(itemClicked(QListWidgetItem*)), SLOT(OnItemClicked(QListWidgetItem*)));
    connect(view_, SIGNAL(itemDoubleClicked(QListWidgetItem*)), SLOT(OnItemDoubleClicked(QListWidgetItem*)));
    connect(ui_.buttonSelect, SIGNAL(clicked()), SLOT(OnSelect()), Qt::QueuedConnection);
    connect(ui_.buttonCancel, SIGNAL(clicked()), SLOT(reject()), Qt::QueuedConnection);
    connect(this, SIGNAL(rejected()), SLOT(OnCancel()));
    connect(ui_.lineEditFilter, SIGNAL(textChanged(const QString&)), SLOT(OnFilterChanged(const QString&)));

    // Dialog setup
    setAttribute(Qt::WA_DeleteOnClose, true);
    setWindowModality(parent != 0 ? Qt::WindowModal : Qt::ApplicationModal);
    setWindowFlags(parent != 0 ? Qt::Tool : Qt::SplashScreen);
    setWindowTitle(parent != 0 ? "Meshmoon Storage Picker" : "");
    setModal(true);

    // Center to main window or to parent window.
    if (!parent)
    {
        plugin_->Notifications()->DimForeground();
        plugin_->Notifications()->CenterToMainWindow(this);
    }
    else
        plugin_->Notifications()->CenterToWindow(parent, this);
    
    // Show and activate
    show();
    setFocus(Qt::ActiveWindowFocusReason);
    activateWindow();
    
    // If this is a splash dialog animate opacity
    if (!parent)
    {
        setWindowOpacity(0.0);

        QPropertyAnimation *showAnim = new QPropertyAnimation(this, "windowOpacity", this);
        showAnim->setStartValue(0.0);
        showAnim->setEndValue(1.0);
        showAnim->setDuration(300);
        showAnim->setEasingCurve(QEasingCurve(QEasingCurve::InOutQuad)); 
        showAnim->start();
    }

    if (!plugin_ || !storage_)
    {
        view_->addItem(new QListWidgetItem("Failed to list storage content"));
        return;
    }
    if (storage_->RootDirectory().IsNull())
        view_->addItem(new QListWidgetItem("Loading..."));

    MeshmoonStorageAuthenticationMonitor *auth = storage_->Authenticate();
    connect(auth, SIGNAL(Completed()), SLOT(OnStorageAuthCompleted()), Qt::QueuedConnection);
    connect(auth, SIGNAL(Canceled()), SLOT(reject()), Qt::QueuedConnection);
    connect(auth, SIGNAL(Failed(const QString&)), SLOT(reject()), Qt::QueuedConnection);
}
Beispiel #11
0
HRESULT CTryData4Dlg::OnButtonCancel(IHTMLElement* /*pElement*/)
{
	OnCancel();
	return S_OK;
}
BOOL CClassMgrDlg::OnInitDialog()
{
	CDialog::OnInitDialog();
	pDlg = reinterpret_cast<CConsoleDlg*>(AfxGetMainWnd());

	((CEdit*)GetDlgItem(IDC_NAME))->LimitText(64);
	((CEdit*)GetDlgItem(IDC_PATH))->LimitText(255);

	m_lstClass.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
	m_lstClass.InsertColumn(0, TEXT("类别名称"), LVCFMT_LEFT, 90);
	m_lstClass.InsertColumn(1, TEXT("游戏默认路径"), LVCFMT_LEFT, 240);

	i8desk::CDbMgr* pDbMgr = reinterpret_cast<CConsoleDlg*>(AfxGetMainWnd())->m_pDbMgr;
	i8desk::DefClassMap ClassInfos;
	std::string ErrInfo;

	if (!pDbMgr->GetAllClass(ClassInfos, ErrInfo))
	{
		AfxMessageBox(ErrInfo.c_str());
		OnCancel();
		return TRUE;
	}

	LPCSTR defGuid[] = {
		CLASS_WL_GUID, 
		CLASS_DJ_GUID, 
		CLASS_XX_GUID, 
		CLASS_WY_GUID, 
		CLASS_DZ_GUID, 
		CLASS_QP_GUID, 
		CLASS_PL_GUID, 
		CLASS_LT_GUID, 
		CLASS_CY_GUID, 
		CLASS_YY_GUID,
		CLASS_GP_GUID,
	};

	for (int idx=0; idx<_countof(defGuid); idx++)
	{		
		i8desk::DefClassMapItr it = ClassInfos.find(defGuid[idx]);
		if (it != ClassInfos.end())
		{
			int nItem = m_lstClass.InsertItem(m_lstClass.GetItemCount(), it->second->Name);
			char *p = new char[it->first.size() + 1];
			lstrcpy(p, it->first.c_str());
			m_lstClass.SetItemData(nItem, reinterpret_cast<DWORD>(p));
			m_lstClass.SetItemText(nItem, 1, it->second->Path);
		}
	}

	for (i8desk::DefClassMapItr it = ClassInfos.begin();
		it != ClassInfos.end(); it ++)
	{
		if (!i8desk::IsI8DeskClassGUID(it->first))
		{
			int nItem = m_lstClass.InsertItem(m_lstClass.GetItemCount(), it->second->Name);
			char *p = new char[it->first.size() + 1];
			lstrcpy(p, it->first.c_str());
			m_lstClass.SetItemData(nItem, reinterpret_cast<DWORD>(p));
			m_lstClass.SetItemText(nItem, 1, it->second->Path);
		}
	}
	ClassInfos.clear();

	if (m_lstClass.GetItemCount())
		m_lstClass.SetItemState(0, LVIS_SELECTED|LVIS_FOCUSED, LVIS_SELECTED|LVIS_FOCUSED);

	CenterWindow();
	return TRUE;
}
Beispiel #13
0
void CJudgeDlg::OnOK()
{
	OnCancel();
}
Beispiel #14
0
void CDlgBlockAnalysis::OnBnClickedSaveas2()
{
	OnCancel();
}
Beispiel #15
0
bool NCDialog::EventChildKey( Win* child, cevent_key* pEvent )
{
	if ( pEvent->Type() == EV_KEYDOWN )
	{
		//dbg_printf("key=0x%x\n",pEvent->Key());
		if ( pEvent->Key() == VK_ESCAPE )
		{
			OnCancel();
			return true;
		}
		
		if ( pEvent->Key() == VK_TAB )
		{
			if ( ( pEvent->Mod() & KM_SHIFT ) != 0 )
			{
				FocusPrevChild();
			}
			else
			{
				FocusNextChild();
			}

			return true;
		}

// on UNIX shift-tab gives XK_ISO_Left_Tab
#ifdef XK_ISO_Left_Tab
		else if ( pEvent->Key() == XK_ISO_Left_Tab )
		{
			FocusPrevChild();
			return true;
		}

#endif // XK_ISO_Left_Tab
		else if ( pEvent->Key() == VK_RETURN || pEvent->Key() == VK_NUMPAD_RETURN )
		{
			if ( enterCmd && GetFocusButtonNum() < 0 )
			{
				CloseDialog( enterCmd );
				return true;
			}
		}
		else if ( pEvent->Key() == VK_LEFT || pEvent->Key() == VK_RIGHT )
		{
			int i = GetFocusButtonNum();

			if ( i >= 0 )
			{
				int n;

				if ( pEvent->Key() == VK_LEFT )
				{
					n = i ? i - 1 : _bList.count() - 1;
				}
				else
				{
					n = ( ( i + 1 ) % _bList.count() );
				}

				if ( n != i )
				{
					_bList[n]->SetFocus();
				}

				return true;
			}
		}

	};

	return Win::EventChildKey( child, pEvent );
}
void CTorchlightCamModDlg::OnSTExit()
{
	// # User selected exit.
	OnCancel();
}
void CDlgCfgSetUptTime::OnBnClickedCancel()
{
	OnCancel();
}
Beispiel #18
0
LRESULT CDownloadDlg::OnDownloadEnd(WPARAM wParam, LPARAM lParam)
{
	// logout
	m_netdb.Logout();

	m_ctrlProgress.SetPos( STKLIB_MAX_PROGRESS );
	CString	strProgressNew;
	strProgressNew.Format( "%.2f%%", 100. );
	m_staticProgress.SetWindowText( strProgressNew );

	// set message and enable buttons
	CString	strMsg;
	if( wParam )
		strMsg.LoadString( IDS_DOWNLOAD_FINISHED );
	else
		strMsg.LoadString( IDS_DOWNLOAD_PAUSED );
	
	CString	strComma;
	strComma.LoadString( IDS_COMMA );
	CString	strFullStop;
	strFullStop.LoadString( IDS_FULLSTOP );
	for( int i=0; i<m_astrErrorPac.GetSize(); i++ )
	{
		if( 0 == i )
			strMsg	+=	CNetDatabase::GetProgressMessage( PROG_ERRORPAC );
		else
			strMsg	+=	strComma;
		strMsg	+=	m_astrErrorPac.ElementAt(i);
	}

	if( m_astrErrorPac.GetSize() > 0 )
		strMsg	+=	strFullStop;
	if( lParam )
		strMsg	+=	(LPCTSTR)lParam;
	
	m_staticStatus.SetWindowText( strMsg );

	m_btnOK.EnableWindow( TRUE );
	m_btnCancel.EnableWindow( TRUE );
	m_btnProxySet.EnableWindow( TRUE );
	m_btnRefreshServers.EnableWindow( TRUE );
	m_btnStop.EnableWindow( FALSE );

	if( CDownloadDlg::m_hEventKillDownloadThread )
		CloseHandle(CDownloadDlg::m_hEventKillDownloadThread);
	if( CDownloadDlg::m_hEventDownloadThreadKilled )
		CloseHandle(CDownloadDlg::m_hEventDownloadThreadKilled);
	CDownloadDlg::m_hEventKillDownloadThread	=	NULL;
	CDownloadDlg::m_hEventDownloadThreadKilled	=	NULL;

	CSPTime	tmLatest;
	if( m_netdb.SetRootPath( AfxGetProfile().GetSelfDBPath(), IStStore::dbtypeSelfDB )
		&& m_netdb.GetTimeLocalRange( &tmLatest, NULL, NULL ) )
	{
		CString	strTimeLatest	=	tmLatest.Format( "%Y-%m-%d,%A" );
		m_staticLatest.SetWindowText( strTimeLatest );
	}

	m_bDBModified	=	TRUE;

	if( m_bAutoRun && wParam )
		OnCancel( );

	return 1;
}
Beispiel #19
0
// Close
void CDbgView::OnEditAction2()
{
	OnCancel();
} // CDbgView::OnEditAction1
Beispiel #20
0
void CDJMasterDlg::OnBnClickedCancel()
{
	OnCancel();
}
Beispiel #21
0
void CSuspDlg::OnButtonSuspreasonCancel() 
{
	// TODO: Add your control notification handler code here
	OnCancel();
}
Beispiel #22
0
//-----------------------------------------------------------------------------
// Name: 
// Desc: 
//-----------------------------------------------------------------------------
BOOL CDialog::ProcessMessage(E_MESSAGE eMessage, DWORD dwCurrTick) 
{
	int dx, dy;
	RECT rc;
	
	switch (eMessage.dwMessageID) 
	{
	case EM_KEYPRESSED:
		if (eMessage.wParam == DIK_RETURN)
		{
			OnOk();
			return TRUE;
		}
		break;
	case EM_LMOUSEDOWN:
		m_nX = eMessage.lParam;
		m_nY = eMessage.wParam;
		if (m_pDialog && m_pDialog->IsInSprite(m_nX, m_nY)) 
		{
			m_bGrab = TRUE;
			return TRUE;
		}
		break;
	case EM_MOUSEMOVE:
		if (m_bGrab) 
		{
			dx = eMessage.lParam - m_nX;
			dy = eMessage.wParam - m_nY;
			rc = GetScene()->GetViewRect();
			GetScene()->DirtCamera();
			rc.left += dx;
			rc.right += dx;
			rc.bottom += dy;
			rc.top += dy;
			GetScene()->SetViewRect(&rc);
			m_nX = eMessage.lParam;
			m_nY = eMessage.wParam;
		}
		else
		{
			//handle ok
			if (m_pOk)
			{
				if (m_pOk->IsInSprite(eMessage.lParam, eMessage.wParam))
					m_pOk->SetFrame(1);
				else
					m_pOk->SetFrame(0);
			}

			//handle cancel
			if (m_pCancel)
			{
				if (m_pCancel->IsInSprite(eMessage.lParam, eMessage.wParam))
					m_pCancel->SetFrame(1);
				else
					m_pCancel->SetFrame(0);
			}
		}
		break;
	case EM_LMOUSEUP:
		m_bGrab = FALSE;
		if (m_pOk && m_pOk->GetFrame() == 1)
		{
			m_bGrab = FALSE;
			GET_AUDIO()->PlaySample("put");
			m_pOk->SetFrame(0);
			OnOk();
			return TRUE;
		}
		if (m_pCancel && m_pCancel->GetFrame() == 1)
		{
			m_bGrab = FALSE;
			GET_AUDIO()->PlaySample("put");
			m_pCancel->SetFrame(0);
			OnCancel();
			return TRUE;
		}
		break;
    }
	return FALSE;
}
Beispiel #23
0
void CLoginDlg::OnStnClickedLoginClose()
{
    OnCancel();
}
void CPwGeneratorAdvDlg::OnBtnCancel()
{
	OnCancel();
}
Beispiel #25
0
void CBufferMovieDlg::OnBnClickedCancel()
{
	m_Parent->SendMessage(WM_UPDATE_GUI_STOP, 0, 0);
	OnCancel();
}
Beispiel #26
0
void CModuleImportDlg::OnBnClickedCancel()
{
	OnCancel();
}
Beispiel #27
0
/*
================
DialogDeclNew::OnBnClickedCancel
================
*/
void DialogDeclNew::OnBnClickedCancel() {
	OnCancel();
}
Beispiel #28
0
void CmusikFileDrop::OnBnClickedCancel()
{
	m_Ret = MUSIK_FILEDROP_CANCEL;
	OnCancel();
}
Beispiel #29
0
void CGroupAssignToDoDlg::OnClickBtnX() 
{
	OnCancel();
}
Beispiel #30
0
void MyDlg_Search::OnBnClickedCancel()
{
	// TODO: 在此添加控件通知处理程序代码
	OnCancel();
}