// ----------------------------------------------------------------------------
void BrowseSelector::OnKeyUp(wxKeyEvent &event)
// ----------------------------------------------------------------------------
{
	//FIXME: the key should dynamically match the menuitem cmdkey
	if( event.GetKeyCode() == WXK_ALT )
	{
		CloseDialog();
	}
	if( event.GetKeyCode() == WXK_RETURN )
	{
		CloseDialog();
	}
}
Beispiel #2
0
LRESULT CResendDlg::OnPopupExit(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
    KillTimer(0);
    CloseDialog(0);

    return 0;
}
Beispiel #3
0
void SAssetDialog::CommitObjectPathForSave()
{
	if ( ensure(DialogType == EAssetDialogType::Save) )
	{
		if ( bLastInputValidityCheckSuccessful )
		{
			const FString ObjectPath = GetObjectPathForSave();

			bool bProceedWithSave = true;

			// If we were asked to warn on existing assets, do it now
			if ( ExistingAssetPolicy == ESaveAssetDialogExistingAssetPolicy::AllowButWarn )
			{
				FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>("AssetRegistry");
				FAssetData ExistingAsset = AssetRegistryModule.Get().GetAssetByObjectPath(FName(*ObjectPath));
				if ( ExistingAsset.IsValid() && AssetClassNames.Contains(ExistingAsset.AssetClass) )
				{
					EAppReturnType::Type ShouldReplace = FMessageDialog::Open( EAppMsgType::YesNo, FText::Format(LOCTEXT("ReplaceAssetMessage", "{ExistingAsset} already exists. Do you want to replace it?"), FText::FromString(CurrentlyEnteredAssetName)) );
					bProceedWithSave = (ShouldReplace == EAppReturnType::Yes);
				}
			}

			if ( bProceedWithSave )
			{
				OnObjectPathChosenForSave.ExecuteIfBound(ObjectPath);
				CloseDialog();
			}
		}
	}
}
Beispiel #4
0
//-----------------------------------------------------------------------------
//!
//-----------------------------------------------------------------------------
void tSearchItemDialog::Initialize( tMCoord position, const FindType::eItemType type, const tMapFilter& filter )
{
    m_NotificationID = 0;

    SetTitleTypeString( type );
    UpdateStatusString("");

    QVBoxLayout* pMainLayout = new QVBoxLayout();
    pMainLayout->setContentsMargins( 0, 0, 0, 0 );

    m_pSearchItemWidget = new tSearchItemWidget( this, m_pBrandFactory, position, filter );
    Connect( m_pSearchItemWidget, SIGNAL( UpdateStatusString( const QString& ) ), 
                    this, SLOT( UpdateStatusString( const QString& ) ) );
    Connect( m_pSearchItemWidget, SIGNAL( CloseDialog() ), this, SLOT( accept() ) );
    
    pMainLayout->addWidget( m_pSearchItemWidget );
    setLayout( pMainLayout );

    if ( HasSoftKeyBar() )
    {
        tAction* pShowAct = new tAction( tr( "Show", "[button]" ), this ); 
        Connect( pShowAct, SIGNAL( triggered() ), this, SLOT( ShowPressed() ) );
        tAction* pGotoAct = new tAction( tr( "Goto", "[button]" ), this ); 
        Connect( pGotoAct, SIGNAL( triggered() ), this, SLOT( GotoPressed() ) );
        tAction* pDetailsAct = new tAction( tr( "Details", "[button]" ), this ); 
        Connect( pDetailsAct, SIGNAL( triggered() ), this, SLOT( DetailsPressed() ) );

        m_ActionList << pShowAct << pGotoAct << pDetailsAct;

        setSoftKeys( m_ActionList );
    }

    m_pSearchItemWidget->SetSearchType( type ); // starts the search
}
Beispiel #5
0
void CBrushGadget::HandleBrushButtonClick (BrushData* AppliedBrush, AttrBrushType* pBrush, AttrBrushType* pOrigBrush)
{
	if (AppliedBrush == NULL || pBrush == NULL)
	{
		ERROR3("Invalid input parameters");
		return;
	}
	
	if (!(IsDialogOpen ()))
	{
		pDialog_m = new CBrushEditDlg();
		BOOL bMany = FALSE, bAllSameType = TRUE;
								
		//CProfileBiasGain* appliedBiasGain = GetProfileFromSelection (ProfileGadgetID, &bMany, &bAllSameType);

		//if (bAllSameType != FALSE)
		//{
		pDialog_m->InvokeVia (*(this), AppliedBrush, pBrush, pOrigBrush, bMany);
		//}
	}
	else
	{
		CloseDialog ();
	}
}
void vmsWinInetHttpTrafficCollector::OnInternetCloseHandle(HINTERNET hInternet)
{
    if (!hInternet)
        return;

    m_pHttpTraffic->LockDialogsLists (true);

    CloseDialog (hInternet);

    for (size_t i = 0; i < m_pHttpTraffic->m_vCompletedDialogs.size (); i++)
    {
        if (m_pHttpTraffic->m_vCompletedDialogs [i]->hWInetFile == hInternet)
            m_pHttpTraffic->m_vCompletedDialogs [i]->hWInetFile = NULL;
    }

    m_pHttpTraffic->LockDialogsLists (false);

    EnterCriticalSection (&m_cs_vPostData);
    int nIndex = findPostDataIndex (hInternet);
    if (nIndex != -1)
        m_vPostData.erase (m_vPostData.begin () + nIndex);
    LeaveCriticalSection (&m_cs_vPostData);

    EnterCriticalSection (&m_cs_vNonCacheHandles);
    nIndex = findNonCacheHandleIndex (hInternet);
    if (nIndex != -1)
        m_vNonCacheHandles.erase (m_vNonCacheHandles.begin () + nIndex);
    LeaveCriticalSection (&m_cs_vNonCacheHandles);
}
Beispiel #7
0
void wxTabNavigatorWindow::OnKeyUp(wxKeyEvent &event)
{
	if(event.GetKeyCode() == WXK_CONTROL)
	{
		CloseDialog();
	}
}
Beispiel #8
0
void CMainDlg::OnTimer(UINT_PTR nIDEvent)
{
	if (nIDEvent == 1 && gStop)
	{
		static boost::timer tmr;
		// 延迟3秒关闭
		if (tmr.elapsed() > 3)
		{
			// 检测关闭
			trayIcon.Hide();
			CloseDialog(0);
			TerminateProcess(GetCurrentProcess(), 0);
		}
	}
	else if (nIDEvent == 2 && exiting && !gStop)
	{
		static int times = 0;
		if (times < 3)
		{
			times++;
			// L"正在退出太一,请稍候.."
			trayIcon.SetBalloonDetails(GetLocalWStr(strTrayNowExiting), L"", CTrayNotifyIcon::None, 100);
		}
	}
	else
	{
		SetMsgHandled(false);
	}
}
Beispiel #9
0
//=================================================================================================
void Controls::Event(GuiEvent e)
{
	if(e == GuiEvent_Show || e == GuiEvent_WindowResize)
	{
		if(e == GuiEvent_Show)
		{
			visible = true;
			changed = false;
		}
		pos = global_pos = (GUI.wnd_size - size)/2;
		for(int i=0; i<2; ++i)
			bts[i].global_pos = global_pos + bts[i].pos;
		grid.Move(global_pos);
	}
	else if(e == GuiEvent_LostFocus)
		grid.LostFocus();
	else if(e == GuiEvent_Close)
	{
		grid.LostFocus();
		visible = false;
	}
	else if(e == Button_Ok)
	{
		if(changed)
			game->SaveGameKeys();
		CloseDialog();
	}
	else if(e == Button_Reset)
	{
		game->ResetGameKeys();
		changed = true;
	}
}
Beispiel #10
0
	void OnOK(HWND hWnd)
	{
		winx::SaveFileDialog dlg(
			_T("TIFF files(*.tif;*.tiff)\0*.tif;*.tiff\0"), _T("*.tif"));
		
		if (IDOK != dlg.DoModal())
			return;
		
		TCHAR szFrame[] = _T("Frame1");

		USES_CONVERSION;
		CLSID clsid;
		Gdiplus::GetEncoderClsid(L"image/tiff", &clsid);
		Gdiplus::MultiFrameImageCreator multi(T2CW(dlg.lpstrFile), clsid);
		
		for (UINT i = 1; i < 10; ++i)
		{
			szFrame[5] = '0' + i;
			::SetDlgItemText(hWnd, IDC_PROMPT, szFrame);
			
			HBITMAP hbm = winx::ScreenCapture(hWnd);
			{
				Gdiplus::Bitmap bitmap(hbm, NULL);
				WINX_ASSERT(bitmap.GetLastStatus() == Gdiplus::Ok);
				multi.Add(bitmap);
			}
			::DeleteObject(hbm);
		}
		CloseDialog(hWnd);
	}
