#include <Mstn\MdlApi\dlogbox.r.h>
#include <Mstn\MdlApi\dlogids.r.h>
#include "DialogResource.h"
#include "ExportEngineerStruct.h"

#define TABWIDTH (90*XC)
#define TABHEIGHT (25*YC)
DialogBoxRsc DIALOGID_ExportEngineer =
{
	DIALOGATTR_DEFAULT | DIALOGATTR_SINKABLE,
	95*XC, 29*YC,
	NOHELP, MHELP,NOHOOK, NOPARENTID,
	TXT_ExportEngineer,
	{
		{{1*XC,1*YC,TABWIDTH,TABHEIGHT}, TabPageList, TPLISTID_ONE, ON, 0,"",""}, 
		{{TABWIDTH-35*XC, TABHEIGHT+2.25*YC, 0, 0}, ToggleButton, TOGGLEBTNID_DeleteBlank,ON,0,"",""},
		{{TABWIDTH-20*XC, TABHEIGHT+2*YC, BUTTON_STDWIDTH, 0}, PushButton, PUSHBUTTONID_Export,ON,0,"",""},
		{{TABWIDTH-8*XC, TABHEIGHT+2*YC, BUTTON_STDWIDTH, 0}, PushButton, PUSHBUTTONID_Close,ON,0,"",""},
	}
};

DItem_TabPageListRsc TPLISTID_ONE = 
{ 
	0, 0, NOSYNONYM, NOHELP, MHELP, NOHOOK, NOARG, TABATTR_DEFAULT, 
	"", 
	{ 
	{{0,0,0,0}, TabPage, TABPAGEID_Engineer, ON, 0,"",""}, 
	{{0,0,0,0}, TabPage, TABPAGEID_EngineerByRoom,  ON, 0,"",""}, 
	} 
}; 

DItem_TabPageRsc  TABPAGEID_Engineer= 
{ 
	NOCMD, LCMD, NOSYNONYM, NOHELP, MHELP, NOHOOK, NOARG, 
	TABATTR_DEFAULT, NOTYPE, NOICON, 
	TXT_TabPageEngineer, 
	{ 
	{ { 2*XC,  3*YC,  TABWIDTH-1*XC,  TABHEIGHT-2*YC},  ListBox, LISTBOXID_Engineer, ON, 0, "", "" },
	} 
}; 

DItem_TabPageRsc  TABPAGEID_EngineerByRoom= 
{ 
	NOCMD, LCMD, NOSYNONYM, NOHELP, MHELP, NOHOOK, NOARG, 
	TABATTR_DEFAULT, NOTYPE, NOICON, 
	TXT_TabPageEngineerByRoom, 
	{ 
	{ { 2*XC,  3*YC,  TABWIDTH-1*XC,  TABHEIGHT-2*YC},  ListBox, LISTBOXID_EngineerByRoom, ON, 0, "", "" },
	} 
}; 

DItem_PushButtonRsc PUSHBUTTONID_Export= 
{ 
	DEFAULT_BUTTON, NOHELP, MHELP, 
	HOOKBTNID_Export, NOARG,NOCMD , MCMD, "", "导出" 
} 

DItem_PushButtonRsc PUSHBUTTONID_Close= 
{ 
	NOT_DEFAULT_BUTTON, NOHELP, MHELP, 
	HOOKITEMID_Button_StandardAction , ACTIONBUTTON_CANCEL,NOCMD , MCMD, "", "关闭" 
} 

DItem_ListBoxRsc  LISTBOXID_Engineer =
{
    NOHELP, MHELP, HOOKID_ListEngineer, HOOKARG_ListEngineer,
	LISTATTR_RESIZABLECOLUMNS |
    LISTATTR_DYNAMICSCROLL | LISTATTR_SELBROWSE | LISTATTR_HORIZSCROLLBAR | 
    LISTATTR_COLHEADINGBORDERS | LISTATTR_GRID | LISTATTR_EDITABLE | 
    LISTATTR_NEWCOLHEADORIGIN  |
    LISTATTR_INDEPENDENTCOLS,
    10, 0, "",
    {
		{5*XC, 20, ALIGN_CENTER |LISTCOLATTR_EDITABLE, "项目"	 },
		{13*XC, 40, ALIGN_CENTER, "类别"	 },
		{13*XC, 100, ALIGN_CENTER, "构造做法"	 },
		{5*XC, 20, ALIGN_CENTER, "色彩"	 },
		{30*XC, 1024, ALIGN_CENTER, "适用范围"	 },
		{20*XC, 1024, ALIGN_CENTER, "备注"	 },
    }
};

DItem_ListBoxRsc  LISTBOXID_EngineerByRoom =
{
    NOHELP, MHELP, HOOKID_ListEngineer, HOOKARG_ListEngineerByRoom,
	LISTATTR_RESIZABLECOLUMNS |
    LISTATTR_DYNAMICSCROLL | LISTATTR_SELBROWSE | LISTATTR_HORIZSCROLLBAR | 
    LISTATTR_COLHEADINGBORDERS | LISTATTR_GRID | LISTATTR_EDITABLE | 
    LISTATTR_NEWCOLHEADORIGIN  |
    LISTATTR_INDEPENDENTCOLS,
    10, 0, "",
    {
		{5*XC, 20, ALIGN_CENTER |LISTCOLATTR_EDITABLE, "序号"	 },//必须要有1列，否则出错
		//{13*XC, 20, ALIGN_CENTER |LISTCOLATTR_EDITABLE, "所在楼层"	 },
		//{13*XC, 20, ALIGN_CENTER |LISTCOLATTR_EDITABLE, "房间\\部位"	 },
	}
};

DItem_TextRsc TEXTID_ListCell =
{
   NOCMD, LCMD, NOSYNONYM, NOHELP, MHELP, HOOKITEMID_Text, NOARG, 
   ListBoxCell_MaxCharNum, "", "", "", "", NOMASK, NOCONCAT,
   "", "g_binding.editText"
};

DItem_ToggleButtonRsc TOGGLEBTNID_DeleteBlank =
 {
    NOCMD, LCMD, NOSYNONYM, 
    NOHELP, LHELPTOPIC, 
    HOOKID_ToggleBtnDeleteBlank, NOARG, 0x1, NOINVERT,
    "删除空白行", 
    "g_binding.deleteBlank"
 };