This commit is contained in:
Alex 2024-12-01 19:16:14 +03:00
commit 8efb380f5a
340 changed files with 19928 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\presnce.sln",
"PreviewInSolutionExplorer": false
}

BIN
.vs/presence_api/v17/.wsuo Normal file

Binary file not shown.

View File

@ -0,0 +1,23 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\prdb\\source\\repos\\presence_api\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
}
]
}
]
}
]
}

View File

@ -0,0 +1,23 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\adm\\source\\repos\\presence_api\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
}
]
}
]
}
]
}

Binary file not shown.

View File

@ -0,0 +1,23 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\sokol\\source\\repos\\presence_api123\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
}
]
}
]
}
]
}

Binary file not shown.

Binary file not shown.

BIN
.vs/presnce/v17/.suo Normal file

Binary file not shown.

View File

@ -0,0 +1,125 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\sokol\\source\\repos\\presence_api123\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|c:\\users\\sokol\\source\\repos\\presence_api123\\presence.desktop\\app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|solutionrelative:presence.desktop\\app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|c:\\users\\sokol\\source\\repos\\presence_api123\\presence.desktop\\di\\servicecollectionextensions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|solutionrelative:presence.desktop\\di\\servicecollectionextensions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|c:\\users\\sokol\\source\\repos\\presence_api123\\presence.desktop\\viewmodels\\mainwindowviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|solutionrelative:presence.desktop\\viewmodels\\mainwindowviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|c:\\users\\sokol\\source\\repos\\presence_api123\\presence.desktop\\views\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|solutionrelative:presence.desktop\\views\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{4C6194FF-B704-406B-89A7-03C2EE38A899}|domain\\domain.csproj|c:\\users\\sokol\\source\\repos\\presence_api123\\domain\\usecase\\groupusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C6194FF-B704-406B-89A7-03C2EE38A899}|domain\\domain.csproj|solutionrelative:domain\\usecase\\groupusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C6194FF-B704-406B-89A7-03C2EE38A899}|domain\\domain.csproj|c:\\users\\sokol\\source\\repos\\presence_api123\\domain\\usecase\\igroupusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C6194FF-B704-406B-89A7-03C2EE38A899}|domain\\domain.csproj|solutionrelative:domain\\usecase\\igroupusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 2,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "MainWindowViewModel.cs",
"DocumentMoniker": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\ViewModels\\MainWindowViewModel.cs",
"RelativeDocumentMoniker": "Presence.Desktop\\ViewModels\\MainWindowViewModel.cs",
"ToolTip": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\ViewModels\\MainWindowViewModel.cs",
"RelativeToolTip": "Presence.Desktop\\ViewModels\\MainWindowViewModel.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAApAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-01T16:09:42.001Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "App.axaml.cs",
"DocumentMoniker": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\App.axaml.cs",
"RelativeDocumentMoniker": "Presence.Desktop\\App.axaml.cs",
"ToolTip": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\App.axaml.cs",
"RelativeToolTip": "Presence.Desktop\\App.axaml.cs",
"ViewState": "AgIAAAQAAAAAAAAAAAAvwBoAAAAzAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-01T16:06:19.277Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "GroupUseCase.cs",
"DocumentMoniker": "C:\\Users\\sokol\\source\\repos\\presence_api123\\domain\\UseCase\\GroupUseCase.cs",
"RelativeDocumentMoniker": "domain\\UseCase\\GroupUseCase.cs",
"ToolTip": "C:\\Users\\sokol\\source\\repos\\presence_api123\\domain\\UseCase\\GroupUseCase.cs",
"RelativeToolTip": "domain\\UseCase\\GroupUseCase.cs",
"ViewState": "AgIAAB0AAAAAAAAAAAAwwAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-01T16:03:21.763Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "IGroupUseCase.cs",
"DocumentMoniker": "C:\\Users\\sokol\\source\\repos\\presence_api123\\domain\\UseCase\\IGroupUseCase.cs",
"RelativeDocumentMoniker": "domain\\UseCase\\IGroupUseCase.cs",
"ToolTip": "C:\\Users\\sokol\\source\\repos\\presence_api123\\domain\\UseCase\\IGroupUseCase.cs",
"RelativeToolTip": "domain\\UseCase\\IGroupUseCase.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAA0AAAAvAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-01T16:02:55.7Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "ServiceCollectionExtensions.cs",
"DocumentMoniker": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\DI\\ServiceCollectionExtensions.cs",
"RelativeDocumentMoniker": "Presence.Desktop\\DI\\ServiceCollectionExtensions.cs",
"ToolTip": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\DI\\ServiceCollectionExtensions.cs",
"RelativeToolTip": "Presence.Desktop\\DI\\ServiceCollectionExtensions.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABkAAAAFAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-01T15:54:35.248Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "MainWindow.axaml",
"DocumentMoniker": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\Views\\MainWindow.axaml",
"RelativeDocumentMoniker": "Presence.Desktop\\Views\\MainWindow.axaml",
"ToolTip": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\Views\\MainWindow.axaml",
"RelativeToolTip": "Presence.Desktop\\Views\\MainWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2024-12-01T15:39:55.321Z",
"EditorCaption": ""
}
]
}
]
}
]
}

