You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
991 B
C#
33 lines
991 B
C#
using CommanderApp.Services;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace CommanderApp;
|
|
|
|
public partial class App : Application
|
|
{
|
|
public App()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
protected override Window CreateWindow(IActivationState? activationState)
|
|
{
|
|
// Создаем сервисы непосредственно в CreateWindow
|
|
var fileService = new FileSystemService();
|
|
var panelManager = new PanelManager();
|
|
var fileOperations = new FileOperations();
|
|
var keyboardService = new KeyboardService();
|
|
var pathHelper = new PathHelper();
|
|
|
|
var mainPage = new MainPage(fileService, panelManager, fileOperations, keyboardService, pathHelper);
|
|
var window = new Window(new AppShell(mainPage));
|
|
|
|
// Обработка закрытия окна
|
|
window.Destroying += (s, e) =>
|
|
{
|
|
// keyboardService?.Dispose();
|
|
};
|
|
|
|
return window;
|
|
}
|
|
} |