Skip to content

Commit

Permalink
Getters are changed to property
Browse files Browse the repository at this point in the history
  • Loading branch information
iconstudio committed Oct 3, 2023
1 parent a33c715 commit 0c48f7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Editor/TestEditor/Contents/MapHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ internal static class MapHelper
private static Map? loadedMap;
private static List<Map> storedMaps;

public static string MapExtension => mapFileExtension;
public static StorageFile LastFile { get; private set; }
public static List<Map> Maps => storedMaps;
public static JsonSerializerOptions MapLoadSetting { get; }
public static JsonSerializerOptions MapSaveSetting { get; }

Expand Down Expand Up @@ -76,7 +78,7 @@ static MapHelper()
}
public static Task SaveMap(in Map? map, in StorageFolder dest)
{
return SaveMap(map, string.Format(null, "{0}{1}{2}", dest.Path, map?.Name, GetMapExtension()));
return SaveMap(map, string.Format(null, "{0}{1}{2}", dest.Path, map?.Name, MapExtension));
}
public static Task SaveMap(in Map? map, in StorageFile filepath)
{
Expand Down Expand Up @@ -115,8 +117,6 @@ public static void MemoLastFile(in StorageFile file)
{
LastFile = file;
}
public static string GetMapExtension() => mapFileExtension;
public static List<Map> GetMaps() => storedMaps;

}
}
4 changes: 2 additions & 2 deletions Editor/TestEditor/Utilities/FilePickHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static IAsyncOperation<StorageFile> OpenLoadPicker(Window window)
ViewMode = PickerViewMode.Thumbnail
};
picker.FileTypeFilter.Clear();
picker.FileTypeFilter.Add(MapHelper.GetMapExtension());
picker.FileTypeFilter.Add(MapHelper.MapExtension);

var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(window);
WinRT.Interop.InitializeWithWindow.Initialize(picker, hwnd);
Expand All @@ -26,7 +26,7 @@ public static IAsyncOperation<StorageFile> OpenSavePicker(Window window)
{
FileSavePicker picker = new();
picker.FileTypeChoices.Clear();
picker.FileTypeChoices.Add("Map File", new List<string>() { MapHelper.GetMapExtension() });
picker.FileTypeChoices.Add("Map File", new List<string>() { MapHelper.MapExtension });
//picker.FileTypeChoices.Add("Archieved Map File", new List<string>() { ".zip" });

var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(window);
Expand Down

0 comments on commit 0c48f7e

Please sign in to comment.