public int GetTFE_ID(int AIndex) { TDynamicArrayItem P = f_List.GetPosition(AIndex); if (P != null) { return(P.Int_Value); } else { return(0); } }
void AddElementToTree(TPredicateTree APredicateTree) { TPredicateTreeItem N = new TPredicateTreeItem(); N.ParentID = f_Item.ParentID; N.ParentShape = f_Item.ParentBaseShape; N.NumAlt = f_Item.Item.NumAlt + 1; int m_type, m_who = f_Item.Item.Who(); m_type = -1; if (m_who == 0) { N.BaseWorkShape = ((TPredicateItemTFS)f_Item.Item).TFS.BaseWorkShape; m_type = N.BaseWorkShape.TypeShape; } if (m_who == 1) { m_type = 12; } if (m_who == 2) { m_type = 13; } N.TypeWorkShape = m_type; TDynamicArray D = new TDynamicArray(); f_Item.Item.ListIDFill(D); int cnt = D.Count; for (int i = 0; i <= cnt - 1; i++) { N.AddBaseShape((TBaseShape)(D.GetPosition(i).P), D.GetPosition(i).Int_Value); } D = null; APredicateTree.AddPredicateTreeItem(N); }
string ListIDFromTFE() { int n, cnt; string Res = ""; TDynamicArray D = new TDynamicArray(); f_Item.ListIDFill(D); cnt = D.Count; for (int i = 0; i <= cnt - 1; i++) { n = D.GetPosition(i).Int_Value; Res = Res + n.ToString(); if ((i != cnt - 1) && (cnt > 1)) { Res = Res + ", "; } } D = null; return(Res); }
void DoCreateBasis() { TGlsBinaryTree mTree; TAlternativeParserGrpItemTFS Tfs; TAlternativeParserGrpItemList Item; TDynamicArray D = new TDynamicArray(); SharedConst.lc = new List <object>(); f_Basis.Clear(); for (int i = 0; i <= Count - 1; i++) { Item = GetItems(i); for (int j = 0; j <= Item.Count - 1; j++) { Tfs = Item.GetItems(j); if (D.Find(Tfs.TFS) == null) { MessageBox.Show("ДЕЛАЮ на УГАД, эту строчку НУЖНО ДЕБАЖИТЬ", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning); } // D.AppendInteger((int)Tfs, Tfs.TFS); // ХЗ ДЕЛАЮ на УГАД, эту строчку НУЖНО ДЕБАЖИТЬ } } mTree = new TGlsBinaryTree(SharedConst.APC_CompareNode); for (int i = 0; i <= D.Count - 1; i++) { object tmp = D.GetPosition(i).Int_Value; Tfs = (TAlternativeParserGrpItemTFS)tmp; mTree.insert(Tfs); } mTree.inorder(SharedConst.APC_Inorder); for (int i = 0; i <= SharedConst.lc.Count - 1; i++) { Tfs = (TAlternativeParserGrpItemTFS)(SharedConst.lc.ElementAt(i)); f_Basis.Add(Tfs); } mTree = null; D = null; SharedConst.lc = null; }
void MakeElementTFS(TPredicateItemTFS ATFS) { int n, m_who; TBaseShape B; string S; TDynamicArray D = new TDynamicArray(); TBaseWorkShape WS = ATFS.TFS.BaseWorkShape; ATFS.ListIDFill(D); for (int i = 0; i <= D.Count - 1; i++) { n = D.GetPosition(i).Int_Value; B = WS.ShapeSupportID(n); m_who = B.TypeShape; S = B.Make_One_Simple(); if (S.Length > 0) { if (m_who == 5) { f_PrRab = f_PrRab + S + "\r\n"; } if (m_who == 6) { f_PrControlRab = f_PrControlRab + S + "\r\n"; } if (m_who == 7) { f_PrControlFunc = f_PrControlFunc + S + "\r\n"; } if (m_who == 8) { f_PrCheckCondition = f_PrCheckCondition + S + "\r\n"; } } } D = null; }