Ejemplo n.º 1
0
        private void AddConfig(FilterConfig filterConfig)
        {
            var cc = new ColorItemCast(filterConfig)
            {
                Width               = 640,
                Height              = 40,
                VerticalAlignment   = VerticalAlignment.Top,
                HorizontalAlignment = HorizontalAlignment.Left
            };

            cc.OnRemoveThisClick += ColorItemCast_OnRemoveThisClick;
            cc.OnMoveUpClick     += Cc_OnMoveUpClick;
            cc.OnMoveDownClick   += Cc_OnMoveDownClick;
            configStack.Children.Insert(configStack.Children.Count - 1, cc);
        }
Ejemplo n.º 2
0
        private bool TryFindColorItemCast(int id, out ColorItemCast colorItemCast, out int index)
        {
            colorItemCast = null;
            index         = -1;

            foreach (ColorItemCast cc in ForeachColorItemCast())
            {
                index++;
                if (cc.ID == id)
                {
                    colorItemCast = cc;
                    return(true);
                }
            }
            return(false);
        }