Skip to content

Commit

Permalink
Merge pull request #17 from NoahStolk/release-final-compatibility-update
Browse files Browse the repository at this point in the history
Release final compatibility update
  • Loading branch information
NoahStolk authored Jan 17, 2024
2 parents 95e9ab0 + 3127516 commit d41aa13
Show file tree
Hide file tree
Showing 23 changed files with 663 additions and 7,563 deletions.
266 changes: 3 additions & 263 deletions .editorconfig

Large diffs are not rendered by default.

320 changes: 320 additions & 0 deletions .globalconfig

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [1.5.0.0] - 2024-01-17

This is an API compatibility update. Older versions will soon stop working.

- The application now uses the latest API endpoints so that it can continue to function.
- The application no longer checks for updates.
- The application no longer displays the changelog.

## [1.4.0.0] - 2022-05-01

- API updates to support multiple builds. Windows 7 now has a separate build. More builds for other operating systems will follow in the future (not soon).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="Roslynator.Analyzers" Version="4.1.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="Roslynator.Analyzers" Version="4.9.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.38.0.46746">
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.17.0.82934">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
7,338 changes: 282 additions & 7,056 deletions DevilDaggersAssetEditor.Wpf/Clients/DevilDaggersInfoApiClient.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"defaultVariables": null,
"documentGenerator": {
"fromDocument": {
"url": "http://devildaggers.info/swagger/v1/swagger.json",
"url": "https://devildaggers.info/swagger/DDAE/swagger.json",
"output": null,
"newLineBehavior": "Auto"
}
Expand All @@ -13,7 +13,9 @@
"clientBaseClass": null,
"configurationClass": null,
"generateClientClasses": true,
"suppressClientClassesOutput": false,
"generateClientInterfaces": false,
"suppressClientInterfacesOutput": false,
"clientBaseInterface": null,
"injectHttpClient": true,
"disposeHttpClient": true,
Expand All @@ -31,6 +33,8 @@
"exposeJsonSerializerSettings": false,
"clientClassAccessModifier": "public",
"typeAccessModifier": "public",
"propertySetterAccessModifier": "",
"generateNativeRecords": false,
"generateContractsOutput": false,
"contractsNamespace": null,
"contractsOutputFilePath": null,
Expand Down Expand Up @@ -87,10 +91,6 @@
"generateOptionalPropertiesAsNullable": false,
"generateNullableReferenceTypes": true,
"templateDirectory": null,
"typeNameGeneratorType": null,
"propertyNameGeneratorType": null,
"enumNameGeneratorType": null,
"checksumCacheEnabled": false,
"serviceHost": null,
"serviceSchemes": null,
"output": "DevilDaggersInfoApiClient.cs",
Expand Down
10 changes: 5 additions & 5 deletions DevilDaggersAssetEditor.Wpf/DevilDaggersAssetEditor.Wpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<Version>1.4.0.0</Version>
<Version>1.5.0.0</Version>
<Nullable>enable</Nullable>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
Expand All @@ -19,18 +19,18 @@
<ProjectReference Include="..\DevilDaggersAssetEditor\DevilDaggersAssetEditor.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="DevilDaggersCore.Wpf" Version="3.0.0" />
<PackageReference Include="Extended.Wpf.Toolkit" Version="4.3.0" />
<PackageReference Include="DevilDaggersCore.Wpf" Version="4.0.0" />
<PackageReference Include="Extended.Wpf.Toolkit" Version="4.5.1" />
<PackageReference Include="HtmlToXamlConverter" Version="1.0.5727.24510" />
<PackageReference Include="NoahStolk.OpenAlBindings" Version="1.0.0" />
<PackageReference Include="NoahStolk.SyntaxHighlighter" Version="1.0.0" />
<PackageReference Include="NoahStolk.WaveParser" Version="1.0.1" />
<PackageReference Include="Ookii.Dialogs.Wpf" Version="5.0.1" />
<PackageReference Include="Roslynator.Analyzers" Version="4.1.0">
<PackageReference Include="Roslynator.Analyzers" Version="4.9.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.38.0.46746">
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.17.0.82934">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
12 changes: 0 additions & 12 deletions DevilDaggersAssetEditor.Wpf/Extensions/DialogExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,18 @@ namespace DevilDaggersAssetEditor.Wpf.Extensions;

public static class DialogExtensions
{
public static void OpenDevilDaggersRootFolder(this VistaFolderBrowserDialog folderDialog)
=> folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableDevilDaggersRootFolder, UserHandler.Instance.Settings.DevilDaggersRootFolder);

public static void OpenDevilDaggersRootFolder(this FileDialog folderDialog)
=> folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableDevilDaggersRootFolder, UserHandler.Instance.Settings.DevilDaggersRootFolder);

