- Added LogViewer control to display log messages with filtering options. - Integrated LogViewer into EditPage for better log management. - Updated EngineEditorWindow to navigate to EditPage. - Enhanced Logger implementation for improved performance and stack trace capturing. - Introduced PathUtility for path normalization. - Refactored AssetManager to correct shader asset type naming. - Removed obsolete AssetHandlerRegistryTests and cleaned up related tests. - Updated ImportCoordinatorTests for streamlined asset import process.
27 lines
797 B
C#
27 lines
797 B
C#
using Ghost.Editor.Core.Contracts;
|
|
using Ghost.Editor.Models;
|
|
using Microsoft.UI.Xaml.Data;
|
|
|
|
namespace Ghost.Editor.Utilities.Converters;
|
|
|
|
public partial class ExplorerItemToIconUriConverter : IValueConverter
|
|
{
|
|
private readonly IPreviewService _previewService = App.GetService<IPreviewService>();
|
|
|
|
public object Convert(object value, Type targetType, object parameter, string language)
|
|
{
|
|
if (value is ExplorerItem item)
|
|
{
|
|
var path = _previewService.GetIconPath(item.Path, item.IsDirectory, IconSize.Small);
|
|
return new Uri(path);
|
|
}
|
|
|
|
throw new NotSupportedException();
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|