comboboxes; remove users
This commit is contained in:
parent
9b3cfbc400
commit
cd14199d8f
9
Presence.Desktop/App.axaml
Normal file
9
Presence.Desktop/App.axaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<Application xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:Class="Presence.Desktop.App"
|
||||||
|
RequestedThemeVariant="Default">
|
||||||
|
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
||||||
|
<Application.Styles>
|
||||||
|
<FluentTheme />
|
||||||
|
</Application.Styles>
|
||||||
|
</Application>
|
37
Presence.Desktop/App.axaml.cs
Normal file
37
Presence.Desktop/App.axaml.cs
Normal 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<GroupViewModel>();
|
||||||
|
|
||||||
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||||
|
{
|
||||||
|
desktop.MainWindow = new MainWindow()
|
||||||
|
{
|
||||||
|
DataContext = new MainWindowViewModel(services),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
base.OnFrameworkInitializationCompleted();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
BIN
Presence.Desktop/Assets/avalonia-logo.ico
Normal file
BIN
Presence.Desktop/Assets/avalonia-logo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 172 KiB |
29
Presence.Desktop/DI/ServiceColletionExtensions.cs
Normal file
29
Presence.Desktop/DI/ServiceColletionExtensions.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using Demo.Data.RemoteData.RemoteDataBase;
|
||||||
|
using Demo.Data.Repository;
|
||||||
|
using Demo.Domain.UseCase;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Presence.Desktop.ViewModels;
|
||||||
|
using ReactiveUI;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reactive.Concurrency;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Presence.Desktop.DI
|
||||||
|
{
|
||||||
|
public static class ServiceColletionExtensions
|
||||||
|
{
|
||||||
|
public static void AddCommonService(this IServiceCollection collection) {
|
||||||
|
collection
|
||||||
|
.AddDbContext<RemoteDatabaseContext>()
|
||||||
|
.AddSingleton<IGroupRepository, SQLGroupRepositoryImpl>()
|
||||||
|
.AddSingleton<IUserRepository, SQLUserRepositoryImpl>()
|
||||||
|
.AddTransient<IGroupUseCase, GroupUseCase>()
|
||||||
|
.AddTransient<IUserUseCase, UserUseCase>()
|
||||||
|
.AddTransient<GroupViewModel>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
Presence.Desktop/Models/GroupPresenter.cs
Normal file
17
Presence.Desktop/Models/GroupPresenter.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using ReactiveUI;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Presence.Desktop.Models
|
||||||
|
{
|
||||||
|
public class GroupPresenter
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public IEnumerable<UserPresenter>? users { get; set; } = null;
|
||||||
|
}
|
||||||
|
}
|
19
Presence.Desktop/Models/PresencePresenter.cs
Normal file
19
Presence.Desktop/Models/PresencePresenter.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using ReactiveUI;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Presence.Desktop.Models
|
||||||
|
{
|
||||||
|
public class PresencePresenter
|
||||||
|
{
|
||||||
|
public int UserGuid { get; set; }
|
||||||
|
public bool IsAttedance {get; set; }
|
||||||
|
public DateOnly Date {get; set; }
|
||||||
|
public int LessonNumber {get; set; }
|
||||||
|
public UserPresenter user { get; set; }
|
||||||
|
}
|
||||||
|
}
|
15
Presence.Desktop/Models/UserPresenter.cs
Normal file
15
Presence.Desktop/Models/UserPresenter.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Presence.Desktop.Models
|
||||||
|
{
|
||||||
|
public class UserPresenter
|
||||||
|
{
|
||||||
|
public Guid Guid { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public GroupPresenter Group { get; set; }
|
||||||
|
}
|
||||||
|
}
|
29
Presence.Desktop/Presence.Desktop.csproj
Normal file
29
Presence.Desktop/Presence.Desktop.csproj
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<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>
|
||||||
|
<PackageReference Include="Avalonia" Version="11.2.1" />
|
||||||
|
<PackageReference Include="Avalonia.Desktop" Version="11.2.1" />
|
||||||
|
<PackageReference Include="Avalonia.ReactiveUI" 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="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\data\data.csproj" />
|
||||||
|
<ProjectReference Include="..\domain\domain.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
24
Presence.Desktop/Program.cs
Normal file
24
Presence.Desktop/Program.cs
Normal 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();
|
||||||
|
}
|
||||||
|
}
|
19
Presence.Desktop/ViewLocator.cs
Normal file
19
Presence.Desktop/ViewLocator.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Controls.Templates;
|
||||||
|
using Presence.Desktop.ViewModels;
|
||||||
|
using System;
|
||||||
|
using Presence.Desktop.Views;
|
||||||
|
using ReactiveUI;
|
||||||
|
|
||||||
|
namespace Presence.Desktop
|
||||||
|
{
|
||||||
|
public class ViewLocator : IViewLocator
|
||||||
|
{
|
||||||
|
public IViewFor? ResolveView<T>(T? viewModel, string? contract = null) => viewModel switch
|
||||||
|
{
|
||||||
|
GroupViewModel groupViewModel => new GroupView{DataContext = groupViewModel},
|
||||||
|
PresenceViewModel presenceViewModel => new PresenceView{DataContext = presenceViewModel},
|
||||||
|
_ => throw new ArgumentOutOfRangeException(nameof(viewModel))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
92
Presence.Desktop/ViewModels/GroupViewModel.cs
Normal file
92
Presence.Desktop/ViewModels/GroupViewModel.cs
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
using Demo.Domain.UseCase;
|
||||||
|
using DynamicData;
|
||||||
|
using DynamicData.Binding;
|
||||||
|
using Presence.Desktop.Models;
|
||||||
|
using ReactiveUI;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reactive;
|
||||||
|
using System.Reactive.Linq;
|
||||||
|
using Tmds.DBus.Protocol;
|
||||||
|
|
||||||
|
namespace Presence.Desktop.ViewModels
|
||||||
|
{
|
||||||
|
public class GroupViewModel : ViewModelBase, IRoutableViewModel
|
||||||
|
{
|
||||||
|
private readonly List<GroupPresenter> _groupPresentersDataSource = new List<GroupPresenter>();
|
||||||
|
private ObservableCollection<GroupPresenter> _groups;
|
||||||
|
public ObservableCollection<GroupPresenter> Groups => _groups;
|
||||||
|
private GroupPresenter? _selectedGroupItem;
|
||||||
|
|
||||||
|
public ReactiveCommand<Unit, Unit> ButtonRemoveUsersByGroup {get; }
|
||||||
|
// public ReactiveCommand<Unit, Unit> ButtonAddUser { get; }
|
||||||
|
|
||||||
|
public GroupPresenter? SelectedGroupItem
|
||||||
|
{
|
||||||
|
get => _selectedGroupItem;
|
||||||
|
set => this.RaiseAndSetIfChanged(ref _selectedGroupItem, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ObservableCollection<UserPresenter> Users { get => _users;}
|
||||||
|
public ObservableCollection<UserPresenter> _users;
|
||||||
|
public GroupViewModel(IGroupUseCase groupUseCase, IUserUseCase userUseCase)
|
||||||
|
{
|
||||||
|
foreach (var item in groupUseCase.GetAllGroupsWithUsers())
|
||||||
|
{
|
||||||
|
GroupPresenter groupPresenter = new GroupPresenter
|
||||||
|
{
|
||||||
|
Id = item.ID,
|
||||||
|
Name = item.Name,
|
||||||
|
users = item.Users?.Select(user => new UserPresenter
|
||||||
|
{
|
||||||
|
Name = user.FIO,
|
||||||
|
Guid = user.Guid,
|
||||||
|
Group = new GroupPresenter { Id = item.ID, Name = item.Name }
|
||||||
|
}
|
||||||
|
).ToList()
|
||||||
|
};
|
||||||
|
_groupPresentersDataSource.Add(groupPresenter);
|
||||||
|
}
|
||||||
|
|
||||||
|
_groups = new ObservableCollection<GroupPresenter>(_groupPresentersDataSource);
|
||||||
|
|
||||||
|
_users = new ObservableCollection<UserPresenter>();
|
||||||
|
|
||||||
|
this.WhenAnyValue(vm => vm.SelectedGroupItem)
|
||||||
|
.Subscribe(_ => SetUsers());
|
||||||
|
|
||||||
|
ButtonRemoveUsersByGroup = ReactiveCommand.Create(() => RemoveUsersByGroup(groupUseCase));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetUsers()
|
||||||
|
{
|
||||||
|
if(SelectedGroupItem == null) return;
|
||||||
|
if (SelectedGroupItem.users == null) return;
|
||||||
|
Users.Clear();
|
||||||
|
foreach (var item in SelectedGroupItem.users)
|
||||||
|
{
|
||||||
|
Users.Add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RemoveUsersByGroup(IGroupUseCase groupUseCase)
|
||||||
|
{
|
||||||
|
if (_selectedGroupItem != null){
|
||||||
|
groupUseCase.RemoveUsersByGroup(_selectedGroupItem.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
var usersToRemove = Users.Where(user => user.Group.Id == _selectedGroupItem.Id).ToList();
|
||||||
|
foreach (var user in usersToRemove)
|
||||||
|
{
|
||||||
|
Users.Remove(user);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string? UrlPathSegment { get; }
|
||||||
|
public IScreen HostScreen { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
16
Presence.Desktop/ViewModels/MainWindowViewModels.cs
Normal file
16
Presence.Desktop/ViewModels/MainWindowViewModels.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using ReactiveUI;
|
||||||
|
|
||||||
|
namespace Presence.Desktop.ViewModels;
|
||||||
|
|
||||||
|
public class MainWindowViewModel: ViewModelBase, IScreen
|
||||||
|
{
|
||||||
|
public RoutingState Router { get; } = new RoutingState();
|
||||||
|
|
||||||
|
public MainWindowViewModel(IServiceProvider serviceProvider)
|
||||||
|
{
|
||||||
|
var groupViewModel = serviceProvider.GetRequiredService<GroupViewModel>();
|
||||||
|
Router.Navigate.Execute(groupViewModel);
|
||||||
|
}
|
||||||
|
}
|
11
Presence.Desktop/ViewModels/PresenceViewModel.cs
Normal file
11
Presence.Desktop/ViewModels/PresenceViewModel.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using ReactiveUI;
|
||||||
|
|
||||||
|
namespace Presence.Desktop.ViewModels;
|
||||||
|
|
||||||
|
public class PresenceViewModel: ViewModelBase, IRoutableViewModel
|
||||||
|
{
|
||||||
|
public string? UrlPathSegment { get; }
|
||||||
|
public IScreen HostScreen { get; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
8
Presence.Desktop/ViewModels/ViewModelBase.cs
Normal file
8
Presence.Desktop/ViewModels/ViewModelBase.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
using ReactiveUI;
|
||||||
|
|
||||||
|
namespace Presence.Desktop.ViewModels
|
||||||
|
{
|
||||||
|
public class ViewModelBase : ReactiveObject
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
56
Presence.Desktop/Views/GroupView.axaml
Normal file
56
Presence.Desktop/Views/GroupView.axaml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<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.GroupView"
|
||||||
|
x:DataType="vm:GroupViewModel">
|
||||||
|
|
||||||
|
<Design.DataContext>
|
||||||
|
<vm:GroupViewModel/>
|
||||||
|
</Design.DataContext>
|
||||||
|
|
||||||
|
<DockPanel Background="Azure">
|
||||||
|
<!-- Панель с кнопками справа, окрашена в серый -->
|
||||||
|
<StackPanel Width="200" DockPanel.Dock="Right" HorizontalAlignment="Center" Background="Gray">
|
||||||
|
<!-- Две кнопки сверху -->
|
||||||
|
<Button Content="remove" HorizontalAlignment="Center" Margin="10" Command="{Binding ButtonRemoveUsersByGroup}"/>
|
||||||
|
<Button Content="create" HorizontalAlignment="Center" Margin="10"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Содержание на остальной части экрана -->
|
||||||
|
<StackPanel DockPanel.Dock="Bottom">
|
||||||
|
<TextBlock Text="List ↑" HorizontalAlignment="Center"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel
|
||||||
|
Spacing="10"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
DockPanel.Dock="Top"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
<TextBlock Text="Combobox ->"/>
|
||||||
|
<ComboBox ItemsSource="{Binding Groups}" SelectedValue="{Binding SelectedGroupItem}">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Name}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
<ComboBox/>
|
||||||
|
<ComboBox/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<Border>
|
||||||
|
<ListBox Background="Bisque" ItemsSource="{Binding Users}">
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding Name}" FontSize="16" Foreground="Black"/>
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
</Border>
|
||||||
|
</DockPanel>
|
||||||
|
</UserControl>
|
17
Presence.Desktop/Views/GroupView.axaml.cs
Normal file
17
Presence.Desktop/Views/GroupView.axaml.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
using Avalonia.ReactiveUI;
|
||||||
|
using Presence.Desktop.ViewModels;
|
||||||
|
using ReactiveUI;
|
||||||
|
|
||||||
|
namespace Presence.Desktop.Views
|
||||||
|
{
|
||||||
|
public partial class GroupView : ReactiveUserControl<GroupViewModel>
|
||||||
|
{
|
||||||
|
public GroupView()
|
||||||
|
{
|
||||||
|
this.WhenActivated(disposables => { });
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
Presence.Desktop/Views/MainWindow.axaml
Normal file
19
Presence.Desktop/Views/MainWindow.axaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<Window xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:app="clr-namespace:Presence.Desktop"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:vm="using:Presence.Desktop.ViewModels"
|
||||||
|
xmlns:reactiveUi="http://reactiveui.net"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="Presence.Desktop.Views.MainWindow"
|
||||||
|
x:DataType="vm:MainWindowViewModel"
|
||||||
|
Title="MainWindow">
|
||||||
|
<DockPanel>
|
||||||
|
<reactiveUi:RoutedViewHost Router="{Binding Router}" DockPanel.Dock="Right" Background="AliceBlue">
|
||||||
|
<reactiveUi:RoutedViewHost.ViewLocator>
|
||||||
|
<app:ViewLocator/>
|
||||||
|
</reactiveUi:RoutedViewHost.ViewLocator>
|
||||||
|
</reactiveUi:RoutedViewHost>
|
||||||
|
</DockPanel>
|
||||||
|
</Window>
|
18
Presence.Desktop/Views/MainWindow.axaml.cs
Normal file
18
Presence.Desktop/Views/MainWindow.axaml.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
using Avalonia.ReactiveUI;
|
||||||
|
using Presence.Desktop.ViewModels;
|
||||||
|
using ReactiveUI;
|
||||||
|
|
||||||
|
namespace Presence.Desktop.Views;
|
||||||
|
|
||||||
|
public partial class MainWindow : ReactiveWindow<MainWindowViewModel>
|
||||||
|
{
|
||||||
|
public MainWindow()
|
||||||
|
{
|
||||||
|
this.WhenActivated(disposables => { });
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
8
Presence.Desktop/Views/PresenceView.axaml
Normal file
8
Presence.Desktop/Views/PresenceView.axaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<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>
|
16
Presence.Desktop/Views/PresenceView.axaml.cs
Normal file
16
Presence.Desktop/Views/PresenceView.axaml.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
using Avalonia.ReactiveUI;
|
||||||
|
using Presence.Desktop.ViewModels;
|
||||||
|
using ReactiveUI;
|
||||||
|
|
||||||
|
namespace Presence.Desktop.Views;
|
||||||
|
|
||||||
|
public partial class PresenceView : ReactiveUserControl<PresenceViewModel>
|
||||||
|
{
|
||||||
|
public PresenceView()
|
||||||
|
{
|
||||||
|
this.WhenActivated(disposables => { });
|
||||||
|
AvaloniaXamlLoader.Load(this); }
|
||||||
|
}
|
18
Presence.Desktop/app.manifest
Normal file
18
Presence.Desktop/app.manifest
Normal 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>
|
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Base.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Base.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Controls.ColorPicker.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Controls.ColorPicker.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Controls.DataGrid.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Controls.DataGrid.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Controls.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Controls.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.DesignerSupport.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.DesignerSupport.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Desktop.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Desktop.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Diagnostics.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Diagnostics.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Dialogs.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Dialogs.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Fonts.Inter.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Fonts.Inter.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.FreeDesktop.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.FreeDesktop.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Markup.Xaml.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Markup.Xaml.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Markup.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Markup.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Metal.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Metal.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.MicroCom.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.MicroCom.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Native.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Native.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.OpenGL.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.OpenGL.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.ReactiveUI.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.ReactiveUI.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Remote.Protocol.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Remote.Protocol.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Skia.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Skia.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Themes.Fluent.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Themes.Fluent.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Themes.Simple.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Themes.Simple.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Vulkan.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Vulkan.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Win32.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.Win32.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.X11.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.X11.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Avalonia.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/ClosedXML.Parser.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/ClosedXML.Parser.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/ClosedXML.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/ClosedXML.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/DocumentFormat.OpenXml.Framework.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/DocumentFormat.OpenXml.Framework.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/DocumentFormat.OpenXml.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/DocumentFormat.OpenXml.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/DynamicData.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/DynamicData.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/ExcelNumberFormat.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/ExcelNumberFormat.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/HarfBuzzSharp.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/HarfBuzzSharp.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/MicroCom.Runtime.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/MicroCom.Runtime.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.Abstractions.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.Abstractions.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.Relational.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.Relational.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.Extensions.Caching.Abstractions.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.Extensions.Caching.Abstractions.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.Extensions.Caching.Memory.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.Extensions.Caching.Memory.dll
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.Extensions.DependencyInjection.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.Extensions.DependencyInjection.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.Extensions.Logging.Abstractions.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.Extensions.Logging.Abstractions.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.Extensions.Logging.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.Extensions.Logging.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.Extensions.Options.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.Extensions.Options.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.Extensions.Primitives.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Microsoft.Extensions.Primitives.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Npgsql.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Npgsql.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Presence.Desktop
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Presence.Desktop
Executable file
Binary file not shown.
1168
Presence.Desktop/bin/Debug/net8.0/Presence.Desktop.deps.json
Normal file
1168
Presence.Desktop/bin/Debug/net8.0/Presence.Desktop.deps.json
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Presence.Desktop/bin/Debug/net8.0/Presence.Desktop.dll
Normal file
BIN
Presence.Desktop/bin/Debug/net8.0/Presence.Desktop.dll
Normal file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Presence.Desktop.pdb
Normal file
BIN
Presence.Desktop/bin/Debug/net8.0/Presence.Desktop.pdb
Normal file
Binary file not shown.
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
BIN
Presence.Desktop/bin/Debug/net8.0/RBush.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/RBush.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/ReactiveUI.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/ReactiveUI.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/SixLabors.Fonts.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/SixLabors.Fonts.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/SkiaSharp.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/SkiaSharp.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Splat.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Splat.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/System.IO.Packaging.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/System.IO.Packaging.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/System.IO.Pipelines.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/System.IO.Pipelines.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/System.Reactive.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/System.Reactive.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/Tmds.DBus.Protocol.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/Tmds.DBus.Protocol.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/data.dll
Normal file
BIN
Presence.Desktop/bin/Debug/net8.0/data.dll
Normal file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/data.pdb
Normal file
BIN
Presence.Desktop/bin/Debug/net8.0/data.pdb
Normal file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/domain.dll
Normal file
BIN
Presence.Desktop/bin/Debug/net8.0/domain.dll
Normal file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/domain.pdb
Normal file
BIN
Presence.Desktop/bin/Debug/net8.0/domain.pdb
Normal file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/linux-arm/native/libHarfBuzzSharp.so
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/linux-arm/native/libHarfBuzzSharp.so
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/linux-arm/native/libSkiaSharp.so
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/linux-arm/native/libSkiaSharp.so
Executable file
Binary file not shown.
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/linux-arm64/native/libSkiaSharp.so
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/linux-arm64/native/libSkiaSharp.so
Executable file
Binary file not shown.
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/linux-musl-x64/native/libSkiaSharp.so
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/linux-musl-x64/native/libSkiaSharp.so
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/linux-x64/native/libHarfBuzzSharp.so
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/linux-x64/native/libHarfBuzzSharp.so
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/linux-x64/native/libSkiaSharp.so
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/linux-x64/native/libSkiaSharp.so
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/osx/native/libAvaloniaNative.dylib
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/osx/native/libAvaloniaNative.dylib
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/osx/native/libHarfBuzzSharp.dylib
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/osx/native/libHarfBuzzSharp.dylib
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/osx/native/libSkiaSharp.dylib
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/osx/native/libSkiaSharp.dylib
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/win-arm64/native/av_libglesv2.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/win-arm64/native/av_libglesv2.dll
Executable file
Binary file not shown.
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/win-arm64/native/libHarfBuzzSharp.dll
Executable file
BIN
Presence.Desktop/bin/Debug/net8.0/runtimes/win-arm64/native/libHarfBuzzSharp.dll
Executable file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user