public static void OpenDevilDaggersModsFolder(this VistaFolderBrowserDialog folderDialog)
=> folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableDevilDaggersRootFolder, Path.Combine(UserHandler.Instance.Settings.DevilDaggersRootFolder, "mods"));

public static void OpenDevilDaggersModsFolder(this FileDialog folderDialog)
=> folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableDevilDaggersRootFolder, Path.Combine(UserHandler.Instance.Settings.DevilDaggersRootFolder, "mods"));

public static void OpenModsRootFolder(this VistaFolderBrowserDialog folderDialog)
=> folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableModsRootFolder, UserHandler.Instance.Settings.ModsRootFolder);

public static void OpenModsRootFolder(this FileDialog folderDialog)
=> folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableModsRootFolder, UserHandler.Instance.Settings.ModsRootFolder);

public static void OpenAssetsRootFolder(this VistaFolderBrowserDialog folderDialog)
=> folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableAssetsRootFolder, UserHandler.Instance.Settings.AssetsRootFolder);

public static void OpenAssetsRootFolder(this FileDialog folderDialog)
=> folderDialog.OpenDirectory(UserHandler.Instance.Settings.EnableAssetsRootFolder, UserHandler.Instance.Settings.AssetsRootFolder);

public static void OpenDirectory(this VistaFolderBrowserDialog folderDialog, bool condition, string? path)
{
if (condition && !string.IsNullOrEmpty(path) && Directory.Exists(path))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using DevilDaggersAssetEditor.Wpf.Utils;
using DevilDaggersCore.Wpf.Utils;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,12 @@ private void ReloadButton_Click(object sender, RoutedEventArgs e)
ReloadButton.Content = "Loading...";

using BackgroundWorker thread = new();
thread.DoWork += (senderDoWork, eDoWork) =>
thread.DoWork += (_, _) =>
{
Task modsTask = NetworkHandler.Instance.RetrieveModList();
modsTask.Wait();
};
thread.RunWorkerCompleted += (senderRunWorkerCompleted, eRunWorkerCompleted) =>
thread.RunWorkerCompleted += (_, _) =>
{
UpdateMods();
UpdatePageLabel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using DevilDaggersAssetEditor.Utils;
using DevilDaggersAssetEditor.Wpf.Audio;
using DevilDaggersCore.Wpf.Extensions;
using DevilDaggersCore.Wpf.Windows;
using NoahStolk.OpenAlBindings;
using NoahStolk.WaveParser;
using System;
Expand Down Expand Up @@ -54,7 +53,7 @@ public AudioPreviewerControl()
ResetPitchImage.Source = ((Image)Resources["ResetPitchImage"]).Source;

DispatcherTimer timer = new() { Interval = new TimeSpan(0, 0, 0, 0, 10) };
timer.Tick += (sender, e) =>
timer.Tick += (_, _) =>
{
if (_soundSource == null || _soundSource.State == SourceState.Paused)
return;
Expand Down
64 changes: 10 additions & 54 deletions DevilDaggersAssetEditor.Wpf/Gui/Windows/Loading.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace DevilDaggersAssetEditor.Wpf.Gui.Windows;

Expand All @@ -34,50 +33,9 @@ public LoadingWindow()

private void RunThreads(object? sender, EventArgs e)
{
using BackgroundWorker checkVersionThread = new();
checkVersionThread.DoWork += (sender, e) => NetworkHandler.Instance.GetOnlineTool();
checkVersionThread.RunWorkerCompleted += (sender, e) =>
{
Dispatcher.Invoke(() =>
{
string message = string.Empty;
SolidColorBrush color;

if (NetworkHandler.Instance.Tool == null || NetworkHandler.Instance.Distribution == null)
{
message = "Error";
color = ColorUtils.ThemeColors["ErrorText"];
}
else if (App.LocalVersion < Version.Parse(NetworkHandler.Instance.Tool.VersionNumberRequired))
{
message = "Warning (update required)";
color = ColorUtils.ThemeColors["WarningText"];
}
else if (App.LocalVersion < Version.Parse(NetworkHandler.Instance.Distribution.VersionNumber))
{
message = "Warning (update recommended)";
color = ColorUtils.ThemeColors["SuggestionText"];
}
else
{
message = "OK (up to date)";
color = ColorUtils.ThemeColors["SuccessText"];
}

TaskResultsStackPanel.Children.Add(new TextBlock
{
Text = message,
Foreground = color,
FontWeight = FontWeights.Bold,
});
});

ThreadComplete();
};

bool readUserSettingsSuccess = false;
using BackgroundWorker readUserSettingsThread = new();
readUserSettingsThread.DoWork += (sender, e) =>
readUserSettingsThread.DoWork += (_, _) =>
{
try
{
Expand All @@ -89,7 +47,7 @@ private void RunThreads(object? sender, EventArgs e)
App.Instance.ShowError("Error", "Error while trying to read user settings.", ex);
}
};
readUserSettingsThread.RunWorkerCompleted += (sender, e) =>
readUserSettingsThread.RunWorkerCompleted += (_, _) =>
{
Dispatcher.Invoke(() =>
{
Expand All @@ -106,7 +64,7 @@ private void RunThreads(object? sender, EventArgs e)

bool readUserCacheSuccess = false;
using BackgroundWorker readUserCacheThread = new();
readUserCacheThread.DoWork += (sender, e) =>
readUserCacheThread.DoWork += (_, _) =>
{
try
{
Expand All @@ -118,7 +76,7 @@ private void RunThreads(object? sender, EventArgs e)
App.Instance.ShowError("Error", "Error while trying to read user cache.", ex);
}
};
readUserCacheThread.RunWorkerCompleted += (sender, e) =>
readUserCacheThread.RunWorkerCompleted += (_, _) =>
{
Dispatcher.Invoke(() =>
{
Expand All @@ -135,13 +93,13 @@ private void RunThreads(object? sender, EventArgs e)

bool retrieveModsSuccess = false;
using BackgroundWorker retrieveModsThread = new();
retrieveModsThread.DoWork += (sender, e) =>
retrieveModsThread.DoWork += (_, _) =>
{
Task<bool> modsTask = NetworkHandler.Instance.RetrieveModList();
modsTask.Wait();
retrieveModsSuccess = modsTask.Result;
};
retrieveModsThread.RunWorkerCompleted += (sender, e) =>
retrieveModsThread.RunWorkerCompleted += (_, _) =>
{
Dispatcher.Invoke(() =>
{
Expand All @@ -158,13 +116,13 @@ private void RunThreads(object? sender, EventArgs e)

bool retrieveAssetInfoSuccess = false;
using BackgroundWorker retrieveAssetInfoThread = new();
retrieveAssetInfoThread.DoWork += (sender, e) =>
retrieveAssetInfoThread.DoWork += (_, _) =>
{
Task<bool> assetInfoTask = NetworkHandler.Instance.RetrieveAssetInfo();
assetInfoTask.Wait();
retrieveAssetInfoSuccess = assetInfoTask.Result;
};
retrieveAssetInfoThread.RunWorkerCompleted += (sender, e) =>
retrieveAssetInfoThread.RunWorkerCompleted += (_, _) =>
{
Dispatcher.Invoke(() =>
{
Expand All @@ -180,24 +138,22 @@ private void RunThreads(object? sender, EventArgs e)
};

using BackgroundWorker mainInitThread = new();
mainInitThread.DoWork += (sender, e) =>
mainInitThread.DoWork += (_, _) =>
{
Dispatcher.Invoke(() =>
{
MainWindow mainWindow = new();
mainWindow.Show();
});
};
mainInitThread.RunWorkerCompleted += (sender, e) => Close();
mainInitThread.RunWorkerCompleted += (_, _) => Close();

_threads.Add(checkVersionThread);
_threads.Add(readUserSettingsThread);
_threads.Add(readUserCacheThread);
_threads.Add(retrieveModsThread);
_threads.Add(retrieveAssetInfoThread);
_threads.Add(mainInitThread);

_threadMessages.Add("Checking for updates...");
_threadMessages.Add("Reading user settings...");
_threadMessages.Add("Reading user cache...");
_threadMessages.Add("Retrieving mods...");
Expand Down
2 changes: 0 additions & 2 deletions DevilDaggersAssetEditor.Wpf/Gui/Windows/Main.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@
<MenuItem Header="Help" Name="HelpItem">
<MenuItem Header="Help" Click="Help_Click" />
<MenuItem Header="About" Click="About_Click" />
<MenuItem Header="Changelog" Click="Changelog_Click" />
<MenuItem Header="View source code" Click="ViewSourceCode_Click" />
<MenuItem Header="Check for updates" Name="UpdateItem" Click="CheckForUpdates_Click" />
</MenuItem>
</Menu>
</DockPanel>
Expand Down
Loading

0 comments on commit d41aa13

Please sign in to comment.