Batch Update
This commit is contained in:
parent
693d12b61c
commit
4c2b5cca93
32 changed files with 483 additions and 332 deletions
32
app/InkForge.Desktop/ViewModels/MainViewModel.cs
Normal file
32
app/InkForge.Desktop/ViewModels/MainViewModel.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
using Avalonia;
|
||||
|
||||
using Dock.Model.Core;
|
||||
|
||||
using InkForge.Desktop.Managers;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using ReactiveUI;
|
||||
|
||||
namespace InkForge.Desktop.ViewModels;
|
||||
|
||||
public class MainViewModel : ReactiveObject
|
||||
{
|
||||
private readonly DocumentManager _documentManager;
|
||||
public IDock Layout { get; }
|
||||
|
||||
public MainViewModel(InkForgeFactory factory)
|
||||
{
|
||||
Layout = factory.CreateLayout();
|
||||
factory.InitLayout(Layout);
|
||||
|
||||
_documentManager = CreateDocumentManager();
|
||||
}
|
||||
|
||||
private static DocumentManager CreateDocumentManager()
|
||||
{
|
||||
return ActivatorUtilities.CreateInstance<DocumentManager>(
|
||||
Application.Current!.GetValue(App.ServiceProviderProperty)
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue