cms_nuaa wrote:
恩,看来你们做的是比较成熟的。能不能提供点具体的做法?十分感谢。
另外,楼上的这位说的我也知道。别偷笑,呵呵。
全部的source不能给你,我们这1个人从设计到测试做了1个月,算到cost大约7千美元呢
。。。
ConfigName = Excel.ActiveWorkbook.ActiveSheet.Name
MyPath = Excel.ActiveWorkbook.Path + "\" + FWName + "\" + ConfigName + "CreationWbench.m" + "\LocalInterfaces\" + ConfigName + "Configuration.h"
Open MyPath For Output As #FileNum
WBName = ConfigName + "CreationWkb"
 rint #FileNum, "// Copyright WSH 2004"
 rint #FileNum, ""
 rint #FileNum, "NewAccess( CATCmdWorkbench, pWorkbench, " + WBName + " );"
 rint #FileNum, "SetWorkbenchPriority( pWorkbench, 150 );"
 rint #FileNum, ""
Print #FileNum, "////////////////////////////////////////////////////////////////"
Print #FileNum, "/// ToolBar"
Print #FileNum, ""
ContName = ""
SubContName = ""
ContObjName = ""
ContObjPnt = ""
SubContObjName = ""
SubContObjPnt = ""
CmdObjName = ""
CmdObjPnt = ""
RootChildObjPrePnt = ""
ContChildObjPrePnt = ""
SubContChildObjPrePnt = ""
IsToolVar = True
RootChildFlg = True
ContChildFlg = True
SubContChildFlg = True
For i = FirstRow To LastRow
If Cells(i, CLASSIFICATION_Col) = Type_Tool Or Cells(i, CLASSIFICATION_Col) = Type_Both Then
If Cells(i, CONTAINER_Col) <> "" Then
If Cells(i, CONTAINER_Col) <> ContName Then
ContChildFlg = True
SubContChildFlg = True
ContName = Cells(i, CONTAINER_Col)
SubContName = ""
rc = AddContainer("pWorkbench", RootChildObjPrePnt, ConfigName, ContCnt, i, IsToolVar, RootChildFlg, 1)
Else
If Cells(i, SUB_CONTAINER_Col) <> "" Then
If Cells(i, SUB_CONTAINER_Col) <> SubContName Then
SubContChildFlg = True
SubContName = Cells(i, SUB_CONTAINER_Col)
rc = AddSubContainer(RootChildObjPrePnt, ContChildObjPrePnt, ConfigName, SubContCnt, i, ContChildFlg, 2)
Else
CmdHdrId = Cells(i, HEADER_ID_Col)
rc = AddCommand(ContChildObjPrePnt, SubContChildObjPrePnt, CmdHdrId, ConfigName, CmdCnt, SubContChildFlg, 3)
End If
Else
CmdHdrId = Cells(i, HEADER_ID_Col)
rc = AddCommander(RootChildObjPrePnt, ContChildObjPrePnt, CmdHdrId, ConfigName, CmdCnt, ContChildFlg, 2)
End If
End If
Else
ContChildFlg = True
ContName = Cells(i, CMD_SEP_Col)
SubContName = ""
rc = AddContainer("pWorkbench", RootChildObjPrePnt, ConfigName, ContCnt, i, IsToolVar, RootChildFlg, 1)
CmdHdrId = Cells(i, HEADER_ID_Col)
rc = AddCommander(RootChildObjPrePnt, "", CmdHdrId, ConfigName, CmdCnt, ContChildFlg, 2)
End If
End If
Next i
。。。 |