Пример #1
0
        public List <array_item> getSplitItems()
        {
            List <array_item> list = new List <array_item>();

            foreach (search_item si in search_items)
            {
                if (si.split > 0)
                {
                    if (si.row_text != null)
                    {
                        string[]   array = (si.value).Split(",");
                        array_item ai    = new array_item {
                            name   = si.name,
                            values = array,
                        };
                        list.Add(ai);
                    }
                }
            }
            if (list.Count == 0)
            {
                return(null);
            }
            return(list);
        }
Пример #2
0
        private int findChannelCol(search_table st, string[] array_names = null)
        {
            int        colChannel = NOT_FOUND;
            array_item ai2        = null;

            if (array_items == null)
            {
                return(NOT_FOUND);
            }

            if (array_names == null)
            {
                array_names = new string [] { "CalibrationFactors", "Logger channel" };
            }

            foreach (string array_name in array_names)
            {
                ai2 = array_items.Find(a => a.name == array_name);
                if (ai2 != null)
                {
                    break;
                }
            }

            if (ai2 == null)
            {
                return(NOT_FOUND);
            }

            foreach (value_header vh in st.headers)
            {
                for (int i = 0; i < ai2.values.Length; i++)
                {
                    if (ai2.values[i] != null)
                    {
                        if (vh.name == ai2.values[i])
                        {
                            colChannel = i;
                            break;
                        }
                    }
                }
            }

            return(colChannel);
        }