Force rerender on visibility change

This commit is contained in:
2023-08-12 09:09:17 +02:00
parent 1fde0df2d6
commit 16bdc1ed40
20 changed files with 292 additions and 147 deletions

View File

@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TerminalUI\TerminalUI.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,16 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace TerminalUI.DependencyInjection;
public static class TerminalUiServiceCollectionExtensions
{
public static IServiceCollection AddTerminalUi(this IServiceCollection collection)
{
collection.TryAddSingleton<IFocusManager, FocusManager>();
collection.TryAddSingleton<IRenderEngine, RenderEngine>();
collection.TryAddSingleton<IApplicationContext, ApplicationContext>();
collection.TryAddSingleton<IEventLoop, EventLoop>();
return collection;
}
}