Ejemplo n.º 1
0
 public PlaysTreeView()
 {
     enableCategoryMove = true;
     targetEntry        = new TargetEntry [] { new TargetEntry("event-type-dnd", TargetFlags.Widget, 0) };
     targetList         = new TargetList(targetEntry);
     this.EnableModelDragDest(targetEntry, DragAction.Move);
     eventTypeMenu = new EventTypeMenu();
     eventTypeMenu.EditProperties += (cat) => EditProperties(cat);
     eventTypeMenu.SortEvent      += (sender, e) => modelSort.SetSortFunc(0, SortFunction);
 }
        public LMTimelineEventsTreeView()
        {
            menu          = new SportsPlaysMenu();
            eventTypeMenu = new EventTypeMenu();

            // FIXME: Fix the behaviour in the tree view
            menu.EditPlayEvent += (sender, e) =>
                                  ViewModel.EditionCommand.Execute(ViewModel.FullTimeline.Selection.First().Model);
            eventTypeMenu.EditProperties += (cat) => OnEditProperties(cat);
            ShowExpanders            = false;
            eventTypeMenu.SortEvent += (sender, e) => sort.SetSortFunc(0, HandleSort);
        }
        public LMTimelineEventsTreeView()
        {
            menu          = new SportsPlaysMenu();
            eventTypeMenu = new EventTypeMenu();

            // FIXME: Fix the behaviour in the tree view
            menu.EditPlayEvent += (sender, e) =>
                                  ViewModel.EditionCommand.Execute(ViewModel.FullTimeline.Selection.First().Model);
            eventTypeMenu.EditProperties += (cat) => OnEditProperties(cat);
            ShowExpanders            = false;
            eventTypeMenu.SortEvent += (sender, e) => sort.SetSortFunc(0, HandleSort);
            CreateDragDest(new [] { new TargetEntry(Constants.EventElementsDND, TargetFlags.App, 0) });
            CreateDragSource(new [] { new TargetEntry(Constants.EventElementsDND, TargetFlags.App, 0) });
        }