Beispiel #1
0
        public static void MoveTier(ITiers h0, int ix0, ITiers h1, int ix1)
        {
            if (h0 == h1)
            {
                if (ix0 != ix1)
                    h0.Tiers.Move(ix0, ix1);
            }
            else
            {
                var told = h0[ix0];
                h0.RemoveAt(ix0);
                (told.TiersHost = h1).Insert(ix1, told);

                IHostedItem hi;
                if (h0.Count == 0 && (hi = h0 as IHostedItem) != null)
                {
                    Debug.Print("drag removing {0} from {1}", hi.GetType().Name, hi.Host.GetType().Name);
                    hi.Host.GetList().Remove(hi);
                }
            }
        }