-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More work on Sorting/Filtering + Removal of redundant page code
- Loading branch information
Showing
12 changed files
with
1,161 additions
and
132 deletions.
There are no files selected for viewing
531 changes: 531 additions & 0 deletions
531
FadedVanguardLogUploader/Resources/Lang/Resources.Designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Avalonia.Data; | ||
using Avalonia.Data.Converters; | ||
using FadedVanguardLogUploader.Enums; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace FadedVanguardLogUploader.Utils.Converter | ||
{ | ||
public class EnumConverter : IValueConverter | ||
{ | ||
public static readonly EnumConverter Instance = new(); | ||
|
||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) | ||
{ | ||
return value?.Equals(parameter); | ||
} | ||
|
||
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) | ||
{ | ||
return value?.Equals(true) == true ? parameter : BindingOperations.DoNothing; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,23 @@ | ||
using FadedVanguardLogUploader.Enums; | ||
using FadedVanguardLogUploader.Models; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace FadedVanguardLogUploader.Utils | ||
{ | ||
internal class Filter | ||
{ | ||
public DateTimeOffset timeOffsetMin = DateTimeOffset.MinValue; | ||
public DateTimeOffset timeOffsetMax = DateTimeOffset.MaxValue; | ||
public Encounter encounter = Encounter.Empty; | ||
public Specialization specialization = Specialization.Empty; | ||
public List<Encounter> encounter = new(); | ||
// TODO Implement Spec filtering | ||
//public Specialization specialization = Specialization.Empty; | ||
|
||
public bool Predicate(ListItem i) | ||
{ | ||
if (encounter == Encounter.Empty && specialization == Specialization.Empty) | ||
return i.CreationDate >= timeOffsetMin && | ||
i.CreationDate <= timeOffsetMax; | ||
if (encounter == Encounter.Empty && specialization != Specialization.Empty) | ||
return i.CreationDate >= timeOffsetMin && | ||
i.CreationDate <= timeOffsetMax && | ||
i.CharcterSpec == specialization; | ||
if(encounter != Encounter.Empty && specialization == Specialization.Empty) | ||
return i.CreationDate >= timeOffsetMin && | ||
i.CreationDate <= timeOffsetMax && | ||
i.Encounter == encounter; | ||
return i.CreationDate >= timeOffsetMin && | ||
i.CreationDate <= timeOffsetMax && | ||
i.Encounter == encounter && | ||
i.CharcterSpec == specialization; | ||
return (encounter.Count == 0 || encounter.Contains(i.Encounter)) | ||
&& i.CreationDate >= timeOffsetMin | ||
&& i.CreationDate <= timeOffsetMax; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.