Skip to content
This repository was archived by the owner on Feb 16, 2024. It is now read-only.

Commit 38e08c4

Browse files
committed
Merge branch 'main' into xlcommon2
2 parents f908236 + 18b838d commit 38e08c4

File tree

7 files changed

+56
-14
lines changed

7 files changed

+56
-14
lines changed

src/XIVLauncher2.Common/XIVLauncher2.Common.csproj

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
<PropertyGroup Condition="'$(IsLinux)'=='true'">
2727
<DefineConstants>$(DefineConstants);LINUX</DefineConstants>
2828
</PropertyGroup>
29-
3029
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Release'">
3130
<AppOutputBase>$(MSBuildProjectDirectory)\</AppOutputBase>
3231
<PathMap>$(AppOutputBase)=C:\goatsoft\xl\XIVLauncher.Common\</PathMap>
@@ -45,13 +44,11 @@
4544
<PackageReference Include="Downloader" Version="2.2.8" />
4645
<PackageReference Include="MonoTorrent" Version="2.0.0" />
4746
<PackageReference Include="Serilog" Version="2.12.0" />
47+
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
4848
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
49-
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
50-
<PackageReference Include="Serilog.Sinks.Debug" Version="1.0.1" />
49+
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
50+
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
5151
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
5252
<PackageReference Include="SharedMemory" Version="2.3.2" />
53-
<PackageReference Include="System.Memory" Version="4.5.5" />
54-
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
55-
<PackageReference Include="System.Text.Json" Version="7.0.0" />
5653
</ItemGroup>
5754
</Project>

src/XIVLauncher2/App.axaml.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Avalonia;
22
using Avalonia.Controls.ApplicationLifetimes;
33
using Avalonia.Markup.Xaml;
4+
using XIVLauncher2.ViewModels;
45

56
namespace XIVLauncher2;
67

@@ -15,7 +16,10 @@ public override void OnFrameworkInitializationCompleted()
1516
{
1617
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
1718
{
18-
desktop.MainWindow = new MainWindow();
19+
desktop.MainWindow = new MainWindow()
20+
{
21+
DataContext = new MainWindowViewModel()
22+
};
1923
}
2024

2125
base.OnFrameworkInitializationCompleted();
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System.Reactive;
2+
using CommunityToolkit.Mvvm.ComponentModel;
3+
using CommunityToolkit.Mvvm.Input;
4+
5+
namespace XIVLauncher2.ViewModels;
6+
7+
public partial class MainWindowViewModel : ViewModelBase
8+
{
9+
[ObservableProperty]
10+
private string _XIVLauncherText = "XIVLauncher";
11+
12+
[RelayCommand]
13+
private void RunTheThing()
14+
{
15+
this.XIVLauncherText = "XIVLauncher TWO";
16+
}
17+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
namespace XIVLauncher2.ViewModels;
2+
3+
using CommunityToolkit.Mvvm.ComponentModel;
4+
5+
public class ViewModelBase : ObservableObject { }

src/XIVLauncher2/MainWindow.axaml renamed to src/XIVLauncher2/Views/MainWindow.axaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@
33
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:i="clr-namespace:Projektanker.Icons.Avalonia;assembly=Projektanker.Icons.Avalonia"
6+
xmlns:vm="using:XIVLauncher2.ViewModels"
67
mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="500"
78
x:Class="XIVLauncher2.MainWindow"
89
Title="XIVLauncher2"
910
Width="1000" Height="500"
1011
MinWidth="1000" MinHeight="500"
11-
MaxWidth="1280" MaxHeight="800"
1212
WindowStartupLocation="CenterScreen"
1313
TransparencyLevelHint="AcrylicBlur"
1414
Background="Transparent"
1515
ExtendClientAreaToDecorationsHint="False">
16-
16+
<Design.DataContext>
17+
<vm:MainWindowViewModel />
18+
</Design.DataContext>
19+
1720
<ExperimentalAcrylicBorder Padding="10">
1821
<ExperimentalAcrylicBorder.Material>
1922
<ExperimentalAcrylicMaterial BackgroundSource="Digger" TintOpacity="1" TintColor="Black"
@@ -49,8 +52,8 @@
4952
Grid.Column="1">
5053
<StackPanel Width="250" Spacing="10" VerticalAlignment="Center">
5154
<!-- Placeholder logo text -->
52-
<TextBlock Text="XIVLauncher" FontSize="24" FontWeight="Bold" HorizontalAlignment="Center" />
53-
55+
<TextBlock Text="{Binding XIVLauncherText}" FontSize="24" FontWeight="Bold" HorizontalAlignment="Center" />
56+
5457
<!-- Text boxes -->
5558
<TextBox Watermark="ID"></TextBox>
5659
<TextBox Watermark="Password" PasswordChar="*"></TextBox>
@@ -65,9 +68,12 @@
6568
<!-- Buttons -->
6669
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"
6770
Spacing="5">
68-
<Button i:Attached.Icon="fa-play" ToolTip.Tip="Play" Height="40" Width="40" FontSize="20" Background="#1e88e5" />
69-
<Button i:Attached.Icon="fa-user-group" ToolTip.Tip="Accounts" Height="40" Width="40" FontSize="20" />
70-
<Button i:Attached.Icon="fa-cog" ToolTip.Tip="Settings" Height="40" Width="40" FontSize="20" />
71+
<Button i:Attached.Icon="fa-play" ToolTip.Tip="Play" Height="40" Width="40" FontSize="20"
72+
Background="#1e88e5" Command="{Binding RunTheThingCommand}" />
73+
<Button i:Attached.Icon="fa-user-group" ToolTip.Tip="Accounts" Height="40" Width="40"
74+
FontSize="20" />
75+
<Button i:Attached.Icon="fa-cog" ToolTip.Tip="Settings" Height="40" Width="40"
76+
FontSize="20" />
7177
</StackPanel>
7278
</StackPanel>
7379
</Border>
File renamed without changes.

src/XIVLauncher2/XIVLauncher2.csproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,21 @@
1616
<PackageReference Include="Avalonia" Version="0.10.18" />
1717
<PackageReference Include="Avalonia.Desktop" Version="0.10.18" />
1818
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="0.10.18" />
19+
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0" />
1920
<PackageReference Include="Projektanker.Icons.Avalonia" Version="5.8.0" />
2021
<PackageReference Include="Projektanker.Icons.Avalonia.FontAwesome" Version="5.8.0" />
22+
<PackageReference Include="Serilog" Version="2.12.0" />
2123
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
2224
</ItemGroup>
25+
26+
<ItemGroup>
27+
<Compile Update="Views\MainWindow.axaml.cs">
28+
<DependentUpon>MainWindow.axaml</DependentUpon>
29+
<SubType>Code</SubType>
30+
</Compile>
31+
</ItemGroup>
32+
33+
<ItemGroup>
34+
<ProjectReference Include="..\XIVLauncher2.Common\XIVLauncher2.Common.csproj" />
35+
</ItemGroup>
2336
</Project>

0 commit comments

Comments
 (0)