コード例 #1
0
ファイル: VolumeHistory.cpp プロジェクト: AB9IL/VeraCrypt
	void VolumeHistory::Add (const VolumePath &newPath)
	{
		if (Gui->GetPreferences().SaveHistory)
		{
			ScopeLock lock (AccessMutex);

			VolumePathList::iterator iter = VolumePaths.begin();
			foreach (const VolumePath &path, VolumePaths)
			{
				if (newPath == path)
				{
					VolumePaths.erase (iter);
					break;
				}
				iter++;
			}

			VolumePaths.push_front (newPath);
			if (VolumePaths.size() > MaxSize)
				VolumePaths.pop_back();

			foreach (wxComboBox *comboBox, ConnectedComboBoxes)
			{
				UpdateComboBox (comboBox);
			}
コード例 #2
0
EEventStatus::Enum GCovertActionsNewMissionWindow::OnCustomEvent(UINT32 in_iEventID, const SDK::GUI::GEventData & in_Data, SDK::GUI::GBaseObject* in_pCaller)
{
   if(in_iEventID == ECustomEvents::OnComboBoxSelectionEvent)
   {
      if(((GUI::GComboBox*)in_Data.Data) == m_pObjTypeCbo || ((GUI::GComboBox*)in_Data.Data) == m_pObjSectorCbo)
         UpdateComboBox();
   }

   return GUI::EEventStatus::Handled;
}
コード例 #3
0
/*!
 * Called when the object is displayed
 **/
void GCovertActionsNewMissionWindow::OnShow()
{
   __super::OnShow();

   m_pObjTypeCbo->Selected_Content( g_ClientDAL.GetString(EStrId::MissionTypeEspionage) );
   m_pObjSectorCbo->Selected_Content( g_ClientDAL.GetString(EStrId::MissionTargetMilitary) );
   m_pObjComplexityCbo->Selected_Content( g_ClientDAL.GetString(EStrId::MissionComplexityMedium) );
  
   UpdateComboBox();

   g_ClientDDL.MainBar()->BringToFront();
   g_ClientDDL.MiniMap()->BringToFront();
}
コード例 #4
0
ファイル: MjSet.cpp プロジェクト: lincoln56/robinerp
//选牌数
void CMjSet::OnChoiceDesk(UINT nID)
{
	UpdateData(TRUE);
	//当前选项ID
	m_iCurrentDesk = (nID - IDC_MJDESK_0);

	//设置当前牌
	SetCurrentData(m_iOldDesk);
	
	//换位置中出现默认选项清零
	if(m_iOldDesk == 0 || m_iCurrentDesk == 0)
		for(int i  = 0; i < 54; i++)
			m_RemainCard[i] = 4;
	//清零
	if(m_iCurrentDesk == 0)
		::memset(&m_paistruct,0,sizeof(m_paistruct));
	//保存历史坐号
	m_iOldDesk = m_iCurrentDesk;
	//更新控件
	UpdateComboBox();
	return ;
}
コード例 #5
0
LRESULT CALLBACK CSkeletalViewerApp::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch(message)
    {
        case WM_INITDIALOG:
        {
            LOGFONT lf;

            // Clean state the class
            Nui_Zero();

            // Bind application window handle
            m_hWnd=hWnd;

            // Initialize and start NUI processing
            Nui_Init();

            // Set the font for Frames Per Second
            GetObject((HFONT) GetStockObject(DEFAULT_GUI_FONT),sizeof(lf),&lf);
            lf.lfHeight*=4;
            m_hFontFPS=CreateFontIndirect(&lf);
            SendDlgItemMessage(hWnd,IDC_FPS,WM_SETFONT,(WPARAM) m_hFontFPS,0);
			// Use the same font for distance and user
			SendDlgItemMessage(hWnd,IDC_DISTANCE,WM_SETFONT,(WPARAM) m_hFontFPS,0);
			SendDlgItemMessage(hWnd,IDC_USER,WM_SETFONT,(WPARAM) m_hFontFPS,0);

            UpdateComboBox();
            SendDlgItemMessage (m_hWnd, IDC_CAMERAS, CB_SETCURSEL, 0, 0);
        }
        break;

        case WM_USER_UPDATE_FPS:
        {
            ::SetDlgItemInt( m_hWnd, static_cast<int>(wParam), static_cast<int>(lParam), FALSE );
        }
        break;
		case WM_USER_UPDATE_DISTANCE:
        {
            ::SetDlgItemInt( m_hWnd, static_cast<int>(wParam), static_cast<int>(lParam), FALSE );
        }
        break;
		case WM_USER_UPDATE_USER:
        {
            ::SetDlgItemInt( m_hWnd, static_cast<int>(wParam), static_cast<int>(lParam), FALSE );
        }
        break;
        case WM_USER_UPDATE_COMBO:
        {
            UpdateComboBox();
        }
        break;
        case WM_COMMAND:
        if( HIWORD( wParam ) == CBN_SELCHANGE )
        {
            LRESULT index = ::SendDlgItemMessage(m_hWnd, IDC_CAMERAS, CB_GETCURSEL, 0, 0);
            switch (LOWORD(wParam))
            {
            case IDC_CAMERAS:
                {
                    if (!m_fUpdatingUi) // Don't reconnect as a result of updating the combo box.
                    {
                        Nui_UnInit();
                        Nui_Zero();
                        Nui_Init(static_cast<int>(index));
                    }
                }
            break;
            }
        }
        break;
		// Handle key presses
		case WM_KEYUP:
			switch (wParam)
			{
			default:
				// Print the info about the key I just pressed
				char msg[1024];
				sprintf_s (msg, 1024, "wParam: %s lParam: %s", wParam, lParam);
				WCHAR msg_u[1024];
				MultiByteToWideChar(0, 0, msg, 1024, msg_u, 6);
				MessageBox(hWnd, msg_u, TEXT("Display pressed character"), NULL);
			}
			break;
        // If the titlebar X is clicked destroy app
        case WM_CLOSE:
            DestroyWindow(hWnd);
            break;

        case WM_DESTROY:
            // Uninitialize NUI
            Nui_UnInit();

            // Other cleanup
            DeleteObject(m_hFontFPS);

            // Quit the main message pump
            PostQuitMessage(0);
            break;
    }
    return (FALSE);
}