Container traits to extensions

This commit is contained in:
2023-08-03 10:48:39 +02:00
parent 86cffa6aa4
commit 558a0a08bb
32 changed files with 258 additions and 158 deletions

View File

@@ -165,7 +165,7 @@ public class Tab : ITab
if (newLocation.FullName != null)
{
_tabEvents.OnLocationChanged(this, newLocation.FullName);
_tabEvents.OnLocationChanged(this, newLocation);
}
}
@@ -177,7 +177,7 @@ public class Tab : ITab
if (newLocation.FullName != null)
{
_tabEvents.OnLocationChanged(this, newLocation.FullName);
_tabEvents.OnLocationChanged(this, newLocation);
}
}

View File

@@ -4,10 +4,8 @@ namespace FileTime.Core.Services;
public class TabEvents : ITabEvents
{
public event EventHandler<TabLocationChanged> LocationChanged;
public event EventHandler<TabLocationChanged>? LocationChanged;
public void OnLocationChanged(ITab tab, FullName location)
{
LocationChanged?.Invoke(this, new TabLocationChanged(location, tab));
}
public void OnLocationChanged(ITab tab, IContainer location)
=> LocationChanged?.Invoke(this, new TabLocationChanged(location, tab));
}