View File

@ -0,0 +1,125 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\sokol\\source\\repos\\presence_api123\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|c:\\users\\sokol\\source\\repos\\presence_api123\\presence.desktop\\app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|solutionrelative:presence.desktop\\app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|c:\\users\\sokol\\source\\repos\\presence_api123\\presence.desktop\\di\\servicecollectionextensions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|solutionrelative:presence.desktop\\di\\servicecollectionextensions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|c:\\users\\sokol\\source\\repos\\presence_api123\\presence.desktop\\viewmodels\\mainwindowviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|solutionrelative:presence.desktop\\viewmodels\\mainwindowviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|c:\\users\\sokol\\source\\repos\\presence_api123\\presence.desktop\\views\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{197B665D-A688-4661-8C15-52CD08344229}|Presence.Desktop\\Presence.Desktop.csproj|solutionrelative:presence.desktop\\views\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{4C6194FF-B704-406B-89A7-03C2EE38A899}|domain\\domain.csproj|c:\\users\\sokol\\source\\repos\\presence_api123\\domain\\usecase\\groupusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C6194FF-B704-406B-89A7-03C2EE38A899}|domain\\domain.csproj|solutionrelative:domain\\usecase\\groupusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C6194FF-B704-406B-89A7-03C2EE38A899}|domain\\domain.csproj|c:\\users\\sokol\\source\\repos\\presence_api123\\domain\\usecase\\igroupusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C6194FF-B704-406B-89A7-03C2EE38A899}|domain\\domain.csproj|solutionrelative:domain\\usecase\\igroupusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 2,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "MainWindowViewModel.cs",
"DocumentMoniker": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\ViewModels\\MainWindowViewModel.cs",
"RelativeDocumentMoniker": "Presence.Desktop\\ViewModels\\MainWindowViewModel.cs",
"ToolTip": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\ViewModels\\MainWindowViewModel.cs",
"RelativeToolTip": "Presence.Desktop\\ViewModels\\MainWindowViewModel.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAApAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-01T16:09:42.001Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "App.axaml.cs",
"DocumentMoniker": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\App.axaml.cs",
"RelativeDocumentMoniker": "Presence.Desktop\\App.axaml.cs",
"ToolTip": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\App.axaml.cs",
"RelativeToolTip": "Presence.Desktop\\App.axaml.cs",
"ViewState": "AgIAAA0AAAAAAAAAAAAswBoAAAAzAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-01T16:06:19.277Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "GroupUseCase.cs",
"DocumentMoniker": "C:\\Users\\sokol\\source\\repos\\presence_api123\\domain\\UseCase\\GroupUseCase.cs",
"RelativeDocumentMoniker": "domain\\UseCase\\GroupUseCase.cs",
"ToolTip": "C:\\Users\\sokol\\source\\repos\\presence_api123\\domain\\UseCase\\GroupUseCase.cs",
"RelativeToolTip": "domain\\UseCase\\GroupUseCase.cs",
"ViewState": "AgIAAB0AAAAAAAAAAAAwwAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-01T16:03:21.763Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "IGroupUseCase.cs",
"DocumentMoniker": "C:\\Users\\sokol\\source\\repos\\presence_api123\\domain\\UseCase\\IGroupUseCase.cs",
"RelativeDocumentMoniker": "domain\\UseCase\\IGroupUseCase.cs",
"ToolTip": "C:\\Users\\sokol\\source\\repos\\presence_api123\\domain\\UseCase\\IGroupUseCase.cs",
"RelativeToolTip": "domain\\UseCase\\IGroupUseCase.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAA0AAAAvAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-01T16:02:55.7Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "ServiceCollectionExtensions.cs",
"DocumentMoniker": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\DI\\ServiceCollectionExtensions.cs",
"RelativeDocumentMoniker": "Presence.Desktop\\DI\\ServiceCollectionExtensions.cs",
"ToolTip": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\DI\\ServiceCollectionExtensions.cs",
"RelativeToolTip": "Presence.Desktop\\DI\\ServiceCollectionExtensions.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABkAAAAFAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-01T15:54:35.248Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "MainWindow.axaml",
"DocumentMoniker": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\Views\\MainWindow.axaml",
"RelativeDocumentMoniker": "Presence.Desktop\\Views\\MainWindow.axaml",
"ToolTip": "C:\\Users\\sokol\\source\\repos\\presence_api123\\Presence.Desktop\\Views\\MainWindow.axaml",
"RelativeToolTip": "Presence.Desktop\\Views\\MainWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2024-12-01T15:39:55.321Z",
"EditorCaption": ""
}
]
}
]
}
]
}

View File

