Exemplo n.º 1
0
String MAPIContact::GetPostalAddress() {
#ifdef _WIN32_WCE
	return String();
#else
	return GetPropertyString(PR_POSTAL_ADDRESS);
#endif
}
Exemplo n.º 2
0
// uses the built in outlook email fields, OUTLOOK_EMAIL1 etc, minus 1 for ADDRt_YPE and +1 for EmailOriginalDisplayName
String MAPIContact::GetEmail(int nIndex) {
	String strEmail;
	ULONG nID = GetOutlookEmailID(nIndex);
	if(!nID) 
		return String();

#ifdef _WIN32_WCE
	return GetPropertyString(nID, strEmail);
#else
	LPSPropValue pProp;
	if(GetOutlookProperty(OUTLOOK_DATA1, nID-1, pProp)) {
		String strAddrType = MAPIEx::GetValidString(*pProp);
		MAPIFreeBuffer(pProp);
		if(GetOutlookProperty(OUTLOOK_DATA1, nID, pProp)) {
			strEmail = MAPIEx::GetValidString(*pProp);
			MAPIFreeBuffer(pProp);
			if(strAddrType == "EX") {
				// for EX types we use the original display name (seems to contain the appropriate data)
				if(GetOutlookProperty(OUTLOOK_DATA1, nID+1, pProp)) {
					strEmail = MAPIEx::GetValidString(*pProp);
					MAPIFreeBuffer(pProp);
				}
			}
			return strEmail;
		}
	}
	return String();
#endif
}
Exemplo n.º 3
0
CPropertyItem_AEMode::CPropertyItem_AEMode(EdsImageRef	imageRef)
{
	EdsUInt32 uValue;
	if( EDS_ERR_OK == EdsGetPropertyData( imageRef, kEdsPropID_AEMode, 0, sizeof(uValue),&uValue))
	{
		STR_ID_TABLE propCaptions[] = {
			"Program AE",					0, 
			"Shutter-Speed Priority AE",	1, 
			"Aperture Priority AE",			2, 
			"Manual Exposure",				3, 
			"Bulb",							4, 
			"Auto Depth-of-Field AE AE",	5, 
			"Depth-of-Field  AE",			6, 
			"Auto",							9, 
			 "Night Scene Portrait",		10,
			 "Sports",						11,
			 "Portrait",					12,
			 "Landscape",					13,
			 "Close-Up",					14,
			 "Flash Off",					15,
		};
		const char * tmpString = GetPropertyString(propCaptions, sizeof(propCaptions)/sizeof(STR_ID_TABLE), (int)uValue);
		m_value.push_back(tmpString);
		strcpy_s(m_title, EDS_MAX_NAME, "AE Mode");
	}
}
Exemplo n.º 4
0
// Categories are stored under the multi-value named property CATEGORIES_PROPERTY
String MAPIContact::GetCategories() {
	String strCategories;
#ifdef _WIN32_WCE
	return GetPropertyString(OUTLOOK_CATEGORIES, strCategories);
#else
	LPSPropValue pProp;
	if(GetNamedProperty(CATEGORIES_PROPERTY, pProp)) {
		strCategories = "";

		ULONG i;
		String strCategory;
		for(i = 0; i < pProp->Value.MVi.cValues; i++) {
			strCategory = MAPIEx::GetValidMVString(*pProp, i);
			if(strCategory.GetLength()) {
				if(strCategories.GetLength()) 
					strCategories += ';';
				strCategories += strCategory;
			}
		}
		MAPIFreeBuffer(pProp);
		return strCategories;
	}
	return String();
#endif
}
void CChangePasswordSession::CmdOK (void)

