mymessage.cpp

来自「一个简单的日程计划工具。用VC7+DAO35开发。有兴趣的话下载后自己研究吧。」· C++ 代码 · 共 100 行

CPP
100
字号
// MyMessage.cpp : implementation file
//

#include "stdafx.h"
#include "Alarm.h"
#include "MyMessage.h"

/////////////////////////////////////////////////////////////////////////////
// CMyMessage

CMyMessage::CMyMessage()
{
	m_strModeList.SetSize(10,10);
	m_strModeList.RemoveAll();

	m_strModeList.Add("每天提示");
	m_strModeList.Add("到时提示");
	m_strModeList.Add("提前1分钟提示");
	m_strModeList.Add("提前2分钟提示");
	m_strModeList.Add("提前3分钟提示");
	m_strModeList.Add("提前5分钟提示");
	m_strModeList.Add("提前10分钟提示");
	m_strModeList.Add("提前15分钟提示");
	m_strModeList.Add("提前30分钟提示");
	m_strModeList.Add("提前45分钟提示");
	m_strModeList.Add("提前1小时提示");
	m_strModeList.Add("提前2小时提示");

	m_nRemainTimeList.RemoveAll();
	m_nRemainTimeList.Add(0);
	m_nRemainTimeList.Add(0);
	m_nRemainTimeList.Add(1);
	m_nRemainTimeList.Add(2);
	m_nRemainTimeList.Add(3);
	m_nRemainTimeList.Add(5);
	m_nRemainTimeList.Add(10);
	m_nRemainTimeList.Add(15);
	m_nRemainTimeList.Add(30);
	m_nRemainTimeList.Add(45);
	m_nRemainTimeList.Add(60);
	m_nRemainTimeList.Add(120);
}

CMyMessage::~CMyMessage()
{
}

/////////////////////////////////////////////////////////////////////////////
// CMyMessage message handlers

void CMyMessage::SetPlan(CString strInput)
{
	this->strPlan = strInput;
}

void CMyMessage::SetPlanDate(CTime tInput)
{
	this->tDate = tInput;
}

void CMyMessage::SetPlanTime(CTime tInput)
{
	this->tTime = tInput;
}

void CMyMessage::SetPlanPri(int nPri)
{
	this->nPri = nPri;
}

CString CMyMessage::GetPlan()
{
	return this->strPlan;
}

CTime CMyMessage::GetPlanDate()
{
	return this->tDate;
}

CTime CMyMessage::GetPlanTime()
{
	return this->tTime;
}

int CMyMessage::GetPri()
{
	return this->nPri;
}

int CMyMessage::GetMode()
{
	return m_nMode;
}

void CMyMessage::SetMode(int nMode)
{
	m_nMode = nMode;
}

⌨️ 快捷键说明

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