init commit

This commit is contained in:
-SSS- 2024-11-24 21:05:17 +03:00
parent de13fb6245
commit 9ec13299bc
249 changed files with 5693 additions and 1655 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@ -1,258 +0,0 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\class_student\\source\\repos\\presence\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{E466FB14-716E-437F-9E6C-B2A0D786694C}|presence_api\\presence_api.csproj|c:\\users\\class_student\\source\\repos\\presence\\presence_api\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{E466FB14-716E-437F-9E6C-B2A0D786694C}|presence_api\\presence_api.csproj|solutionrelative:presence_api\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{E466FB14-716E-437F-9E6C-B2A0D786694C}|presence_api\\presence_api.csproj|c:\\users\\class_student\\source\\repos\\presence\\presence_api\\controllers\\adminpanelcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{E466FB14-716E-437F-9E6C-B2A0D786694C}|presence_api\\presence_api.csproj|solutionrelative:presence_api\\controllers\\adminpanelcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{E466FB14-716E-437F-9E6C-B2A0D786694C}|presence_api\\presence_api.csproj|c:\\users\\class_student\\source\\repos\\presence\\presence_api\\serviceextensions\\serviceextensions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{E466FB14-716E-437F-9E6C-B2A0D786694C}|presence_api\\presence_api.csproj|solutionrelative:presence_api\\serviceextensions\\serviceextensions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{53B2C28F-CCC6-4399-BA63-8A21E2D26B73}|domain\\domain.csproj|c:\\users\\class_student\\source\\repos\\presence\\domain\\usecase\\usecaseapi.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{53B2C28F-CCC6-4399-BA63-8A21E2D26B73}|domain\\domain.csproj|solutionrelative:domain\\usecase\\usecaseapi.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{53B2C28F-CCC6-4399-BA63-8A21E2D26B73}|domain\\domain.csproj|c:\\users\\class_student\\source\\repos\\presence\\domain\\usecase\\groupusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{53B2C28F-CCC6-4399-BA63-8A21E2D26B73}|domain\\domain.csproj|solutionrelative:domain\\usecase\\groupusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{7E1D482B-6976-4984-85C3-AE6E789E7FC2}|data\\data.csproj|c:\\users\\class_student\\source\\repos\\presence\\data\\repository\\igrouprepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{7E1D482B-6976-4984-85C3-AE6E789E7FC2}|data\\data.csproj|solutionrelative:data\\repository\\igrouprepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{7E1D482B-6976-4984-85C3-AE6E789E7FC2}|data\\data.csproj|c:\\users\\class_student\\source\\repos\\presence\\data\\repository\\sqlgrouprepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{7E1D482B-6976-4984-85C3-AE6E789E7FC2}|data\\data.csproj|solutionrelative:data\\repository\\sqlgrouprepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{7E1D482B-6976-4984-85C3-AE6E789E7FC2}|data\\data.csproj|c:\\users\\class_student\\source\\repos\\presence\\data\\repository\\sqlpresencerepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{7E1D482B-6976-4984-85C3-AE6E789E7FC2}|data\\data.csproj|solutionrelative:data\\repository\\sqlpresencerepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{7E1D482B-6976-4984-85C3-AE6E789E7FC2}|data\\data.csproj|c:\\users\\class_student\\source\\repos\\presence\\data\\repository\\sqluserrepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{7E1D482B-6976-4984-85C3-AE6E789E7FC2}|data\\data.csproj|solutionrelative:data\\repository\\sqluserrepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{53B2C28F-CCC6-4399-BA63-8A21E2D26B73}|domain\\domain.csproj|c:\\users\\class_student\\source\\repos\\presence\\domain\\models\\groupwithstudentsdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{53B2C28F-CCC6-4399-BA63-8A21E2D26B73}|domain\\domain.csproj|solutionrelative:domain\\models\\groupwithstudentsdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{53B2C28F-CCC6-4399-BA63-8A21E2D26B73}|domain\\domain.csproj|c:\\users\\class_student\\source\\repos\\presence\\domain\\usecase\\userusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{53B2C28F-CCC6-4399-BA63-8A21E2D26B73}|domain\\domain.csproj|solutionrelative:domain\\usecase\\userusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{53B2C28F-CCC6-4399-BA63-8A21E2D26B73}|domain\\domain.csproj|c:\\users\\class_student\\source\\repos\\presence\\domain\\usecase\\usecasegeneratepresence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{53B2C28F-CCC6-4399-BA63-8A21E2D26B73}|domain\\domain.csproj|solutionrelative:domain\\usecase\\usecasegeneratepresence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{7E1D482B-6976-4984-85C3-AE6E789E7FC2}|data\\data.csproj|c:\\users\\class_student\\source\\repos\\presence\\data\\repository\\iuserrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{7E1D482B-6976-4984-85C3-AE6E789E7FC2}|data\\data.csproj|solutionrelative:data\\repository\\iuserrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{7E1D482B-6976-4984-85C3-AE6E789E7FC2}|data\\data.csproj|c:\\users\\class_student\\source\\repos\\presence\\data\\repository\\ipresencerepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{7E1D482B-6976-4984-85C3-AE6E789E7FC2}|data\\data.csproj|solutionrelative:data\\repository\\ipresencerepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "Program.cs",
"DocumentMoniker": "C:\\Users\\class_student\\source\\repos\\presence\\presence_api\\Program.cs",
"RelativeDocumentMoniker": "presence_api\\Program.cs",
"ToolTip": "C:\\Users\\class_student\\source\\repos\\presence\\presence_api\\Program.cs",
"RelativeToolTip": "presence_api\\Program.cs",
"ViewState": "AQIAAAAAAAAAAAAAAAAAABAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-20T09:04:16.471Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "ServiceExtensions.cs",
"DocumentMoniker": "C:\\Users\\class_student\\source\\repos\\presence\\presence_api\\ServiceExtensions\\ServiceExtensions.cs",
"RelativeDocumentMoniker": "presence_api\\ServiceExtensions\\ServiceExtensions.cs",
"ToolTip": "C:\\Users\\class_student\\source\\repos\\presence\\presence_api\\ServiceExtensions\\ServiceExtensions.cs",
"RelativeToolTip": "presence_api\\ServiceExtensions\\ServiceExtensions.cs",
"ViewState": "AQIAABIAAAAAAAAAAAAkwCYAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-20T08:58:05.371Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 10,
"Title": "UserUseCase.cs",
"DocumentMoniker": "C:\\Users\\class_student\\source\\repos\\presence\\domain\\UseCase\\UserUseCase.cs",
"RelativeDocumentMoniker": "domain\\UseCase\\UserUseCase.cs",
"ToolTip": "C:\\Users\\class_student\\source\\repos\\presence\\domain\\UseCase\\UserUseCase.cs",
"RelativeToolTip": "domain\\UseCase\\UserUseCase.cs",
"ViewState": "AQIAAGQAAAAAAAAAAAAAwHEAAAAHAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-20T07:06:29.916Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "UseCaseAPI.cs",
"DocumentMoniker": "C:\\Users\\class_student\\source\\repos\\presence\\domain\\UseCase\\UseCaseAPI.cs",
"RelativeDocumentMoniker": "domain\\UseCase\\UseCaseAPI.cs",
"ToolTip": "C:\\Users\\class_student\\source\\repos\\presence\\domain\\UseCase\\UseCaseAPI.cs",
"RelativeToolTip": "domain\\UseCase\\UseCaseAPI.cs",
"ViewState": "AQIAABMAAAAAAAAAAAAwwCoAAAARAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-20T07:37:53.868Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 9,
"Title": "GroupWithStudentsDto.cs",
"DocumentMoniker": "C:\\Users\\class_student\\source\\repos\\presence\\domain\\Models\\GroupWithStudentsDto.cs",
"RelativeDocumentMoniker": "domain\\Models\\GroupWithStudentsDto.cs",
"ToolTip": "C:\\Users\\class_student\\source\\repos\\presence\\domain\\Models\\GroupWithStudentsDto.cs",
"RelativeToolTip": "domain\\Models\\GroupWithStudentsDto.cs",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAA0AAAAIAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-20T07:36:54.393Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "GroupUseCase.cs",
"DocumentMoniker": "C:\\Users\\class_student\\source\\repos\\presence\\domain\\UseCase\\GroupUseCase.cs",
"RelativeDocumentMoniker": "domain\\UseCase\\GroupUseCase.cs",
"ToolTip": "C:\\Users\\class_student\\source\\repos\\presence\\domain\\UseCase\\GroupUseCase.cs",
"RelativeToolTip": "domain\\UseCase\\GroupUseCase.cs",
"ViewState": "AQIAADQAAAAAAAAAAAAYwEkAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-20T07:05:40.692Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "SQLPresenceRepositoryImpl.cs",
"DocumentMoniker": "C:\\Users\\class_student\\source\\repos\\presence\\data\\Repository\\SQLPresenceRepositoryImpl.cs",
"RelativeDocumentMoniker": "data\\Repository\\SQLPresenceRepositoryImpl.cs",
"ToolTip": "C:\\Users\\class_student\\source\\repos\\presence\\data\\Repository\\SQLPresenceRepositoryImpl.cs",
"RelativeToolTip": "data\\Repository\\SQLPresenceRepositoryImpl.cs",
"ViewState": "AQIAAMoAAAAAAAAAAAAYwN0AAAAFAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-20T07:11:00.628Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 8,
"Title": "SQLUserRepositoryImpl.cs",
"DocumentMoniker": "C:\\Users\\class_student\\source\\repos\\presence\\data\\Repository\\SQLUserRepositoryImpl.cs",
"RelativeDocumentMoniker": "data\\Repository\\SQLUserRepositoryImpl.cs",
"ToolTip": "C:\\Users\\class_student\\source\\repos\\presence\\data\\Repository\\SQLUserRepositoryImpl.cs",
"RelativeToolTip": "data\\Repository\\SQLUserRepositoryImpl.cs",
"ViewState": "AQIAAEoAAAAAAAAAAAAQwGYAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-20T07:07:02.478Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "AdminPanelController.cs",
"DocumentMoniker": "C:\\Users\\class_student\\source\\repos\\presence\\presence_api\\Controllers\\AdminPanelController.cs",
"RelativeDocumentMoniker": "presence_api\\Controllers\\AdminPanelController.cs",
"ToolTip": "C:\\Users\\class_student\\source\\repos\\presence\\presence_api\\Controllers\\AdminPanelController.cs",
"RelativeToolTip": "presence_api\\Controllers\\AdminPanelController.cs",
"ViewState": "AQIAAGAAAAAAAAAAAAAswHsAAAA8AAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-20T07:19:40.565Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "IGroupRepository.cs",
"DocumentMoniker": "C:\\Users\\class_student\\source\\repos\\presence\\data\\Repository\\IGroupRepository.cs",
"RelativeDocumentMoniker": "data\\Repository\\IGroupRepository.cs",
"ToolTip": "C:\\Users\\class_student\\source\\repos\\presence\\data\\Repository\\IGroupRepository.cs",
"RelativeToolTip": "data\\Repository\\IGroupRepository.cs",
"ViewState": "AQIAAAAAAAAAAAAAAAAAABAAAAAoAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-20T07:08:19.923Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 6,
"Title": "SQLGroupRepositoryImpl.cs",
"DocumentMoniker": "C:\\Users\\class_student\\source\\repos\\presence\\data\\Repository\\SQLGroupRepositoryImpl.cs",
"RelativeDocumentMoniker": "data\\Repository\\SQLGroupRepositoryImpl.cs",
"ToolTip": "C:\\Users\\class_student\\source\\repos\\presence\\data\\Repository\\SQLGroupRepositoryImpl.cs",
"RelativeToolTip": "data\\Repository\\SQLGroupRepositoryImpl.cs",
"ViewState": "AQIAABYAAAAAAAAAAAAgwCwAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-20T08:36:33.509Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 11,
"Title": "UseCaseGeneratePresence.cs",
"DocumentMoniker": "C:\\Users\\class_student\\source\\repos\\presence\\domain\\UseCase\\UseCaseGeneratePresence.cs",
"RelativeDocumentMoniker": "domain\\UseCase\\UseCaseGeneratePresence.cs",
"ToolTip": "C:\\Users\\class_student\\source\\repos\\presence\\domain\\UseCase\\UseCaseGeneratePresence.cs",
"RelativeToolTip": "domain\\UseCase\\UseCaseGeneratePresence.cs",
"ViewState": "AQIAAAMAAAAAAAAAAAAAABcAAAAaAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-20T07:11:44.683Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 12,
"Title": "IUserRepository.cs",
"DocumentMoniker": "C:\\Users\\class_student\\source\\repos\\presence\\data\\Repository\\IUserRepository.cs",
"RelativeDocumentMoniker": "data\\Repository\\IUserRepository.cs",
"ToolTip": "C:\\Users\\class_student\\source\\repos\\presence\\data\\Repository\\IUserRepository.cs",
"RelativeToolTip": "data\\Repository\\IUserRepository.cs",
"ViewState": "AQIAAAkAAAAAAAAAAAAAABMAAAAcAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-20T07:08:31.58Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 13,
"Title": "IPresenceRepository.cs",
"DocumentMoniker": "C:\\Users\\class_student\\source\\repos\\presence\\data\\Repository\\IPresenceRepository.cs",
"RelativeDocumentMoniker": "data\\Repository\\IPresenceRepository.cs",
"ToolTip": "C:\\Users\\class_student\\source\\repos\\presence\\data\\Repository\\IPresenceRepository.cs",
"RelativeToolTip": "data\\Repository\\IPresenceRepository.cs",
"ViewState": "AQIAAAYAAAAAAAAAAAAAABUAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-11-20T07:08:43.328Z",
"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,39 @@
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,21 @@
using Microsoft.Extensions.DependencyInjection;
using data;
using data.Repository;
using data.RemoteData.RemoteDataBase;
using Presence.Desktop.ViewModels;
using domain.UseCase;
namespace Presence.Desktop.DI
{
public static class ServiceCollectionExtensions
{
public static void AddCommonService(this IServiceCollection collection)
{
collection
.AddSingleton<IGroupRepository, SQLGroupRepositoryImpl>()
.AddDbContext<RemoteDatabaseContext>()
.AddTransient<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 GroupUseCase _groupService;
public MainWindowViewModel(GroupUseCase 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,31 @@
<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"
Icon="/Assets/avalonia-logo.ico"
Title="Presence.Desktop"
x:DataType="vm:MainWindowViewModel">
<Design.DataContext>
<vm:MainWindowViewModel/>
</Design.DataContext>
<DockPanel Background="White">
<StackPanel Height="30" DockPanel.Dock="Bottom" Background="White">
<TextBlock Text="List ↑" HorizontalAlignment="Center" Margin="5">
</TextBlock>
<StackPanel/>
</StackPanel>
<!-- Верхняя панель -->
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" HorizontalAlignment="Center" Background="White" Height="40">
<ComboBox Margin="5"/>
<ComboBox Margin="5"/>
<ComboBox Margin="5"/>
</StackPanel>
<StackPanel Background="Beige"/>
</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