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

📄 myaldoc.cpp

📁 一个非常简单地址簿程序
💻 CPP
📖 第 1 页 / 共 3 页
字号:
		{
			switch(nCondition)
			{
			case 0:
				if(m_pUnitSet->m_UnitName == strText)
					return TRUE;
				break;
			case 1:
				if(m_pUnitSet->m_UnitName.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 4://部门
		{
			switch(nCondition)
			{
			case 0:
				if(m_pUnitSet->m_Department == strText)
					return TRUE;
				break;
			case 1:
				if(m_pUnitSet->m_Department.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 5://办公室
		{
			switch(nCondition)
			{
			case 0:
				if(m_pUnitSet->m_Office == strText)
					return TRUE;
				break;
			case 1:
				if(m_pUnitSet->m_Office.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 6://职位
		{
			switch(nCondition)
			{
			case 0:
				if(m_pUnitSet->m_Job == strText)
					return TRUE;
				break;
			case 1:
				if(m_pUnitSet->m_Job.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 7://街道地址
		{
			switch(nCondition)
			{
			case 0:
				if(m_pUnitSet->m_Street == strText)
					return TRUE;
				break;
			case 1:
				if(m_pUnitSet->m_Street.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 8://邮编
		{
			switch(nCondition)
			{
			case 0:
				if(m_pUnitSet->m_PostalCode == strText)
					return TRUE;
				break;
			case 1:
				if(m_pUnitSet->m_PostalCode.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 9://电话
		{
			switch(nCondition)
			{
			case 0:
				if(m_pUnitSet->m_Telephone == strText)
					return TRUE;
				break;
			case 1:
				if(m_pUnitSet->m_Telephone.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 10://传真
		{
			switch(nCondition)
			{
			case 0:
				if(m_pUnitSet->m_Fax == strText)
					return TRUE;
				break;
			case 1:
				if(m_pUnitSet->m_Fax.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 11://单位主页
		{
			switch(nCondition)
			{
			case 0:
				if(m_pUnitSet->m_Web == strText)
					return TRUE;
				break;
			case 1:
				if(m_pUnitSet->m_Web.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 12://电子邮件
		{
			switch(nCondition)
			{
			case 0:
				if(m_pUnitSet->m_Email == strText)
					return TRUE;
				break;
			case 1:
				if(m_pUnitSet->m_Email.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	}
	return FALSE;
}

BOOL CMyALDoc::SearchContact(int nField, int nCondition, CString strText)
{
	switch(nField)
	{
	case 0://邮编
		{
			switch(nCondition)
			{
			case 0:
				if(m_pContactSet->m_PostalCode == strText)
					return TRUE;
				break;
			case 1:
				if(m_pContactSet->m_PostalCode.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 1://国家/地区
		{
			switch(nCondition)
			{
			case 0:
				if(m_pContactSet->m_Country == strText)
					return TRUE;
				break;
			case 1:
				if(m_pContactSet->m_Country.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 2://省份/自治区
		{
			switch(nCondition)
			{
			case 0:
				if(m_pContactSet->m_Province == strText)
					return TRUE;
				break;
			case 1:
				if(m_pContactSet->m_Province.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 3://城市
		{
			switch(nCondition)
			{
			case 0:
				if(m_pContactSet->m_City == strText)
					return TRUE;
				break;
			case 1:
				if(m_pContactSet->m_City.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 4://街道地址
		{
			switch(nCondition)
			{
			case 0:
				if(m_pContactSet->m_Street == strText)
					return TRUE;
				break;
			case 1:
				if(m_pContactSet->m_Street.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 5://电话
		{
			switch(nCondition)
			{
			case 0:
				if(m_pContactSet->m_Telephone == strText)
					return TRUE;
				break;
			case 1:
				if(m_pContactSet->m_Telephone.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 6://传真
		{
			switch(nCondition)
			{
			case 0:
				if(m_pContactSet->m_Fax == strText)
					return TRUE;
				break;
			case 1:
				if(m_pContactSet->m_Fax.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 7://手机
		{
			switch(nCondition)
			{
			case 0:
				if(m_pContactSet->m_Handset == strText)
					return TRUE;
				break;
			case 1:
				if(m_pContactSet->m_Handset.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 8://电子邮件
		{
			switch(nCondition)
			{
			case 0:
				if(m_pContactSet->m_Email == strText)
					return TRUE;
				break;
			case 1:
				if(m_pContactSet->m_Email.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 9://MSN
		{
			switch(nCondition)
			{
			case 0:
				if(m_pContactSet->m_MSN == strText)
					return TRUE;
				break;
			case 1:
				if(m_pContactSet->m_MSN.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 10://QQ号码
		{
			switch(nCondition)
			{
			case 0:
				if(m_pContactSet->m_QQ == strText)
					return TRUE;
				break;
			case 1:
				if(m_pContactSet->m_QQ.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 11://ICQ号码
		{
			switch(nCondition)
			{
			case 0:
				if(m_pContactSet->m_ICQ == strText)
					return TRUE;
				break;
			case 1:
				if(m_pContactSet->m_ICQ.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	}
	return FALSE;
}

BOOL CMyALDoc::SearchOther(int nField, int nCondition, CString strText)
{
	switch(nField)
	{
	case 0://昵称
		{
			switch(nCondition)
			{
			case 0:
				if(m_pOtherSet->m_Nickname == strText)
					return TRUE;
				break;
			case 1:
				if(m_pOtherSet->m_Nickname.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 1://爱好
		{
			switch(nCondition)
			{
			case 0:
				if(m_pOtherSet->m_Favorites == strText)
					return TRUE;
				break;
			case 1:
				if(m_pOtherSet->m_Favorites.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 2://特长
		{
			switch(nCondition)
			{
			case 0:
				if(m_pOtherSet->m_Specialty == strText)
					return TRUE;
				break;
			case 1:
				if(m_pOtherSet->m_Specialty.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 3://配偶
		{
			switch(nCondition)
			{
			case 0:
				if(m_pOtherSet->m_Mate == strText)
					return TRUE;
				break;
			case 1:
				if(m_pOtherSet->m_Mate.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 4://个人主页
		{
			switch(nCondition)
			{
			case 0:
				if(m_pOtherSet->m_Web == strText)
					return TRUE;
				break;
			case 1:
				if(m_pOtherSet->m_Web.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	}
	
	return FALSE;
}

BOOL CMyALDoc::SearchActive(int nField, int nCondition, CString strText, int nLogic, COleDateTime m_oleDate)
{
	switch(nField)
	{
	case 0://活动内容
		{
			switch(nCondition)
			{
			case 0:
				if(m_pActiveSet->m_Summary == strText)
					return TRUE;
				break;
			case 1:
				if(m_pActiveSet->m_Summary.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 1://活动类型
		{
			switch(nCondition)
			{
			case 0:
				if(m_pActiveSet->m_Type == strText)
					return TRUE;
				break;
			case 1:
				if(m_pActiveSet->m_Type.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	case 2://日期
		{
			CString strActiveDate,strDate;
			strActiveDate.Format("%d年%d月%d日",m_pActiveSet->m_Date.GetYear(),m_pActiveSet->m_Date.GetMonth(),m_pActiveSet->m_Date.GetDay());
			strDate.Format("%d年%d月%d日",m_oleDate.GetYear(),m_oleDate.GetMonth(),m_oleDate.GetDay());
			switch(nCondition)
			{
			case 0:
				if(strActiveDate == strDate)
					return TRUE;
				break;
			case 1:
				if(strActiveDate < strDate)
					return TRUE;
				break;
			case 2:
				if(strActiveDate > strDate)
					return TRUE;
				break;
			}
			break;
		}
	case 3://提示
		{
			switch(nCondition)
			{
			case 0:
				if(m_pActiveSet->m_Clew == nLogic)
					return TRUE;
				break;
			}
			break;
		}
	}
	
	return FALSE;
}

BOOL CMyALDoc::SearchRemark(int nField, int nCondition, CString strText)
{
	switch(nField)
	{
	case 0:
		{
			switch(nCondition)
			{
			case 0:
				if(m_pRemarkSet->m_Remark == strText)
					return TRUE;
				break;
			case 1:
				if(m_pRemarkSet->m_Remark.Find(strText) != -1)
					return TRUE;
				break;
			}
			break;
		}
	}

	return FALSE;
}

⌨️ 快捷键说明

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