Beispiel #11
0
LRESULT CErrorReportDlg::OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
    // Show popup menu on "Other actions..." button click
    if(g_CrashInfo.m_bQueueEnabled)
    {    
        CPoint pt;
        GetCursorPos(&pt);
        CMenu menu = LoadMenu(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDR_POPUPMENU));
        CMenu submenu = menu.GetSubMenu(4);

        strconv_t strconv;
        CString sSendLater = Utility::GetINIString(g_CrashInfo.m_sLangFileName, _T("MainDlg"), _T("SendReportLater"));
        CString sCloseTheProgram = Utility::GetINIString(g_CrashInfo.m_sLangFileName, _T("MainDlg"), _T("CloseTheProgram"));

        MENUITEMINFO mii;
        memset(&mii, 0, sizeof(MENUITEMINFO));
        mii.cbSize = sizeof(MENUITEMINFO);
        mii.fMask = MIIM_STRING;

        mii.dwTypeData = sSendLater.GetBuffer(0);  
        submenu.SetMenuItemInfo(ID_MENU5_SENDREPORTLATER, FALSE, &mii);

        mii.dwTypeData = sCloseTheProgram.GetBuffer(0);  
        submenu.SetMenuItemInfo(ID_MENU5_CLOSETHEPROGRAM, FALSE, &mii);

        submenu.TrackPopupMenu(0, pt.x, pt.y, m_hWnd);    
    }  
    else
    {
        // Close dialog
        CloseDialog(wID);  
    }

    return 0;
}
/*!
	ボタンが押されたときの動作
*/
BOOL CDlgFileUpdateQuery::OnBnClicked(int id)
{
	EFileUpdateQuery result;

	switch( id ){
	case IDC_BTN_RELOAD: // 再読込
		result = EFUQ_RELOAD;
		break;
	case IDC_BTN_CLOSE: // 閉じる
		result = EFUQ_CLOSE;
		break;
	case IDC_BTN_NOTIFYONLY: // 以後通知メッセージのみ
		result = EFUQ_NOTIFYONLY;
		break;
	case IDC_BTN_NOSUPERVISION: // 以後更新を監視しない
		result = EFUQ_NOSUPERVISION;
		break;
	case IDC_BTN_AUTOLOAD:		// 以後未編集で再ロード
		result = EFUQ_AUTOLOAD;
		break;
	default:
		result = EFUQ_CLOSE;
		break;
	}
	CloseDialog( (INT_PTR)result );

	return 0;
}
Beispiel #13
0
LRESULT CErrorReportDlg::OnPopupSendReportLater(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
    g_CrashInfo.SetRemindPolicy(REMIND_LATER);

    CloseDialog(wID);  
    return 0;
}
FReply SAblAbilityPreviewAssetClassDlg::CancelClicked()
{
	m_bOkClicked = false;

	CloseDialog();

	return FReply::Handled();
}
Beispiel #15
0
	void OnOK(HWND hWnd)
	{
		DoDataExchange(true);
		winx::MsgBoxTrace(
			_T("Check=%d, Sex=%d, Level=%d, Edit='%s'\n"),
			m_fCheck1, m_nSex, m_nLevel, (LPCTSTR)m_strEdit1);
		CloseDialog(hWnd);
	}
