コード例 #1
0
		internal static InstantMessagingAccount GetImAccount (ICursor c, Resources resources)
		{
			InstantMessagingAccount ima = new InstantMessagingAccount();
			ima.Account = c.GetString (CommonColumns.Data);

			//IMTypeDataKind imKind = (IMTypeDataKind) c.GetInt (c.GetColumnIndex (CommonColumns.Type));
			//ima.Type = imKind.ToInstantMessagingType();
			//ima.Label = InstantMessaging.GetTypeLabel (resources, imKind, c.GetString (CommonColumns.Label));

			IMProtocolDataKind serviceKind = (IMProtocolDataKind) c.GetInt (c.GetColumnIndex (InstantMessaging.Protocol));
			ima.Service = serviceKind.ToInstantMessagingService();
			ima.ServiceLabel = (serviceKind != IMProtocolDataKind.Custom)
								? InstantMessaging.GetProtocolLabel (resources, serviceKind, String.Empty)
								: c.GetString (InstantMessaging.CustomProtocol);

			return ima;
		}