- fix: UpdateResolver preview think
This commit is contained in:
@@ -24,5 +24,5 @@ public static class TypeConverters
|
||||
});
|
||||
|
||||
public static FuncValueConverter<string, Avalonia.Media.Color> NameColorRepresentation { get; } =
|
||||
new(ColorUtils.GetColorFromString);
|
||||
new((str)=>ColorUtils.GetColorFromString(str ?? throw new ArgumentNullException(nameof(str),"Name of color is null!")));
|
||||
}
|
||||
@@ -54,6 +54,4 @@ public static class LauncherConVar
|
||||
public static readonly ConVar<string> CurrentLang = ConVarBuilder.Build<string>("launcher.language", CultureInfo.CurrentCulture.Name);
|
||||
public static readonly ConVar<string> ILSpyUrl = ConVarBuilder.Build<string>("decompiler.url",
|
||||
"https://github.com/icsharpcode/ILSpy/releases/download/v9.0/ILSpy_binaries_9.0.0.7889-x64.zip");
|
||||
|
||||
|
||||
}
|
||||
@@ -72,10 +72,6 @@ public class LocaledText : MarkupExtension
|
||||
|
||||
public LocaledText(string key) => Key = key;
|
||||
|
||||
public LocaledText()
|
||||
{
|
||||
}
|
||||
|
||||
public override object ProvideValue(IServiceProvider serviceProvider)
|
||||
{
|
||||
return LocalisationService.GetString(Key, Options);
|
||||
|
||||
@@ -416,7 +416,20 @@ public abstract class BaseFolderContentEntry : ViewModelBase, IContentEntry
|
||||
private Dictionary<string, IContentEntry> _childs = [];
|
||||
|
||||
public string IconPath => "/Assets/svg/folder.svg";
|
||||
public IContentHolder Holder { get; private set; }
|
||||
|
||||
private IContentHolder? _holder = null;
|
||||
public IContentHolder Holder
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_holder == null)
|
||||
throw new InvalidOperationException(
|
||||
GetType().Name + " was not initialised! Call Init(IContentHolder holder, string? name = null) before using it.");
|
||||
|
||||
return _holder;
|
||||
}
|
||||
}
|
||||
|
||||
public IContentEntry? Parent { get; set; }
|
||||
public string? Name { get; private set; }
|
||||
|
||||
@@ -432,7 +445,7 @@ public abstract class BaseFolderContentEntry : ViewModelBase, IContentEntry
|
||||
public void Init(IContentHolder holder, string? name = null)
|
||||
{
|
||||
Name = name;
|
||||
Holder = holder;
|
||||
_holder = holder;
|
||||
}
|
||||
|
||||
public T AddChild<T>(T child) where T: IContentEntry
|
||||
|
||||
Reference in New Issue
Block a user