예제 #1
0
        public override void Drop(AyDropInfo dropInfo)
        {
            IList         ChuShiList = GetList(dropInfo.TargetCollection);
            StringBuilder chuSb      = new StringBuilder();

            foreach (var item in ChuShiList)
            {
                PupilViewModel dd = item as PupilViewModel;
                if (dd != null)
                {
                    chuSb.Append(dd.FullName + ",");
                }
            }
            base.Drop(dropInfo);
            IList         destinationList = GetList(dropInfo.TargetCollection);
            StringBuilder endSb           = new StringBuilder();

            foreach (var item in destinationList)
            {
                PupilViewModel dd = item as PupilViewModel;
                if (dd != null)
                {
                    endSb.Append(dd.FullName + ",");
                }
            }
            if (chuSb.ToString() != endSb.ToString())
            {
                MessageBox.Show("拖放前顺序:" + chuSb.ToString() + "\n拖放后顺序:" + endSb.ToString());
            }
        }
예제 #2
0
        void IAyDropTarget.Drop(AyDropInfo dropInfo)
        {
            SchoolViewModel school = (SchoolViewModel)dropInfo.TargetItem;
            PupilViewModel  pupil  = (PupilViewModel)dropInfo.Data;

            school.Pupils.Add(pupil);

            ((IList)dropInfo.DragInfo.SourceCollection).Remove(pupil);
        }
예제 #3
0
        public void DoubleClickItem(AyDragInfo dragInfo)
        {
            PupilViewModel pupil = dragInfo.SourceItem as PupilViewModel;

            MessageBox.Show("播放歌曲:" + pupil.FullName);
        }