aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--EventMaker/EventMaker/Model/EventCatalogSingleton.cs8
-rw-r--r--EventMaker/EventMaker/ViewModel/EventViewModel.cs2
2 files changed, 5 insertions, 5 deletions
diff --git a/EventMaker/EventMaker/Model/EventCatalogSingleton.cs b/EventMaker/EventMaker/Model/EventCatalogSingleton.cs
index 26a5d90..9c8713b 100644
--- a/EventMaker/EventMaker/Model/EventCatalogSingleton.cs
+++ b/EventMaker/EventMaker/Model/EventCatalogSingleton.cs
@@ -85,7 +85,7 @@ namespace EventMaker.Model
sorted = false;
for (int i = 0; i < Events.Count - 1; i++)
{
- if (string.CompareOrdinal(Events[i].Name, Events[i + 1].Name) == 1)
+ 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 (int i = 0; i < Events.Count - 1; i++)
{
- if (string.CompareOrdinal(Events[i].Name, Events[i + 1].Name) == -1)
+ if (string.CompareOrdinal(Events[i].Name, Events[i + 1].Name) <= 0)
{
Events.Move(i, i + 1);
sorted = true;
@@ -115,7 +115,7 @@ namespace EventMaker.Model
sorted = false;
for (int i = 0; i < Events.Count - 1; i++)
{
- if (string.CompareOrdinal(Events[i].Place, Events[i + 1].Place) == 1)
+ if (string.CompareOrdinal(Events[i].Place, Events[i + 1].Place) >= 0)
{
Events.Move(i, i + 1);
sorted = true;
@@ -130,7 +130,7 @@ namespace EventMaker.Model
sorted = false;
for (int i = 0; i < Events.Count - 1; i++)
{
- if (string.CompareOrdinal(Events[i].Place, Events[i + 1].Place) == -1)
+ if (string.CompareOrdinal(Events[i].Place, Events[i + 1].Place) <= 0)
{
Events.Move(i, i + 1);
sorted = true;
diff --git a/EventMaker/EventMaker/ViewModel/EventViewModel.cs b/EventMaker/EventMaker/ViewModel/EventViewModel.cs
index b72672b..da6c47d 100644
--- a/EventMaker/EventMaker/ViewModel/EventViewModel.cs
+++ b/EventMaker/EventMaker/ViewModel/EventViewModel.cs
@@ -15,7 +15,7 @@ namespace EventMaker.ViewModel
private static string _selectedSortValue = "date (ascending)";
public EventCatalogSingleton EventCatalogSingleton { get; set; } = EventCatalogSingleton.Instance;
public static int SelectedEventIndex { get; set; }
- public static ObservableCollection<string> SortValues { get; set; } = new ObservableCollection<string>() {"date (ascending)","date (descending)"/*, "name (ascending)","name (descending)" ,"place (ascending)", "place (descending)"*/ };
+ public static ObservableCollection<string> SortValues { get; set; } = new ObservableCollection<string>() {"date (ascending)","date (descending)", "name (ascending)","name (descending)" ,"place (ascending)", "place (descending)" };
public static DateTimeOffset Date { get; set; } = DateTimeOffset.Now;
public static TimeSpan Time { get; set; }
public ICommand CreateEventCommand { get; set; }