//	CmdOK
//
//	Submit password change request

	{
	const CVisualPalette &VI = m_HI.GetVisuals();
	CUIHelper Helper(m_HI);

	if (!IsElementEnabled(ID_CTRL_MAIN_ACTION))
		return;

	//	Get the fields

	CString sOldPassword = GetPropertyString(ID_CTRL_PASSWORD, PROP_TEXT);
	CString sNewPassword = GetPropertyString(ID_CTRL_PASSWORD_NEW, PROP_TEXT);
	CString sConfirmPassword = GetPropertyString(ID_CTRL_PASSWORD_CONFIRM, PROP_TEXT);

	//	Make sure passwords match

	if (!strEquals(sNewPassword, sConfirmPassword))
		{
		Helper.CreateInputErrorMessage(this, m_rcInputError, CONSTLIT("New Password Does Not Match"), CONSTLIT("The new password you entered does not match the confirmation password."));
		return;
		}

	//	Validate password complexity

	CString sError;
	if (!CHexarc::ValidatePasswordComplexity(sNewPassword, &sError))
		{
		Helper.CreateInputErrorMessage(this, m_rcInputError, CONSTLIT("Password Is Too Easy"), sError);
		return;
		}

	//	Register the name

	m_HI.AddBackgroundTask(new CChangePasswordTask(m_HI, m_Service, m_Service.GetUsername(), sOldPassword, sNewPassword), this, CMD_CHANGE_COMPLETE);

	//	Disable controls

	SetPropertyBool(ID_CTRL_PASSWORD, PROP_ENABLED, false);
	SetPropertyBool(ID_CTRL_PASSWORD_NEW, PROP_ENABLED, false);
	SetPropertyBool(ID_CTRL_PASSWORD_CONFIRM, PROP_ENABLED, false);
	SetPropertyBool(ID_CTRL_MAIN_ACTION, PROP_ENABLED, false);
	}
