int SortFunc(TreeModel model, TreeIter a, TreeIter b) { ProjectDescription p1, p2; p1 = (ProjectDescription)model.GetValue(a, COL_PROJECT_DESCRIPTION); p2 = (ProjectDescription)model.GetValue(b, COL_PROJECT_DESCRIPTION); return(ProjectDescription.Sort(p1, p2, (ProjectSortType)sortcombobox.Active)); }
protected override int HandleSort (TreeModel model, TreeIter a, TreeIter b) { SportsProjectVM p1, p2; p1 = model.GetValue (a, COL_DATA) as SportsProjectVM; p2 = model.GetValue (b, COL_DATA) as SportsProjectVM; if (p1 == null && p2 == null) { return 0; } else if (p1 == null) { return -1; } else if (p2 == null) { return 1; } return ProjectDescription.Sort (p1.Model.Description, p2.Model.Description, SortType); }
protected override int HandleSort(TreeModel model, TreeIter a, TreeIter b) { LMProjectVM p1, p2; p1 = (LMProjectVM)model.GetValue(a, COL_DATA); p2 = (LMProjectVM)model.GetValue(b, COL_DATA); if (p1 == null && p2 == null) { return(0); } else if (p1 == null) { return(-1); } else if (p2 == null) { return(1); } return(ProjectDescription.Sort(p1.Model.Description, p2.Model.Description, ViewModel.SortType)); }
int SortFunc(TreeModel model, TreeIter a, TreeIter b) { LMProject p1, p2; p1 = (LMProject)model.GetValue(a, COL_PROJECT); p2 = (LMProject)model.GetValue(b, COL_PROJECT); if (p1 == null && p2 == null) { return(0); } else if (p1 == null) { return(-1); } else if (p2 == null) { return(1); } return(ProjectDescription.Sort(p1.Description, p2.Description, (ProjectSortType)sortcombobox.Active)); }