void NotebookNavigationDlg::OnKeyUp(wxKeyEvent& event)
{
    CL_DEBUG("NotebookNavigationDlg::OnKeyUp");
#ifdef __WXOSX__
    if(event.GetKeyCode() == WXK_ALT) {
        CloseDialog();
    } else {
        event.Skip();
    }
#else
    if(event.GetKeyCode() == WXK_CONTROL) {
        CloseDialog();
    } else {
        event.Skip();
    }
#endif
}
Beispiel #17
0
LRESULT CLoginDlg::OnGotoWorld(UINT, WPARAM, LPARAM, BOOL&)
{
    ShowWindow(SW_HIDE);
    CWorldDlg dlg;
    dlg.DoModal();
    CloseDialog(0);
    return 0;
}
Beispiel #18
0
//=================================================================================================
void CreateCharacterPanel::OnEnterName(int id)
{
	if(id == BUTTON_OK)
	{
		CloseDialog();
		event(BUTTON_OK);
	}
}
Beispiel #19
0
LRESULT CErrorReportDlg::OnPopupCloseTheProgram(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
    // If needed, restart the application
    g_ErrorReportSender.DoWork(RESTART_APP);

    CloseDialog(wID);  
    return 0;
}
Beispiel #20
0
void __fastcall TPrepareBitDlg::CancellBttnClick(TObject *Sender)
{
   m_wasCancelled = true;
   CBackEndInterface* BackEnd = CBackEndInterface::Instance();
   BackEnd->EnableDoor(false);
   CloseDialog();
   Clean();
}
Beispiel #21
0
/// <summary>
/// Wait for injection
/// </summary>
/// <returns>Error code</returns>
NTSTATUS DlgWait::WaitForInjection()
{
    for (bool inject = true; inject && _status != STATUS_REQUEST_ABORTED; inject = _context.cfg.injIndef)
        _status = _core.InjectMultiple( &_context );

    CloseDialog();
    return _status;
}
void VExitDialog::OnItemClicked(VMenuEventDataObject *pEvent)
{
  VDialog::OnItemClicked(pEvent);

  if (pEvent->m_pItem == m_pExitButton)
    m_bExitTriggered = true;
  else if (pEvent->m_pItem == m_pCancelButton)
    CloseDialog();
}
Beispiel #23
0
LRESULT CResendDlg::OnNeverRemind(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
    g_CrashInfo.SetLastRemindDateToday();
    g_CrashInfo.SetRemindPolicy(NEVER_REMIND);

    KillTimer(0);
    CloseDialog(0);
    return 0;
}
Beispiel #24
0
 ///////////////////////////////////////////////////////////////////////
 ///  Function: On_WM_COMMAND_IDC_FALSE_WindowMessage
 ///
 ///    Author: $author$
 ///      Date: 1/29/2012
 ///////////////////////////////////////////////////////////////////////
 virtual LRESULT On_WM_COMMAND_IDC_FALSE_WindowMessage
 (HWND hWnd,
  UINT msg,
  WPARAM wParam,
  LPARAM lParam) 
 {
     LRESULT lResult = FALSE;
     CloseDialog(hWnd, FALSE);
     return lResult;
 }