Exemplo n.º 6
0
String MAPIContact::GetPhoneNumber(ULONG ulPhoneNumberID) {
	ULONG i = 0;
	while(PhoneNumberIDs[i] != ulPhoneNumberID && PhoneNumberIDs[i] > 0) 
		i++;
	if(!PhoneNumberIDs[i]) 
		return String();
	else 
		return GetPropertyString(ulPhoneNumberID);
}
Exemplo n.º 7
0
String MAPIContact::GetName(ULONG ulNameID) {
	ULONG i = 0;
	while(NameIDs[i] != ulNameID && NameIDs[i] > 0) 
		i++;
	if(!NameIDs[i]) 
		return String();
	else 
		return GetPropertyString(ulNameID);
}
Exemplo n.º 8
0
BOOL CMAPIContact::GetName(CString& strName,ULONG ulNameID)
{
	ULONG i=0;
	while(NameIDs[i]!=ulNameID && NameIDs[i]>0) i++;
	if(!NameIDs[i]) {
		strName=_T("");
		return FALSE;
	} else {
		return GetPropertyString(strName,ulNameID);
	}
}
Exemplo n.º 9
0
BOOL CMAPIContact::GetPhoneNumber(CString& strPhoneNumber,ULONG ulPhoneNumberID)
{
	ULONG i=0;
	while(PhoneNumberIDs[i]!=ulPhoneNumberID && PhoneNumberIDs[i]>0) i++;
	if(!PhoneNumberIDs[i]) {
		strPhoneNumber=_T("");
		return FALSE;
	} else {
		return GetPropertyString(strPhoneNumber,ulPhoneNumberID);
	}
}
Exemplo n.º 10
0
String MAPIContact::GetFileAs() {
	String strFileAs;
#ifdef _WIN32_WCE
	return GetPropertyString(PR_DISPLAY_NAME, strFileAs);
#else
	LPSPropValue pProp;
	if(GetOutlookProperty(OUTLOOK_DATA1, OUTLOOK_FILE_AS, pProp)) {
		strFileAs = MAPIEx::GetValidString(*pProp);
		MAPIFreeBuffer(pProp);
		return strFileAs;
	}
	return String();
#endif
}
Exemplo n.º 11
0
CPropertyItem_RedEye::CPropertyItem_RedEye(EdsImageRef	imageRef)
{
	EdsUInt32	uValue;
	char value[EDS_MAX_NAME]  = {0};
	if( EDS_ERR_OK == EdsGetPropertyData( imageRef, kEdsPropID_RedEye, 0, sizeof(uValue),&uValue))
	{
		STR_ID_TABLE propCaptions[] = {
			"Off",	0,
			"On",	1,
		};
		const char * tmpString = GetPropertyString(propCaptions, sizeof(propCaptions)/sizeof(STR_ID_TABLE), (int)uValue);
		m_value.push_back(tmpString);
		strcpy_s(m_title, EDS_MAX_NAME, "Red-eye Reduction");
	}
}
Exemplo n.º 12
0
CPropertyItem_FlashMode::CPropertyItem_FlashMode(EdsImageRef	imageRef)
{
	EdsUInt32	flashMode[2];
	char value[EDS_MAX_NAME]  = {0};
	if( EDS_ERR_OK == EdsGetPropertyData( imageRef, kEdsPropID_FlashMode, 0, sizeof(flashMode),&flashMode))
	{
		strcpy_s(m_title, EDS_MAX_NAME, "Flash Mode");
		STR_ID_TABLE propCaptions[] = {
			"None",				0,
			"Internal",			1,
			"external E-TTL",	2,
			"external A-TTL",	3,
		};		
		const char * tmpString = GetPropertyString(propCaptions, sizeof(propCaptions)/sizeof(STR_ID_TABLE), (int)flashMode[0]);
		m_value.push_back(tmpString);
		
		STR_ID_TABLE propCaptions2[] = {
			"1st Curtain Synchro",	0,
			"2nd Curtain Synchro",	1,
		};
		tmpString = GetPropertyString(propCaptions2, sizeof(propCaptions2)/sizeof(STR_ID_TABLE), (int)flashMode[1]);
		m_value.push_back(tmpString);
	}
}
Exemplo n.º 13
0
CPropertyItem_ColorSpace::CPropertyItem_ColorSpace(EdsImageRef	imageRef)
{
	EdsUInt32	uValue;
	char value[EDS_MAX_NAME]  = {0};
	if( EDS_ERR_OK == EdsGetPropertyData( imageRef, kEdsPropID_ColorSpace|kEdsPropID_AtCapture_Flag, 0, sizeof(uValue),&uValue))
	{
		STR_ID_TABLE propCaptions[] = {
			"sRGB",			1,
			"Adobe RGB",	2,
		};
		const char * tmpString = GetPropertyString(propCaptions, sizeof(propCaptions)/sizeof(STR_ID_TABLE), (int)uValue);
		m_value.push_back(tmpString);
		strcpy_s(m_title, EDS_MAX_NAME, "Color Space");
	}
}
Exemplo n.º 14
0
void CLoginSession::CmdSignIn (void)

//	CmdSignIn
//
//	Sign in the user

	{
	CUIHelper Helper(m_HI);

	//	Get the fields

	CString sUsername = GetPropertyString(ID_CTRL_USERNAME, PROP_TEXT);
	CString sPassword = GetPropertyString(ID_CTRL_PASSWORD, PROP_TEXT);
	bool bAutoSignIn = GetPropertyBool(ID_CTRL_AUTO_SIGN_IN, PROP_CHECKED);

	//	Get the text for the username. If blank, then we have an error.

	if (sUsername.IsBlank())
		{
		Helper.CreateInputErrorMessage(this, m_rcInputError, CONSTLIT("Username Missing"), CONSTLIT("You must have a username to sign in."));
		return;
		}

	//	Register the name

	m_HI.AddBackgroundTask(new CSignInUserTask(m_HI, m_Service, sUsername, sPassword, bAutoSignIn), this, CMD_SIGN_IN_COMPLETE);

	//	Disable controls

	SetPropertyBool(ID_CTRL_USERNAME, PROP_ENABLED, false);
	SetPropertyBool(ID_CTRL_PASSWORD, PROP_ENABLED, false);
	SetPropertyBool(ID_CTRL_MAIN_ACTION, PROP_ENABLED, false);
	SetPropertyBool(ID_CTRL_AUTO_SIGN_IN, PROP_ENABLED, false);
	SetPropertyBool(ID_CTRL_REGISTER, PROP_ENABLED, false);
	SetPropertyBool(ID_CTRL_PASSWORD_RESET, PROP_ENABLED, false);
	}
