Exemplo n.º 1
0
        public void RemoveCustomElement(string oldlabel, string oldvalue)
        {
            int  index = 0;
            bool found = false;

            while ((Attributes.FindLabel(oldlabel, index, out index)) && (!found))
            {
                if (Attributes[index].GetValue().Equals(oldvalue))
                {
                    Attributes.RemoveAt(index);
                    found = true;
                }
            }
            //bool found = false;
            //for (int index = 0; index < Attributes.Count; index++)
            //    if ((Attributes[index].GetLabel().Equals(oldlabel)) && (!found))
            //    {
            //        if (Attributes[index].GetValue().Equals(oldvalue))
            //        {
            //            found = true;
            //            Attributes.RemoveAt(index);

            //        }
            //    }
        }
Exemplo n.º 2
0
        public void RemoveCustomElement(string oldlabel, string oldvalue)
        {
            int  index = 0;
            bool found = false;

            while ((Options.FindLabel(oldlabel, index, out index)) && (!found))
            {
                if (Options[index].GetValue().Equals(oldvalue))
                {
                    Options.RemoveAt(index);
                    found = true;
                }
            }
        }