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

📄 displaysettings.cpp

📁 The application wizard has created this SoccerDoctor application for you. This application not onl
💻 CPP
字号:
#include "StdAfx.h"
#include "SoccerDoctor.h" // theApp
#include "DisplaySettings.h"
CDisplaySettings::CDisplaySettings(void)
{
	LoadSettings();
}

CDisplaySettings::~CDisplaySettings(void)
{
	SaveSettings();
}
void CDisplaySettings::LoadSettings()
{
	CString strScale ;
	strScale.Format("%.3f",3.0);
	strScale = theApp.GetProfileString("Displayer","PlayerScale",strScale);
	m_dPlayerScale = atof(strScale);
	if( m_dPlayerScale < MIN_PLAYER_SCALE || m_dPlayerScale > MAX_PLAYER_SCALE){
		m_dPlayerScale = 3.0;
	}
	m_bNumber = (theApp.GetProfileInt("Displayer","Number",0) == 1);
	m_bKickmargin = (theApp.GetProfileInt("Displayer","Kickmargin",0) == 1);
	m_bViewarea = (theApp.GetProfileInt("Displayer","Viewarea",0) == 1);
	m_bStamina = (theApp.GetProfileInt("Displayer","Stamina",1) == 1);
	m_bVelocity = (theApp.GetProfileInt("Displayer","Velocity",0) == 1);
	m_bOffsideLine = (theApp.GetProfileInt("Displayer","OffsideLine",0) == 1);
	m_bBallDetail = (theApp.GetProfileInt("Displayer","BallDetail",0) == 1);
	m_bControlCourse = (theApp.GetProfileInt("Displayer","ControlCourse",0) == 1);
}
void CDisplaySettings::SaveSettings()
{
	CString strScale;
	strScale.Format("%.3f",m_dPlayerScale);
	theApp.WriteProfileString("Displayer","PlayerScale",strScale);
	theApp.WriteProfileInt("Displayer","Number",m_bNumber);
	theApp.WriteProfileInt("Displayer","Kickmargin",m_bKickmargin);
	theApp.WriteProfileInt("Displayer","Viewarea",m_bViewarea);
	theApp.WriteProfileInt("Displayer","Stamina",m_bStamina);
	theApp.WriteProfileInt("Displayer","Velocity",m_bVelocity);
	theApp.WriteProfileInt("Displayer","OffsideLine",m_bOffsideLine);
	theApp.WriteProfileInt("Displayer","BallDetail",m_bBallDetail);
	theApp.WriteProfileInt("Displayer","ControlCourse",m_bControlCourse);
}

⌨️ 快捷键说明

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