Exemplo n.º 1
0
        public static trackDataListIntervalText getTrackTextDataList(string sData, int dfDS1Show, int dfDS2Show)
        {
            trackDataListIntervalText sttTrackDataList = new trackDataListIntervalText();

            string[] split = sData.Trim().Split(new char[] { ' ', '\t', ',' }, StringSplitOptions.RemoveEmptyEntries);
            for (int i = 0; i < split.Length; i = i + 3)
            {
                float top    = float.Parse(split[i]);
                float bottom = float.Parse(split[i + 1]);
                if (!(dfDS2Show <= top || dfDS1Show >= bottom))
                {
                    sttTrackDataList.fListDS1.Add(top);
                    sttTrackDataList.fListDS2.Add(bottom);
                    sttTrackDataList.ltStrText.Add(split[i + 2]);
                }
            }
            return(sttTrackDataList);
        }
Exemplo n.º 2
0
        public static trackDataListIntervalText getTrackDataIntervalText(string sData, double dfDS1Show, double dfDS2Show)
        {
            trackDataListIntervalText curDataList = new trackDataListIntervalText();

            string[] split = sData.Trim().Split(new string[] { cProjectData.splitMark }, StringSplitOptions.RemoveEmptyEntries);
            for (int i = 0; i < split.Length; i = i + 3)
            {
                float top    = float.Parse(split[i]);
                float bottom = float.Parse(split[i + 1]);
                if (dfDS1Show <= top && bottom <= dfDS2Show)
                {
                    curDataList.fListDS1.Add(top);
                    curDataList.fListDS2.Add(bottom);
                    curDataList.ltStrText.Add(split[i + 2]);
                }
            }
            return(curDataList);
        }