Skip to content

Commit e1ac76b

Browse files
committed
initial port to avalonia
1 parent 5a535f0 commit e1ac76b

29 files changed

Lines changed: 303 additions & 798 deletions

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "C#: SharpFM.App",
5+
"type": "dotnet",
6+
"request": "launch",
7+
"projectPath": "${workspaceFolder}\\SharpFM.App\\SharpFM.App.csproj",
8+
"launchConfigurationId": "TargetFramework=;SharpFM.App"
9+
}
10+
]
11+
}

.vscode/settings.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"workbench.colorCustomizations": {
3+
"activityBar.activeBackground": "#fa1b49",
4+
"activityBar.background": "#fa1b49",
5+
"activityBar.foreground": "#e7e7e7",
6+
"activityBar.inactiveForeground": "#e7e7e799",
7+
"activityBarBadge.background": "#155e02",
8+
"activityBarBadge.foreground": "#e7e7e7",
9+
"commandCenter.border": "#e7e7e799",
10+
"sash.hoverBorder": "#fa1b49",
11+
"statusBar.background": "#dd0531",
12+
"statusBar.foreground": "#e7e7e7",
13+
"statusBarItem.hoverBackground": "#fa1b49",
14+
"statusBarItem.remoteBackground": "#dd0531",
15+
"statusBarItem.remoteForeground": "#e7e7e7",
16+
"titleBar.activeBackground": "#dd0531",
17+
"titleBar.activeForeground": "#e7e7e7",
18+
"titleBar.inactiveBackground": "#dd053199",
19+
"titleBar.inactiveForeground": "#e7e7e799"
20+
},
21+
"peacock.color": "#dd0531"
22+
}

SharpFM.App/App.axaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Application xmlns="https://github.com/avaloniaui"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3+
x:Class="SharpFM.App.App"
4+
RequestedThemeVariant="Default">
5+
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
6+
7+
<Application.Styles>
8+
<FluentTheme />
9+
</Application.Styles>
10+
</Application>

SharpFM.App/App.axaml.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Avalonia;
2+
using Avalonia.Controls.ApplicationLifetimes;
3+
using Avalonia.Markup.Xaml;
4+
using SharpFM.App.ViewModels;
5+
6+
namespace SharpFM.App;
7+
8+
public partial class App : Application
9+
{
10+
public override void Initialize()
11+
{
12+
AvaloniaXamlLoader.Load(this);
13+
}
14+
15+
public override void OnFrameworkInitializationCompleted()
16+
{
17+
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
18+
{
19+
desktop.MainWindow = new MainWindow
20+
{
21+
DataContext = new MainWindowViewModel()
22+
};
23+
}
24+
25+
base.OnFrameworkInitializationCompleted();
26+
}
27+
}

SharpFM.App/App.xaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

SharpFM.App/App.xaml.cs

Lines changed: 0 additions & 90 deletions
This file was deleted.
-1.4 KB
Binary file not shown.
-7.52 KB
Binary file not shown.
-2.87 KB
Binary file not shown.
-1.61 KB
Binary file not shown.

0 commit comments

Comments
 (0)