Files
envi-code/SourceCode/Code2026/tg_shs/shs_siteplan/ParkingSpaceDlg.h
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

114 lines
3.9 KiB
C++

#pragma once
#include "tchbasedlg.h"
#include "resource.h"
#include "afxwin.h"
namespace
{
#if ADS <= 18
double _ttof(LPCTSTR psz)
{
if (!psz) return .0;
USES_CONVERSION;
return atof(W2A(psz));
}
#endif
}
class CParkingSpaceDlg :public CModelessDialog
{
public:
enum eUNIT
{
eMeter = 0,
eMillimetre,
};
enum eLocation //位置
{
eOutSide = 0,
eInSide,
eMid,
};
public:
CParkingSpaceDlg(CWnd* pParent = NULL);
~CParkingSpaceDlg();
virtual BOOL OnInitDialog();
afx_msg void OnEnChangeCarWidth();
afx_msg void OnEnChangeCarHeight();
afx_msg void OnEnSetfocusCarWidth();
afx_msg void OnEnSetfocusCarHeight();
afx_msg void OnBnClickedBtnSwap();
afx_msg void OnCbnEditchangeCmbAngle();
afx_msg void OnCbnSetfocusCmbAngle();
afx_msg void OnPaint();
afx_msg void OnClose();
double GetWidth();
double GetHeight();
int GetAngle();
int GetRowFlag();
int GetStyle();
double GetTextHeigh(){ return _ttof(m_strTextHigh); }; //字高
CString GetStartNum(){ return m_strStartNum; }; //起始编号
BOOL GetCarNum(){ return m_bCarNum; }; //车位编号是否点选
int GetParkingLoc(){ return m_iLocation; }; //标注位置
bool IsCheck();
void UpdateEx();
void ShowPic(int index);
void UpdataSerialNum(CString &strSerialNunm);
CString GetTextStyle(){return m_strTextStyle;}
CString m_strPreFix, m_strPostFix, m_strNum;
public:
enum { IDD = IDD_DLG_PARKINGSPACE };
protected:
afx_msg void OnBnClickedBtnParkheigh();
afx_msg void OnCbnSelchangeCmbParktextstyle();
afx_msg void OnCbnKillfocusCmbParktextheigh();
afx_msg void OnBnClickedChkParkcarnumber();
afx_msg void OnBnClickedChkMarker();//标车位数
afx_msg void OnEnKillfocusEdtParknum();
afx_msg void OnCbnKillfocusCarWidth();
afx_msg void OnCbnKillfocusCarHeight();
void AddTextStyle(); //添加一条文字标注样式在TextStyleDef.DAT文件
BOOL LoadTextStyle(); //加载文字样式
BOOL isHasTextStyle(); //停车位文字样式是否存在
void LayerInit(); //图层初始化
void GetDefalutTextStyleAndTextHigh(BOOL bJudge = FALSE); //获取默认的文字样式和文字字高
void LoadRegeditSaveData(); //获取注册表保存的数据
void SaveToRegeditData(); //保存数据到注册表
void InitTextStyle(); //创建文字样式
void LoadWidthAndHeigh(); //对话框的高宽处理
void ReadWidthAndHeigh(); //读取注册表,获取预存的宽度高度
void SaveWidthAndHeigh(); //保存注册表,将输入的宽度高度保存
protected:
virtual void DoDataExchange(CDataExchange* pDX);
DECLARE_MESSAGE_MAP()
private:
int m_iAngle; //角度
int m_iRow; //0,单排;1,双排
int m_iStyle; //0,无斜线;1,单斜线;2,双斜线;3,有停车
int m_iCheck; //0,1
int m_iLocation; //车位编号位置
int m_iTextStyle; //文字样式选择项
BOOL m_bCarNum; //车位编号
CString m_strTextHigh; //字高
CString m_strStartNum; //起始编号
CString m_strTextStyle; //文字样式
XStringList m_lstStyle; //文字样式
BOOL m_bAddTextStyle; //添加文字样式
CImageDC m_ShowPicDC;
int m_iPic;
private:
CComboBox m_comboStyleName;
int m_iWidth; //宽度,以mm为单位保存数据
int m_iHeight; //深度,以mm为单位保存数据
std::vector<CString> m_vecStrWidth;
std::vector<CString> m_vecStrHeight;
public:
CString m_strWidth;
CString m_strHeight;
};