GroupItem*
DeviceInfoForm::CreateGroupItem(int groupIndex, int itemWidth)
{
    static const int GROUP_ITEM_HEIGHT = 50;

    static const wchar_t* pStringOfDeviceInfoType[DeviceInfoType::LENGTH] = { L"Device Name",
                                                                        L"MAC Address",
                                                                        L"IP Address",
                                                                        L"SSID",
                                                                        L"Device Status",
                                                                        L"Group Member Type",
                                                                        L"Device Category Type",
                                                                        L"WPS Configuration Modes" };

	GroupItem* pItem = new GroupItem();
	pItem->Construct(Dimension(GetClientAreaBounds().width, GROUP_ITEM_HEIGHT));

	// skip IP addrss and SSID
	if ((groupIndex >= DeviceInfoType::IP_ADDRESS) && (__pLocalDeviceInfo->GetGroupMemberType() == WIFI_DIRECT_GROUP_MEMBER_TYPE_NONE))
	{
		groupIndex += 2;
	}

	pItem->SetElement(pStringOfDeviceInfoType[groupIndex], null);
	return pItem;
}
Exemple #2
0
Tizen::Ui::Controls::GroupItem*
EventListForm::CreateGroupItem(int groupIndex, int itemWidth)
{
	GroupItem* pItem = new (std::nothrow) GroupItem();
	pItem->Construct(Dimension(itemWidth, H_GROUP_ITEM));
	pItem->SetBackgroundColor(Color(COLOR_ITEM_BACKGROUND));

	if (groupIndex == GROUP_INDEX_ALL_DAY_EVENT)
	{
		pItem->SetElement(L"모든 일정");
	}
	else
	{
		pItem->SetElement(L"일정 목록");
	}

	return pItem;
}
Osp::Ui::Controls::GroupItem* Form1::CreateGroupItem(int groupIndex, int itemWidth) {
    GroupItem* pItem = new GroupItem();
    pItem->Construct(Dimension(itemWidth, 32));
    String text;
    text.Format(100, L"Group #%d", groupIndex);

    /* You can also set a bitmap in group items,
     * just pass a Bitmap pointer as the second
     * parameter to the GroupItem::SetElement() */
    pItem->SetElement(text, null);

    /* You can set a custom background color to group items */
    // pItem->SetBackgroundColor(Color::COLOR_BLACK);

    /* You can set a custom text size */
    // pItem->SetTextSize(26);

    return pItem;

}
Exemple #4
0
GroupItem*
PartnerListForm::CreateGroupItem(int groupIndex, float itemWidth)
{
	GroupItem* pItem = new (std::nothrow) GroupItem();
	pItem->Construct(FloatDimension(itemWidth, 76.0f));
	String text(L"");
	switch (groupIndex)
	{
	case GROUP_INDEX0:
		text.Append(Group_name[0]);

		break;
	case GROUP_INDEX1:
		text.Append(Group_name[1]);
		break;
	case GROUP_INDEX2:
		text.Append(Group_name[2]);
		break;
	case GROUP_INDEX3:
		text.Append(Group_name[3]);
		break;
	case GROUP_INDEX4:
		text.Append(Group_name[4]);
		break;
	case GROUP_INDEX5:
		text.Append(Group_name[5]);
		break;
	case GROUP_INDEX6:
		text.Append(Group_name[6]);
		break;
	case GROUP_INDEX7:
		text.Append(Group_name[7]);
		break;
	case GROUP_INDEX8:
		text.Append(Group_name[8]);
		break;
	case GROUP_INDEX9:
		text.Append(Group_name[9]);
		break;
	case GROUP_INDEX10:
		text.Append(Group_name[10]);
		break;
	case GROUP_INDEX11:
		text.Append(Group_name[11]);
		break;
	case GROUP_INDEX12:
		text.Append(Group_name[12]);
		break;
	case GROUP_INDEX13:
		text.Append(Group_name[13]);
		break;
	case GROUP_INDEX14:
		text.Append(Group_name[14]);
		break;
	case GROUP_INDEX15:
		text.Append(Group_name[15]);
		break;
	case GROUP_INDEX16:
		text.Append(Group_name[16]);
		break;
	case GROUP_INDEX17:
		text.Append(Group_name[17]);
		break;
	case GROUP_INDEX18:
		text.Append(Group_name[18]);
		break;
	case GROUP_INDEX19:
		text.Append(Group_name[19]);
		break;
	case GROUP_INDEX20:
		text.Append(Group_name[20]);
		break;
	case GROUP_INDEX21:
		text.Append(Group_name[21]);
		break;
	case GROUP_INDEX22:
		text.Append(Group_name[22]);
		break;
	case GROUP_INDEX23:
		text.Append(Group_name[23]);
		break;
	case GROUP_INDEX24:
		text.Append(Group_name[24]);
		break;
	case GROUP_INDEX25:
		text.Append(Group_name[25]);
		break;
	default:
		break;
	}
	pItem->SetElement(text, null);
	return pItem;
}