Пример #1
0
        private void EditList_Click(object sender, EventArgs e)
        {
            string        listText = CidListString.Trim();
            List <string> al       = Csv.SplitCsvString(listText);
            CidList       cnList   = new CidList(al, true);

            cnList.UserObject.Name = "Criteria List";
            cnList.UserObject.Id   = CidListEditor.EditInMemoryOnlyUoId;           // indicate not to be persisted to user object
            cnList = CidListEditor.Edit(cnList, Qc.MetaColumn.MetaTable.Root);
            if (cnList == null)
            {
                return;
            }

            CidListString = CidList.BuildListCsvStringOfFormattedCids(Qc, cnList.ToStringList());
            SetCidListDisplay();
            if (CidListDisplayIsEditable() && CidListString.Length > 0)             // no text selected
            {
                CidListDisplay.Select(0, 0);
            }
            else
            {
                InList.Focus();
            }
        }
Пример #2
0
        private void ImportList_Click(object sender, EventArgs e)
        {
            string filePath = UIMisc.SelectListFileDialog("List File to Import", "");

            if (String.IsNullOrEmpty(filePath))
            {
                return;
            }

            string  fileName = Path.GetFileNameWithoutExtension(filePath);
            CidList cnList   = CidList.ReadFromFile(filePath);           // read file list

            if (cnList == null)
            {
                return;
            }

            CidListString = CidList.BuildListCsvStringOfFormattedCids(Qc, cnList.ToStringList());
            SetCidListDisplay();
            if (CidListDisplay.Text.Length > 0)             // no text selected
            {
                CidListDisplay.Select(0, 0);
            }
            return;
        }