mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
27 lines
725 B
C#
27 lines
725 B
C#
using Remotely.Desktop.Shared;
|
|
using Remotely.Desktop.Shared.Abstractions;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace Remotely.Desktop.UI.Services;
|
|
|
|
public class SessionIndicator : ISessionIndicator
|
|
{
|
|
private readonly IUiDispatcher _dispatcher;
|
|
|
|
public SessionIndicator(IUiDispatcher dispatcher)
|
|
{
|
|
_dispatcher = dispatcher;
|
|
}
|
|
public void Show()
|
|
{
|
|
_dispatcher.Post(() =>
|
|
{
|
|
var indicatorWindow = new SessionIndicatorWindow()
|
|
{
|
|
DataContext = StaticServiceProvider.Instance?.GetRequiredService<ISessionIndicatorWindowViewModel>()
|
|
};
|
|
_dispatcher.ShowMainWindow(indicatorWindow);
|
|
});
|
|
}
|
|
}
|