⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selectsong.cpp

📁 本系统实现了简单的点歌功能
💻 CPP
字号:
// SelectSong.cpp: implementation of the CSelectSong class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "songclient.h"
#include "SelectSong.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CSelectSong::CSelectSong()
{
	m_nSelectFlag = 1; //点歌类别
	m_nPageNum    = 0; //总页数
	m_nPageIndex  = 0; //现在处于的页数
	m_nUpDwnIndex = 1; //上下位置
	m_nLftRtIndex = 1; //左右位置

	m_nMenuItem = 0;
	m_strMenuItem = NULL;
}

CSelectSong::~CSelectSong()
{
	if(m_strMenuItem != NULL)
	{
		delete[] m_strMenuItem;
		m_strMenuItem = NULL;
	}
}

//设置属性
void CSelectSong::SetSelectFlag(int nSelectFlag)
{
	m_nSelectFlag = nSelectFlag;
}

void CSelectSong::SetPageNum(int nPageNum)
{
	m_nPageNum = nPageNum;
}

void CSelectSong::SetPageIndex(int nPageIndex)
{
	m_nPageIndex = nPageIndex;
}

void CSelectSong::SetUpDwnIndex(int nUpDwnIndex)
{
	m_nUpDwnIndex = nUpDwnIndex;
}

void CSelectSong::SetLftRtIndex(int nLftRtIndex)
{
	m_nLftRtIndex = nLftRtIndex;
}

//得到属性
int CSelectSong::GetSelectFlag()
{
	return m_nSelectFlag;
}

int CSelectSong::GetPageNum()
{
	return m_nPageNum;
}

int CSelectSong::GetPageIndex()
{
	return m_nPageIndex;
}

int CSelectSong::GetUpDwnIndex()
{
	return m_nUpDwnIndex;
}

int CSelectSong::GetLftRtIndex()
{
	return m_nLftRtIndex;
}

void CSelectSong::SetMenuItemNum(int nMenuItem)
{
	m_nMenuItem = nMenuItem;
}

int CSelectSong::GetMenuItemNum()
{
	return m_nMenuItem;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -