Files
envi-code/SourceCode/Code2026/PipelineCmd/SysLayerCfg/WSysTreeGrid.h
T

68 lines
2.1 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
#if !defined(__SYSTREEGRID_H__)
2026-09-28 15:28:50 +08:00
#define __SYSTREEGRID_H__
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "BaseTreeGrid.h"
2026-10-04 00:04:20 +08:00
// 系统设置表格
2026-09-28 15:28:50 +08:00
class CWSysTreeGrid : public CBaseTreeGrid
{
public:
CWSysTreeGrid();
virtual ~CWSysTreeGrid();
public:
2026-10-04 00:04:20 +08:00
// 创建新的行
2026-09-28 15:28:50 +08:00
BOOL InsertNewTreeRow(CUIIValueTable &vTable, const Ttable& arFieldName, LPCTSTR pszParent);
BOOL InsertNewTreeRow(CUIIValueTable &vTable, const CStringArray& lstFieldName, LPCTSTR pszParName);
BOOL InsertChildTreeRow(WDGridTreeRow* pParentRow, CUIIValueTable &vTable, const Ttable& arFieldName);
BOOL InsertChildTreeRow(WDGridTreeRow* pParentRow, CUIIValueTable &vTable, const CStringArray& arFieldName);
2026-10-04 00:04:20 +08:00
// 根据数据库中的关键字,找到对应的表格列序号; SYSTEM_KEY 所属系统,LAYCODE_KEY 图层代号
2026-09-28 15:28:50 +08:00
BOOL GetGridIndex(LPCTSTR pszDBKey, int &iIndexCol);
2026-10-04 00:04:20 +08:00
// 限制单元个操作
2026-09-28 15:28:50 +08:00
BOOL SetCellGrade(WDGridCell& cell);
2026-10-04 00:04:20 +08:00
// 判断系统名称是否存在,返回的新的系统名称
2026-09-28 15:28:50 +08:00
CString GetNewSysName(LPCTSTR pszSys);
2026-10-04 00:04:20 +08:00
// 插入行
2026-09-28 15:28:50 +08:00
virtual void OnInsertRow(WDGridRow &row);
2026-10-04 00:04:20 +08:00
// 删除行
2026-09-28 15:28:50 +08:00
virtual bool OnBeforeDeleteRow();
virtual void OnEndDeleteRow();
virtual BOOL PreTranslateMessage(MSG* pMsg);
2026-10-04 00:04:20 +08:00
// 移动行, 不让其移动,容易崩溃
2026-09-28 15:28:50 +08:00
virtual bool OnMoveRow(long i);
virtual void OnEndMoveRow();
2026-10-04 00:04:20 +08:00
// 单元格combox加载数据
2026-09-28 15:28:50 +08:00
virtual void OnCellComboString(WDGridCell &wdCell, CComboBox &combo);
2026-10-04 00:04:20 +08:00
// 刷新单元格
2026-09-28 15:28:50 +08:00
virtual bool OnRefresh(WDGridCell& wdCell);
2026-10-04 00:04:20 +08:00
// 编辑单元格
2026-09-28 15:28:50 +08:00
virtual WCellCtrl* OnGetCellEdit(WDGridCell&cell);
virtual bool OnModified(WDGridCell&cell,CString&text);
2026-10-04 00:04:20 +08:00
// combo下拉列表选择变化
2026-09-28 15:28:50 +08:00
virtual void OnCmbSelchange(WDGridCell& cell, CComboBox* pCmb);
2026-10-04 00:04:20 +08:00
// 按钮
2026-09-28 15:28:50 +08:00
virtual bool OnCellButtonDown(WDGridCell& cell, CString& res);
public:
2026-10-04 00:04:20 +08:00
Ttable m_arField; // 系统设置数据库结构
CUIIValueTable m_tabModel; // 系统设置树形行的模板
CUIIValueTable m_tabLineType; // 线型表
CStringArray m_arDuctMat; // 风管材料 ywb 2009-2-23
2026-09-28 15:28:50 +08:00
};
#endif // !defined(__SYSTREEGRID_H__)