public DescriptionPane GetContent()
        {
            TaggingBar bar = new TaggingBar();
            bar.StatusVisible = false;
            List<ClassTagRecord> stus;
            bar.GetTagsDelegate = key =>
            {
                stus = K12.Data.ClassTag.SelectByClassID(key);
                return stus.ConvertAll<GeneralTagRecord>(x => x);
            };

            bar.GetDescriptionDelegate = key =>
            {
                ClassRecord cls = Class.SelectByID(key);

                string desc = cls.Name;
                if (cls.Teacher != null)
                    desc = string.Format("{0} (導師:{1})", cls.Name, cls.Teacher.Name);

                return desc;
            };

            ClassTag.AfterInsert += bar.TagRecordChangedEventHandler;
            ClassTag.AfterUpdate += bar.TagRecordChangedEventHandler;
            ClassTag.AfterDelete += bar.TagRecordChangedEventHandler;

            bar.Disposed += delegate
            {
                ClassTag.AfterInsert -= bar.TagRecordChangedEventHandler;
                ClassTag.AfterUpdate -= bar.TagRecordChangedEventHandler;
                ClassTag.AfterDelete -= bar.TagRecordChangedEventHandler;
            };

            return bar;
        }
        public DescriptionPane GetContent()
        {
            TaggingBar bar = new TaggingBar();
            bar.StatusVisible = false;
            List<TeacherTagRecord> stus;
            bar.GetTagsDelegate = key =>
            {
                stus = K12.Data.TeacherTag.SelectByTeacherID(key);
                return stus.ConvertAll<GeneralTagRecord>(x => x);
            };

            bar.GetDescriptionDelegate = key =>
            {
                TeacherRecord record = Teacher.SelectByID(key);
                return string.Format("{0}", record.Name);
            };

            TeacherTag.AfterInsert += bar.TagRecordChangedEventHandler;
            TeacherTag.AfterUpdate += bar.TagRecordChangedEventHandler;
            TeacherTag.AfterDelete += bar.TagRecordChangedEventHandler;

            bar.Disposed += delegate
            {
                TeacherTag.AfterInsert -= bar.TagRecordChangedEventHandler;
                TeacherTag.AfterUpdate -= bar.TagRecordChangedEventHandler;
                TeacherTag.AfterDelete -= bar.TagRecordChangedEventHandler;
            };

            return bar;
        }
        public DescriptionPane GetContent()
        {
            TaggingBar bar = new TaggingBar();
            bar.StatusVisible = true;
            List<StudentTagRecord> stus;

            bar.GetTagsDelegate = key =>
            {
                stus = K12.Data.StudentTag.SelectByStudentID(key);
                return stus.ConvertAll<GeneralTagRecord>(x => x);
            };

            bar.GetDescriptionDelegate = key =>
            {
                StudentRecord stu = Student.SelectByID(key);

                if (stu.Class == null)
                    return string.Format("{0} {1}", stu.Name, stu.StudentNumber);
                else
                {
                    if (stu.SeatNo == null)
                        return string.Format("{0} {1} {2}", stu.Class.Name, stu.Name, stu.StudentNumber);
                    else
                        return string.Format("{0}({1}) {2} {3}", stu.Class.Name, stu.SeatNo, stu.Name, stu.StudentNumber);
                }
            };

            StudentTag.AfterInsert += bar.TagRecordChangedEventHandler;
            StudentTag.AfterUpdate += bar.TagRecordChangedEventHandler;
            StudentTag.AfterDelete += bar.TagRecordChangedEventHandler;

            bar.Disposed += delegate
            {
                StudentTag.AfterInsert -= bar.TagRecordChangedEventHandler;
                StudentTag.AfterUpdate -= bar.TagRecordChangedEventHandler;
                StudentTag.AfterDelete -= bar.TagRecordChangedEventHandler;
            };

            return bar;
        }