|
37 | 37 | #include "EventSubscriptions.h" |
38 | 38 | #include "Roles.h" |
39 | 39 | #include "CommonCommands.h" |
| 40 | +#include "TConstants.h" |
40 | 41 | #include "CommonPictures.h" |
41 | 42 | #include "CommandGroups.h" |
42 | 43 | #include "CommonForms.h" |
@@ -1556,6 +1557,19 @@ void __fastcall TMainForm::FillVirtualTree() { |
1556 | 1557 | { |
1557 | 1558 | FillTreeMD(parentNode, MainForm->mdCalculationRegisters, md_CalculationRegisters, category.imgIndex); |
1558 | 1559 | } |
| 1560 | + else if (category.name == md_Constants) |
| 1561 | + { |
| 1562 | + // Константы |
| 1563 | + for (int i = 0; i < MainForm->mdConstants->Count; i++) |
| 1564 | + { |
| 1565 | + PVirtualNode childNodeConst = VirtualStringTreeValue1C->AddChild(parentNode); |
| 1566 | + VirtualTreeData *childDataConst = (VirtualTreeData*)VirtualStringTreeValue1C->GetNodeData(childNodeConst); |
| 1567 | + TConstants* CurConstant = static_cast<TConstants*>(MainForm->mdConstants->Items[i]); |
| 1568 | + childDataConst->Name = CurConstant->name; |
| 1569 | + childDataConst->Age = 30; |
| 1570 | + childDataConst->ImgIndex = category.imgIndex; |
| 1571 | + } |
| 1572 | + } |
1559 | 1573 | else if (category.name == md_InformationRegisters) |
1560 | 1574 | { |
1561 | 1575 | FillTreeMD(parentNode, MainForm->mdInformationRegisters, md_InformationRegisters, category.imgIndex); |
@@ -2996,7 +3010,10 @@ void fill_md(tree* tr, String guid_md, std::vector<String> &md_list) |
2996 | 3010 | else if (guid_md == GUID_WSReferences) |
2997 | 3011 | {} |
2998 | 3012 | else if (guid_md == GUID_Constants) |
2999 | | - {} |
| 3013 | + { |
| 3014 | + TConstants* CurConstant = new TConstants(cf, curNode->get_value(), val); |
| 3015 | + MainForm->mdConstants->Add(CurConstant); |
| 3016 | + } |
3000 | 3017 | else if (guid_md == GUID_Documents) |
3001 | 3018 | { |
3002 | 3019 | TDocuments* CurDocuments = new TDocuments(cf, curNode->get_value(), val); |
@@ -3183,7 +3200,7 @@ void get_cf_name(tree* tr, Messager* mess) |
3183 | 3200 |
|
3184 | 3201 | // константы |
3185 | 3202 | fill_md(tr, GUID_Constants, MainForm->Constants); |
3186 | | - mess->AddMessage(L"Константы обработаны", MessageState::msInfo); |
| 3203 | + mess->AddMessage(L"Константы обработаны: " + IntToStr((int)MainForm->Constants.size()), MessageState::msInfo); |
3187 | 3204 |
|
3188 | 3205 | // обработки |
3189 | 3206 | fill_md(tr, GUID_DataProcessors, MainForm->DataProcessors); |
|
0 commit comments