@ -0,0 +1,15 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="Presence.Desktop.App"
xmlns:local="using:Presence.Desktop"
RequestedThemeVariant="Default">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
<Application.DataTemplates>
<local:ViewLocator/>
</Application.DataTemplates>
<Application.Styles>
<FluentTheme />
</Application.Styles>
</Application>

View File

@ -0,0 +1,37 @@
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using Microsoft.Extensions.DependencyInjection;
using Presence.Desktop.DI;
using Presence.Desktop.ViewModels;
using Presence.Desktop.Views;
namespace Presence.Desktop
{
public partial class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}
public override void OnFrameworkInitializationCompleted()
{
var serviceCollection = new ServiceCollection();
serviceCollection.AddCommonService();
var services = serviceCollection.BuildServiceProvider();
var mainViewModel = services.GetRequiredService<MainWindowViewModel>();
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new MainWindow
{
DataContext = mainViewModel,
};
}
base.OnFrameworkInitializationCompleted();
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

View File

@ -0,0 +1,27 @@
using data.Domain.UseCase;
using data.RemoteData.RemoteDataBase;
using data.Repository;
using Microsoft.Extensions.DependencyInjection;
using Presence.Desktop.ViewModels;
using Presence.Desktop.Views;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace Presence.Desktop.DI
{
public static class ServiceCollectionExtensions
{
public static void AddCommonService(this IServiceCollection collection)
{
collection
.AddDbContext<RemoteDatabaseContext>()
.AddSingleton<IGroupRepository, SQLGroupRepositoryImpl>()
.AddTransient<GroupUseCase, GroupUseCase>()
.AddTransient<MainWindowViewModel>();
}
}
}

View File

@ -0,0 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>
<ItemGroup>
<Folder Include="Models\" />
<AvaloniaResource Include="Assets\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.2.1" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.1" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.1" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.1" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Include="Avalonia.Diagnostics" Version="11.2.1">
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
</PackageReference>
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\data\data.csproj" />
<ProjectReference Include="..\domain\domain.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,24 @@
using Avalonia;
using Avalonia.ReactiveUI;
using System;
namespace Presence.Desktop
{
internal sealed class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
[STAThread]
public static void Main(string[] args) => BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);
// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace()
.UseReactiveUI();
}
}

View File

@ -0,0 +1,32 @@
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Presence.Desktop.ViewModels;
using System;
namespace Presence.Desktop
{
public class ViewLocator : IDataTemplate
{
public Control? Build(object? param)
{
if (param is null)
return null;
var name = param.GetType().FullName!.Replace("ViewModel", "View", StringComparison.Ordinal);
var type = Type.GetType(name);
if (type != null)
{
return (Control)Activator.CreateInstance(type)!;
}
return new TextBlock { Text = "Not Found: " + name };
}
public bool Match(object? data)
{
return data is ViewModelBase;
}
}
}

View File

@ -0,0 +1,14 @@
using domain.UseCase;
namespace Presence.Desktop.ViewModels
{
public class MainWindowViewModel : ViewModelBase
{
private readonly IGroupUseCase _groupService;
public MainWindowViewModel(IGroupUseCase groupUseCase)
{
_groupService = groupUseCase;
}
public string Greeting { get; } = "Welcome to Avalonia!";
}
}

View File

@ -0,0 +1,8 @@
using ReactiveUI;
namespace Presence.Desktop.ViewModels
{
public class ViewModelBase : ReactiveObject
{
}
}

View File

@ -0,0 +1,30 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:Presence.Desktop.ViewModels"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Presence.Desktop.Views.MainWindow"
x:DataType="vm:MainWindowViewModel"
Icon="/Assets/avalonia-logo.ico"
Title="Presence.Desktop">
<Design.DataContext>
<vm:MainWindowViewModel/>
</Design.DataContext>
<DockPanel Background="Azure">
<StackPanel Width="30" DockPanel.Dock="Right" Background="Green">
</StackPanel>
<StackPanel Height="100" DockPanel.Dock="Bottom" Background="Red"/>
<StackPanel Orientation="Horizontal"
Height="40"
DockPanel.Dock="Top"
Background="Orange">
<ComboBox/>
<ComboBox/>
<ComboBox/>
</StackPanel>
<StackPanel Background="Black"/>
</DockPanel>
</Window>

View File

@ -0,0 +1,12 @@
using Avalonia.Controls;
namespace Presence.Desktop.Views
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<!-- This manifest is used on Windows only.
Don't remove it as it might cause problems with window transparency and embedded controls.
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
<assemblyIdentity version="1.0.0.0" name="Presence.Desktop.Desktop"/>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on
and is designed to work with. Uncomment the appropriate elements
and Windows will automatically select the most compatible environment. -->
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
</assembly>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,14 @@
{
"runtimeOptions": {
"tfm": "net8.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
},
"configProperties": {
"System.Reflection.NullabilityInfoContext.IsSupported": true,
"System.Runtime.InteropServices.BuiltInComInterop.IsSupported": true,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More