Ejemplo n.º 1
0
void CDlgBundleTimeList::OnNMDblclkListBundletime(NMHDR *pNMHDR, LRESULT *pResult)
{
	OnOK();

	*pResult = 0;
}
Ejemplo n.º 2
0
void CMediaStorageDlg::OnBnClickedOk()
{
    m_uAFF = UINT(m_wndAFF.GetItemData(m_wndAFF.GetCurSel()));
    OnOK();
}
bool CGUIDialogKeyboardGeneric::OnAction(const CAction &action)
{
  bool handled(true);
  if (action.GetID() == ACTION_BACKSPACE)
  {
    Backspace();
  }
  else if (action.GetID() == ACTION_ENTER)
  {
    OnOK();
  }
  else if (action.GetID() == ACTION_CURSOR_LEFT)
  {
    MoveCursor( -1);
  }
  else if (action.GetID() == ACTION_CURSOR_RIGHT)
  {
    if (m_strEditing.empty() && (unsigned int) GetCursorPos() == m_strEdit.size() && (m_strEdit.size() == 0 || m_strEdit[m_strEdit.size() - 1] != ' '))
    { // add a space
      Character(L' ');
    }
    else
      MoveCursor(1);
  }
  else if (action.GetID() == ACTION_SHIFT)
  {
    OnShift();
  }
  else if (action.GetID() == ACTION_SYMBOLS)
  {
    OnSymbols();
  }
  else if (action.GetID() >= REMOTE_0 && action.GetID() <= REMOTE_9)
  {
    OnRemoteNumberClick(action.GetID());
  }
  else if (action.GetID() == ACTION_PASTE)
  {
    OnPasteClipboard();
  }
  else if ( (action.GetID() >= KEY_VKEY && action.GetID() < KEY_ASCII) ||
  			(action.GetButtonCode() >= KEY_VKEY && action.GetButtonCode() < KEY_ASCII) )
  { // input from the keyboard (vkey, not ascii)
    if (!m_strEditing.empty())
      return handled;
    uint8_t b = action.GetButtonCode() ? action.GetButtonCode() & 0xFF : action.GetID() & 0xFF;
    
    switch (b)
    {
	case XBMCVK_HOME:
    	SetCursorPos(0);
    	break;
    case XBMCVK_END:
	    SetCursorPos(m_strEdit.size());
    	break;
    case XBMCVK_LEFT:
    	MoveCursor( -1);
    	break;
    case XBMCVK_RIGHT:
    	MoveCursor(1);
    	break;
    case XBMCVK_RETURN:
    case XBMCVK_NUMPADENTER:
    	OnOK();
    	break;
    case XBMCVK_DELETE:
		if (GetCursorPos() < (int)m_strEdit.size())
		{
			MoveCursor(1);
			Backspace();
		}
    	break;
    case XBMCVK_BACK:
    	Backspace();
    	break;
    case XBMCVK_ESCAPE:
    	Close();
    	break;
    case XBMCVK_LSHIFT:
    case XBMCVK_RSHIFT:
		OnShift();
		break;
	case XBMCVK_CAPSLOCK:
		OnCapsLock();
		break;
	}	
  }
  else if (action.GetID() >= KEY_ASCII)
  { // input from the keyboard
    //char ch = action.GetID() & 0xFF;
    int ch = action.GetUnicode();
    
    if( m_keyType == LOWER && m_bShift )
    {
		if (ch >= 'a' && ch <= 'z')
    		ch -= 32;
    		
    	OnShift();	
	}	
	else if( m_keyType == CAPS && !m_bShift )
	{
		if (ch >= 'a' && ch <= 'z')
    		ch -= 32;
    }
    else if( m_keyType == CAPS && m_bShift )
    	OnShift();
   		
    // Ignore non-printing characters
    if ( !((0 <= ch && ch < 0x8) || (0xE <= ch && ch < 0x1B) || (0x1C <= ch && ch < 0x20)) )
    {
      switch (ch)
      {
      case 0x8: // backspace
        Backspace();
        break;
      case 0x9: // Tab (do nothing)
      case 0xB: // Non-printing character, ignore
      case 0xC: // Non-printing character, ignore
        break;
      case 0xA: // enter
      case 0xD: // enter
        OnOK();
        break;
      case 0x1B: // escape
        Close();
        break;
      case 0x7F: // Delete
        if (GetCursorPos() < (int)m_strEdit.size())
        {
          MoveCursor(1);
          Backspace();
        }
        break;
      default:  //use character input
        // When we support text input method, we only accept text by gui text message.
        if (!g_Windowing.IsTextInputEnabled())
	        Character(ch);
	        //Character(action.GetUnicode());
        break;
      }
    }
  }
  else // unhandled by us - let's see if the baseclass wants it
    handled = CGUIDialog::OnAction(action);

  if (handled && m_pCharCallback)
  { // we did _something_, so make sure our search message filter is reset
    m_pCharCallback(this, GetText());
  }
  return handled;
}
Ejemplo n.º 4
0
void CSelectReaderDlg::OnDblClkTreeDevices(NMHDR* pNMHDR, LRESULT* pResult)
{
	*pResult = 0;
	OnOK();
}
Ejemplo n.º 5
0
void CTextCommentSettings::OnBnClickedOk()
{
	// TODO: Add your control notification handler code here
	OnOK();
	//CloseWindow();
}
Ejemplo n.º 6
0
void AmbloneHotkeys::OnBnClickedOk()
{
  Parent->HotkeyWinClose();
  OnOK();
}
Ejemplo n.º 7
0
void CSearchDlg::OnBnClickedCancel()
{
	// TODO: 在此添加控件通知处理程序代码
	OnOK();
}
Ejemplo n.º 8
0
HRESULT CDHtmlTest::OnButtonOK(IHTMLElement* /*pElement*/)
{
	OnOK();
	return S_OK;
}
Ejemplo n.º 9
0
void HistoryDlg::OnNMDblclkTree(NMHDR *pNMHDR, LRESULT *pResult)
{
    *pResult = 0;

    OnOK();
}
Ejemplo n.º 10
0
void CEditOptions::OnBnClickedOk()
{
	//shader
	CInt checkState = m_checkBoxShader.GetCheck();
	if( checkState == BST_CHECKED )
		g_options.m_enableShader = CTrue;
	else
		g_options.m_enableShader = CFalse;

	//multisample
	if( g_multipleView->m_multiSample )
	{
		checkState = m_checkBoxMultisample.GetCheck();
		if( checkState == BST_CHECKED )
		{
			CInt curSel = m_comboMultisample.GetCurSel();
			switch( curSel )
			{
			case 0:
				g_options.m_numSamples = 2;
				break;
			case 1:
				g_options.m_numSamples = 4;
				break;
			case 2:
				g_options.m_numSamples = 8;
				break;
			case 3:
				g_options.m_numSamples = 16;
				break;
			}
		}
		else
			g_options.m_numSamples = 0;
	}

	//Anisotropy
	if( GLEW_EXT_texture_filter_anisotropic )
	{
		checkState = m_checkBoxAnisotropy.GetCheck();
		if( checkState == BST_CHECKED )
		{
			CInt curSel = m_comboAnisotropy.GetCurSel();
			switch( curSel )
			{
			case 0:
				g_options.m_anisotropy = 2;
				break;
			case 1:
				g_options.m_anisotropy = 4;
				break;
			case 2:
				g_options.m_anisotropy = 8;
				break;
			case 3:
				g_options.m_anisotropy = 16;
				break;
			}
		}
		else
			g_options.m_anisotropy = 0;
	}

	//VSync
	if( WGLEW_EXT_swap_control )
	{
		checkState = m_checkBoxVSync.GetCheck();
		if( checkState == BST_CHECKED )
		{
			g_options.m_disableVSync = CTrue;
			wglSwapIntervalEXT(0);
		}
		else
		{
			g_options.m_disableVSync = CFalse;
			wglSwapIntervalEXT(1);
		}
	}
	
	//FBO
	if( g_render.UsingFBOs() )
	{
		checkState = m_checkBoxFBO.GetCheck();
		if( checkState == BST_CHECKED )
		{
			g_options.m_enableFBO = CTrue;
		}
		else
		{
			g_options.m_enableFBO = CFalse;
		}
	}

	//VBO
	if( g_render.UsingVBOs() )
	{
		checkState = m_checkBoxVBO.GetCheck();
		if( checkState == BST_CHECKED )
		{
			g_options.m_enableVBO = CTrue;
		}
		else
		{
			g_options.m_enableVBO = CFalse;
		}
	}
	//welcome dialog
	checkState = m_checkBoxWelcomeDialog.GetCheck();
	if( checkState == BST_CHECKED )
		g_options.m_showStartupDialog = CTrue;
	else
		g_options.m_showStartupDialog = CFalse;

	//water
	if(	g_render.m_useWaterReflection )
	{
		checkState = m_checkBoxWaterReflection.GetCheck();
		if( checkState == BST_CHECKED )
			g_options.m_enableWaterReflection = CTrue;
		else
			g_options.m_enableWaterReflection = CFalse;
	}
	OnOK();
}
Ejemplo n.º 11
0
void CSkeletonSetDlg::OnBnClickedOk()
{
    // TODO: Add your control notification handler code here
    OnOK();
}
Ejemplo n.º 12
0
BOOL CProSetCameraTab::OnBnClickedOk()
{
	if (m_pConfigCenter->GetImgSource()!=CAMERA_SOURCE)
		return TRUE;

	if (m_ComboSource.GetCount()==0)
	{
		CString msg;
		msg.Format(_T("Cannot find Camera %s. please rescan"),(s2ws(m_pConfigCenter->GetCameraName())).c_str());
		AfxMessageBox(msg);
		return FALSE;
	}

	CString name;
	m_ComboSource.GetLBText(m_ComboSource.GetCurSel(),name);
	wstring wname = name;
	m_pConfigCenter->SetCameraName(ws2s(wname));
	m_pConfigCenter->SetImgSource(CAMERA_SOURCE);

	bool bChecked = (m_TriggerMode.GetCheck()==BST_CHECKED);
	m_pConfigCenter->SetTriggerMode(bChecked);

	if(bChecked) 
	{
		if (m_TraggerEdge.GetCurSel() == 0)
		{
			m_pConfigCenter->SetTriggerEdge(RISING_EDGE);
		}
		else
		{
			m_pConfigCenter->SetTriggerEdge(FALLING_EDGE);
		}
	}
	USES_CONVERSION;
	CString strValue;

	m_CameraGain.GetWindowText(strValue);
	m_pConfigCenter->SetCameraGain(_ttoi(T2CW(strValue)));

	m_triggerDelayAbs.GetWindowText(strValue);
	m_pConfigCenter->SetTriggerDelayAbs(_ttoi(T2CW(strValue)));

#ifdef SHEET_INSPECTION
	m_linePerFrame.GetWindowText(strValue);
	m_pConfigCenter->SetLineCountPerFrame(_ttoi(T2CW(strValue)));

	m_framePerSheet.GetWindowText(strValue);
	m_pConfigCenter->SetFrameCountPerSheet(_ttoi(T2CW(strValue)));
#endif

	// Connect to Light Controller and update the intensity value
	bChecked = (m_bConnectLightCtrl.GetCheck() == BST_CHECKED);
	m_pConfigCenter->SetConnect2LightCtrlFlag(bChecked);
	if(bChecked)
	{
		if(CMCtrlCenter::GetSingletonCtrlCenter()->m_VLproxy.TryConnectToUSB())
		{
			CMCtrlCenter::GetSingletonCtrlCenter()->m_VLproxy.WriteLightParam2Controller();
		}
	}
	OnOK();
	return TRUE;
}
Ejemplo n.º 13
0
BOOL CWndGHUpkeep::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) 
{ 
	int nBuyNum = 0;

	switch( nID )
	{
	case WIDC_PLUS:
		nBuyNum = atoi(m_pEdit->GetString());
		++nBuyNum;

		if ( nBuyNum > MAX_UPKEEP_DAY_CLIENT )
			nBuyNum = MAX_UPKEEP_DAY_CLIENT;
			
		OnChangeBuyCount(nBuyNum);
		break;

	case WIDC_MINUS:
		nBuyNum = atoi(m_pEdit->GetString());
		if ( --nBuyNum < 1 )
			nBuyNum = 1;

		OnChangeBuyCount(nBuyNum);
		break;

	case WIDC_MAX:
		OnChangeBuyCount( MAX_UPKEEP_DAY_CLIENT );
		break;

	case WIDC_CONTROL2:
		if( EN_CHANGE == message )
		{
			if( m_pEdit == NULL )
			{
				ADDERRORMSG( "CWndConfirmBuy::OnChildNotify : m_pEdit == NULL" );
				char szMsg[256];
				sprintf( szMsg, "CWndConfirmBuy::OnChildNotify : more info(%d, %d)", pLResult, GetDlgItem( WIDC_CONTROL2 ) );
				ADDERRORMSG( szMsg );

				nBuyNum = 1;
			}
			else
				nBuyNum = atoi(m_pEdit->GetString());

			nBuyNum = max( nBuyNum, 0 );
			DWORD dwMAXCount = MAX_BUY_UPKEEP;

			nBuyNum = min( nBuyNum, (int)( dwMAXCount ) );

			OnChangeBuyCount(nBuyNum);
		}
		break;

	case WIDC_CANCEL:
		Destroy();
		break;

	case WIDC_OK:
		OnOK();
		Destroy();
		break;
	}

	return CWndNeuz::OnChildNotify( message, nID, pLResult ); 
} 
Ejemplo n.º 14
0
void CDlgObservaciones::OnBnClickedOk()
{
	GetDlgItem(IDC_OBSERVACIONES)->GetWindowText(m_strObs);

	OnOK();
}
Ejemplo n.º 15
0
void CDirectionDlg::OnButtonW() {
  m_dir = W;
  OnOK();
}
Ejemplo n.º 16
0
void CInsertControlDlg::OnControlsDblClk()
{
   OnOK();
}
Ejemplo n.º 17
0
void CMProfileDlg::OnBnClickedOk()
{
	int cur = m_plist.GetCurSel();
	m_plist.GetLBText(cur , m_profile_add);
	OnOK();
}
Ejemplo n.º 18
0
void CHttpOption::OnBnClickedOk()
{
	// TODO: 在此添加控件通知处理程序代码
	OnOK();
}
Ejemplo n.º 19
0
void CDialogTextures::OnDblclkListTextures() 
{
  OnOK();
}
Ejemplo n.º 20
0
HRESULT HtmlDlg::OnButtonOK(IHTMLElement* /*pElement*/)
{
	OnOK();
	return S_OK;
}
Ejemplo n.º 21
0
void MachineRoomDlg::OnBnClickedOk()
{
    writePropertyData();

    OnOK();
}
Ejemplo n.º 22
0
void CUpdateInfoDlg::OnBnClickedOK()
{
	OnOK();
}
Ejemplo n.º 23
0
void palEditDlg::OnDblclkPalList() 
{
	m_selectedColor = m_palListBox.GetCurSel();
	OnOK();	
}
Ejemplo n.º 24
0
void CDirectionDlg::OnButtonS() {
  m_dir = S;
  OnOK();
}
Ejemplo n.º 25
0
void BlockDraw_ConfigDlg::OnBnClickedOk()
{
    m_blockName = getSelBlock();

    OnOK();
}
Ejemplo n.º 26
0
void CDirectionDlg::OnButtonE() {
  m_dir = E;
  OnOK();
}
HRESULT CDlg_DemandType::OnButtonOK(IHTMLElement* /*pElement*/)
{
	OnOK();
	return S_OK;
}
Ejemplo n.º 28
0
void CDirectionDlg::OnButtonN() {
  m_dir = N;
  OnOK();
}
bool CGUIDialogKeyboardGeneric::OnMessage(CGUIMessage& message)
{
  CGUIDialog::OnMessage(message);


  switch ( message.GetMessage() )
  {
  case GUI_MSG_CLICKED:
    {
      int iControl = message.GetSenderId();

      switch (iControl)
      {
      case CTL_BUTTON_DONE:
        OnOK();
        break;
      case CTL_BUTTON_CANCEL:
        Close();
        break;
      case CTL_BUTTON_SHIFT:
        OnShift();
        break;
      case CTL_BUTTON_CAPS:
		OnCapsLock();
        break;
      case CTL_BUTTON_SYMBOLS:
        OnSymbols();
        break;
      case CTL_BUTTON_LEFT:
        MoveCursor( -1);
        break;
      case CTL_BUTTON_RIGHT:
        MoveCursor(1);
        break;
      case CTL_BUTTON_IP_ADDRESS:
        OnIPAddress();
        break;
      case CTL_BUTTON_CLEAR:
        SetText("");
        break;
      default:
        m_lastRemoteKeyClicked = 0;
        OnClickButton(iControl);
        break;
      }
    }
    break;

  case GUI_MSG_SET_TEXT:
    SetText(message.GetLabel());

    // close the dialog if requested
    if (message.GetParam1() > 0)
      OnOK();
    break;

  case GUI_MSG_INPUT_TEXT:
    InputText(message.GetLabel());
    break;

  case GUI_MSG_INPUT_TEXT_EDIT:
    InputTextEditing(message.GetLabel(), message.GetParam1(), message.GetParam2());
    break;
  }

  return true;
}
Ejemplo n.º 30
0
void CDlgBundleTimeList::OnBnClickedOk()
{
	OnOK();
}