public void ShowElement(IAccountingElement iElmt, TreeViewMappingElement tvme = null, Dictionary <string, double?> lastTotal = null)
        {
            if (tvme == null)
            {
                tvme = _Memory;
            }
            else
            {
                _Memory = tvme;
            }

            SetLastTotalMemoryAmount(lastTotal);

            Rows.Clear();
            foreach (IAccountingElement item in iElmt.GetItemList(tvme))
            {
                AddRow(item, iElmt.CcyRef, lastTotal: GetLastTotalMemoryAmount(item.GetName()));
            }
            AddRow(iElmt.GetTotalAccount(FXMarketUsed, AssetMarketUsed, iElmt.CcyRef,
                                         overrideName: "Total",
                                         lastTotal: GetLastTotalMemoryAmount()),
                   isTotalRow: iElmt.GetNodeType() != NodeType.Account);
            ElementShowed             = iElmt;
            TotalShowed               = null;
            Rows[0].Cells[0].Selected = false;
        }
        public static TreeViewMappingElement CreateElement(IAccountingElement iNewElmt)
        {
            var res = new TreeViewMappingElement(iNewElmt.GetName());

            foreach (IAccountingElement item in iNewElmt.GetItemList())
            {
                res.AddElement(CreateElement(item));
            }
            return(res);
        }