示例#1
0
        private void RemoveActualString(string property_name, string value_to_remove)
        {
            ValueList current_vl = _DocNodeRef.GetList(property_name, VALUE_SUBSCRIPT);
            ValueList new_vl     = GlobalsDocDB.ActiveConnection().CreateList();

            string loop_str = current_vl.GetNextString();

            while (loop_str != null)
            {
                if (loop_str != value_to_remove)
                {
                    new_vl.Append(loop_str);
                }

                loop_str = current_vl.GetNextString();
            }

            _DocNodeRef.Set(new_vl, property_name, VALUE_SUBSCRIPT);

            current_vl.Close();
            new_vl.Close();
        }
示例#2
0
        private List <string> GetActualStringList(string property_name)
        {
            List <string> working_list = new List <string>();

            try
            {
                ValueList string_vl = _DocNodeRef.GetList(property_name, VALUE_SUBSCRIPT);

                for (int loop_ix = 1; loop_ix <= string_vl.Length; loop_ix++)
                {
                    string loop_str = string_vl.GetNextString();
                    working_list.Add(loop_str);
                }
                string_vl.Close();
                return(working_list);
            }
            catch
            {
                return(null);
            }
        }