Esempio n. 1
0
/// <summary>
/// Get list from control removing blank lines & normalizing the ids
/// </summary>
/// <param name="CidList"></param>

        void GetNormalizedListFromControl(CidList CidList)
        {
            CidList.Clear();             // clear contents, keep name

            string[] cna = CidListCtl.Lines;

            bool allowDuplicates = !RemoveDuplicates.Checked;

            for (int i1 = 0; i1 < cna.Length; i1++)
            {
                string extCn = cna[i1];
                if (extCn.Trim() == "" || extCn.StartsWith("("))
                {
                    continue;
                }
                string intCid = CompoundId.Normalize(extCn, RootTable);
                if (String.IsNullOrEmpty(intCid))
                {
                    intCid = extCn;
                }
                CidList.Add(intCid, allowDuplicates);
            }
            return;
        }