Example #1
0
void CDlgTestSounds::OnSfxGroup() 
{

	UpdateData (TRUE);
	
	switch ( m_iGroup )
		{
		case 0 :
			m_btnFore.EnableWindow (TRUE);
			m_btnBack.EnableWindow (TRUE);
			m_btnExcl.EnableWindow (FALSE);
			m_strDesc = IntToCString (SOUNDS::sounds_end) + " Sound Effects";
			break;
		case 1 : {
			m_btnFore.EnableWindow (TRUE);
			m_btnBack.EnableWindow (FALSE);
			m_btnExcl.EnableWindow (FALSE);
			int iNum = VOICES::first_second_voice - VOICES::first_voice;
			if ( theApp.HaveMultVoices () )
				iNum += VOICES::num_second_voice;
			m_strDesc = IntToCString (iNum) + " Voices";
			break; }
		case 2 :
			m_btnFore.EnableWindow (FALSE);
			m_btnBack.EnableWindow (FALSE);
			m_btnExcl.EnableWindow (TRUE);
			m_strDesc = IntToCString (MUSIC::play_game - MUSIC::first_music + MUSIC::num_play_game) + " WAV Clips";
			break;
		}

	m_iTrack = 0;

	UpdateData (FALSE);
}
Example #2
0
void CStroeSet::InitMapping( CString strMap )
{
	//strMap += ";";
	CString strTemp = "";
	int iPos = 0 ;
	int idx = 0;
	m_List.DeleteAllItems();
	int iCount = 0;
	while( true )
	{
		try
		{
			iPos = strMap.Find( ';' );
			if ( iPos != -1 )
			{
				strTemp = strMap.Left( iPos );
				idx = strTemp.Find(',');
				iCount = m_List.GetItemCount();
				m_List.InsertItem(iCount,strTemp.Left(idx));
				m_List.SetItemText( iCount,1,IntToCString(atoi(strTemp.Mid(idx+1))) );
				strMap = strMap.Mid(iPos+1);
			}
			else
			{
				break;
			}
		}
		catch (...)
		{
		}		
	}
}
Example #3
0
CString CInitAttrib::GetLine (int iVal) const
{

	ASSERT_VALID (this);
	CString sRtn;
	int iPts = ComputePts (iVal);

	switch (m_iTyp)
		{
		case ATRIB_TYP_RANGE :
			sRtn = m_sLine + "\t" + IntToCString (iVal) +
																	"%\t(" + IntToCString (iPts) + ")";
			break;
		case ATRIB_TYP_UNITS :
			sRtn = m_sLine + "\t" + IntToCString (iVal) +
																	"\t(" + IntToCString (iPts) + ")";
			break;
		case ATRIB_TYP_SPLYS :
			sRtn = m_sLine + "\t" + IntToCString (iVal) +
																	"\t(" + IntToCString (iPts) + ")";
			break;
		case ATRIB_TYP_FEE :
			if (iVal)
				sRtn = m_sLine + "\tYes\t(" + IntToCString (iPts) + ")";
			else
				sRtn = m_sLine + "\tNo\t(0)";
			break;
		}

	return (sRtn);
}
void CDlgStationAlarm::AddAlarmInfoToList(std::vector<ACS_ALARM_INFO> vecAlarmInfo)
{
	for (int i=0; i<vecAlarmInfo.size(); i++)
	{
		m_lstAlarm.InsertItem(i, IntToCString(vecAlarmInfo.at(i).nId));
		m_lstAlarm.SetItemText(i, 1, vecAlarmInfo.at(i).szStationName);
		m_lstAlarm.SetItemText(i, 2, vecAlarmInfo.at(i).szDevName);
		m_lstAlarm.SetItemText(i, 3, vecAlarmInfo.at(i).szAlarmTypeName);
		m_lstAlarm.SetItemText(i, 4, vecAlarmInfo.at(i).szAlarmStartTime);
		m_lstAlarm.SetItemText(i, 5, GetPriorLevelText(vecAlarmInfo.at(i).nPriorLevel));
		m_lstAlarm.SetItemText(i, 6, GetProcessStatusText(vecAlarmInfo.at(i).nStatus));
	}
}