예제 #1
0
파일: Element.cs 프로젝트: glcjr/Wixard
        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);

            //        }
            //    }
        }
예제 #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;
                }
            }
        }