init commit
This commit is contained in:
parent
57da9f595a
commit
a85b2c9da9
@ -26,7 +26,6 @@ namespace Presence.Desktop
|
||||
|
||||
|
||||
var services = serviceCollection.BuildServiceProvider();
|
||||
var mainViewModel = services.GetRequiredService<GroupViewModel>();
|
||||
|
||||
|
||||
var groupUseCase = services.GetRequiredService<GroupUseCase>();
|
||||
|
@ -17,8 +17,6 @@ namespace Presence.Desktop.DI
|
||||
.AddSingleton<IPresenceRepository, SQLPresenceRepositoryImpl>()
|
||||
.AddSingleton<UseCaseGeneratePresence>()
|
||||
.AddSingleton<UserUseCase>()
|
||||
.AddTransient<GroupUseCase>()
|
||||
.AddTransient<GroupViewModel>();
|
||||
}
|
||||
.AddTransient<GroupUseCase>(); }
|
||||
}
|
||||
}
|
@ -16,6 +16,11 @@ namespace Presence.Desktop.ViewModels
|
||||
{
|
||||
public class GroupViewModel : ViewModelBase, IRoutableViewModel
|
||||
{
|
||||
|
||||
public string? UrlPathSegment { get; }
|
||||
public IScreen HostScreen { get; }
|
||||
|
||||
|
||||
private readonly GroupUseCase _groupUseCase;
|
||||
private List<GroupPresenter> groupPresentersDataSource = new List<GroupPresenter>();
|
||||
private ObservableCollection<GroupPresenter> _groups;
|
||||
@ -51,10 +56,13 @@ namespace Presence.Desktop.ViewModels
|
||||
public ICommand RemoveAllStudentsCommand { get; }
|
||||
public ICommand AddStudentCommand { get; }
|
||||
|
||||
public GroupViewModel(GroupUseCase groupUseCase)
|
||||
public GroupViewModel(IScreen screen, GroupUseCase groupUseCase)
|
||||
{
|
||||
_groupUseCase = groupUseCase;
|
||||
HostScreen = screen;
|
||||
|
||||
|
||||
HostScreen.Router.Navigate.Execute(new PresenceViewModel());
|
||||
OnDeleteUserClicks = ReactiveCommand.Create(OnDeleteUserClick, this.WhenAnyValue(vm => vm.CanDelete));
|
||||
EditUserCommand = ReactiveCommand.Create(OnEditUserClick, this.WhenAnyValue(vm => vm.CanEdit));
|
||||
|
||||
@ -231,8 +239,7 @@ namespace Presence.Desktop.ViewModels
|
||||
}
|
||||
_groups = new ObservableCollection<GroupPresenter>(groupPresentersDataSource);
|
||||
}
|
||||
public string? UrlPathSegment { get; }
|
||||
public IScreen HostScreen { get; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using domain.UseCase;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using ReactiveUI;
|
||||
|
||||
@ -10,7 +11,13 @@ public class MainWindowViewModel : ViewModelBase, IScreen
|
||||
|
||||
public MainWindowViewModel(IServiceProvider serviceProvider)
|
||||
{
|
||||
var groupViewModel = serviceProvider.GetRequiredService<GroupViewModel>();
|
||||
Router.Navigate.Execute(groupViewModel);
|
||||
var groupUseCase = serviceProvider.GetRequiredService<GroupUseCase>();
|
||||
|
||||
Router.Navigate.Execute(new GroupViewModel (this, groupUseCase));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,76 +1,13 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
<UserControl 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"
|
||||
xmlns:local="clr-namespace:Presence.Desktop.ViewModels"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}">
|
||||
x:Class="Presence.Desktop.Views.GroupView"
|
||||
x:DataType="vm:GroupViewModel">
|
||||
|
||||
|
||||
<Window.Styles>
|
||||
<!-- Общие стили -->
|
||||
<Style Selector="TextBlock">
|
||||
<Setter Property="Foreground" Value="#333333"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="FontWeight" Value="Medium"/>
|
||||
</Style>
|
||||
<Style Selector="ComboBox">
|
||||
<Setter Property="Foreground" Value="#333333"/>
|
||||
<Setter Property="Background" Value="#FFFFFF"/>
|
||||
<Setter Property="BorderBrush" Value="#CCCCCC"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="8"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="CornerRadius" Value="8"/>
|
||||
<Setter Property="BoxShadow" Value="0 2px 4px rgba(0, 0, 0, 0.1)"/>
|
||||
</Style>
|
||||
<Style Selector="Button">
|
||||
<Setter Property="Foreground" Value="#FFFFFF"/>
|
||||
<Setter Property="Background" Value="#0078D7"/>
|
||||
<Setter Property="BorderBrush" Value="#0078D7"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="12"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="CornerRadius" Value="8"/>
|
||||
<Setter Property="BoxShadow" Value="0 2px 4px rgba(0, 0, 0, 0.1)"/>
|
||||
<Setter Property="Cursor" Value="Pointer"/>
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<Transitions.BoxShadow>
|
||||
<BoxShadowTransition Duration="0:0:0.2"/>
|
||||
</Transitions.BoxShadow>
|
||||
<Transitions.Background>
|
||||
<BrushTransition Duration="0:0:0.2"/>
|
||||
</Transitions.Background>
|
||||
</Transitions>
|
||||
</Setter>
|
||||
<Setter Property="PointerOverBackground" Value="#005A9E"/>
|
||||
<Setter Property="PressedBackground" Value="#004C87"/>
|
||||
</Style>
|
||||
<Style Selector="ListBox">
|
||||
<Setter Property="Background" Value="#FFFFFF"/>
|
||||
<Setter Property="BorderBrush" Value="#CCCCCC"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="10"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="CornerRadius" Value="8"/>
|
||||
<Setter Property="BoxShadow" Value="0 2px 4px rgba(0, 0, 0, 0.1)"/>
|
||||
</Style>
|
||||
<Style Selector="MenuItem">
|
||||
<Setter Property="Foreground" Value="#333333"/>
|
||||
<Setter Property="Background" Value="#FFFFFF"/>
|
||||
<Setter Property="BorderBrush" Value="#CCCCCC"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="8"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="CornerRadius" Value="4"/>
|
||||
<Setter Property="PointerOverBackground" Value="#EAEAEA"/>
|
||||
</Style>
|
||||
</Window.Styles>
|
||||
|
||||
<DockPanel Background="#F9F9F9">
|
||||
<!-- Верхняя панель с комбобоксами -->
|
||||
@ -142,4 +79,4 @@
|
||||
</ListBox.ContextMenu>
|
||||
</ListBox>
|
||||
</DockPanel>
|
||||
</Window>
|
||||
</UserControl>
|
@ -1,10 +1,8 @@
|
||||
|
||||
}<UserControl xmlns="https://github.com/avaloniaui"
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
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.PresenceView">
|
||||
Welcome to Avalonia!
|
||||
</UserControl>
|
||||
|
||||
|
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.
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Presence.Desktop")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4f43086a9a8fd68f7a6ab19eaa5cbcec67f8b7cc")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+57da9f595adc9e04fc02459f82d5ab33106f3cc1")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Presence.Desktop")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Presence.Desktop")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
52fca480bf5c37bdf1b053c0541563bdec821e517e590fb3a914e7998f5d9636
|
||||
6626c11c76827858e921023ed7151541b66049467a7ca21ae7b4bca478e53d06
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
b5a74d4ac62fce8d6f67ada3570bfc8e139cdefba13b2f52e0a9dd38d4b3e7cb
|
||||
b8e457a113689dd6d1f34fdc4825583934edea336ebb5371c3f539b140208dad
|
||||
|
@ -292,6 +292,3 @@ C:\Users\IVAN\Source\Repos\presence_new\Presence.Desktop\bin\Debug\net8.0\domain
|
||||
C:\Users\IVAN\Source\Repos\presence_new\Presence.Desktop\obj\Debug\net8.0\Presence.C94E1B86.Up2Date
|
||||
C:\Users\IVAN\Source\Repos\presence_new\Presence.Desktop\obj\Debug\net8.0\Presence.Desktop.genruntimeconfig.cache
|
||||
C:\Users\IVAN\Source\Repos\presence_new\Presence.Desktop\obj\Debug\net8.0\ref\Presence.Desktop.dll
|
||||
C:\Users\class_student\source\repos\presence\Presence.Desktop\obj\Debug\net8.0\Presence.Desktop.dll
|
||||
C:\Users\class_student\source\repos\presence\Presence.Desktop\obj\Debug\net8.0\refint\Presence.Desktop.dll
|
||||
C:\Users\class_student\source\repos\presence\Presence.Desktop\obj\Debug\net8.0\Presence.Desktop.pdb
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -263,10 +263,7 @@
|
||||
"Npgsql.EntityFrameworkCore.PostgreSQL": "8.0.10"
|
||||
},
|
||||
"runtime": {
|
||||
"data.dll": {
|
||||
"assemblyVersion": "1.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
"data.dll": {}
|
||||
}
|
||||
},
|
||||
"domain/1.0.0": {
|
||||
@ -275,10 +272,7 @@
|
||||
"data": "1.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"domain.dll": {
|
||||
"assemblyVersion": "1.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
"domain.dll": {}
|
||||
}
|
||||
},
|
||||
"ui/1.0.0": {
|
||||
@ -286,10 +280,7 @@
|
||||
"domain": "1.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"ui.dll": {
|
||||
"assemblyVersion": "1.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
"ui.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
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.
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("console_ui")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4f43086a9a8fd68f7a6ab19eaa5cbcec67f8b7cc")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+57da9f595adc9e04fc02459f82d5ab33106f3cc1")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("console_ui")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("console_ui")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
68fb8b1647d6409374a307810ef56cda241e3315bac4ef43f397378c62ed68bf
|
||||
3583cd3ceba6f9d9364f72261d4b9b33a7c57a107e030a8e76a1a8f2bafd45a1
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
29c0befe59102fd2c5cc7d447cf6aa668333ecb9a9254b61995e50d49abfd77b
|
||||
2a4e6c37a4039d9ae1e17af5dec76b3ab33e39290d0045a217d72db5432179ab
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
b37bdb9f39391effb5f167930ddca4369f378092372aee6b535e8d80670c5857
|
||||
26d3e230181239da2f5c0ec50a011c8201532e8bf41b8953993ac55370a1416f
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("data")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4f43086a9a8fd68f7a6ab19eaa5cbcec67f8b7cc")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+57da9f595adc9e04fc02459f82d5ab33106f3cc1")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("data")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("data")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
2bcd7df782775669dce88ad8a6d8a6650bea3b850dabd305376a3cb811d615b5
|
||||
8d2d495a0c7f40589babe47a0a3473661f143114f2ab49b4078af1e3b85fe209
|
||||
|
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.
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("domain")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4f43086a9a8fd68f7a6ab19eaa5cbcec67f8b7cc")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+57da9f595adc9e04fc02459f82d5ab33106f3cc1")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("domain")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("domain")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
2bb2a6bdd0bb2ee3cfb8c44871c92eaf186a15ba5107b5ceaf825c47659992a2
|
||||
c4036d5bd8264457dad00c3e3b4ab541f1f2b4fc631d766cf78141a8d4368297
|
||||
|
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.
@ -299,10 +299,7 @@
|
||||
"Npgsql.EntityFrameworkCore.PostgreSQL": "8.0.10"
|
||||
},
|
||||
"runtime": {
|
||||
"data.dll": {
|
||||
"assemblyVersion": "1.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
"data.dll": {}
|
||||
}
|
||||
},
|
||||
"domain/1.0.0": {
|
||||
@ -311,10 +308,7 @@
|
||||
"data": "1.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"domain.dll": {
|
||||
"assemblyVersion": "1.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
"domain.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("presence_api")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4f43086a9a8fd68f7a6ab19eaa5cbcec67f8b7cc")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+57da9f595adc9e04fc02459f82d5ab33106f3cc1")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("presence_api")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("presence_api")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
1243f25163bdc64a1b0faedfea91ec0c945112a9d66a810cd75ec40e59cec826
|
||||
a4b811bfa5a1288299761bdb88f6a762b56ddc16d1d655a39e28d53972a6932f
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
bffc0d5371252f9dd239a12e8fe96b406244795fb5f1cf3c26f65cc0f50d6e44
|
||||
42cd786d8fef4959fec2fd8abd8ea0720f32d40cfaa49e4dd15343a1fd3abcfe
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
530660ffbfb912c2b85f6a8a3f3f949460f4f3bba4f1f87e2233c2d1b530e760
|
||||
3a2a601248dd535ef3741f4ebc6335411ed0f699580eaaa48a0fe3c4700ec5ee
|
||||
|
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.
@ -258,10 +258,7 @@
|
||||
"Npgsql.EntityFrameworkCore.PostgreSQL": "8.0.10"
|
||||
},
|
||||
"runtime": {
|
||||
"data.dll": {
|
||||
"assemblyVersion": "1.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
"data.dll": {}
|
||||
}
|
||||
},
|
||||
"domain/1.0.0": {
|
||||
@ -270,10 +267,7 @@
|
||||
"data": "1.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"domain.dll": {
|
||||
"assemblyVersion": "1.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
"domain.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("ui")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4f43086a9a8fd68f7a6ab19eaa5cbcec67f8b7cc")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+57da9f595adc9e04fc02459f82d5ab33106f3cc1")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("ui")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("ui")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
13e3dfc81debd1ebc31d2cea34dd42ea7de9c82e78a7d33652f6d9ae5a01754b
|
||||
6690d536df4991d027b0fbf2702ae19245b03d724e4967c9dfdddd2d2b14a968
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
a9e97d75342d45223ccffdf9786f948e2fdf34b668eea436522315c6150ee78f
|
||||
3dd1dc8fda2ba22df3e3649f46e4e587835ec7d23e74ea02414adc299e214078
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user