private int GetColumnIdByCaption(TreeList objTr, string strColumn)
 {
     foreach (TreeListColumn objOneColumn in objTr.VisibleColumns)
     {
         if (TigerMarsUtil.RegularTest(strColumn, objOneColumn.Caption))
         {
             return(objOneColumn.AbsoluteIndex);
         }
     }
     return(-1);
 }
Beispiel #2
0
        /*
         * protected override void AddEvent()
         * {
         *  //base.AddEvent();
         * }
         */
        #region for addins
        public int SearchColumnId(object objColumnInfo)
        {
            Logger.logBegin("SearchColumnId");
            int       iColumnResult = -1;
            UltraGrid objGrid       = (UltraGrid)base.SourceControl;

            if (objGrid.Rows.Count <= 0)
            {
                Logger.Error("SearchColumnId", "Row count is zero");
                return(iColumnResult);
            }
            string strColumnInfo = objColumnInfo == null?"":objColumnInfo.ToString();

            try
            {
                if (string.IsNullOrEmpty(strColumnInfo))
                {
                    Logger.Error("SearchColumnId", "ColumnInfo passed is null");
                    return(-1);
                }
                UltraGridRow objFirstRow = objGrid.Rows[0];
                string       strColumn = "", strHeader = "";
                for (int i = 0; i < objFirstRow.Cells.Count; i++)
                {
                    strColumn = objFirstRow.Cells[i].Column.Key.ToUpper();
                    strHeader = objFirstRow.Cells[i].Column.Header.Caption.ToUpper();
                    if ((strColumnInfo.ToUpper().CompareTo(strColumn) == 0) || (strColumnInfo.ToUpper().CompareTo(strHeader) == 0) ||
                        (TigerMarsUtil.RegularTest(strColumnInfo, strColumn)) || (TigerMarsUtil.RegularTest(strColumnInfo, strHeader)))
                    {
                        Logger.logEnd("SearchColumnId");
                        return(iColumnResult = i);
                    }
                }
                return(iColumnResult);
            }
            catch (Exception e)
            {
                Logger.Error("SearchColumnId", string.Format("Exception:[{0}]", e.Message), e);
                return(iColumnResult);
            }finally{
                Logger.logEnd("SearchColumnId");
            }
        }
 private bool TraverseItems(BarItemLinkCollection col, string[] arrItems, int iCurrentLevel, List <BarItemLink> lstMenuChain)
 {
     if (iCurrentLevel >= arrItems.Length)
     {
         Logger.Error("TraverseItems", "Can't get the right menuItem when Navigating reaches the last item.");
         return(false);
     }
     foreach (BarItemLink link in col)
     {
         //SomeAction(link);
         if (!(TigerMarsUtil.RegularTest(arrItems[iCurrentLevel], link.Caption)))
         {
             continue;
         }
         /** keep the current menuItem **/
         lstMenuChain.Add(link);
         if (link.Item is BarSubItem)
         {
             if (TraverseItems((link.Item as BarSubItem).ItemLinks, arrItems, iCurrentLevel + 1, lstMenuChain))
             {
                 return(true);
             }
             else
             {
                 /** remove the last one **/
                 if (lstMenuChain.Count > 0)
                 {
                     Logger.Info("TraverseItems", string.Format("Its Subitems [{0}] are not match to [{1}], level:[{2}]. Remove last node of the chain", link.Caption, arrItems[iCurrentLevel], iCurrentLevel));
                     lstMenuChain.RemoveAt(lstMenuChain.Count - 1);
                     return(false);
                 }
             }
         }
         else
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #4
0
        public object StoreColumnsValue(object objColumnId, object objStartRow, object objEndRow, object objSplitPerRow, ref object isRight)
        {
            Logger.logBegin("StoreColumnsValue");
            Logger.Info("StoreColumnsValue", string.Format("parameter:\r\n\tobjColumnId:[{0}] \t objStartRow:[{1}], \tobjEndRow:[{2}] \tobjSplitPerRow[{3}]",
                                                           objColumnId, objStartRow, objEndRow, objSplitPerRow));
            string    strResult = "";
            UltraGrid objGrid   = (UltraGrid)base.SourceControl;
            /** check parameters **/
            int iColumnId = TigerMarsUtil.ConvertObject2Int(objColumnId, -1);

            isRight = false;
            if (iColumnId < 0)
            {
                Logger.Error("StoreColumnsValue", string.Format("Column Id is < 0 or not a number:[{0}]", objColumnId));
                return(strResult = "");
            }
            int iStartRow = TigerMarsUtil.ConvertObject2Int(objStartRow, -1);

            if (iStartRow < 0)
            {
                Logger.Error("StoreColumnsValue", string.Format("iStartRow is < 0 or not a number:[{0}]", objStartRow));
                return("");
            }
            int iEndRow = TigerMarsUtil.ConvertObject2Int(objEndRow, -1);

            if (iEndRow < 0)
            {
                Logger.Error("StoreColumnsValue", string.Format("iEndRow is < 0 or not a number:[{0}]", objEndRow));
                return("");
            }
            if (objGrid.Rows.Count <= 0)
            {
                isRight = true;
                Logger.Error("StoreColumnsValue", "No row exists for the Datagrid");
                return("");
            }
            if ((iStartRow >= objGrid.Rows.Count) || (iEndRow >= objGrid.Rows.Count) || (iStartRow < 0) || (iEndRow < 0))
            {
                Logger.Error("StoreColumnsValue", string.Format("StartRow [{0}] or EndRow [{1}] is out of range", iStartRow, iEndRow));
                return("");
            }
            if (iStartRow > iEndRow)
            {
                Logger.Error("StoreColumnsValue", string.Format("StartRow [{0}] is greater than endRow [{1}] number.", iStartRow, iEndRow));
                return("");
            }
            string strSplit = objSplitPerRow == null ? "\n" : objSplitPerRow.ToString();
            string strCell  = "";

            isRight = true;
            for (int i = iStartRow; i <= iEndRow; i++)
            {
                strCell = objGrid.Rows[i].Cells[iColumnId].Text;
                if (TigerMarsUtil.RegularTest("179,769,313,486,23.*", strCell))
                {
                    strCell = "";
                }
                strResult = string.Format("{0}{1}{2}", strResult, strSplit, strCell);
            }

            Logger.logEnd("StoreColumnsValue");
            return(strResult);
        }
        public bool FetchDataFromCells(object objCommand, ref object objResult, ref object objError)
        {
            Logger.logBegin("FetchDataFromCells");
            const string cnst_allrow     = "ALLROWS;";
            const string cnst_CONDITION  = "CONDITION:";
            const string cnst_ROWS_LIMIT = "ROWS_LIMIT:";

            try
            {
                string strCommand = objCommand == null?objCommand.ToString() : null;

                if (string.IsNullOrEmpty(strCommand))
                {
                    throw new Exception("objCommand should not be NULL or empty");
                }

                /** check Command **/

                /*  ' format :
                 *  '   ROWS_LIMIT:0:0;Code/Name
                 *  '   ALLROWS;ColumnsName
                 *  '   CONDITION:COLUMN=A;ColumnName;NOSUB, Example: CONDITION:0=@FO_test;Income;NOSUB
                 *  '       NOSUB means don't get all sub information, other wise get all sub expanded rows
                 * */
                if (!(TigerMarsUtil.RegularTest("^" + cnst_allrow, strCommand) || TigerMarsUtil.RegularTest("^ROWS_LIMIT", strCommand) || TigerMarsUtil.RegularTest("^CONDITION:", strCommand)))
                {
                    throw new Exception(string.Format("No supported Command, [{0}]", strCommand));
                }

                TreeList objTr = (TreeList)base.SourceControl;
                int      iStartRow = 0, iEndRow = -1;
                string   strColumn = "";

                if (TigerMarsUtil.RegularTest("^" + cnst_allrow, strCommand))
                {
                    #region AllROWS dealing
                    iStartRow = 0;
                    strColumn = strCommand.Replace(cnst_allrow, "");
                    int iColId = GetColumnIdByCaption(objTr, strColumn);

                    if (iColId == -1)
                    {
                        objError = string.Format("Can't get column info with caption:[{0}]", strColumn);
                        Logger.Error("FetchDataFromCells", (string)objError);
                        return(false);
                    }

                    TreeListColumn objCol = objTr.Columns[0];

                    foreach (TreeListNode objOneNode in objTr.Nodes)
                    {
                        if (strColumn.Length == 0)
                        {
                            strColumn = objOneNode.GetValue(iColId).ToString();
                        }
                        else
                        {
                            string.Format("{1}", objOneNode.GetValue(iColId).ToString());
                        }
                    }
                    objResult = strColumn;
                    return(true);

                    #endregion //AllROWS dealing
                }
                if (TigerMarsUtil.RegularTest("^" + cnst_CONDITION, strCommand))
                {
                    #region CONDITION MODE
                    //CONDITION:COLUMN=A;ColumnName;NOSUB, Example: CONDITION:0=@FO_test;Income;NOSUB
                    if (!TigerMarsUtil.RegularTest(@"CONDITION:\b\w+\b=\w+;\b\w+\b(;NOSUB){0,1}", strCommand))
                    {
                        objError = string.Format("RC should match CONDITION:\\b\\w+\\b=\\w+;\\b\\w+\\b(;NOSUB), Command:{0}", strCommand);
                        Logger.Error("FetchDataFromCells", (string)objError);
                        return(false);
                    }
                    string   strCmd          = strCommand.Replace(cnst_CONDITION, "");
                    string[] arrCmdComma     = strCmd.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
                    int      iColId          = -1;
                    string[] arrCmdCondition = arrCmdComma[0].Split(new string[] { "=" }, StringSplitOptions.RemoveEmptyEntries);
                    bool     isColIndex      = int.TryParse(arrCmdCondition[0], out iColId);
                    if (!isColIndex)
                    {
                        iColId = this.GetColumnIdByCaption(objTr, arrCmdCondition[0]);
                        if (iColId == -1)
                        {
                            Logger.Error("FetchDataFromCells", (string)(objError = string.Format("Can't find condition column name like [{0}] from Treelist type spreadsheet", arrCmdCondition[0])));
                            return(false);
                        }
                    }
                    /** GET TAGET COLUMN **/
                    int iTargetColId = this.GetColumnIdByCaption(objTr, arrCmdComma[1]);
                    if (iTargetColId == -1)
                    {
                        Logger.Error("FetchDataFromCells", (string)(objError = string.Format("Can't find target column name like [{0}] from Treelist type spreadsheet", arrCmdComma[1])));
                        return(false);
                    }

                    /** find Condtion node **/
                    string strResult        = "";
                    bool   isSubNodeInclude = arrCmdComma.Length <= 2 ? true : string.Compare(arrCmdComma[2], "NOSUB", true) != 0;

                    foreach (TreeListNode objNode in objTr.Nodes)
                    {
                        string strCaption       = objNode.GetValue(iColId).ToString();
                        string strTargetCaption = objNode.GetValue(iTargetColId).ToString();
                        if (TigerMarsUtil.RegularTest(arrCmdCondition[1], strCaption))
                        {
                            strResult = string.IsNullOrEmpty(strResult) ? strTargetCaption : string.Format("{0}\r\n{1}", strResult, strTargetCaption);
                            /** 判断是否有子 节点 and expanded ; arrCmdComma.Length>2 means sub**/
                            if (objNode.HasChildren && objNode.Expanded && isSubNodeInclude)
                            {
                                strTargetCaption = this.CaptureAllValuesOfSubNodes(objNode.Nodes, iTargetColId);
                                strResult        = string.IsNullOrEmpty(strResult) ? strTargetCaption : string.Format("{0}\r\n{1}", strResult, strTargetCaption);
                            }
                        }
                    }
                    objResult = strResult;
                    return(true);

                    #endregion //CONDTION MODE
                }
                if (TigerMarsUtil.RegularTest("^" + cnst_ROWS_LIMIT, strCommand))
                {
                    #region Rows Limit
                    //ROWS_LIMIT:0:0;Code/Name
                    string[] arrCmdComma = strCommand.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
                    if (arrCmdComma.Length < 2)
                    {
                        objError = string.Format("For Rows_limit model, command formatter should be Rows_limit:[rowStart]:[rowEnd];Column name or column Index, but current command string is [{0}]", strCommand);
                        Logger.Error("FetchDataFromCells", (string)objError);
                        return(false);
                    }
                    string   strCmd  = arrCmdComma[0].Replace(cnst_ROWS_LIMIT, "");
                    string[] arrRows = strCmd.Split(new string[] { ":" }, StringSplitOptions.RemoveEmptyEntries);
                    if (arrRows.Length != 2)
                    {
                        objError = string.Format("For Rows_limit model, command formatter should be Rows_limit:[rowStart]:[rowEnd];Column name or column Index, but current RowStart and RowEnd string is [{0}]", strCmd);
                        Logger.Error("FetchDataFromCells", (string)objError);
                        return(false);
                    }
                    bool isInt = int.TryParse(arrRows[0], out iStartRow) && int.TryParse(arrRows[1], out iEndRow);
                    if ((!isInt) || (iEndRow < iStartRow) || (iEndRow <= 0) || (iStartRow <= 0) || (iEndRow >= objTr.Nodes.Count) || (iStartRow >= objTr.Nodes.Count))
                    {
                        objError = string.Format("For Rows_limit model, command formatter should be Rows_limit:[rowStart]:[rowEnd];Column name or column Index. StartRow should less than EndRow, but current RowStart and RowEnd string is [{0}]", strCmd);
                        Logger.Error("FetchDataFromCells", (string)objError);
                        return(false);
                    }
                    int  iColId        = -1;
                    bool isVisibleNode = true;
                    if (!int.TryParse(arrCmdComma[1], out iColId))
                    {
                        foreach (TreeListColumn item in objTr.Columns)
                        {
                            if (TigerMarsUtil.RegularTest(arrCmdComma[1], item.Caption))
                            {
                                iColId        = item.AbsoluteIndex + 1;
                                isVisibleNode = false;
                                break;
                            }
                        }
                    }

                    if ((iColId < 0) || (iColId > objTr.Columns.Count))
                    {
                        objError = string.Format("No such column [{0}] exists or Exceed the total column count.");
                        Logger.Error("FetchDataFromCells", (string)objError);
                        return(false);
                    }
                    string strResult = "";
                    for (int i = iStartRow; i < iEndRow; i++)
                    {
                        string strCell = objTr.Nodes[i - 1].GetValue(iColId).ToString();
                        strResult = string.IsNullOrEmpty(strResult) ? strCell : string.Format("{0}\r\n{1}", strResult, strCell);
                    }
                    objResult = strResult;
                    return(true);

                    #endregion //Rows Limit
                }
                objError = string.Format("Unsupported Command formatter:[{0}]", strColumn);
                return(false);
            }
            catch (Exception e)
            {
                objError = e.Message;
                Logger.Error("FetchDataFromCells", string.Format("Errors come across. Exception:[{0}]", e.Message), e);
                return(false);
            }
            finally
            {
                Logger.logEnd("FetchDataFromCells");
            }
        }
        public bool FetchDataFromCellsMisys(object objCommand, ref object objResult, ref object objError)
        {
            Logger.logBegin("FetchDataFromCellsMisys");

            const string cnst_CONDITION = "CONDITION:";
            string       strCommand     = objCommand == null ?  null : objCommand.ToString();

            try
            {
                if (string.IsNullOrEmpty(strCommand))
                {
                    throw new Exception("objCommand should not be NULL or empty");
                }

                /** check Command **/

                /*  ' format :
                 *  '   ROWS_LIMIT:0:0;Code/Name
                 *  '   ALLROWS;ColumnsName
                 *  '   CONDITION:COLUMN=A;ColumnName;NOSUB, Example: CONDITION:0=@FO_test;Income;NOSUB
                 *  '       NOSUB means don't get all sub information, other wise get all sub expanded rows
                 * */
                if (!TigerMarsUtil.RegularTest("^CONDITION:", strCommand))
                {
                    throw new Exception(string.Format("No supported Command, [{0}]", strCommand));
                }
                //objReflect.GetMember<object>(objDataSrcTmp,"")

                if (TigerMarsUtil.RegularTest("^" + cnst_CONDITION, strCommand))
                {
                    #region CONDITION MODE
                    //CONDITION:COLUMN=A;ColumnName;NOSUB, Example: CONDITION:0=@FO_test;Income;NOSUB
                    if (!TigerMarsUtil.RegularTest(@"CONDITION:\S+=\S{1,};\b\w+\b(;NOSUB){0,1}", strCommand))
                    {
                        objError = string.Format("RC should match CONDITION:\\b\\w+\\b=\\w+;\\b\\w+\\b(;NOSUB), Command:{0}", strCommand);
                        Logger.Error("FetchDataFromCellsMisys", (string)objError);
                        return(false);
                    }

                    string   strCmdNoHeader = strCommand.Replace(cnst_CONDITION, "");
                    string[] arrTargetField = strCmdNoHeader.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
                    string   strTargetField = arrTargetField[1];
                    string[] arrCondition   = arrTargetField[0].Split(new string[] { "=" }, StringSplitOptions.RemoveEmptyEntries);

                    TreeList objTr = (TreeList)base.SourceControl;

                    CustomTreeList     objCTrlst     = (CustomTreeList)objTr;
                    object             objDataSrcTmp = objCTrlst.DataSource;
                    ReflectorForCSharp objReflect    = new ReflectorForCSharp();
                    CSMPortfolio       objPortC      = null;
                    CSMPosition        objPortCsub   = null;
                    //object objPortfolio = objReflect.GetMember<object>(objDataSrcTmp, "Portfolio");
                    //CSMPortfolio objPortC = (CSMPortfolio)objPortfolio;
                    //double dIncome = objPortC.GetIncome();
                    object         tmpData = objReflect.GetMember <object>(objTr, "Data");
                    UnboundData    unData = (UnboundData)tmpData;
                    VirtualDataRow objVDataRow = null;
                    bool           isFind = false;
                    string         strHeadName = "";
                    int            iLevel = -1;
                    double         dDat = 0.00;
                    string         strResult = "", strTmp = "";
                    for (int i = 0; i < unData.DataList.Count; i++)
                    {
                        objVDataRow = (VirtualDataRow)unData.DataList[i];
                        objPortC    = (CSMPortfolio)(objReflect.GetMember <object>(objVDataRow.VirtualNode, "Portfolio"));
                        iLevel      = objPortC.GetLevel();
                        if ((iLevel <= 1) && (isFind))
                        {
                            break;
                        }
                        strHeadName = objPortC.GetName() == null?"":objPortC.GetName().ToString();
                        if (!isFind)
                        {
                            /** Only the root level can be taken as comparison node **/
                            if (iLevel != 1)
                            {
                                continue;
                            }
                            if (!TigerMarsUtil.RegularTest(arrCondition[1], strHeadName))
                            {
                                continue;
                            }
                            else
                            {
                                isFind = true;
                            }
                        }

                        switch (strTargetField.ToUpper())
                        {
                        case "INCOME":
                            dDat   = objPortC.GetIncome() * 1000;
                            strTmp = dDat.ToString("0.");
                            break;

                        case "NAV":
                            dDat   = objPortC.GetNetAssetValue() * 1000;
                            strTmp = dDat.ToString("0.");
                            break;

                        case "RESULT":
                            dDat   = objPortC.GetResult() * 1000;
                            strTmp = dDat.ToString("0.");
                            break;

                        case "REALIZED":
                            dDat   = objPortC.GetRealised() * 1000;
                            strTmp = dDat.ToString("0.");
                            break;

                        case "BALANCE":
                            dDat   = objPortC.GetBalance() * 1000;
                            strTmp = dDat.ToString("0.");
                            break;

                        default:
                            throw new Exception(string.Format("Not supported field :[{0}]", strTargetField));
                        }
                        if (string.IsNullOrEmpty(strResult))
                        {
                            strResult = string.Format("[{0}{1}]", strHeadName, FormatStrWithTab(0, strTmp));
                        }
                        else
                        {
                            strResult = string.Format("{0}\n\r{1}", strResult, string.Format("[{0}{1}]", strHeadName, FormatStrWithTab(0, strTmp)));
                        }

                        for (int j = 0; j < objVDataRow.Children.Count; j++)
                        {
                            //objVDataRow.Children[j];
                            objPortCsub = (CSMPosition)objReflect.GetMember <object>(objVDataRow.Children[j], "Position");
                            strHeadName = objVDataRow.Children[j].ToString();
                            if (objPortCsub == null)
                            {
                                continue;
                            }
                            switch (strTargetField.ToUpper())
                            {
                            case "INCOME":
                                dDat   = objPortCsub.GetIncome() * 1000;
                                strTmp = dDat.ToString("0.");
                                break;

                            case "NAV":
                                dDat   = objPortCsub.GetNetAssetValue() * 1000;
                                strTmp = dDat.ToString("0.");
                                break;

                            case "RESULT":
                                dDat   = objPortCsub.GetResult() * 1000;
                                strTmp = dDat.ToString("0.");
                                break;

                            case "REALIZED":
                                dDat   = objPortCsub.GetRealised() * 1000;
                                strTmp = dDat.ToString("0.");
                                break;

                            case "BALANCE":
                                dDat   = objPortCsub.GetBalance() * 1000;
                                strTmp = dDat.ToString("0.");
                                break;

                            default:
                                throw new Exception(string.Format("Not supported field :[{0}]", strTargetField));
                            }
                            strResult = string.Format("{0}\n\r{1}", strResult, string.Format("[{0}    {1}]", strHeadName, FormatStrWithTab(0, strTmp)));
                        }
                        break;
                    }
                    objResult = strResult;
                    return(true);

                    #endregion //CONDTION MODE
                }

                objError = string.Format("Unsupported Command formatter:[{0}]", strCommand);
                return(false);
            }
            catch (Exception e)
            {
                objError = e.Message;
                Logger.Error("FetchDataFromCellsMisys", string.Format("Errors come across. Exception:[{0}]", e.Message), e);
                return(false);
            }
            finally
            {
                Logger.logEnd("FetchDataFromCellsMisys");
            }
        }
        private bool FindNodeBySettings(TreeListNodes treeListNodes, int iDepths, int iCurrentDep, string[] arrSearchItems, ref TreeListNode objFindNode, int iColumnId = 0)
        {
            Logger.logBegin(string.Format("FindNodeBySettings with level [{0}]", iCurrentDep));

            try
            {
                IEnumerator en = treeListNodes.GetEnumerator();
                en.Reset();
                while (en.MoveNext())
                {
                    TreeListNode objOneItem = (TreeListNode)en.Current;
                    if (objOneItem.GetValue(iColumnId) == null)
                    {
                        continue;
                    }
                    string strNodeCaption = objOneItem.GetValue(iColumnId).ToString();
                    Logger.Info("FindNodeBySettings", string.Format("tring to compare node value [{0}] against [{1}]", strNodeCaption, arrSearchItems[iCurrentDep]));

                    if (TigerMarsUtil.RegularTest(arrSearchItems[iCurrentDep], strNodeCaption))
                    {
                        if (iCurrentDep == iDepths - 1)
                        {
                            objFindNode = objOneItem;
                            /** expand all **/
                            ExpandParents(objOneItem);
                            return(true);
                        }

                        if (objOneItem.HasChildren)
                        {
                            bool isFind = FindNodeBySettings(objOneItem.Nodes, iDepths, iCurrentDep + 1, arrSearchItems, ref objFindNode, iColumnId);
                            if (isFind)
                            {
                                Logger.Info("FindNodeBySettings", "find node");
                                return(true);
                            }
                            else
                            {
                                Logger.Info("FindNodeBySettings", string.Format("Not find for node:[{0}] and its Descendants", strNodeCaption));
                                continue;
                            }
                        }
                        else
                        {
                            continue;
                        }
                    }
                    else
                    {
                        continue;
                    }
                }
                return(false);
            }
            catch (Exception e)
            {
                Logger.Error("FindNodeBySettings", string.Format("Exceptions:[{0}]", e.Message), e);
                return(false);
            }
            finally
            {
                Logger.logBegin(string.Format("FindNodeBySettings with level [{0}]", iCurrentDep));
            }
        }
        private bool FindNodeBySettings_Sophis(Sophis.Util.GUI.CustomTreeList objTreeList, int iDepths, int iCurrentDep, string[] arrNodeSearchItems, ref TreeListNode objCurrentNode, int iColumn)
        {
            Logger.logBegin("FindNodeBySettings_Sophis");
            ReflectorForCSharp objReflector = new ReflectorForCSharp();

            try
            {
                TreeListData objData = objReflector.GetMember <TreeListData>(objTreeList, "Data");
                if (objData == null)
                {
                    Logger.Info("FindNodeBySettings_Sophis", "Can't get Data from object instance via reflection.");
                    return(false);
                }
                if (objData.DataList == null)
                {
                    Logger.Info("FindNodeBySettings_Sophis", "DataList is null");
                    return(false);
                }

                /** +		virtualDataHelper	{Sophis.Util.GUI.CustomTLVDH}	DevExpress.XtraTreeList.TreeList.TreeListVirtualDataHelper {Sophis.Util.GUI.CustomTLVDH}
                 * -		objData.DataHelper	{DevExpress.XtraTreeList.Data.TreeListDataHelper}	DevExpress.XtraTreeList.Data.TreeListDataHelper
                 *
                 *
                 * object o = objData.GetValue(0, 0);
                 * string strCellDis = objTreeList.Nodes[0].GetDisplayText(objTreeList.Columns[0]) ;
                 * object or = objData.GetDataRow(objTreeList.Nodes[0].Id);
                 * strCellDis = objData.GetDisplayText(objTreeList.Nodes[0].Id, objTreeList.Columns[0].AbsoluteIndex, objTreeList.Nodes[0]);
                 * object oc = objReflector.GetMember<object>(objTreeList, "CurrencyManager");
                 * object ov = objReflector.CallPrivateMethod<object>(objTreeList, "GetNodeValue", new object[] {objTreeList.Nodes[0],objTreeList.Columns[0] });
                 * object objHelper0 = objReflector.GetMember<object>(objTreeList, "VirtualDataHelper");
                 * object objHelper2 = objReflector.GetPrivateProperty<object>(objTreeList, "VirtualDataHelper");
                 * TreeList.TreeListVirtualDataHelper objDataHelper = (TreeList.TreeListVirtualDataHelper)(objHelper0) ;
                 * object objCellData = objDataHelper.GetCellDataViaEvent(((VirtualDataRow)objData.DataList[0]).Node, objTreeList.Columns[0]);
                 * objCellData = objDataHelper.GetCellDataViaEvent(objTreeList.Nodes[0], objTreeList.Columns[0]);
                 * objCellData = objDataHelper.GetCellDataViaInterface(((VirtualDataRow)objData.DataList[0]).Node, objTreeList.Columns[0], null);
                 * objCellData = objDataHelper.GetCellDataViaInterface(objTreeList.Nodes[0], objTreeList.Columns[0], null);
                 * object value = typeof(TreeListVirtualData).GetField("virtualNodeToDataRowCache", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(objData);
                 *  **/
                //DevExpress.XtraTreeList.TreeList.TreeListVirtualDataHelper objHelper1 = objReflector.GetPrivateProperty<DevExpress.XtraTreeList.TreeList.TreeListVirtualDataHelper>(objTreeList, "virtualDataHelper");
                //GetCellDataViaEvent
                for (int i = 0; i < objData.DataList.Count; i++)
                {
                    object objRawItem = objData.DataList[i];
                    if (!(objRawItem is VirtualDataRow))
                    {
                        /** I don't know what it could be **/
                        continue;
                    }
                    VirtualDataRow objRow = (VirtualDataRow)objRawItem;

                    if (objRow.VirtualNode == null)
                    {
                        continue;
                    }
                    string strCaption = objRow.VirtualNode.ToString();
                    if (TigerMarsUtil.RegularTest(arrNodeSearchItems[iCurrentDep], strCaption))
                    {
                        /** find **/
                        Logger.Info("FindNodeBySettings_Sophis", string.Format("Find Level [{0}] node information [{1}], with node value is:[{2}]", iCurrentDep, arrNodeSearchItems[iCurrentDep], strCaption));
                        if (iCurrentDep == iDepths - 1)
                        {
                            objCurrentNode          = objTreeList.Nodes[i];
                            objTreeList.FocusedNode = objTreeList.Nodes[i];
                        }
                        return(true);
                    }
                }
                return(false);
            }
            catch (Exception e)
            {
                Logger.Error("FindNodeBySettings_Sophis", string.Format("Exceptions when trying to get data via Reflection. Exception:[{0}]", e.Message), e);
                return(false);
            }
        }