From 7610b2d2a826a6d7dcac1faebfb00cdeec1cf6c8 Mon Sep 17 00:00:00 2001 From: marcinzelent Date: Sun, 26 Feb 2017 00:46:36 +0100 Subject: Fixed sorting. --- EventMaker/EventMaker/Model/EventCatalogSingleton.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/EventMaker/EventMaker/Model/EventCatalogSingleton.cs b/EventMaker/EventMaker/Model/EventCatalogSingleton.cs index d82c41c..9553017 100644 --- a/EventMaker/EventMaker/Model/EventCatalogSingleton.cs +++ b/EventMaker/EventMaker/Model/EventCatalogSingleton.cs @@ -74,7 +74,7 @@ namespace EventMaker.Model { sorted = false; for (var i = 0; i < Events.Count - 1; i++) - if (string.CompareOrdinal(Events[i].Name, Events[i + 1].Name) >= 0) + if (string.CompareOrdinal(Events[i].Name, Events[i + 1].Name) > 0) { Events.Move(i, i + 1); sorted = true; @@ -87,7 +87,7 @@ namespace EventMaker.Model { sorted = false; for (var i = 0; i < Events.Count - 1; i++) - if (string.CompareOrdinal(Events[i].Name, Events[i + 1].Name) <= 0) + if (string.CompareOrdinal(Events[i].Name, Events[i + 1].Name) < 0) { Events.Move(i, i + 1); sorted = true; @@ -100,7 +100,7 @@ namespace EventMaker.Model { sorted = false; for (var i = 0; i < Events.Count - 1; i++) - if (string.CompareOrdinal(Events[i].Place, Events[i + 1].Place) >= 0) + if (string.CompareOrdinal(Events[i].Place, Events[i + 1].Place) > 0) { Events.Move(i, i + 1); sorted = true; @@ -113,7 +113,7 @@ namespace EventMaker.Model { sorted = false; for (var i = 0; i < Events.Count - 1; i++) - if (string.CompareOrdinal(Events[i].Place, Events[i + 1].Place) <= 0) + if (string.CompareOrdinal(Events[i].Place, Events[i + 1].Place) < 0) { Events.Move(i, i + 1); sorted = true; -- cgit v1.2.3