Пример #1
0
        /// <summary>
        /// parse the dbh's ctl information.
        /// </summary>
        /// <param name="dbhRealIdxs"></param>
        internal void fillDbhRealIdxs(String dbhRealIdxs)
        {
            // clear the  dbhRealIdxsTab.

            dbhRealIdxInfoTab.Clear();
            if (dbhRealIdxs.Trim().Length > 0)
            {
                string[] dbhRealIdxStr = dbhRealIdxs.Split(";".ToCharArray());

                ////first is blank entry skip it

                for (int i = 1; i < dbhRealIdxStr.Length; i++)
                {
                    String[] dbhRealIdxVal = dbhRealIdxStr[i].Split(",".ToCharArray());

                    System.Diagnostics.Debug.Assert(dbhRealIdxVal.Length == 4);

                    DataSourceIdKey dataSourceIdKey = new DataSourceIdKey(Convert.ToInt32(dbhRealIdxVal[0]), Convert.ToInt32(dbhRealIdxVal[1]));

                    DataSourceId dataSourceId = new DataSourceId(Convert.ToInt32(dbhRealIdxVal[2]), Convert.ToInt32(dbhRealIdxVal[3]));

                    dbhRealIdxInfoTab.Add(dataSourceIdKey, dataSourceId);
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Get DataSourceId using taskCtlIdx and realIdx.
        /// </summary>
        /// <param name="taskCtlIdx"></param>
        /// <param name="realIdx"></param>
        internal DataSourceId GetDataSourceId(int taskCtlIdx, int realIdx)
        {
            DataSourceIdKey dataSourceIdKey = new DataSourceIdKey(taskCtlIdx, realIdx);

            return((DataSourceId)(dbhRealIdxInfoTab[dataSourceIdKey]));
        }