Exemplo n.º 15
0
CPropertyItem_Contrast::CPropertyItem_Contrast(EdsImageRef	imageRef)
{
	EdsInt32	sValue;
	if( EDS_ERR_OK == EdsGetPropertyData( imageRef, kEdsPropID_Contrast|kEdsPropID_AtCapture_Flag, 0, sizeof(sValue),&sValue))
	{
		STR_ID_TABLE propCaptions[] = {
			"Low",			-2,
			"Mid. low",		-1,
			"Standard",		0,
			"Mid. High",	1,
			"High",			2,
		};
		const char * tmpString = GetPropertyString(propCaptions, sizeof(propCaptions)/sizeof(STR_ID_TABLE), (int)sValue);
		m_value.push_back(tmpString);
		strcpy_s(m_title, EDS_MAX_NAME, "Contrast");
	}
}
Exemplo n.º 16
0
void Game::GenerateItems(std::vector<tmx::MapLayer> layers)
{
	int itemType;
	if (layers.size() <= 0)
		return;

	
	std::cout << "Generating level..." << std::endl;

	items.clear();
	slimes.clear();
	fireMonsters.clear();
	hBar->SetActive(true);
	
	if (mPlayer)
		delete mPlayer;

	for (auto layer = layers.begin(); layer != layers.end(); ++layer)
	{
		for (auto object = layer->objects.begin(); object != layer->objects.end(); ++object)
		{
			if (layer->name == "Items")
			{
				if (!object->Visible())
					continue;
				
				itemType = atoi(object->GetPropertyString("ItemType").c_str());
				items.push_back(new Item(object->GetPosition(),(ItemType)itemType));
			}

			if (layer->name == "Enemies")
			{
				if (object->GetType() == "S")
					slimes.push_back(new Slime(layers, object->GetName(),imageManager));

				if (object->GetType() == "F")
					fireMonsters.push_back(new FireMonster(object->GetPosition(), layers, imageManager));
			}

			if (layer->name == "Player")
			{
				mPlayer = new Player(wnd, layers, imageManager);
			}
		}
	}
}
Exemplo n.º 17
0
CPropertyItem_ToningEffect::CPropertyItem_ToningEffect(EdsImageRef	imageRef)
{
	EdsUInt32	uValue;
	char value[EDS_MAX_NAME]  = {0};
	if( EDS_ERR_OK == EdsGetPropertyData( imageRef, kEdsPropID_ToningEffect|kEdsPropID_AtCapture_Flag, 0, sizeof(uValue),&uValue))
	{
		STR_ID_TABLE propCaptions[] = {
			"None",		0,
			"Sepia",	1,
			"Blue",		2,
			"Violet",	3,
			"Green",	4,
		};
		const char * tmpString = GetPropertyString(propCaptions, sizeof(propCaptions)/sizeof(STR_ID_TABLE), (int)uValue);
		m_value.push_back(tmpString);
		strcpy_s(m_title, EDS_MAX_NAME, "Toning Effect");
	}
}
Exemplo n.º 18
0
CPropertyItem_AFMode::CPropertyItem_AFMode(EdsImageRef	imageRef)
{
	EdsUInt32 uValue;
	char value[EDS_MAX_NAME] = {0};
	if(EDS_ERR_OK == EdsGetPropertyData( imageRef, kEdsPropID_AFMode, 0, sizeof(uValue),&uValue))
	{
		STR_ID_TABLE propCaptions[] = {
			"One-Shot AF",		0,
			"AI Servo AF",		1,
			"AI Focus AF",		2,
			"Manual Focus",		3,
		};

		const char * tmpString = GetPropertyString(propCaptions, sizeof(propCaptions)/sizeof(STR_ID_TABLE), (int)uValue);
		m_value.push_back(tmpString);
		strcpy_s(m_title, EDS_MAX_NAME, "AF Mode");
	}
}
Exemplo n.º 19
0
CPropertyItem_MeteringMode::CPropertyItem_MeteringMode(EdsImageRef	imageRef)
{
	EdsUInt32 uValue;
	char value[EDS_MAX_NAME] = {0};
	if(EDS_ERR_OK == EdsGetPropertyData( imageRef, kEdsPropID_MeteringMode, 0, sizeof(uValue),&uValue))
	{
		STR_ID_TABLE propCaptions[] = {
			"Spot metering",						1,
			"Evaluative metering",					3,
			"Partial metering",						4,
			"Center-weighted averaging metering",	5,
		};

		const char * tmpString = GetPropertyString(propCaptions, sizeof(propCaptions)/sizeof(STR_ID_TABLE), (int)uValue);
		m_value.push_back(tmpString);
		strcpy_s(m_title, EDS_MAX_NAME, "Metering Mode");
	}
}
Exemplo n.º 20
0
CPropertyItem_ToneCurve::CPropertyItem_ToneCurve(EdsImageRef	imageRef)
{
	EdsUInt32	uValue;
	char value[EDS_MAX_NAME]  = {0};
	if( EDS_ERR_OK == EdsGetPropertyData( imageRef, kEdsPropID_ToneCurve, 0, sizeof(uValue),&uValue))
	{
		STR_ID_TABLE propCaptions[] = {
			"Standard",			0x00,
			"User setting",		0x11,
			"Custom setting",	0x80,
			"TCD1",				0x01,
			"TCD2",				0x02,
			"TCD3",				0x03,
		};
		const char * tmpString = GetPropertyString(propCaptions, sizeof(propCaptions)/sizeof(STR_ID_TABLE), (int)uValue);
		m_value.push_back(tmpString);
		strcpy_s(m_title, EDS_MAX_NAME, "Tone Curve");
	}
}
Exemplo n.º 21
0
CPropertyItem_WhiteBalance::CPropertyItem_WhiteBalance(EdsImageRef	imageRef)
{
	EdsInt32	sValue;
	char value[EDS_MAX_NAME]  = {0};
	if( EDS_ERR_OK == EdsGetPropertyData( imageRef, kEdsPropID_WhiteBalance|kEdsPropID_AtCapture_Flag, 0, sizeof(sValue),&sValue))
	{
		STR_ID_TABLE propCaptions[] = {
			"Auto",							0,
			"Daylight",						1,
			"Cloudy",						2,
			"Tungsten",						3,
			"Fluorescent",					4,
			"Flash",						5,
			"Manual",						6,
			"Shade",						8,
			"Color temperature",			9,
			"Custom white balance: PC-1",	10,
			"Custom white balance: PC-2",	11,
			"Custom white balance: PC-3",	12,
			"Manual 2",						15,
			"Manual 3",						16,
			"Manual 4",						15,
			"Manual 5",						19,
			"Custom white balance: PC-4",	20,
			"Custom white balance: PC-5",	21,
		};

		const char * tmpString = GetPropertyString(propCaptions, sizeof(propCaptions)/sizeof(STR_ID_TABLE), (int)sValue);
		m_value.push_back(tmpString);
		strcpy_s(m_title, EDS_MAX_NAME, "White Balance");


		if(sValue == 9)
		{
			EdsUInt32	uValue;
			EdsGetPropertyData( imageRef, kEdsPropID_ColorTemperature|kEdsPropID_AtCapture_Flag, 0, sizeof(uValue),&uValue);
			sprintf_s(value, EDS_MAX_NAME, "%d K", uValue);
			m_value.push_back(value);
		}
	}
}
Exemplo n.º 22
0
CPropertyItem_DriveMode::CPropertyItem_DriveMode(EdsImageRef	imageRef)
{
	EdsUInt32 uValue;
	char value[EDS_MAX_NAME] = {0};
	if(EDS_ERR_OK == EdsGetPropertyData( imageRef, kEdsPropID_DriveMode, 0, sizeof(uValue),&uValue))
	{
		STR_ID_TABLE propCaptions[] = {
			"Single-Frame Shooting",			0x00,
			"Continuous Shooting",				0x01,
			"High-Speed Continuous Shooting",	0x04,
			"Low-Speed Continuous Shooting",	0x05,
			"Silent single shooting",			0x06,
			"Custom Self-Timer",				0x07,
			"10-Sec Self-Timer",				0x10,
			"2-Sec Self-Timer",					0x11,

		};
		const char * tmpString = GetPropertyString(propCaptions, sizeof(propCaptions)/sizeof(STR_ID_TABLE), (int)uValue);
		m_value.push_back(tmpString);
		strcpy_s(m_title, EDS_MAX_NAME, "Drive Mode");
	}
}
Exemplo n.º 23
0
CPropertyItem_Sharpness::CPropertyItem_Sharpness(EdsImageRef	imageRef)
{
	char value[EDS_MAX_NAME]  = {0};
	char productName[EDS_MAX_NAME]  = {0};
	if(EDS_ERR_OK != EdsGetPropertyData(imageRef, kEdsPropID_ProductName|kEdsPropID_AtCapture_Flag, 0 , sizeof(productName), productName ))	return;

	if(!strcmp("EOS-1D", productName) ||
		!strcmp("EOS-1Ds", productName))
	{
		EdsUInt32	sharpness[2];
		if(EDS_ERR_OK != EdsGetPropertyData( imageRef, kEdsPropID_Sharpness , 0, sizeof(sharpness),&sharpness))
		{
			STR_ID_TABLE propCaptions[] = {
				"Off",			0,
				"Rough",		1,
				"Mid. rough",	2,
				"Standard",		3,
				"Mid. fine",	4,
				"Fine",			5,
			};
			strcpy_s(m_title, EDS_MAX_NAME, "Sharpness");
			const char * tmpString = GetPropertyString(propCaptions, sizeof(propCaptions)/sizeof(STR_ID_TABLE), (int)sharpness[1]);
			if(tmpString != NULL)	sprintf_s(value, EDS_MAX_NAME, "level:%d target:%s", sharpness[0], tmpString);
			m_value.push_back(value);
		}
	}
	else
	{
		EdsUInt32 uValue;
		if( EDS_ERR_OK == EdsGetPropertyData( imageRef ,kEdsPropID_Sharpness , 0, sizeof(uValue),&uValue))
		{
			strcpy_s(m_title, EDS_MAX_NAME, "Sharpness");
			sprintf_s(value, EDS_MAX_NAME, "%d", uValue);
			m_value.push_back(value);
		}
	}
}
Exemplo n.º 24
0
String MAPIContact::GetSpouseName() {
	return GetPropertyString(PR_SPOUSE_NAME);
}
Exemplo n.º 25
0
String MAPIContact::GetNickName() {
	return GetPropertyString(PR_NICKNAME);
}
Exemplo n.º 26
0
String MAPIContact::GetAssistantName() {
	return GetPropertyString(PR_ASSISTANT);
}
Exemplo n.º 27
0
String MAPIContact::GetManagerName() {
	return GetPropertyString(PR_MANAGER_NAME);
}
Exemplo n.º 28
0
String MAPIContact::GetOffice() {
	return GetPropertyString(PR_OFFICE_LOCATION);
}
Exemplo n.º 29
0
String MAPIContact::GetDepartment() {
	return GetPropertyString(PR_DEPARTMENT_NAME);
}
Exemplo n.º 30
0
String MAPIContact::GetGeneration() {
	return GetPropertyString(PR_GENERATION);
}