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

📄 ui.cpp

📁 vc2005编写黑白棋
💻 CPP
字号:
#include "stdafx.h"
#include "黑白棋对弈.h"
#include "Core.h"
#include "UI.h"
extern CBad *pCore;
extern HWND m_hDlg;
extern bool UpdatePic(HWND m_hDlg,int **p);
bool UI::Clear()
{
	pCore->Clear();
return false;
}
bool UI::PushExit()
{
	pCore->Exit();
	return true;
}
bool UI::PushStart()
{
	bool flag=pCore->LoadSuccess();
	return flag;
}
bool UI::SelectDllName(string dll,int i)
{
	return pCore->SelecetDllName(dll,i);
}
bool UI::SeletFirst(int mark)
{
	pCore->iFirst=mark;
	pCore->iTurn=mark;
	return true;
}
int ** UI::GetChess()
{
	return (int **)pCore->iData;
}
void UI::EndResult(string Result)
{
	SetDlgItemText(m_hDlg,IDC_STATIC1,&Result[0]);
}
void UI::ShowTime(string time)
{
	SetDlgItemText(m_hDlg,IDC_TIME,&time[0]);
}
void UI::ShowScore(string score)
{
	SetDlgItemText(m_hDlg,IDC_SCORE,&score[0]);
}
void UI::Show(string Result)
{
SetDlgItemText(m_hDlg,IDC_STATIC1,&Result[0]);
}
void UI::ShowName(string name,int n)
{
	if(n==1)
SetDlgItemText(m_hDlg,IDC_P1,&name[0]);
	if(n==2)
SetDlgItemText(m_hDlg,IDC_P2,&name[0]);
}
void UI:: Begin()
{
	pCore->GameBegin();
}
void UI::NewChess()
{
	int **p=GetChess();
	UpdatePic(m_hDlg,p);
}
void UI::SetTimeLimit(int n)
{
	pCore->iTimeLimit=n;
}

⌨️ 快捷键说明

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