Skip to content

Commit

Permalink
Convert WPF app to netcoreapp3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stakira committed Sep 19, 2021
1 parent 9db8031 commit c0753fa
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 696 deletions.
4 changes: 2 additions & 2 deletions OpenUtau.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31321.278
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenUtau", "OpenUtau\OpenUtau.csproj", "{D951492F-0901-4296-AE7F-831430C07FA9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenUtau", "OpenUtau\OpenUtau.csproj", "{D951492F-0901-4296-AE7F-831430C07FA9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8CC070AB-64DC-4C02-89E7-D8E5EC91A492}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -19,7 +19,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenUtau.Test", "OpenUtau.T
{D951492F-0901-4296-AE7F-831430C07FA9} = {D951492F-0901-4296-AE7F-831430C07FA9}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenUtau.Core", "OpenUtau.Core\OpenUtau.Core.csproj", "{7793257C-054C-4935-A1EF-CAB345E9F6C5}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenUtau.Core", "OpenUtau.Core\OpenUtau.Core.csproj", "{7793257C-054C-4935-A1EF-CAB345E9F6C5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
56 changes: 0 additions & 56 deletions OpenUtau/App.config

This file was deleted.

3 changes: 2 additions & 1 deletion OpenUtau/App.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Application x:Class="OpenUtau.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:OpenUtau">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
Expand Down
29 changes: 2 additions & 27 deletions OpenUtau/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
using System;
using System.Globalization;
using System.Globalization;
using System.Linq;
using System.Threading;
using System.Windows;
using System.Windows.Threading;
using Serilog;

namespace OpenUtau {

/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application {

private App() {
public App() {
InitializeComponent();
InitializeCulture();
InitializeTheme();
Expand Down Expand Up @@ -47,25 +42,5 @@ public static void InitializeTheme() {
Current.Resources.MergedDictionaries.Add(dark);
}
}

[STAThread]
private static void Main() {
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.WriteTo.Console()
.WriteTo.File("log.txt", rollingInterval: RollingInterval.Day, encoding: System.Text.Encoding.UTF8)
.CreateLogger();
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler((sender, args) => {
Log.Error((Exception)args.ExceptionObject, "Unhandled exception");
});

Core.DocManager.Inst.Initialize();
Core.PlaybackManager.Inst.AudioOutput = new Audio.WaveOutAudioOutput();
Core.AudioFileUtilsProvider.Utils = new Audio.NAudioFileUtils();

var app = new App();
var window = new UI.MainWindow();
app.Run(window);
}
}
}
10 changes: 10 additions & 0 deletions OpenUtau/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
Loading

0 comments on commit c0753fa

Please sign in to comment.