Beispiel #25
0
LRESULT CErrorReportDlg::OnPopupSendReportLater(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
  g_CrashInfo.SetRemindPolicy(REMIND_LATER);
  
  // If needed, restart the application
  g_ErrorReportSender.DoWork(RESTART_APP);

  CloseDialog(wID);  
  return 0;
}
Beispiel #26
0
LRESULT CErrorReportDlg::OnPopupSendReportLater(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	// User has clicked the popup menu's "Close the program and send report later".

	// Update our remind policy to "Remind me later".
	CErrorReportSender* pSender = CErrorReportSender::GetInstance();
	pSender->GetCrashInfo()->SetRemindPolicy(REMIND_LATER);

    CloseDialog(wID);  
    return 0;
}
Beispiel #27
0
LRESULT CErrorReportDlg::OnPopupCloseTheProgram(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	// User has clicked the popup menu's "Close the program".
		
	CErrorReportSender* pSender = CErrorReportSender::GetInstance();
	// The following line will prevent from queueing the report
	pSender->GetCrashInfo()->m_bQueueEnabled = FALSE;

    CloseDialog(wID);  
    return 0;
}
Beispiel #28
0
LRESULT CErrorReportDlg::OnPopupCloseTheProgram(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
  // If needed, restart the application
  g_ErrorReportSender.DoWork(RESTART_APP);

  // Remove the error report files
  Utility::RecycleFile(g_CrashInfo.GetReport(0).m_sErrorReportDirName, true);

  CloseDialog(wID);  
  return 0;
}
Beispiel #29
0
void SAssetDialog::ChooseAssetsForOpen(const TArray<FAssetData>& SelectedAssets)
{
	if ( ensure(DialogType == EAssetDialogType::Open) )
	{
		if (SelectedAssets.Num() > 0)
		{
			OnAssetsChosenForOpen.ExecuteIfBound(SelectedAssets);
			CloseDialog();
		}
	}
}
Beispiel #30
0
	void DiskChange::cmdOK_Pushed() {
		Config::Drives[disk].File = grp.txtImage.GetText();
		Config::Drives[disk].Mounted = grp.chkMounted.IsChecked();
		Config::Drives[disk].Readonly = grp.chkReadonly.IsChecked();

		drives[disk].file->Close();
		if(Config::Drives[disk].Mounted) {
			drives[disk].file->Open(Config::Drives[disk].File, Config::Drives[disk].Readonly ? Piston::Io::File::Access::Read : Piston::Io::File::Access::ReadWrite, Piston::Io::File::Sharing::ReadWrite);
		}

		CloseDialog(1);
	}