From a2608b0e3e510c7eb865a70aa3e5493aad95fb8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Korczy=C5=84ski?= Date: Mon, 22 Nov 2021 19:43:29 +0000 Subject: [PATCH 1/8] Switched to .NET 6.0 completely --- AvaloniaStyles/AvaloniaStyles.csproj | 2 +- LoaderAvalonia/LoaderAvalonia.csproj | 2 +- README.md | 10 ++++------ Rendering/OpenGLBindings/OpenGLBindings.csproj | 2 +- Rendering/TheAvaloniaOpenGL/TheAvaloniaOpenGL.csproj | 2 +- Rendering/TheEngine/TheEngine.csproj | 2 +- Rendering/TheMaths/TheMaths.csproj | 2 +- Updater/Updater.csproj | 2 +- WDE.AzerothCore/WDE.AzerothCore.csproj | 2 +- WDE.Common.Avalonia/WDE.Common.Avalonia.csproj | 2 +- .../WDE.CommonViews.Avalonia.csproj | 2 +- WDE.Conditions.Avalonia/WDE.Conditions.Avalonia.csproj | 2 +- WDE.Conditions/WDE.Conditions.csproj | 2 +- .../WDE.DatabaseEditors.Avalonia.csproj | 2 +- WDE.DatabaseEditors/WDE.DatabaseEditors.csproj | 2 +- WDE.MPQ/WDE.MPQ.csproj | 2 +- WDE.MVVM/WDE.MVVM.csproj | 2 +- WDE.MapRenderer/WDE.MapRenderer.csproj | 2 +- WDE.MpqReader/WDE.MpqReader.csproj | 2 +- WDE.MySqlDatabaseCommon/WDE.MySqlDatabaseCommon.csproj | 2 +- .../WDE.PacketViewer.Avalonia.csproj | 2 +- WDE.PacketViewer/WDE.PacketViewer.csproj | 2 +- WDE.Parameters/WDE.Parameters.csproj | 2 +- WDE.ProjectSkyFire/WDE.ProjectSkyFire.csproj | 2 +- WDE.RemoteSOAP/WDE.RemoteSOAP.csproj | 2 +- WDE.SQLEditor/WDE.SQLEditor.csproj | 2 +- .../WDE.SmartScriptEditor.Avalonia.csproj | 2 +- WDE.SmartScriptEditor/WDE.SmartScriptEditor.csproj | 2 +- WDE.Solutions/WDE.Solutions.csproj | 2 +- .../WDE.SourceCodeIntegrationEditor.csproj | 2 +- WDE.Spells/WDE.Spells.csproj | 2 +- WDE.SqlInterpreter/WDE.SqlInterpreter.csproj | 2 +- WDE.SqlQueryGenerator/WDE.SqlQueryGenerator.csproj | 2 +- WDE.Trinity/WDE.Trinity.csproj | 2 +- .../WDE.TrinitySmartScriptEditor.csproj | 2 +- WDE.Updater/WDE.Updater.csproj | 2 +- WDE.WoWHeadConnector/WDE.WoWHeadConnector.csproj | 2 +- WDE.WorldMap/WDE.WorldMap.csproj | 2 +- WoWDatabaseEditor.Common/WDE.Common/WDE.Common.csproj | 2 +- .../WDE.DbcStore/WDE.DbcStore.csproj | 2 +- .../WDE.History/WDE.History.csproj | 2 +- .../WDE.SkyFireMySqlDatabase.csproj | 2 +- .../WDE.TrinityMySqlDatabase.csproj | 2 +- WoWDatabaseEditor/WoWDatabaseEditorCore.csproj | 2 +- .../WoWDatabaseEditorCore.Avalonia.csproj | 2 +- appveyor.yml | 6 +++--- 46 files changed, 51 insertions(+), 53 deletions(-) diff --git a/AvaloniaStyles/AvaloniaStyles.csproj b/AvaloniaStyles/AvaloniaStyles.csproj index 2190fc70d..578cc28fd 100644 --- a/AvaloniaStyles/AvaloniaStyles.csproj +++ b/AvaloniaStyles/AvaloniaStyles.csproj @@ -2,7 +2,7 @@ WinExe - net5.0;net6.0 + net6.0 Debug;Release AnyCPU enable diff --git a/LoaderAvalonia/LoaderAvalonia.csproj b/LoaderAvalonia/LoaderAvalonia.csproj index 177b47cfd..320a2e540 100644 --- a/LoaderAvalonia/LoaderAvalonia.csproj +++ b/LoaderAvalonia/LoaderAvalonia.csproj @@ -2,7 +2,7 @@ Exe - net5.0;net6.0 + net6.0 Debug;Release AnyCPU diff --git a/README.md b/README.md index 16bed0b25..dbf8077c6 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,7 @@ Application has a built-in auto updater, so you do **not** have to redownload a ## Mac OS / Linux / Windows version -**To run the editor, you need [.NET 5 Runtime](https://dotnet.microsoft.com/download/dotnet/5.0) for your OS**. - -**Future versions will require [.NET 6 Runtime](https://dotnet.microsoft.com/download/dotnet/6.0), we recommend to install it now already**. +**To run the editor, you need [.NET 6 Runtime](https://dotnet.microsoft.com/download/dotnet/6.0) for your OS**. WoW Database Editor is compatibile with both MacOS, Linux and Windows. @@ -56,13 +54,13 @@ Now you can open the solution in Visual Studio or other C#/.NET IDE and build. S ``` -- Windows version -dotnet publish -c Release --self-contained false -f net5.0 -o bin/wowdatabaseeditor-avalonia-win/ LoaderAvalonia/LoaderAvalonia.csproj -r win7-x64 +dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-win/ LoaderAvalonia/LoaderAvalonia.csproj -r win7-x64 -- MacOS version -dotnet publish -c Release --self-contained false -f net5.0 -o bin/wowdatabaseeditor-avalonia-mac/ LoaderAvalonia/LoaderAvalonia.csproj -r osx-x64 +dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-mac/ LoaderAvalonia/LoaderAvalonia.csproj -r osx-x64 -- Linux version -dotnet publish -c Release --self-contained false -f net5.0 -o bin/wowdatabaseeditor-avalonia-linux/ LoaderAvalonia/LoaderAvalonia.csproj -r linux-x64 +dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-linux/ LoaderAvalonia/LoaderAvalonia.csproj -r linux-x64 ``` diff --git a/Rendering/OpenGLBindings/OpenGLBindings.csproj b/Rendering/OpenGLBindings/OpenGLBindings.csproj index 5efbd877b..eb2460e91 100644 --- a/Rendering/OpenGLBindings/OpenGLBindings.csproj +++ b/Rendering/OpenGLBindings/OpenGLBindings.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 enable enable diff --git a/Rendering/TheAvaloniaOpenGL/TheAvaloniaOpenGL.csproj b/Rendering/TheAvaloniaOpenGL/TheAvaloniaOpenGL.csproj index 126cd1267..08e6b35c3 100644 --- a/Rendering/TheAvaloniaOpenGL/TheAvaloniaOpenGL.csproj +++ b/Rendering/TheAvaloniaOpenGL/TheAvaloniaOpenGL.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 enable enable true diff --git a/Rendering/TheEngine/TheEngine.csproj b/Rendering/TheEngine/TheEngine.csproj index ee17eecde..df36d1145 100644 --- a/Rendering/TheEngine/TheEngine.csproj +++ b/Rendering/TheEngine/TheEngine.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 enable enable true diff --git a/Rendering/TheMaths/TheMaths.csproj b/Rendering/TheMaths/TheMaths.csproj index 22292f330..4e8188e94 100644 --- a/Rendering/TheMaths/TheMaths.csproj +++ b/Rendering/TheMaths/TheMaths.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 enable enable true diff --git a/Updater/Updater.csproj b/Updater/Updater.csproj index b2164204c..0801ddfb4 100644 --- a/Updater/Updater.csproj +++ b/Updater/Updater.csproj @@ -1,6 +1,6 @@ - net5.0;net6.0 + net6.0 Exe false enable diff --git a/WDE.AzerothCore/WDE.AzerothCore.csproj b/WDE.AzerothCore/WDE.AzerothCore.csproj index 3c53d6455..1ce068f02 100644 --- a/WDE.AzerothCore/WDE.AzerothCore.csproj +++ b/WDE.AzerothCore/WDE.AzerothCore.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Library enable nullable diff --git a/WDE.Common.Avalonia/WDE.Common.Avalonia.csproj b/WDE.Common.Avalonia/WDE.Common.Avalonia.csproj index 742ee7f47..045e3db61 100644 --- a/WDE.Common.Avalonia/WDE.Common.Avalonia.csproj +++ b/WDE.Common.Avalonia/WDE.Common.Avalonia.csproj @@ -1,7 +1,7 @@  Library - net5.0 + net6.0 Debug;Release AnyCPU enable diff --git a/WDE.CommonViews.Avalonia/WDE.CommonViews.Avalonia.csproj b/WDE.CommonViews.Avalonia/WDE.CommonViews.Avalonia.csproj index b4e3d22d0..63f780ed3 100644 --- a/WDE.CommonViews.Avalonia/WDE.CommonViews.Avalonia.csproj +++ b/WDE.CommonViews.Avalonia/WDE.CommonViews.Avalonia.csproj @@ -1,7 +1,7 @@  Library - net5.0 + net6.0 Debug;Release AnyCPU enable diff --git a/WDE.Conditions.Avalonia/WDE.Conditions.Avalonia.csproj b/WDE.Conditions.Avalonia/WDE.Conditions.Avalonia.csproj index bf1550b59..9a8779c4a 100644 --- a/WDE.Conditions.Avalonia/WDE.Conditions.Avalonia.csproj +++ b/WDE.Conditions.Avalonia/WDE.Conditions.Avalonia.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0 0.0.0.0 0.0.0.0 Debug;Release diff --git a/WDE.Conditions/WDE.Conditions.csproj b/WDE.Conditions/WDE.Conditions.csproj index 7c1e25ecf..09201a65a 100644 --- a/WDE.Conditions/WDE.Conditions.csproj +++ b/WDE.Conditions/WDE.Conditions.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0 Library false enable diff --git a/WDE.DatabaseEditors.Avalonia/WDE.DatabaseEditors.Avalonia.csproj b/WDE.DatabaseEditors.Avalonia/WDE.DatabaseEditors.Avalonia.csproj index e2fdcbc12..5d4c32f78 100644 --- a/WDE.DatabaseEditors.Avalonia/WDE.DatabaseEditors.Avalonia.csproj +++ b/WDE.DatabaseEditors.Avalonia/WDE.DatabaseEditors.Avalonia.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 0.0.0.0 0.0.0.0 Debug;Release diff --git a/WDE.DatabaseEditors/WDE.DatabaseEditors.csproj b/WDE.DatabaseEditors/WDE.DatabaseEditors.csproj index 44788b210..f27236274 100644 --- a/WDE.DatabaseEditors/WDE.DatabaseEditors.csproj +++ b/WDE.DatabaseEditors/WDE.DatabaseEditors.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0 Library false Debug;Release diff --git a/WDE.MPQ/WDE.MPQ.csproj b/WDE.MPQ/WDE.MPQ.csproj index c03f5b1bf..7a6eb7b6a 100644 --- a/WDE.MPQ/WDE.MPQ.csproj +++ b/WDE.MPQ/WDE.MPQ.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 enable enable nullable diff --git a/WDE.MVVM/WDE.MVVM.csproj b/WDE.MVVM/WDE.MVVM.csproj index e6451e363..ac94d4ecd 100644 --- a/WDE.MVVM/WDE.MVVM.csproj +++ b/WDE.MVVM/WDE.MVVM.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Library enable nullable diff --git a/WDE.MapRenderer/WDE.MapRenderer.csproj b/WDE.MapRenderer/WDE.MapRenderer.csproj index f2e49ab7b..ed459b295 100644 --- a/WDE.MapRenderer/WDE.MapRenderer.csproj +++ b/WDE.MapRenderer/WDE.MapRenderer.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 enable enable true diff --git a/WDE.MpqReader/WDE.MpqReader.csproj b/WDE.MpqReader/WDE.MpqReader.csproj index a51b02f9f..7054f9e7b 100644 --- a/WDE.MpqReader/WDE.MpqReader.csproj +++ b/WDE.MpqReader/WDE.MpqReader.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 enable enable true diff --git a/WDE.MySqlDatabaseCommon/WDE.MySqlDatabaseCommon.csproj b/WDE.MySqlDatabaseCommon/WDE.MySqlDatabaseCommon.csproj index e9a646332..0975f651c 100644 --- a/WDE.MySqlDatabaseCommon/WDE.MySqlDatabaseCommon.csproj +++ b/WDE.MySqlDatabaseCommon/WDE.MySqlDatabaseCommon.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0 Library false enable diff --git a/WDE.PacketViewer.Avalonia/WDE.PacketViewer.Avalonia.csproj b/WDE.PacketViewer.Avalonia/WDE.PacketViewer.Avalonia.csproj index 8cd46e177..15926e103 100644 --- a/WDE.PacketViewer.Avalonia/WDE.PacketViewer.Avalonia.csproj +++ b/WDE.PacketViewer.Avalonia/WDE.PacketViewer.Avalonia.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 0.0.0.0 0.0.0.0 Debug;Release diff --git a/WDE.PacketViewer/WDE.PacketViewer.csproj b/WDE.PacketViewer/WDE.PacketViewer.csproj index e6d131ed1..47fb8e552 100644 --- a/WDE.PacketViewer/WDE.PacketViewer.csproj +++ b/WDE.PacketViewer/WDE.PacketViewer.csproj @@ -1,7 +1,7 @@ - net5.0;net6.0 + net6.0 Library false enable diff --git a/WDE.Parameters/WDE.Parameters.csproj b/WDE.Parameters/WDE.Parameters.csproj index bc16de0c3..bf3984e8e 100644 --- a/WDE.Parameters/WDE.Parameters.csproj +++ b/WDE.Parameters/WDE.Parameters.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 Library false Debug;Release diff --git a/WDE.ProjectSkyFire/WDE.ProjectSkyFire.csproj b/WDE.ProjectSkyFire/WDE.ProjectSkyFire.csproj index 3c53d6455..1ce068f02 100644 --- a/WDE.ProjectSkyFire/WDE.ProjectSkyFire.csproj +++ b/WDE.ProjectSkyFire/WDE.ProjectSkyFire.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Library enable nullable diff --git a/WDE.RemoteSOAP/WDE.RemoteSOAP.csproj b/WDE.RemoteSOAP/WDE.RemoteSOAP.csproj index 4087a9a15..49379ce9d 100644 --- a/WDE.RemoteSOAP/WDE.RemoteSOAP.csproj +++ b/WDE.RemoteSOAP/WDE.RemoteSOAP.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Library false Debug;Release diff --git a/WDE.SQLEditor/WDE.SQLEditor.csproj b/WDE.SQLEditor/WDE.SQLEditor.csproj index 9f07df9d1..1a52bf74d 100644 --- a/WDE.SQLEditor/WDE.SQLEditor.csproj +++ b/WDE.SQLEditor/WDE.SQLEditor.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 Library false Debug;Release diff --git a/WDE.SmartScriptEditor.Avalonia/WDE.SmartScriptEditor.Avalonia.csproj b/WDE.SmartScriptEditor.Avalonia/WDE.SmartScriptEditor.Avalonia.csproj index 8d92bb112..38c87f281 100644 --- a/WDE.SmartScriptEditor.Avalonia/WDE.SmartScriptEditor.Avalonia.csproj +++ b/WDE.SmartScriptEditor.Avalonia/WDE.SmartScriptEditor.Avalonia.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 0.0.0.0 0.0.0.0 Debug;Release diff --git a/WDE.SmartScriptEditor/WDE.SmartScriptEditor.csproj b/WDE.SmartScriptEditor/WDE.SmartScriptEditor.csproj index 0aeabb3a8..4e808036a 100644 --- a/WDE.SmartScriptEditor/WDE.SmartScriptEditor.csproj +++ b/WDE.SmartScriptEditor/WDE.SmartScriptEditor.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Library false Debug;Release diff --git a/WDE.Solutions/WDE.Solutions.csproj b/WDE.Solutions/WDE.Solutions.csproj index ed3edcfd7..86feb0f44 100644 --- a/WDE.Solutions/WDE.Solutions.csproj +++ b/WDE.Solutions/WDE.Solutions.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 Library false Debug;Release diff --git a/WDE.SourceCodeIntegrationEditor/WDE.SourceCodeIntegrationEditor.csproj b/WDE.SourceCodeIntegrationEditor/WDE.SourceCodeIntegrationEditor.csproj index 335a496e2..79f95ce4e 100644 --- a/WDE.SourceCodeIntegrationEditor/WDE.SourceCodeIntegrationEditor.csproj +++ b/WDE.SourceCodeIntegrationEditor/WDE.SourceCodeIntegrationEditor.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 0.0.0.0 0.0.0.0 Debug;Release diff --git a/WDE.Spells/WDE.Spells.csproj b/WDE.Spells/WDE.Spells.csproj index a5031fddd..591e846e2 100644 --- a/WDE.Spells/WDE.Spells.csproj +++ b/WDE.Spells/WDE.Spells.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Library false Debug;Release diff --git a/WDE.SqlInterpreter/WDE.SqlInterpreter.csproj b/WDE.SqlInterpreter/WDE.SqlInterpreter.csproj index 3b14d832d..5e52aadb3 100644 --- a/WDE.SqlInterpreter/WDE.SqlInterpreter.csproj +++ b/WDE.SqlInterpreter/WDE.SqlInterpreter.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0 Library false enable diff --git a/WDE.SqlQueryGenerator/WDE.SqlQueryGenerator.csproj b/WDE.SqlQueryGenerator/WDE.SqlQueryGenerator.csproj index d5d4bad5e..684ce9af6 100644 --- a/WDE.SqlQueryGenerator/WDE.SqlQueryGenerator.csproj +++ b/WDE.SqlQueryGenerator/WDE.SqlQueryGenerator.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0 Library false enable diff --git a/WDE.Trinity/WDE.Trinity.csproj b/WDE.Trinity/WDE.Trinity.csproj index 4543a6f26..59ca2dd41 100644 --- a/WDE.Trinity/WDE.Trinity.csproj +++ b/WDE.Trinity/WDE.Trinity.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Library enable nullable diff --git a/WDE.TrinitySmartScriptEditor/WDE.TrinitySmartScriptEditor.csproj b/WDE.TrinitySmartScriptEditor/WDE.TrinitySmartScriptEditor.csproj index fcc15a1b2..e2fee83a2 100644 --- a/WDE.TrinitySmartScriptEditor/WDE.TrinitySmartScriptEditor.csproj +++ b/WDE.TrinitySmartScriptEditor/WDE.TrinitySmartScriptEditor.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 Library false Debug;Release diff --git a/WDE.Updater/WDE.Updater.csproj b/WDE.Updater/WDE.Updater.csproj index 40c1a7282..e8679e273 100644 --- a/WDE.Updater/WDE.Updater.csproj +++ b/WDE.Updater/WDE.Updater.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0 Library false enable diff --git a/WDE.WoWHeadConnector/WDE.WoWHeadConnector.csproj b/WDE.WoWHeadConnector/WDE.WoWHeadConnector.csproj index c83fddc66..393e6d320 100644 --- a/WDE.WoWHeadConnector/WDE.WoWHeadConnector.csproj +++ b/WDE.WoWHeadConnector/WDE.WoWHeadConnector.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 enable enable diff --git a/WDE.WorldMap/WDE.WorldMap.csproj b/WDE.WorldMap/WDE.WorldMap.csproj index 6d1c896bb..8c5d98e80 100644 --- a/WDE.WorldMap/WDE.WorldMap.csproj +++ b/WDE.WorldMap/WDE.WorldMap.csproj @@ -2,7 +2,7 @@ Library - net5.0 + net6.0 Debug;Release AnyCPU enable diff --git a/WoWDatabaseEditor.Common/WDE.Common/WDE.Common.csproj b/WoWDatabaseEditor.Common/WDE.Common/WDE.Common.csproj index f02671ad4..507039398 100644 --- a/WoWDatabaseEditor.Common/WDE.Common/WDE.Common.csproj +++ b/WoWDatabaseEditor.Common/WDE.Common/WDE.Common.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 Library false Debug;Release diff --git a/WoWDatabaseEditor.Common/WDE.DbcStore/WDE.DbcStore.csproj b/WoWDatabaseEditor.Common/WDE.DbcStore/WDE.DbcStore.csproj index 277dc7c67..1f21c4001 100644 --- a/WoWDatabaseEditor.Common/WDE.DbcStore/WDE.DbcStore.csproj +++ b/WoWDatabaseEditor.Common/WDE.DbcStore/WDE.DbcStore.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0 Library false Debug;Release diff --git a/WoWDatabaseEditor.Common/WDE.History/WDE.History.csproj b/WoWDatabaseEditor.Common/WDE.History/WDE.History.csproj index 60bd5cf5a..cf8019a4b 100644 --- a/WoWDatabaseEditor.Common/WDE.History/WDE.History.csproj +++ b/WoWDatabaseEditor.Common/WDE.History/WDE.History.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 Library false Debug;Release diff --git a/WoWDatabaseEditor.Common/WDE.SkyFireMySqlDatabase/WDE.SkyFireMySqlDatabase.csproj b/WoWDatabaseEditor.Common/WDE.SkyFireMySqlDatabase/WDE.SkyFireMySqlDatabase.csproj index 2abf17f45..138e9f5a3 100644 --- a/WoWDatabaseEditor.Common/WDE.SkyFireMySqlDatabase/WDE.SkyFireMySqlDatabase.csproj +++ b/WoWDatabaseEditor.Common/WDE.SkyFireMySqlDatabase/WDE.SkyFireMySqlDatabase.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 Library false enable diff --git a/WoWDatabaseEditor.Common/WDE.TrinityMySqlDatabase/WDE.TrinityMySqlDatabase.csproj b/WoWDatabaseEditor.Common/WDE.TrinityMySqlDatabase/WDE.TrinityMySqlDatabase.csproj index 2abf17f45..138e9f5a3 100644 --- a/WoWDatabaseEditor.Common/WDE.TrinityMySqlDatabase/WDE.TrinityMySqlDatabase.csproj +++ b/WoWDatabaseEditor.Common/WDE.TrinityMySqlDatabase/WDE.TrinityMySqlDatabase.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 Library false enable diff --git a/WoWDatabaseEditor/WoWDatabaseEditorCore.csproj b/WoWDatabaseEditor/WoWDatabaseEditorCore.csproj index d52ba1ff7..0d54e5eb8 100644 --- a/WoWDatabaseEditor/WoWDatabaseEditorCore.csproj +++ b/WoWDatabaseEditor/WoWDatabaseEditorCore.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 Library enable nullable diff --git a/WoWDatabaseEditorCore.Avalonia/WoWDatabaseEditorCore.Avalonia.csproj b/WoWDatabaseEditorCore.Avalonia/WoWDatabaseEditorCore.Avalonia.csproj index af478647e..1ab43e3f9 100644 --- a/WoWDatabaseEditorCore.Avalonia/WoWDatabaseEditorCore.Avalonia.csproj +++ b/WoWDatabaseEditorCore.Avalonia/WoWDatabaseEditorCore.Avalonia.csproj @@ -1,7 +1,7 @@  WinExe - net5.0;net6.0 + net6.0 Debug;Release AnyCPU Icon.ico diff --git a/appveyor.yml b/appveyor.yml index 33c7d6e40..d3028a78e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,11 +14,11 @@ build_script: - cmd: >- Rem Building WDE - dotnet publish -c Release --self-contained false -f net5.0 -o bin/wowdatabaseeditor-avalonia-win/ LoaderAvalonia/LoaderAvalonia.csproj -r win7-x64 + dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-win/ LoaderAvalonia/LoaderAvalonia.csproj -r win7-x64 - dotnet publish -c Release --self-contained false -f net5.0 -o bin/wowdatabaseeditor-avalonia-mac/ LoaderAvalonia/LoaderAvalonia.csproj -r osx-x64 + dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-mac/ LoaderAvalonia/LoaderAvalonia.csproj -r osx-x64 - dotnet publish -c Release --self-contained false -f net5.0 -o bin/wowdatabaseeditor-avalonia-linux/ LoaderAvalonia/LoaderAvalonia.csproj -r linux-x64 + dotnet publish -c Release --self-contained false -f net6.0 -o bin/wowdatabaseeditor-avalonia-linux/ LoaderAvalonia/LoaderAvalonia.csproj -r linux-x64 rename bin\wowdatabaseeditor-avalonia-mac\Updater _Updater From e5f6228cd441bd88ed0f4e63ca721f42e2ccc3cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Korczy=C5=84ski?= Date: Mon, 22 Nov 2021 20:02:46 +0000 Subject: [PATCH 2/8] Drop old WPF code --- LoaderWPF/LoaderWPF.csproj | 44 - LoaderWPF/Program.cs | 9 - WDE.Common.WPF/AssemblyInfo.cs | 9 - WDE.Common.WPF/Attached/GongDragAndDrop.cs | 160 ---- WDE.Common.WPF/Attached/SmartFormattedText.cs | 160 ---- WDE.Common.WPF/CommonWpfModule.cs | 9 - .../Components/ParameterValueHolderView.cs | 23 - WDE.Common.WPF/Components/TeachingTip.cs | 74 -- WDE.Common.WPF/Components/WdeImage.cs | 44 - .../Converters/BoolToDoubleConverter.cs | 34 - .../Converters/DataTimeToStringConverter.cs | 23 - .../Converters/NativeTextDocumentConverter.cs | 25 - WDE.Common.WPF/Converters/NullConverter.cs | 22 - WDE.Common.WPF/Themes/Generic.xaml | 108 --- .../Themes/ParameterDataTemplateSelector.cs | 26 - WDE.Common.WPF/Types/NativeTextDocument.cs | 41 - WDE.Common.WPF/Utils/GridUtils.cs | 82 -- WDE.Common.WPF/Utils/LoadingSpinner.xaml | 213 ----- WDE.Common.WPF/Utils/LoadingSpinner.xaml.cs | 12 - WDE.Common.WPF/Utils/ViewBind.cs | 62 -- .../ViewHelpers/BoolToVisibilityConverter.cs | 34 - WDE.Common.WPF/ViewHelpers/GridViewColumns.cs | 327 ------- .../ViewHelpers/IntInputValidationRule.cs | 23 - .../ViewHelpers/InvertedBoolConverter.cs | 20 - .../ViewHelpers/LongToBoolConverter.cs | 35 - .../ViewHelpers/NullToVisibilityConverter.cs | 23 - .../ViewHelpers/StretchedTreeView.cs | 52 -- .../ViewHelpers/ViewItemDoubleClickCommand.cs | 60 -- WDE.Common.WPF/WDE.Common.WPF.csproj | 25 - WDE.CommonViews.WPF/AssemblyInfo.cs | 9 - WDE.CommonViews.WPF/CommonViewsModule.cs | 49 - .../DbcStore/Views/DBCConfigView.xaml | 34 - .../DbcStore/Views/DBCConfigView.xaml.cs | 15 - .../History/Views/HistoryView.xaml | 31 - .../History/Views/HistoryView.xaml.cs | 15 - .../Parameters/Views/ParametersView.xaml | 49 - .../Parameters/Views/ParametersView.xaml.cs | 15 - .../RemoteSOAP/Views/SoapConfigView.xaml | 32 - .../RemoteSOAP/Views/SoapConfigView.xaml.cs | 15 - .../SQLEditor/Views/SqlEditorView.xaml | 15 - .../SQLEditor/Views/SqlEditorView.xaml.cs | 26 - .../Explorer/Helpers/MyTreeViewHelper.cs | 133 --- .../Views/LeftMarginMultiplierConverter .cs | 27 - .../Explorer/Views/SolutionExplorerView.xaml | 248 ----- .../Views/SolutionExplorerView.xaml.cs | 34 - .../Explorer/Views/TreeViewItemExtensions.cs | 25 - .../Tools/DebugQueryToolView.xaml | 20 - .../Tools/DebugQueryToolView.xaml.cs | 51 -- .../Views/DatabaseConfigView.xaml | 29 - .../Views/DatabaseConfigView.xaml.cs | 15 - .../Updater/ChangeLogView.xaml | 50 - .../Updater/ChangeLogView.xaml.cs | 12 - .../Updater/UpdaterConfigurationView.xaml | 46 - .../Updater/UpdaterConfigurationView.xaml.cs | 12 - .../WDE.CommonViews.WPF.csproj | 47 - WDE.Conditions.WPF/ConditionsWpfModule.cs | 9 - WDE.Conditions.WPF/Properties/AssemblyInfo.cs | 19 - WDE.Conditions.WPF/Themes/Generic.xaml | 25 - .../Views/ConditionsEditorView.xaml | 131 --- .../Views/ConditionsEditorView.xaml.cs | 28 - .../DefinitionEditor/ConditionEditorView.xaml | 106 --- .../ConditionEditorView.xaml.cs | 17 - .../ConditionGroupsEditorView.xaml | 75 -- .../ConditionGroupsEditorView.xaml.cs | 12 - .../ConditionGroupsInputView.xaml | 20 - .../ConditionGroupsInputView.xaml.cs | 12 - .../ConditionSourceEditorView.xaml | 126 --- .../ConditionSourceEditorView.xaml.cs | 17 - .../ConditionSourceTargetInputView.xaml | 24 - .../ConditionSourceTargetInputView.xaml.cs | 12 - .../ConditionSourcesListEditorView.xaml | 43 - .../ConditionSourcesListEditorView.xaml.cs | 12 - .../ConditionsDefinitionEditorView.xaml | 44 - .../ConditionsDefinitionEditorView.xaml.cs | 12 - .../ConditionsParameterEditorView.xaml | 98 -- .../ConditionsParameterEditorView.xaml.cs | 17 - WDE.Conditions.WPF/Views/LabeledControl.cs | 34 - WDE.Conditions.WPF/WDE.Conditions.WPF.csproj | 27 - .../Controls/FastBoolCellView.cs | 12 - .../Controls/FastCellView.cs | 161 ---- .../Controls/FastCellViewBase.cs | 199 ---- .../DatabaseEditorsWpfModule.cs | 9 - .../Helpers/FieldValueTemplateSelector.cs | 25 - .../Helpers/GridColumnsBinder.cs | 105 --- .../Properties/AssemblyInfo.cs | 19 - WDE.DatabaseEditors.WPF/Themes/Generic.xaml | 49 - .../MultiRow/MultiRowDbTableEditorView.xaml | 122 --- .../MultiRowDbTableEditorView.xaml.cs | 13 - .../Template/TemplateDbTableEditorView.xaml | 133 --- .../TemplateDbTableEditorView.xaml.cs | 19 - .../WDE.DatabaseEditors.WPF.csproj | 27 - WDE.SmartScriptEditor.WPF/AssemblyInfo.cs | 9 - .../Editor/Helpers/FocusBehavior.cs | 34 - .../Editor/Helpers/InputBindingsBehavior.cs | 46 - .../Editor/Helpers/IsNullConverter.cs | 19 - .../Helpers/NullToVisibilityConverter.cs | 20 - WDE.SmartScriptEditor.WPF/Editor/README.md | 1 - .../ActionDataTemplateSelector.cs | 34 - .../UserControls/GlobalVaraiableView.cs | 76 -- .../Editor/UserControls/MiniEventIcon.cs | 22 - .../Editor/UserControls/SmartActionView.cs | 94 -- .../Editor/UserControls/SmartConditionView.cs | 92 -- .../UserControls/SmartEventFlagsView.cs | 165 ---- .../Editor/UserControls/SmartEventView.cs | 99 -- .../UserControls/SmartScriptPanelLayout.cs | 809 ---------------- .../Editor/UserControls/SmartScriptView.xaml | 179 ---- .../UserControls/SmartScriptView.xaml.cs | 40 - .../Views/Editing/ParameterEditorView.cs | 19 - .../Views/Editing/ParametersEditView.xaml | 68 -- .../Views/Editing/ParametersEditView.xaml.cs | 69 -- .../Views/GlobalVariableEditDialogView.xaml | 54 -- .../GlobalVariableEditDialogView.xaml.cs | 28 - .../Editor/Views/Helpers/MoveFocusOnArrows.cs | 50 - .../Helpers/ParameterDataTemplateSelector.cs | 24 - .../SmartDataActionsEditorView.xaml | 143 --- .../SmartDataActionsEditorView.xaml.cs | 23 - .../SmartDataConditionEditorView.xaml | 127 --- .../SmartDataConditionEditorView.xaml.cs | 17 - .../SmartDataDefinesListView.xaml | 56 -- .../SmartDataDefinesListView.xaml.cs | 28 - .../SmartDataDescRuleEditorView.xaml | 86 -- .../SmartDataDescRuleEditorView.xaml.cs | 12 - .../SmartDataEventsEditorView.xaml | 226 ----- .../SmartDataEventsEditorView.xaml.cs | 32 - .../SmartDataGroupsEditorView.xaml | 84 -- .../SmartDataGroupsEditorView.xaml.cs | 28 - .../SmartDataGroupsInputView.xaml | 21 - .../SmartDataGroupsInputView.xaml.cs | 27 - .../SmartDataParameterEditorView.xaml | 123 --- .../SmartDataParameterEditorView.xaml.cs | 32 - .../SmartDataTargetsEditorView.xaml | 125 --- .../SmartDataTargetsEditorView.xaml.cs | 32 - .../Editor/Views/SmartScriptEditorView.xaml | 13 - .../Views/SmartScriptEditorView.xaml.cs | 15 - .../Editor/Views/SmartSelectView.xaml | 185 ---- .../Editor/Views/SmartSelectView.xaml.cs | 136 --- .../Editor/Views/ToolSmartEditorView.xaml | 12 - .../Editor/Views/ToolSmartEditorView.xaml.cs | 12 - .../SmartScriptWpfModule.cs | 9 - WDE.SmartScriptEditor.WPF/Themes/Generic.xaml | 366 -------- .../WDE.SmartScriptEditor.WPF.csproj | 32 - WDE.ThemeChanger/App.config | 22 - WDE.ThemeChanger/Data/ThemeSettings.cs | 14 - WDE.ThemeChanger/Properties/AssemblyInfo.cs | 52 -- .../Properties/Resources.Designer.cs | 63 -- WDE.ThemeChanger/Properties/Resources.resx | 117 --- .../Properties/Settings.Designer.cs | 26 - WDE.ThemeChanger/Properties/Settings.settings | 7 - .../Providers/IThemeSettingsProvider.cs | 11 - .../Providers/ThemeSettingsProvider.cs | 34 - WDE.ThemeChanger/ThemeChangerModule.cs | 17 - WDE.ThemeChanger/ThemeManager.cs | 60 -- .../ViewModels/ThemeConfigViewModel.cs | 61 -- WDE.ThemeChanger/Views/ThemeConfigView.xaml | 22 - .../Views/ThemeConfigView.xaml.cs | 15 - WDE.ThemeChanger/WDE.ThemeChanger.csproj | 40 - WoWDatabaseEditorCore.WPF/App.xaml | 15 - WoWDatabaseEditorCore.WPF/App.xaml.cs | 312 ------- WoWDatabaseEditorCore.WPF/AssemblyInfo.cs | 13 - .../Views/CoreVersionConfigView.xaml | 23 - .../Views/CoreVersionConfigView.xaml.cs | 12 - .../Extensions/FocusBehavior.cs | 40 - .../Extensions/GlobalMenuHotKeys.cs | 55 -- WoWDatabaseEditorCore.WPF/Icon.ico | Bin 19988 -> 0 bytes WoWDatabaseEditorCore.WPF/MainModuleWPF.cs | 29 - .../Managers/MessageBoxService.cs | 76 -- .../Managers/ScopedContainer.cs | 60 -- .../Managers/WindowManager.cs | 71 -- .../Views/ModulesConfigView.xaml | 34 - .../Views/ModulesConfigView.xaml.cs | 15 - .../Services/ClipboardService.cs | 22 - .../Views/ConfigurationPanelView.xaml | 61 -- .../Views/ConfigurationPanelView.xaml.cs | 15 - .../GenericSelectorDialogView.xaml | 43 - .../GenericSelectorDialogView.xaml.cs | 16 - .../InputEntryProviderView.xaml | 19 - .../InputEntryProviderView.xaml.cs | 12 - .../ItemFromListProviderView.xaml | 43 - .../ItemFromListProviderView.xaml.cs | 51 -- .../NewItemService/NewItemDialogView.xaml | 51 -- .../NewItemService/NewItemDialogView.xaml.cs | 29 - .../Services/ProblemsTool/ProblemsView.xaml | 110 --- .../ProblemsTool/ProblemsView.xaml.cs | 28 - .../Themes/BlueTheme.xaml | 258 ------ .../Themes/Controls/Button.xaml | 110 --- .../Themes/Controls/Menu.xaml | 379 -------- .../Themes/Controls/Merged.xaml | 15 - .../Themes/Controls/ScrollBars.xaml | 86 -- .../Themes/Controls/Tooltip.xaml | 37 - .../Themes/Controls/Window.xaml | 32 - .../Themes/Controls/WindowCommands.xaml | 111 --- .../Themes/DarkTheme.xaml | 862 ------------------ .../Themes/DarkTheme.xaml.cs | 26 - WoWDatabaseEditorCore.WPF/Themes/Icons.xaml | 70 -- .../Themes/icon.afdesign | Bin 44567 -> 0 bytes .../Utils/LayoutInitializer.cs | 113 --- .../Utils/LayoutUtility.cs | 60 -- .../Views/AboutView.xaml | 69 -- .../Views/AboutView.xaml.cs | 15 - .../Views/DialogWindow.xaml | 31 - .../Views/DialogWindow.xaml.cs | 54 -- .../Views/Helpers/ActiveDocumentConverter.cs | 26 - .../Helpers/BoolToResizeModeConverter.cs | 25 - .../Helpers/DocumentOrToolToTitleConverter.cs | 40 - .../Helpers/DynamicMenuItemStyleSelector.cs | 31 - .../Views/Helpers/PanesStyleSelector.cs | 25 - .../Views/MainWindow.xaml | 234 ----- .../Views/MainWindow.xaml.cs | 82 -- .../Views/PaneDocumentTemplateSelector.cs | 23 - .../Views/SplashScreenView.xaml | 30 - .../Views/SplashScreenView.xaml.cs | 15 - .../Views/StatusBarView.xaml | 131 --- .../Views/StatusBarView.xaml.cs | 12 - .../Views/TasksPanel.xaml | 106 --- .../Views/TasksPanel.xaml.cs | 12 - .../WoWDatabaseEditorCore.WPF.csproj | 86 -- WoWDatabaseEditorCore.WPF/app.manifest | 75 -- 217 files changed, 13796 deletions(-) delete mode 100644 LoaderWPF/LoaderWPF.csproj delete mode 100644 LoaderWPF/Program.cs delete mode 100644 WDE.Common.WPF/AssemblyInfo.cs delete mode 100644 WDE.Common.WPF/Attached/GongDragAndDrop.cs delete mode 100644 WDE.Common.WPF/Attached/SmartFormattedText.cs delete mode 100644 WDE.Common.WPF/CommonWpfModule.cs delete mode 100644 WDE.Common.WPF/Components/ParameterValueHolderView.cs delete mode 100644 WDE.Common.WPF/Components/TeachingTip.cs delete mode 100644 WDE.Common.WPF/Components/WdeImage.cs delete mode 100644 WDE.Common.WPF/Converters/BoolToDoubleConverter.cs delete mode 100644 WDE.Common.WPF/Converters/DataTimeToStringConverter.cs delete mode 100644 WDE.Common.WPF/Converters/NativeTextDocumentConverter.cs delete mode 100644 WDE.Common.WPF/Converters/NullConverter.cs delete mode 100644 WDE.Common.WPF/Themes/Generic.xaml delete mode 100644 WDE.Common.WPF/Themes/ParameterDataTemplateSelector.cs delete mode 100644 WDE.Common.WPF/Types/NativeTextDocument.cs delete mode 100644 WDE.Common.WPF/Utils/GridUtils.cs delete mode 100644 WDE.Common.WPF/Utils/LoadingSpinner.xaml delete mode 100644 WDE.Common.WPF/Utils/LoadingSpinner.xaml.cs delete mode 100644 WDE.Common.WPF/Utils/ViewBind.cs delete mode 100644 WDE.Common.WPF/ViewHelpers/BoolToVisibilityConverter.cs delete mode 100644 WDE.Common.WPF/ViewHelpers/GridViewColumns.cs delete mode 100644 WDE.Common.WPF/ViewHelpers/IntInputValidationRule.cs delete mode 100644 WDE.Common.WPF/ViewHelpers/InvertedBoolConverter.cs delete mode 100644 WDE.Common.WPF/ViewHelpers/LongToBoolConverter.cs delete mode 100644 WDE.Common.WPF/ViewHelpers/NullToVisibilityConverter.cs delete mode 100644 WDE.Common.WPF/ViewHelpers/StretchedTreeView.cs delete mode 100644 WDE.Common.WPF/ViewHelpers/ViewItemDoubleClickCommand.cs delete mode 100644 WDE.Common.WPF/WDE.Common.WPF.csproj delete mode 100644 WDE.CommonViews.WPF/AssemblyInfo.cs delete mode 100644 WDE.CommonViews.WPF/CommonViewsModule.cs delete mode 100644 WDE.CommonViews.WPF/DbcStore/Views/DBCConfigView.xaml delete mode 100644 WDE.CommonViews.WPF/DbcStore/Views/DBCConfigView.xaml.cs delete mode 100644 WDE.CommonViews.WPF/History/Views/HistoryView.xaml delete mode 100644 WDE.CommonViews.WPF/History/Views/HistoryView.xaml.cs delete mode 100644 WDE.CommonViews.WPF/Parameters/Views/ParametersView.xaml delete mode 100644 WDE.CommonViews.WPF/Parameters/Views/ParametersView.xaml.cs delete mode 100644 WDE.CommonViews.WPF/RemoteSOAP/Views/SoapConfigView.xaml delete mode 100644 WDE.CommonViews.WPF/RemoteSOAP/Views/SoapConfigView.xaml.cs delete mode 100644 WDE.CommonViews.WPF/SQLEditor/Views/SqlEditorView.xaml delete mode 100644 WDE.CommonViews.WPF/SQLEditor/Views/SqlEditorView.xaml.cs delete mode 100644 WDE.CommonViews.WPF/Solutions/Explorer/Helpers/MyTreeViewHelper.cs delete mode 100644 WDE.CommonViews.WPF/Solutions/Explorer/Views/LeftMarginMultiplierConverter .cs delete mode 100644 WDE.CommonViews.WPF/Solutions/Explorer/Views/SolutionExplorerView.xaml delete mode 100644 WDE.CommonViews.WPF/Solutions/Explorer/Views/SolutionExplorerView.xaml.cs delete mode 100644 WDE.CommonViews.WPF/Solutions/Explorer/Views/TreeViewItemExtensions.cs delete mode 100644 WDE.CommonViews.WPF/TrinityMySqlDatabase/Tools/DebugQueryToolView.xaml delete mode 100644 WDE.CommonViews.WPF/TrinityMySqlDatabase/Tools/DebugQueryToolView.xaml.cs delete mode 100644 WDE.CommonViews.WPF/TrinityMySqlDatabase/Views/DatabaseConfigView.xaml delete mode 100644 WDE.CommonViews.WPF/TrinityMySqlDatabase/Views/DatabaseConfigView.xaml.cs delete mode 100644 WDE.CommonViews.WPF/Updater/ChangeLogView.xaml delete mode 100644 WDE.CommonViews.WPF/Updater/ChangeLogView.xaml.cs delete mode 100644 WDE.CommonViews.WPF/Updater/UpdaterConfigurationView.xaml delete mode 100644 WDE.CommonViews.WPF/Updater/UpdaterConfigurationView.xaml.cs delete mode 100644 WDE.CommonViews.WPF/WDE.CommonViews.WPF.csproj delete mode 100644 WDE.Conditions.WPF/ConditionsWpfModule.cs delete mode 100644 WDE.Conditions.WPF/Properties/AssemblyInfo.cs delete mode 100644 WDE.Conditions.WPF/Themes/Generic.xaml delete mode 100644 WDE.Conditions.WPF/Views/ConditionsEditorView.xaml delete mode 100644 WDE.Conditions.WPF/Views/ConditionsEditorView.xaml.cs delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionEditorView.xaml delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionEditorView.xaml.cs delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionGroupsEditorView.xaml delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionGroupsEditorView.xaml.cs delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionGroupsInputView.xaml delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionGroupsInputView.xaml.cs delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionSourceEditorView.xaml delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionSourceEditorView.xaml.cs delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionSourceTargetInputView.xaml delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionSourceTargetInputView.xaml.cs delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionSourcesListEditorView.xaml delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionSourcesListEditorView.xaml.cs delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionsDefinitionEditorView.xaml delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionsDefinitionEditorView.xaml.cs delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionsParameterEditorView.xaml delete mode 100644 WDE.Conditions.WPF/Views/DefinitionEditor/ConditionsParameterEditorView.xaml.cs delete mode 100644 WDE.Conditions.WPF/Views/LabeledControl.cs delete mode 100644 WDE.Conditions.WPF/WDE.Conditions.WPF.csproj delete mode 100644 WDE.DatabaseEditors.WPF/Controls/FastBoolCellView.cs delete mode 100644 WDE.DatabaseEditors.WPF/Controls/FastCellView.cs delete mode 100644 WDE.DatabaseEditors.WPF/Controls/FastCellViewBase.cs delete mode 100644 WDE.DatabaseEditors.WPF/DatabaseEditorsWpfModule.cs delete mode 100644 WDE.DatabaseEditors.WPF/Helpers/FieldValueTemplateSelector.cs delete mode 100644 WDE.DatabaseEditors.WPF/Helpers/GridColumnsBinder.cs delete mode 100644 WDE.DatabaseEditors.WPF/Properties/AssemblyInfo.cs delete mode 100644 WDE.DatabaseEditors.WPF/Themes/Generic.xaml delete mode 100644 WDE.DatabaseEditors.WPF/Views/MultiRow/MultiRowDbTableEditorView.xaml delete mode 100644 WDE.DatabaseEditors.WPF/Views/MultiRow/MultiRowDbTableEditorView.xaml.cs delete mode 100644 WDE.DatabaseEditors.WPF/Views/Template/TemplateDbTableEditorView.xaml delete mode 100644 WDE.DatabaseEditors.WPF/Views/Template/TemplateDbTableEditorView.xaml.cs delete mode 100644 WDE.DatabaseEditors.WPF/WDE.DatabaseEditors.WPF.csproj delete mode 100644 WDE.SmartScriptEditor.WPF/AssemblyInfo.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Helpers/FocusBehavior.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Helpers/InputBindingsBehavior.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Helpers/IsNullConverter.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Helpers/NullToVisibilityConverter.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/README.md delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/UserControls/ActionDataTemplateSelector.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/UserControls/GlobalVaraiableView.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/UserControls/MiniEventIcon.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartActionView.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartConditionView.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartEventFlagsView.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartEventView.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartScriptPanelLayout.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartScriptView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartScriptView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/Editing/ParameterEditorView.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/Editing/ParametersEditView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/Editing/ParametersEditView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/GlobalVariableEditDialogView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/GlobalVariableEditDialogView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/Helpers/MoveFocusOnArrows.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/Helpers/ParameterDataTemplateSelector.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataActionsEditorView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataActionsEditorView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataConditionEditorView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataConditionEditorView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataDefinesListView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataDefinesListView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataDescRuleEditorView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataDescRuleEditorView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataEventsEditorView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataEventsEditorView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataGroupsEditorView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataGroupsEditorView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataGroupsInputView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataGroupsInputView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataParameterEditorView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataParameterEditorView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataTargetsEditorView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartDataEditors/SmartDataTargetsEditorView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartScriptEditorView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartScriptEditorView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartSelectView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/SmartSelectView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/ToolSmartEditorView.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/Editor/Views/ToolSmartEditorView.xaml.cs delete mode 100644 WDE.SmartScriptEditor.WPF/SmartScriptWpfModule.cs delete mode 100644 WDE.SmartScriptEditor.WPF/Themes/Generic.xaml delete mode 100644 WDE.SmartScriptEditor.WPF/WDE.SmartScriptEditor.WPF.csproj delete mode 100644 WDE.ThemeChanger/App.config delete mode 100644 WDE.ThemeChanger/Data/ThemeSettings.cs delete mode 100644 WDE.ThemeChanger/Properties/AssemblyInfo.cs delete mode 100644 WDE.ThemeChanger/Properties/Resources.Designer.cs delete mode 100644 WDE.ThemeChanger/Properties/Resources.resx delete mode 100644 WDE.ThemeChanger/Properties/Settings.Designer.cs delete mode 100644 WDE.ThemeChanger/Properties/Settings.settings delete mode 100644 WDE.ThemeChanger/Providers/IThemeSettingsProvider.cs delete mode 100644 WDE.ThemeChanger/Providers/ThemeSettingsProvider.cs delete mode 100644 WDE.ThemeChanger/ThemeChangerModule.cs delete mode 100644 WDE.ThemeChanger/ThemeManager.cs delete mode 100644 WDE.ThemeChanger/ViewModels/ThemeConfigViewModel.cs delete mode 100644 WDE.ThemeChanger/Views/ThemeConfigView.xaml delete mode 100644 WDE.ThemeChanger/Views/ThemeConfigView.xaml.cs delete mode 100644 WDE.ThemeChanger/WDE.ThemeChanger.csproj delete mode 100644 WoWDatabaseEditorCore.WPF/App.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/App.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/AssemblyInfo.cs delete mode 100644 WoWDatabaseEditorCore.WPF/CoreVersion/Views/CoreVersionConfigView.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/CoreVersion/Views/CoreVersionConfigView.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Extensions/FocusBehavior.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Extensions/GlobalMenuHotKeys.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Icon.ico delete mode 100644 WoWDatabaseEditorCore.WPF/MainModuleWPF.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Managers/MessageBoxService.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Managers/ScopedContainer.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Managers/WindowManager.cs delete mode 100644 WoWDatabaseEditorCore.WPF/ModulesManagement/Configuration/Views/ModulesConfigView.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/ModulesManagement/Configuration/Views/ModulesConfigView.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Services/ClipboardService.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Services/ConfigurationService/Views/ConfigurationPanelView.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Services/ConfigurationService/Views/ConfigurationPanelView.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Services/CreatureEntrySelectorService/GenericSelectorDialogView.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Services/CreatureEntrySelectorService/GenericSelectorDialogView.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Services/InputEntryProviderService/InputEntryProviderView.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Services/InputEntryProviderService/InputEntryProviderView.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Services/ItemFromListSelectorService/ItemFromListProviderView.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Services/ItemFromListSelectorService/ItemFromListProviderView.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Services/NewItemService/NewItemDialogView.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Services/NewItemService/NewItemDialogView.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Services/ProblemsTool/ProblemsView.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Services/ProblemsTool/ProblemsView.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Themes/BlueTheme.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Themes/Controls/Button.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Themes/Controls/Menu.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Themes/Controls/Merged.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Themes/Controls/ScrollBars.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Themes/Controls/Tooltip.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Themes/Controls/Window.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Themes/Controls/WindowCommands.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Themes/DarkTheme.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Themes/DarkTheme.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Themes/Icons.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Themes/icon.afdesign delete mode 100644 WoWDatabaseEditorCore.WPF/Utils/LayoutInitializer.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Utils/LayoutUtility.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Views/AboutView.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Views/AboutView.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Views/DialogWindow.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Views/DialogWindow.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Views/Helpers/ActiveDocumentConverter.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Views/Helpers/BoolToResizeModeConverter.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Views/Helpers/DocumentOrToolToTitleConverter.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Views/Helpers/DynamicMenuItemStyleSelector.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Views/Helpers/PanesStyleSelector.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Views/MainWindow.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Views/MainWindow.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Views/PaneDocumentTemplateSelector.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Views/SplashScreenView.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Views/SplashScreenView.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Views/StatusBarView.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Views/StatusBarView.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/Views/TasksPanel.xaml delete mode 100644 WoWDatabaseEditorCore.WPF/Views/TasksPanel.xaml.cs delete mode 100644 WoWDatabaseEditorCore.WPF/WoWDatabaseEditorCore.WPF.csproj delete mode 100644 WoWDatabaseEditorCore.WPF/app.manifest diff --git a/LoaderWPF/LoaderWPF.csproj b/LoaderWPF/LoaderWPF.csproj deleted file mode 100644 index 6038d0da2..000000000 --- a/LoaderWPF/LoaderWPF.csproj +++ /dev/null @@ -1,44 +0,0 @@ - - - - WinExe - net5.0-windows7.0 - true - Debug;Release - AnyCPU - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/LoaderWPF/Program.cs b/LoaderWPF/Program.cs deleted file mode 100644 index d4ce9282f..000000000 --- a/LoaderWPF/Program.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace LoaderWPF -{ - public class Program - { - public static void Main(string[] args) - { - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/AssemblyInfo.cs b/WDE.Common.WPF/AssemblyInfo.cs deleted file mode 100644 index cf0b89ecd..000000000 --- a/WDE.Common.WPF/AssemblyInfo.cs +++ /dev/null @@ -1,9 +0,0 @@ -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) -)] \ No newline at end of file diff --git a/WDE.Common.WPF/Attached/GongDragAndDrop.cs b/WDE.Common.WPF/Attached/GongDragAndDrop.cs deleted file mode 100644 index eb87f1340..000000000 --- a/WDE.Common.WPF/Attached/GongDragAndDrop.cs +++ /dev/null @@ -1,160 +0,0 @@ -using System; -using System.Windows; -using CommonDrag = WDE.Common.Utils.DragDrop; -using GongDrag = GongSolutions.Wpf.DragDrop; -using DragDropEffects = System.Windows.DragDropEffects; - -namespace WDE.Common.WPF.Attached -{ - public static class GongDragAndDrop - { - public static readonly DependencyProperty WdeDropHandlerProperty = DependencyProperty.RegisterAttached("WdeDropHandler", - typeof(CommonDrag.IDropTarget), - typeof(GongDragAndDrop), - new FrameworkPropertyMetadata(null, OnWdeDropHandlerChanged)); - - public static object GetWdeDropHandler(DependencyObject d) - { - return d.GetValue(WdeDropHandlerProperty); - } - - public static void SetWdeDropHandler(DependencyObject d, object value) - { - d.SetValue(WdeDropHandlerProperty, value); - } - - private static void OnWdeDropHandlerChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var adapter = new DragTargetAdapter((CommonDrag.IDropTarget)e.NewValue); - d.SetValue(GongDrag.DragDrop.DropHandlerProperty, adapter); - } - - internal static CommonDrag.RelativeInsertPosition ToCommon(this GongDrag.RelativeInsertPosition position) - { - CommonDrag.RelativeInsertPosition dest = CommonDrag.RelativeInsertPosition.None; - if (position.HasFlag(GongDrag.RelativeInsertPosition.AfterTargetItem)) - dest |= CommonDrag.RelativeInsertPosition.AfterTargetItem; - if (position.HasFlag(GongDrag.RelativeInsertPosition.BeforeTargetItem)) - dest |= CommonDrag.RelativeInsertPosition.BeforeTargetItem; - if (position.HasFlag(GongDrag.RelativeInsertPosition.TargetItemCenter)) - dest |= CommonDrag.RelativeInsertPosition.TargetItemCenter; - - return dest; - } - - internal static GongDrag.RelativeInsertPosition ToGong(this CommonDrag.RelativeInsertPosition position) - { - GongDrag.RelativeInsertPosition dest = GongDrag.RelativeInsertPosition.None; - if (position.HasFlag(CommonDrag.RelativeInsertPosition.AfterTargetItem)) - dest |= GongDrag.RelativeInsertPosition.AfterTargetItem; - if (position.HasFlag(CommonDrag.RelativeInsertPosition.BeforeTargetItem)) - dest |= GongDrag.RelativeInsertPosition.BeforeTargetItem; - if (position.HasFlag(CommonDrag.RelativeInsertPosition.TargetItemCenter)) - dest |= GongDrag.RelativeInsertPosition.TargetItemCenter; - - return dest; - } - - internal static Type ToGong(this CommonDrag.DropTargetAdorners adorner) - { - switch (adorner) - { - case CommonDrag.DropTargetAdorners.Highlight: - return GongDrag.DropTargetAdorners.Highlight; - case CommonDrag.DropTargetAdorners.Insert: - return GongDrag.DropTargetAdorners.Insert; - default: - throw new ArgumentOutOfRangeException(nameof(adorner), adorner, null); - } - } - - internal static CommonDrag.DragDropEffects ToCommon(this System.Windows.DragDropEffects effect) - { - switch (effect) - { - case DragDropEffects.Scroll: - return Common.Utils.DragDrop.DragDropEffects.Scroll; - case DragDropEffects.All: - return Common.Utils.DragDrop.DragDropEffects.All; - case DragDropEffects.None: - return Common.Utils.DragDrop.DragDropEffects.None; - case DragDropEffects.Copy: - return Common.Utils.DragDrop.DragDropEffects.Copy; - case DragDropEffects.Move: - return Common.Utils.DragDrop.DragDropEffects.Move; - case DragDropEffects.Link: - return Common.Utils.DragDrop.DragDropEffects.Link; - default: - throw new ArgumentOutOfRangeException(); - } - } - - internal static DragDropEffects ToWindows(this CommonDrag.DragDropEffects effect) - { - switch (effect) - { - case Common.Utils.DragDrop.DragDropEffects.Scroll: - return DragDropEffects.Scroll; - case Common.Utils.DragDrop.DragDropEffects.All: - return DragDropEffects.All; - case Common.Utils.DragDrop.DragDropEffects.None: - return DragDropEffects.None; - case Common.Utils.DragDrop.DragDropEffects.Copy: - return DragDropEffects.Copy; - case Common.Utils.DragDrop.DragDropEffects.Move: - return DragDropEffects.Move; - case Common.Utils.DragDrop.DragDropEffects.Link: - return DragDropEffects.Link; - default: - throw new ArgumentOutOfRangeException(); - } - } - - private class DragTargetAdapter : GongDrag.IDropTarget - { - private readonly CommonDrag.IDropTarget target; - - public DragTargetAdapter(CommonDrag.IDropTarget target) - { - this.target = target; - } - - public void DragOver(GongDrag.IDropInfo dropInfo) - { - var adapter = new DropInfoAdapter(dropInfo); - target.DragOver(adapter); - dropInfo.Effects = adapter.Effects.ToWindows(); - dropInfo.DropTargetAdorner = adapter.DropTargetAdorner.ToGong(); - } - - public void Drop(GongDrag.IDropInfo dropInfo) - { - var adapter = new DropInfoAdapter(dropInfo); - target.Drop(adapter); - } - } - - private class DropInfoAdapter : CommonDrag.IDropInfo - { - public DropInfoAdapter(GongDrag.IDropInfo dropInfo) - { - Data = dropInfo.Data; - TargetItem = dropInfo.TargetItem; - InsertIndex = dropInfo.InsertIndex; - if (dropInfo.DropTargetAdorner == GongDrag.DropTargetAdorners.Highlight) - DropTargetAdorner = CommonDrag.DropTargetAdorners.Highlight; - else if (dropInfo.DropTargetAdorner == GongDrag.DropTargetAdorners.Insert) - DropTargetAdorner = CommonDrag.DropTargetAdorners.Insert; - Effects = dropInfo.Effects.ToCommon(); - InsertPosition = dropInfo.InsertPosition.ToCommon(); - } - - public object Data { get; internal set; } - public object? TargetItem { get; internal set; } - public int InsertIndex { get; internal set; } - public CommonDrag.DropTargetAdorners DropTargetAdorner { get; set; } - public CommonDrag.DragDropEffects Effects { get; set; } - public CommonDrag.RelativeInsertPosition InsertPosition { get; set; } - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/Attached/SmartFormattedText.cs b/WDE.Common.WPF/Attached/SmartFormattedText.cs deleted file mode 100644 index c0396ef19..000000000 --- a/WDE.Common.WPF/Attached/SmartFormattedText.cs +++ /dev/null @@ -1,160 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; - -namespace WDE.Common.WPF.Attached -{ - public class SmartFormattedText - { - public static string GetText(DependencyObject obj) => (string)obj.GetValue(TextProperty); - public static void SetText(DependencyObject obj, string value) => obj.SetValue(TextProperty, value); - public static readonly DependencyProperty TextProperty = - DependencyProperty.RegisterAttached("Text", typeof(string), typeof(SmartFormattedText), new PropertyMetadata("", AllowOnlyString)); - - public static Style GetParamStyle(DependencyObject obj) => (Style)obj.GetValue(ParamStyleProperty); - public static void SetParamStyle(DependencyObject obj, Style value) => obj.SetValue(ParamStyleProperty, value); - public static readonly DependencyProperty ParamStyleProperty = - DependencyProperty.RegisterAttached("ParamStyle", typeof(Style), typeof(SmartFormattedText), new PropertyMetadata(null, AllowOnlyString)); - - public static IList GetContextArray(DependencyObject obj) => (IList)obj.GetValue(ContextArrayProperty); - public static void SetContextArray(DependencyObject obj, IList value) => obj.SetValue(ContextArrayProperty, value); - public static readonly DependencyProperty ContextArrayProperty = - DependencyProperty.RegisterAttached("ContextArray", typeof(IList), typeof(SmartFormattedText), new PropertyMetadata(null, AllowOnlyString)); - - - public static Style GetSourceStyle(DependencyObject obj) => (Style)obj.GetValue(SourceStyleProperty); - public static void SetSourceStyle(DependencyObject obj, Style value) => obj.SetValue(SourceStyleProperty, value); - public static readonly DependencyProperty SourceStyleProperty = - DependencyProperty.RegisterAttached("SourceStyle", typeof(Style), typeof(SmartFormattedText), new PropertyMetadata(null, AllowOnlyString)); - - - private static void AllowOnlyString(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - if (d is TextBlock tb) - { - var text = GetText(d); - var paramStyle = GetParamStyle(d); - var sourceStyle = GetSourceStyle(d); - var contextArray = GetContextArray(d); - - tb.Inlines.Clear(); - if (text == null) - return; - - bool changeRun = false; - int start = 0; - State state = State.Text; - Styles currentStyle = Styles.Normal; - int currentContextIndex = -1; - Run? lastRun = null; - - void Append(string s) - { - if (lastRun != null && !changeRun) - { - lastRun.Text += s; - return; - } - - lastRun = new Run(s); - - if (contextArray != null && currentContextIndex >= 0 && currentContextIndex < contextArray.Count) - lastRun.DataContext = contextArray[currentContextIndex]; - else - lastRun.DataContext = null; - - if (currentStyle.HasFlag(Styles.Parameter) && paramStyle != null) - lastRun.Style = paramStyle; - - if (currentStyle.HasFlag(Styles.Source) && sourceStyle != null) - lastRun.Style = sourceStyle; - - changeRun = false; - - tb.Inlines.Add(lastRun); - } - - for (int i = 0; i < text.Length; i++) - { - char l = text[i]; - if (l == '\\' && state == State.Text) - { - Append(text.Substring(start, i - start)); - start = i + 1; - state = State.Slash; - } - else if (l == '[' && state == State.Text) - { - Append(text.Substring(start, i - start)); - changeRun = true; - currentContextIndex = -1; - start = i + 1; - state = State.OpeningTag; - } - else if (l == '/' && state == State.OpeningTag) - { - start = i + 1; - state = State.InClosingTag; - } - else if (l != ']' && state == State.OpeningTag) - { - state = State.InTag; - } - else if (l == ']' && state == State.InTag) - { - if (text[start] == 'p') - { - currentStyle = currentStyle | Styles.Parameter; - } - else if (text[start] == 's') - { - currentStyle = currentStyle | Styles.Source; - } - - if (text[start + 1] == '=' && char.IsDigit(text[start + 2])) - currentContextIndex = text[start + 2] - '0'; - - start = i + 1; - state = State.Text; - } - else if (l == ']' && state == State.InClosingTag) - { - if (text[start] == 'p') - currentStyle = currentStyle & ~Styles.Parameter; - else if (text[start] == 's') - currentStyle = currentStyle & ~Styles.Source; - - start = i + 1; - state = State.Text; - } - else if (state == State.Slash) - { - state = State.Text; - } - } - - if (state == State.Text) - Append(text.Substring(start)); - } - } - - enum State - { - Text, - Slash, - OpeningTag, - InTag, - InClosingTag - } - - [Flags] - enum Styles - { - Normal = 0, - Source = 1, - Parameter = 2 - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/CommonWpfModule.cs b/WDE.Common.WPF/CommonWpfModule.cs deleted file mode 100644 index 0fb1e2e23..000000000 --- a/WDE.Common.WPF/CommonWpfModule.cs +++ /dev/null @@ -1,9 +0,0 @@ -using WDE.Module; - -namespace WDE.Common.WPF -{ - public class CommonWpfModule : ModuleBase - { - - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/Components/ParameterValueHolderView.cs b/WDE.Common.WPF/Components/ParameterValueHolderView.cs deleted file mode 100644 index e45dab083..000000000 --- a/WDE.Common.WPF/Components/ParameterValueHolderView.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; - -namespace WDE.Common.WPF.Components -{ - public class ParameterValueHolderView : Control - { - public ICommand PickCommand - { - get => (ICommand)GetValue(PickCommandProperty); - set => SetValue(PickCommandProperty, value); - } - - public static readonly DependencyProperty PickCommandProperty = - DependencyProperty.Register("PickCommand", typeof(ICommand), typeof(ParameterValueHolderView)); - - static ParameterValueHolderView() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(ParameterValueHolderView), new FrameworkPropertyMetadata(typeof(ParameterValueHolderView))); - } - } -} diff --git a/WDE.Common.WPF/Components/TeachingTip.cs b/WDE.Common.WPF/Components/TeachingTip.cs deleted file mode 100644 index bef591007..000000000 --- a/WDE.Common.WPF/Components/TeachingTip.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; - -namespace WDE.Common.WPF.Components -{ - public class TeachingTip : Control - { - public static readonly DependencyProperty ContentProperty = - DependencyProperty.Register("Content", typeof(object), typeof(TeachingTip)); - - public object Content - { - get => GetValue(ContentProperty); - set => SetValue(ContentProperty, value); - } - - public static readonly DependencyProperty HeaderProperty = - DependencyProperty.Register("Header", typeof(string), typeof(TeachingTip)); - - public bool IsOpened - { - get => (bool)GetValue(IsOpenedProperty); - set => SetValue(IsOpenedProperty, value); - } - - public static readonly DependencyProperty IsOpenedProperty = - DependencyProperty.Register("IsOpened", typeof(bool), typeof(TeachingTip)); - - public string Header - { - get => (string)GetValue(HeaderProperty); - set => SetValue(HeaderProperty, value); - } - - public ICommand CloseCommand { get; } - - public TeachingTip() - { - CloseCommand = new DelegateCommand(() => - { - IsOpened = false; - }); - } - - static TeachingTip() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(TeachingTip), new FrameworkPropertyMetadata(typeof(TeachingTip))); - } - } - - internal class DelegateCommand : ICommand - { - private readonly Action action; - - public DelegateCommand(System.Action action) - { - this.action = action; - } - - public bool CanExecute(object? parameter) - { - return true; - } - - public void Execute(object? parameter) - { - action?.Invoke(); - } - - public event EventHandler? CanExecuteChanged; - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/Components/WdeImage.cs b/WDE.Common.WPF/Components/WdeImage.cs deleted file mode 100644 index e44ceabc7..000000000 --- a/WDE.Common.WPF/Components/WdeImage.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media.Imaging; -using WDE.Common.Types; - -namespace WDE.Common.WPF.Components -{ - public class WdeImage : Image - { - // we are never releasing those intentionally - private static Dictionary cache = new(); - - public ImageUri Image - { - get => (ImageUri) GetValue(ImageProperty); - set => SetValue(ImageProperty, value); - } - - public static readonly DependencyProperty ImageProperty = - DependencyProperty.Register( - nameof(Image), - typeof(ImageUri), - typeof(WdeImage), - new FrameworkPropertyMetadata( - default(ImageUri), - FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, - new PropertyChangedCallback(OnSourceChanged), - null), - null); - - private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var img = (ImageUri)d.GetValue(ImageProperty); - if (!cache.TryGetValue(img, out var bitmap)) - { - bitmap = cache[img] = - new BitmapImage(new Uri(System.IO.Path.Combine(Environment.CurrentDirectory, img.Uri), UriKind.Absolute)); - } - d.SetValue(SourceProperty, bitmap); - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/Converters/BoolToDoubleConverter.cs b/WDE.Common.WPF/Converters/BoolToDoubleConverter.cs deleted file mode 100644 index 9a0322bda..000000000 --- a/WDE.Common.WPF/Converters/BoolToDoubleConverter.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; - -namespace WDE.Common.WPF.Converters -{ - public class BoolToDoubleConverter : IValueConverter - { - public double WhenTrue { get; set; } = 1; - public double WhenFalse { get; set; } = 0; - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - var flag = false; - if (value is bool) - flag = (bool) value; - return flag ? WhenTrue : WhenFalse; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is double d) - { - if (d == WhenTrue) - return true; - if (d == WhenFalse) - return false; - } - - return false; - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/Converters/DataTimeToStringConverter.cs b/WDE.Common.WPF/Converters/DataTimeToStringConverter.cs deleted file mode 100644 index f22e38e27..000000000 --- a/WDE.Common.WPF/Converters/DataTimeToStringConverter.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; - -namespace WDE.Common.WPF.Converters -{ - public class DataTimeToStringConverter : IValueConverter - { - public string Format { get; set; } = "m"; - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is DateTime dt) - return dt.ToString(Format); - return "not a date"; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/Converters/NativeTextDocumentConverter.cs b/WDE.Common.WPF/Converters/NativeTextDocumentConverter.cs deleted file mode 100644 index 04e462590..000000000 --- a/WDE.Common.WPF/Converters/NativeTextDocumentConverter.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using ICSharpCode.AvalonEdit.Document; -using WDE.Common.WPF.Types; - -namespace WDE.Common.WPF.Converters -{ - public class NativeTextDocumentConverter : IValueConverter - { - public object? Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is NativeTextDocument text) - return text.Native; - return null; - } - - public object? ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is TextDocument doc) - return new NativeTextDocument(doc); - return null; - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/Converters/NullConverter.cs b/WDE.Common.WPF/Converters/NullConverter.cs deleted file mode 100644 index 97e6f218c..000000000 --- a/WDE.Common.WPF/Converters/NullConverter.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; - -namespace WDE.Common.WPF.Converters -{ - public class NullConverter : IValueConverter - { - public bool Inverted { get; set; } - - public object? Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - var isNull = value == null; - return Inverted ? !isNull : isNull; - } - - public object? ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new Exception(); - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/Themes/Generic.xaml b/WDE.Common.WPF/Themes/Generic.xaml deleted file mode 100644 index 52e40be89..000000000 --- a/WDE.Common.WPF/Themes/Generic.xaml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - Do not worry, you won't see this tooltip again. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WDE.Common.WPF/Themes/ParameterDataTemplateSelector.cs b/WDE.Common.WPF/Themes/ParameterDataTemplateSelector.cs deleted file mode 100644 index 5b248ddff..000000000 --- a/WDE.Common.WPF/Themes/ParameterDataTemplateSelector.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using WDE.Parameters; -using WDE.Parameters.Models; - -namespace WDE.Common.WPF.Themes -{ - internal class ParameterDataTemplateSelector : DataTemplateSelector - { - public DataTemplate? Generic { get; set; } - public DataTemplate? BoolParameter { get; set; } - - public override DataTemplate SelectTemplate(object item, DependencyObject container) - { - if (item is ParameterValueHolder intParam && intParam.Parameter is BoolParameter boolParameter && BoolParameter != null) - return BoolParameter; - return Generic!; - } - } - -} diff --git a/WDE.Common.WPF/Types/NativeTextDocument.cs b/WDE.Common.WPF/Types/NativeTextDocument.cs deleted file mode 100644 index 988efb86b..000000000 --- a/WDE.Common.WPF/Types/NativeTextDocument.cs +++ /dev/null @@ -1,41 +0,0 @@ -using ICSharpCode.AvalonEdit.Document; -using WDE.Common.Types; -using WDE.Module.Attributes; -using WDE.MVVM; -using System; - -namespace WDE.Common.WPF.Types -{ - // no single instance! - [AutoRegister] - public class NativeTextDocument : INativeTextDocument - { - public TextDocument Native { get; } - - public IObservable Length => Native.ToObservable(n => n.TextLength); - - public NativeTextDocument() : this(new TextDocument()) { } - - public NativeTextDocument(TextDocument document) - { - Native = document; - } - - public void FromString(string str) - { - Native.Text = str; - } - - public void Append(string str) - { - Native.BeginUpdate(); - Native.Insert(Native.TextLength, str); - Native.EndUpdate(); - } - - public override string ToString() - { - return Native.Text; - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/Utils/GridUtils.cs b/WDE.Common.WPF/Utils/GridUtils.cs deleted file mode 100644 index fae11ec6a..000000000 --- a/WDE.Common.WPF/Utils/GridUtils.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Controls; - -namespace WDE.Common.WPF.Utils -{ - public static class GridUtils - { - public static string GetRows(DependencyObject obj) => (string)obj.GetValue(RowsProperty); - public static void SetRows(DependencyObject obj, string value) => obj.SetValue(RowsProperty, value); - public static readonly DependencyProperty RowsProperty = - DependencyProperty.RegisterAttached("Rows", typeof(string), typeof(GridUtils), new PropertyMetadata("", UpdateRows)); - - public static string GetColumns(DependencyObject obj) => (string)obj.GetValue(ColumnsProperty); - public static void SetColumns(DependencyObject obj, string value) => obj.SetValue(ColumnsProperty, value); - public static readonly DependencyProperty ColumnsProperty = - DependencyProperty.RegisterAttached("Columns", typeof(string), typeof(GridUtils), new PropertyMetadata("", UpdateColumns)); - - private static void UpdateColumns(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - if (!(d is Grid grid)) - return; - - var columns = GetColumns(d).Split(","); - - for (int i = grid.ColumnDefinitions.Count; i < columns.Length; ++i) - grid.ColumnDefinitions.Add(new ColumnDefinition()); - - while (grid.ColumnDefinitions.Count > columns.Length) - grid.ColumnDefinitions.RemoveAt(grid.ColumnDefinitions.Count - 1); - - for (var index = 0; index < columns.Length; index++) - { - var column = columns[index]; - var length = ParseLength(column); - if (length != null) - grid.ColumnDefinitions[index].Width = length.Value; - } - } - - private static void UpdateRows(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - if (!(d is Grid grid)) - return; - - var rows = GetRows(d).Split(","); - - for (int i = grid.RowDefinitions.Count; i < rows.Length; ++i) - grid.RowDefinitions.Add(new RowDefinition()); - - while (grid.RowDefinitions.Count > rows.Length) - grid.RowDefinitions.RemoveAt(grid.RowDefinitions.Count - 1); - - for (var index = 0; index < rows.Length; index++) - { - var row = rows[index]; - var length = ParseLength(row); - if (length != null) - grid.RowDefinitions[index].Height = length.Value; - } - } - - private static GridLength? ParseLength(string text) - { - if (text == "auto") - return GridLength.Auto; - - if (text[^1] == '*') - { - if (double.TryParse(((ReadOnlySpan) text).Slice(0, text.Length - 1), NumberStyles.Any, CultureInfo.InvariantCulture, out var length )) - return new GridLength(length, GridUnitType.Auto); - } - else if (double.TryParse(text,NumberStyles.Any, CultureInfo.InvariantCulture, out var length)) - { - return new GridLength(length, GridUnitType.Pixel); - } - - return null; - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/Utils/LoadingSpinner.xaml b/WDE.Common.WPF/Utils/LoadingSpinner.xaml deleted file mode 100644 index 96601f9f2..000000000 --- a/WDE.Common.WPF/Utils/LoadingSpinner.xaml +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WDE.Common.WPF/Utils/LoadingSpinner.xaml.cs b/WDE.Common.WPF/Utils/LoadingSpinner.xaml.cs deleted file mode 100644 index 93fc75b96..000000000 --- a/WDE.Common.WPF/Utils/LoadingSpinner.xaml.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Windows.Controls; - -namespace WDE.Common.WPF.Utils -{ - public partial class LoadingSpinner : UserControl - { - public LoadingSpinner() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/Utils/ViewBind.cs b/WDE.Common.WPF/Utils/ViewBind.cs deleted file mode 100644 index b6424bcd7..000000000 --- a/WDE.Common.WPF/Utils/ViewBind.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Linq; -using System.Windows; -using System.Windows.Markup; -using WDE.Common.Windows; - -namespace WDE.Common.WPF.Utils -{ - public class ViewBind - { - public static IViewLocator? AppViewLocator { get; set; } - - public static readonly DependencyProperty ModelProperty = DependencyProperty.RegisterAttached("Model", - typeof(object), - typeof(ViewBind), - new PropertyMetadata(null, OnModelChanged)); - - public static object GetModel(DependencyObject element) - { - return element.GetValue(ModelProperty); - } - - public static void SetModel(DependencyObject element, object value) - { - element.SetValue(ModelProperty, value); - } - - private static void OnModelChanged(DependencyObject targetLocation, DependencyPropertyChangedEventArgs args) - { - if (args.OldValue == args.NewValue) - return; - - if (AppViewLocator != null && AppViewLocator.TryResolve(args.NewValue?.GetType()!, out var viewType)) - { - object? view = Activator.CreateInstance(viewType); - SetContentProperty(targetLocation, view); - } - else - SetContentProperty(targetLocation, null); - } - - private static bool SetContentProperty(object targetLocation, object? view) - { - try - { - Type? type = targetLocation.GetType(); - ContentPropertyAttribute? contentProperty = type.GetCustomAttributes(typeof(ContentPropertyAttribute), true) - .OfType() - .FirstOrDefault() ?? new ContentPropertyAttribute("Content"); - - type.GetProperty(contentProperty?.Name ?? new ContentPropertyAttribute("Content").Name) - ?.SetValue(targetLocation, view, null); - - return true; - } - catch (Exception e) - { - throw e; - } - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/ViewHelpers/BoolToVisibilityConverter.cs b/WDE.Common.WPF/ViewHelpers/BoolToVisibilityConverter.cs deleted file mode 100644 index 6937d52ba..000000000 --- a/WDE.Common.WPF/ViewHelpers/BoolToVisibilityConverter.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; - -namespace WDE.Common.WPF.ViewHelpers -{ - public class BooleanToVisibilityConverter : IValueConverter - { - public Visibility WhenTrue { get; set; } = Visibility.Visible; - public Visibility WhenFalse { get; set; } = Visibility.Hidden; - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - var flag = false; - if (value is bool) - flag = (bool) value; - return flag ? WhenTrue : WhenFalse; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is Visibility vis) - { - if (vis == WhenTrue) - return true; - if (vis == WhenFalse) - return false; - } - - return false; - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/ViewHelpers/GridViewColumns.cs b/WDE.Common.WPF/ViewHelpers/GridViewColumns.cs deleted file mode 100644 index 947608815..000000000 --- a/WDE.Common.WPF/ViewHelpers/GridViewColumns.cs +++ /dev/null @@ -1,327 +0,0 @@ -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.IO; -using System.Reflection; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Xml; -using WDE.Common.Types; -using XamlReader = System.Windows.Markup.XamlReader; - -#nullable disable -namespace WDE.Common.WPF.ViewHelpers -{ - //https://stackoverflow.com/questions/2643545/wpf-mvvm-how-to-bind-gridviewcolumn-to-viewmodel-collection - public static class GridViewColumns - { - // Using a DependencyProperty as the backing store for ColumnsSource. This enables animation, styling, binding, etc... - public static readonly DependencyProperty ColumnsSourceProperty = DependencyProperty.RegisterAttached("ColumnsSource", - typeof(object), - typeof(GridViewColumns), - new UIPropertyMetadata(null, ColumnsSourceChanged)); - - // Using a DependencyProperty as the backing store for HeaderTextMember. This enables animation, styling, binding, etc... - public static readonly DependencyProperty HeaderTextMemberProperty = - DependencyProperty.RegisterAttached("HeaderTextMember", - typeof(string), - typeof(GridViewColumns), - new UIPropertyMetadata(null)); - - // Using a DependencyProperty as the backing store for DisplayMember. This enables animation, styling, binding, etc... - public static readonly DependencyProperty DisplayMemberMemberProperty = - DependencyProperty.RegisterAttached("DisplayMemberMember", - typeof(string), - typeof(GridViewColumns), - new UIPropertyMetadata(null)); - - public static readonly DependencyProperty CheckboxMemberProperty = - DependencyProperty.RegisterAttached("CheckboxMember", - typeof(string), - typeof(GridViewColumns), - new UIPropertyMetadata(null)); - - public static readonly DependencyProperty ColumnHeadStyleNameProperty = - DependencyProperty.RegisterAttached("ColumnHeadStyleName", - typeof(string), - typeof(GridViewColumns), - new UIPropertyMetadata(null)); - - public static readonly DependencyProperty ColumnCellTemplateProperty = - DependencyProperty.RegisterAttached("ColumnCellTemplate", - typeof(DataTemplate), - typeof(GridViewColumns), - new UIPropertyMetadata(null)); - - private static readonly IDictionary> GridViewsByColumnsSource = - new Dictionary>(); - - [AttachedPropertyBrowsableForType(typeof(GridView))] - public static object GetColumnsSource(DependencyObject obj) - { - return obj.GetValue(ColumnsSourceProperty); - } - - public static void SetColumnsSource(DependencyObject obj, object value) - { - obj.SetValue(ColumnsSourceProperty, value); - } - - - [AttachedPropertyBrowsableForType(typeof(GridView))] - public static string GetHeaderTextMember(DependencyObject obj) - { - return (string) obj.GetValue(HeaderTextMemberProperty); - } - - public static void SetHeaderTextMember(DependencyObject obj, string value) - { - obj.SetValue(HeaderTextMemberProperty, value); - } - - - [AttachedPropertyBrowsableForType(typeof(GridView))] - public static string GetDisplayMemberMember(DependencyObject obj) - { - return (string) obj.GetValue(DisplayMemberMemberProperty); - } - - [AttachedPropertyBrowsableForType(typeof(GridView))] - public static string GetCheckboxMember(DependencyObject obj) - { - return (string) obj.GetValue(CheckboxMemberProperty); - } - - public static void SetDisplayMemberMember(DependencyObject obj, string value) - { - obj.SetValue(DisplayMemberMemberProperty, value); - } - - [AttachedPropertyBrowsableForType(typeof(GridView))] - public static string GetColumnHeadStyleName(DependencyObject obj) - { - return (string) obj.GetValue(ColumnHeadStyleNameProperty); - } - - public static void SetColumnHeadStyleName(DependencyObject obj, string value) - { - obj.SetValue(ColumnHeadStyleNameProperty, value); - } - - [AttachedPropertyBrowsableForType(typeof(GridView))] - public static DataTemplate GetColumnCellTemplate(DependencyObject obj) - { - return (DataTemplate) obj.GetValue(ColumnCellTemplateProperty); - } - - public static void SetColumnCellTemplate(DependencyObject obj, DataTemplate value) - { - obj.SetValue(ColumnCellTemplateProperty, value); - } - - private static void ColumnsSourceChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e) - { - GridView gridView = obj as GridView; - if (gridView != null) - { - gridView.Columns.Clear(); - - if (e.OldValue != null) - { - ICollectionView view = CollectionViewSource.GetDefaultView(e.OldValue); - //if (view != null) - //RemoveHandlers(gridView, view); - } - - if (e.NewValue != null) - { - ICollectionView view = CollectionViewSource.GetDefaultView(e.NewValue); - if (view != null) - { - //AddHandlers(gridView, view); - CreateColumns(gridView, view); - } - } - } - } - - private static List GetGridViewsForColumnSource(ICollectionView columnSource) - { - List gridViews; - if (!GridViewsByColumnsSource.TryGetValue(columnSource, out gridViews)) - { - gridViews = new List(); - GridViewsByColumnsSource.Add(columnSource, gridViews); - } - - return gridViews; - } - - private static void AddHandlers(GridView gridView, ICollectionView view) - { - GetGridViewsForColumnSource(view).Add(gridView); - view.CollectionChanged += ColumnsSource_CollectionChanged; - } - - private static void CreateColumns(GridView gridView, ICollectionView view) - { - foreach (object item in view) - { - GridViewColumn column = CreateColumn(gridView, item as ColumnDescriptor); - - gridView.Columns.Add(column); - } - } - - private static void RemoveHandlers(GridView gridView, ICollectionView view) - { - view.CollectionChanged -= ColumnsSource_CollectionChanged; - GetGridViewsForColumnSource(view).Remove(gridView); - } - - private static void ColumnsSource_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) - { - ICollectionView view = sender as ICollectionView; - var gridViews = GetGridViewsForColumnSource(view); - if (gridViews == null || gridViews.Count == 0) - return; - - switch (e.Action) - { - case NotifyCollectionChangedAction.Add: - foreach (GridView gridView in gridViews) - { - for (var i = 0; i < e.NewItems.Count; i++) - { - GridViewColumn column = CreateColumn(gridView, e.NewItems[i] as ColumnDescriptor); - gridView.Columns.Insert(e.NewStartingIndex + i, column); - } - } - - break; - case NotifyCollectionChangedAction.Move: - foreach (GridView gridView in gridViews) - { - var columns = new List(); - for (var i = 0; i < e.OldItems.Count; i++) - { - GridViewColumn column = gridView.Columns[e.OldStartingIndex + i]; - columns.Add(column); - } - - for (var i = 0; i < e.NewItems.Count; i++) - { - GridViewColumn column = columns[i]; - gridView.Columns.Insert(e.NewStartingIndex + i, column); - } - } - - break; - case NotifyCollectionChangedAction.Remove: - foreach (GridView gridView in gridViews) - { - for (var i = 0; i < e.OldItems.Count; i++) - gridView.Columns.RemoveAt(e.OldStartingIndex); - } - - break; - case NotifyCollectionChangedAction.Replace: - foreach (GridView gridView in gridViews) - { - for (var i = 0; i < e.NewItems.Count; i++) - { - GridViewColumn column = CreateColumn(gridView, e.NewItems[i] as ColumnDescriptor); - gridView.Columns[e.NewStartingIndex + i] = column; - } - } - - break; - case NotifyCollectionChangedAction.Reset: - foreach (GridView gridView in gridViews) - { - gridView.Columns.Clear(); - CreateColumns(gridView, sender as ICollectionView); - } - - break; - } - } - - private static GridViewColumn CreateColumn(GridView gridView, ColumnDescriptor columnSource) - { - GridViewColumn column = new(); - - string headerTextMember = GetHeaderTextMember(gridView); - string displayMemberMember = GetDisplayMemberMember(gridView); - bool checkbox = columnSource.CheckboxMember; - string styleString = GetColumnHeadStyleName(gridView); - DataTemplate cellStyleTemplate = GetColumnCellTemplate(gridView); - column.Width = 90; - if (!string.IsNullOrEmpty(headerTextMember)) - column.Header = GetPropertyValue(columnSource, headerTextMember); - - if (!string.IsNullOrEmpty(displayMemberMember) && !checkbox) - { - var propertyName = GetPropertyValue(columnSource, displayMemberMember) as string; - var binding = new Binding(propertyName); - if (columnSource.OneTime) - binding.Mode = BindingMode.OneTime; - - if (cellStyleTemplate != null) - column.CellTemplate = CreateCellTemplate(cellStyleTemplate, binding); - else - column.DisplayMemberBinding = binding; - } - else if (checkbox) - { - var propertyName = GetPropertyValue(columnSource, displayMemberMember) as string; - StringReader stringReader = new(@" - - "); - XmlReader xmlReader = XmlReader.Create(stringReader); - column.CellTemplate = XamlReader.Load(xmlReader) as DataTemplate; - column.Width = 24; - } - - if (!string.IsNullOrEmpty(styleString)) - { - Style style = Application.Current.FindResource(styleString) as Style; - if (style != null) - column.HeaderContainerStyle = style; - } - - if (columnSource.PreferredWidth.HasValue) - column.Width = columnSource.PreferredWidth.Value; - else - { - // Set Widht to NaN in order to stretch it to match conent - column.Width = double.NaN; - } - - return column; - } - - private static object GetPropertyValue(object obj, string propertyName) - { - if (obj != null) - { - PropertyInfo prop = obj.GetType().GetProperty(propertyName); - if (prop != null) - return prop.GetValue(obj, null); - } - - return null; - } - - private static DataTemplate CreateCellTemplate(DataTemplate template, Binding binding) - { - var wrapper = new DataTemplate(); - var factory = new FrameworkElementFactory(typeof(ContentPresenter)); - factory.SetValue(ContentPresenter.ContentTemplateProperty, template); - factory.SetBinding(ContentPresenter.ContentProperty, binding); - wrapper.VisualTree = factory; - return wrapper; - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/ViewHelpers/IntInputValidationRule.cs b/WDE.Common.WPF/ViewHelpers/IntInputValidationRule.cs deleted file mode 100644 index 7acb1d7cd..000000000 --- a/WDE.Common.WPF/ViewHelpers/IntInputValidationRule.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Controls; - -namespace WDE.Common.WPF.ViewHelpers -{ - public class IntInputValidationRule: ValidationRule - { - public override ValidationResult Validate(object value, CultureInfo cultureInfo) - { - bool isValid = true; - if (value is string) - { - var strVal = (string)value; - var temp = 0; - isValid = Int32.TryParse(strVal, out temp); - } - else - isValid = false; - return new ValidationResult(isValid, "Violated int only input rule for input field!"); - } - } -} diff --git a/WDE.Common.WPF/ViewHelpers/InvertedBoolConverter.cs b/WDE.Common.WPF/ViewHelpers/InvertedBoolConverter.cs deleted file mode 100644 index 8f95847ee..000000000 --- a/WDE.Common.WPF/ViewHelpers/InvertedBoolConverter.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; - -namespace WDE.Common.WPF.ViewHelpers -{ - public class InvertedBoolConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - bool val = (bool) value; - return !val; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/ViewHelpers/LongToBoolConverter.cs b/WDE.Common.WPF/ViewHelpers/LongToBoolConverter.cs deleted file mode 100644 index cbe0524d0..000000000 --- a/WDE.Common.WPF/ViewHelpers/LongToBoolConverter.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; - -namespace WDE.Common.WPF.ViewHelpers -{ - public class LongToBoolConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - try - { - var longVal = System.Convert.ToInt64(value); - return longVal > 0; - } - catch (Exception e) - { - return false; - } - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - try - { - bool boolVal = System.Convert.ToBoolean(value); - return boolVal ? 1 : 0; - } - catch (Exception e) - { - return false; - } - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/ViewHelpers/NullToVisibilityConverter.cs b/WDE.Common.WPF/ViewHelpers/NullToVisibilityConverter.cs deleted file mode 100644 index 5f4b70198..000000000 --- a/WDE.Common.WPF/ViewHelpers/NullToVisibilityConverter.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; - -namespace WDE.Common.WPF.ViewHelpers -{ - public class NullToVisibilityConverter : IValueConverter - { - public Visibility WhenNull { get; set; } = Visibility.Hidden; - public Visibility WhenNotNull { get; set; } = Visibility.Visible; - - public object Convert(object? value, Type targetType, object parameter, CultureInfo culture) - { - return value == null ? WhenNull : WhenNotNull; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/WDE.Common.WPF/ViewHelpers/StretchedTreeView.cs b/WDE.Common.WPF/ViewHelpers/StretchedTreeView.cs deleted file mode 100644 index c07fb214b..000000000 --- a/WDE.Common.WPF/ViewHelpers/StretchedTreeView.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Windows; -using System.Windows.Controls; - -namespace WDE.Common.WPF.ViewHelpers -{ - // https://stackoverflow.com/a/35557401 - public class StretchedTreeView: TreeView - { - protected override DependencyObject GetContainerForItemOverride() - { - return new StretchedTreeViewItem(); - } - - protected override bool IsItemItsOwnContainerOverride(object item) - { - return item is StretchedTreeViewItem; - } - } - - public class StretchedTreeViewItem: TreeViewItem - { - public StretchedTreeViewItem() - { - this.Loaded += new RoutedEventHandler(StretchingTreeViewItem_Loaded); - } - - private void StretchingTreeViewItem_Loaded(object sender, RoutedEventArgs e) - { - // The purpose of this code is to stretch the Header Content all the way accross the TreeView. - if (this.VisualChildrenCount > 0) - { - Grid? grid = this.GetVisualChild(0) as Grid; - if (grid != null && grid.ColumnDefinitions.Count == 3) - { - // Remove the middle column which is set to Auto and let it get replaced with the - // last column that is set to Star. - grid.ColumnDefinitions.RemoveAt(1); - } - } - } - - protected override DependencyObject GetContainerForItemOverride() - { - return new StretchedTreeViewItem(); - } - - protected override bool IsItemItsOwnContainerOverride(object item) - { - return item is StretchedTreeViewItem; - } - } -} diff --git a/WDE.Common.WPF/ViewHelpers/ViewItemDoubleClickCommand.cs b/WDE.Common.WPF/ViewHelpers/ViewItemDoubleClickCommand.cs deleted file mode 100644 index 4815fc6a3..000000000 --- a/WDE.Common.WPF/ViewHelpers/ViewItemDoubleClickCommand.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; - -namespace WDE.Common.WPF.ViewHelpers -{ - public sealed class ViewItemDoubleClickCommand - { - public static readonly DependencyProperty CommandProperty = DependencyProperty.RegisterAttached( - "Command", typeof(ICommand), typeof(ViewItemDoubleClickCommand), new PropertyMetadata(default(ICommand), OnComandChanged)); - - public static void SetCommand(DependencyObject element, ICommand value) - { - element.SetValue(CommandProperty, value); - } - - public static ICommand GetCommand(DependencyObject element) - { - return (ICommand)element.GetValue(CommandProperty); - } - - public static readonly DependencyProperty CommandParameterProperty = DependencyProperty.RegisterAttached( - "CommandParameter", typeof(object), typeof(ViewItemDoubleClickCommand), new PropertyMetadata(default(object))); - - public static void SetCommandParameter(DependencyObject element, object value) - { - element.SetValue(CommandParameterProperty, value); - } - - public static object GetCommandParameter(DependencyObject element) - { - return (object)element.GetValue(CommandParameterProperty); - } - - private static void OnComandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var c = d as Control; - if (c == null) - throw new InvalidOperationException($"can only be attached to {nameof(Control)}"); - c.MouseDoubleClick -= OnDoubleClick; - if (GetCommand(c) != null) - c.MouseDoubleClick += OnDoubleClick; - } - - private static void OnDoubleClick(object sender, MouseButtonEventArgs e) - { - var d = sender as DependencyObject; - if (d == null) - return; - var command = GetCommand(d); - if (command == null) - return; - var parameter = GetCommandParameter(d); - if (!command.CanExecute(parameter)) - return; - command.Execute(parameter); - } - } -} diff --git a/WDE.Common.WPF/WDE.Common.WPF.csproj b/WDE.Common.WPF/WDE.Common.WPF.csproj deleted file mode 100644 index 9efafe7ca..000000000 --- a/WDE.Common.WPF/WDE.Common.WPF.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - net5.0-windows7.0 - Library - true - enable - nullable - Debug;Release - AnyCPU - - - - - - - - 6.1.0-preview1 - - - 2.3.2 - - - - diff --git a/WDE.CommonViews.WPF/AssemblyInfo.cs b/WDE.CommonViews.WPF/AssemblyInfo.cs deleted file mode 100644 index cf0b89ecd..000000000 --- a/WDE.CommonViews.WPF/AssemblyInfo.cs +++ /dev/null @@ -1,9 +0,0 @@ -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) -)] \ No newline at end of file diff --git a/WDE.CommonViews.WPF/CommonViewsModule.cs b/WDE.CommonViews.WPF/CommonViewsModule.cs deleted file mode 100644 index 4272ef3c5..000000000 --- a/WDE.CommonViews.WPF/CommonViewsModule.cs +++ /dev/null @@ -1,49 +0,0 @@ -using WDE.Common.Windows; -using WDE.CommonViews.WPF.RemoteSOAP.Views; -using WDE.CommonViews.WPF.Updater; -using WDE.DbcStore.ViewModels; -using WDE.DbcStore.Views; -using WDE.HistoryWindow.ViewModels; -using WDE.HistoryWindow.Views; -using WDE.Module; -using WDE.MySqlDatabaseCommon.Tools; -using WDE.Parameters.ViewModels; -using WDE.Parameters.Views; -using WDE.RemoteSOAP.ViewModels; -using WDE.Solutions.Explorer.ViewModels; -using WDE.Solutions.Explorer.Views; -using WDE.SQLEditor.ViewModels; -using WDE.SQLEditor.Views; -using WDE.TrinityMySqlDatabase.Tools; -using WDE.TrinityMySqlDatabase.ViewModels; -using WDE.TrinityMySqlDatabase.Views; -using WDE.Updater.ViewModels; - -namespace WDE.CommonViews.WPF -{ - public class CommonViewsModule : ModuleBase - { - public override void RegisterViews(IViewLocator viewLocator) - { - // database - viewLocator.Bind(); - viewLocator.Bind(); - viewLocator.Bind(); - // solutions - viewLocator.Bind(); - // parameters - viewLocator.Bind(); - // history - viewLocator.Bind(); - // dbc store - viewLocator.Bind(); - // sql editor - viewLocator.Bind(); - // updater - viewLocator.Bind(); - viewLocator.Bind(); - // remote soap - viewLocator.Bind(); - } - } -} \ No newline at end of file diff --git a/WDE.CommonViews.WPF/DbcStore/Views/DBCConfigView.xaml b/WDE.CommonViews.WPF/DbcStore/Views/DBCConfigView.xaml deleted file mode 100644 index 64a0dea80..000000000 --- a/WDE.CommonViews.WPF/DbcStore/Views/DBCConfigView.xaml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WDE.CommonViews.WPF/DbcStore/Views/DBCConfigView.xaml.cs b/WDE.CommonViews.WPF/DbcStore/Views/DBCConfigView.xaml.cs deleted file mode 100644 index c7697934a..000000000 --- a/WDE.CommonViews.WPF/DbcStore/Views/DBCConfigView.xaml.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Windows.Controls; - -namespace WDE.DbcStore.Views -{ - /// - /// Interaction logic for DBCConfigView.xaml - /// - public partial class DBCConfigView : UserControl - { - public DBCConfigView() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WDE.CommonViews.WPF/History/Views/HistoryView.xaml b/WDE.CommonViews.WPF/History/Views/HistoryView.xaml deleted file mode 100644 index 652de2508..000000000 --- a/WDE.CommonViews.WPF/History/Views/HistoryView.xaml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WDE.CommonViews.WPF/History/Views/HistoryView.xaml.cs b/WDE.CommonViews.WPF/History/Views/HistoryView.xaml.cs deleted file mode 100644 index aa987a9c8..000000000 --- a/WDE.CommonViews.WPF/History/Views/HistoryView.xaml.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Windows.Controls; - -namespace WDE.HistoryWindow.Views -{ - /// - /// Interaction logic for HistoryView.xaml - /// - public partial class HistoryView : UserControl - { - public HistoryView() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WDE.CommonViews.WPF/Parameters/Views/ParametersView.xaml b/WDE.CommonViews.WPF/Parameters/Views/ParametersView.xaml deleted file mode 100644 index 238cb5826..000000000 --- a/WDE.CommonViews.WPF/Parameters/Views/ParametersView.xaml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WDE.CommonViews.WPF/Parameters/Views/ParametersView.xaml.cs b/WDE.CommonViews.WPF/Parameters/Views/ParametersView.xaml.cs deleted file mode 100644 index cee432116..000000000 --- a/WDE.CommonViews.WPF/Parameters/Views/ParametersView.xaml.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Windows.Controls; - -namespace WDE.Parameters.Views -{ - /// - /// Interaction logic for ParametersView - /// - public partial class ParametersView : UserControl - { - public ParametersView() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WDE.CommonViews.WPF/RemoteSOAP/Views/SoapConfigView.xaml b/WDE.CommonViews.WPF/RemoteSOAP/Views/SoapConfigView.xaml deleted file mode 100644 index 9333ac471..000000000 --- a/WDE.CommonViews.WPF/RemoteSOAP/Views/SoapConfigView.xaml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WDE.CommonViews.WPF/TrinityMySqlDatabase/Tools/DebugQueryToolView.xaml.cs b/WDE.CommonViews.WPF/TrinityMySqlDatabase/Tools/DebugQueryToolView.xaml.cs deleted file mode 100644 index a9855a723..000000000 --- a/WDE.CommonViews.WPF/TrinityMySqlDatabase/Tools/DebugQueryToolView.xaml.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using WDE.MySqlDatabaseCommon.Tools; - -namespace WDE.TrinityMySqlDatabase.Tools -{ - public partial class DebugQueryToolView : UserControl - { - public DebugQueryToolView() - { - InitializeComponent(); - Loaded += OnLoaded; - Unloaded += OnUnloaded; - } - - private void OnUnloaded(object sender, RoutedEventArgs e) - { - if (DataContext is ICodeEditorViewModel codeEditorViewModel) - { - codeEditorViewModel.Clear -= CodeEditorViewModelOnClear; - codeEditorViewModel.ScrollToEnd -= CodeEditorViewModelOnScrollToEnd; - } - } - - private void OnLoaded(object sender, RoutedEventArgs e) - { - if (DataContext is ICodeEditorViewModel codeEditorViewModel){ - - codeEditorViewModel.Clear += CodeEditorViewModelOnClear; - codeEditorViewModel.ScrollToEnd += CodeEditorViewModelOnScrollToEnd; - } - } - - private void CodeEditorViewModelOnClear() - { - if (MyAvalonEdit?.Document == null || MyAvalonEdit?.TextArea == null) - return; - - MyAvalonEdit.Clear(); - } - - private void CodeEditorViewModelOnScrollToEnd() - { - if (MyAvalonEdit?.Document == null || MyAvalonEdit?.TextArea == null) - return; - - MyAvalonEdit.CaretOffset = MyAvalonEdit.Document.TextLength; - MyAvalonEdit.TextArea.Caret.BringCaretToView(); - } - } -} \ No newline at end of file diff --git a/WDE.CommonViews.WPF/TrinityMySqlDatabase/Views/DatabaseConfigView.xaml b/WDE.CommonViews.WPF/TrinityMySqlDatabase/Views/DatabaseConfigView.xaml deleted file mode 100644 index b7865770e..000000000 --- a/WDE.CommonViews.WPF/TrinityMySqlDatabase/Views/DatabaseConfigView.xaml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WDE.CommonViews.WPF/TrinityMySqlDatabase/Views/DatabaseConfigView.xaml.cs b/WDE.CommonViews.WPF/TrinityMySqlDatabase/Views/DatabaseConfigView.xaml.cs deleted file mode 100644 index 35933133d..000000000 --- a/WDE.CommonViews.WPF/TrinityMySqlDatabase/Views/DatabaseConfigView.xaml.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Windows.Controls; - -namespace WDE.TrinityMySqlDatabase.Views -{ - /// - /// Interaction logic for DatabaseConfigView - /// - public partial class DatabaseConfigView : UserControl - { - public DatabaseConfigView() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WDE.CommonViews.WPF/Updater/ChangeLogView.xaml b/WDE.CommonViews.WPF/Updater/ChangeLogView.xaml deleted file mode 100644 index 20665258c..000000000 --- a/WDE.CommonViews.WPF/Updater/ChangeLogView.xaml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WDE.CommonViews.WPF/Updater/ChangeLogView.xaml.cs b/WDE.CommonViews.WPF/Updater/ChangeLogView.xaml.cs deleted file mode 100644 index 66210c894..000000000 --- a/WDE.CommonViews.WPF/Updater/ChangeLogView.xaml.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Windows.Controls; - -namespace WDE.CommonViews.WPF.Updater -{ - public partial class ChangeLogView : UserControl - { - public ChangeLogView() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WDE.CommonViews.WPF/Updater/UpdaterConfigurationView.xaml b/WDE.CommonViews.WPF/Updater/UpdaterConfigurationView.xaml deleted file mode 100644 index 09be383f7..000000000 --- a/WDE.CommonViews.WPF/Updater/UpdaterConfigurationView.xaml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/WDE.CommonViews.WPF/Updater/UpdaterConfigurationView.xaml.cs b/WDE.CommonViews.WPF/Updater/UpdaterConfigurationView.xaml.cs deleted file mode 100644 index b8a18d0f9..000000000 --- a/WDE.CommonViews.WPF/Updater/UpdaterConfigurationView.xaml.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Windows.Controls; - -namespace WDE.CommonViews.WPF.Updater -{ - public partial class UpdaterConfigurationView : UserControl - { - public UpdaterConfigurationView() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WDE.CommonViews.WPF/WDE.CommonViews.WPF.csproj b/WDE.CommonViews.WPF/WDE.CommonViews.WPF.csproj deleted file mode 100644 index 1740c61e2..000000000 --- a/WDE.CommonViews.WPF/WDE.CommonViews.WPF.csproj +++ /dev/null @@ -1,47 +0,0 @@ - - - - net5.0-windows7.0 - true - Debug;Release - AnyCPU - - - - ..\bin\$(Configuration)\ - - - - - - - - - - - - - - - - - - - - 7.2.0.1422 - - - 6.1.0-preview1 - - - 3.1.0 - - - 2.3.2 - - - 1.1.31 - - - - diff --git a/WDE.Conditions.WPF/ConditionsWpfModule.cs b/WDE.Conditions.WPF/ConditionsWpfModule.cs deleted file mode 100644 index 41b1567ec..000000000 --- a/WDE.Conditions.WPF/ConditionsWpfModule.cs +++ /dev/null @@ -1,9 +0,0 @@ -using WDE.Module; - -namespace WDE.Conditions.WPF -{ - public class ConditionsWpfModule : ModuleBase - { - - } -} \ No newline at end of file diff --git a/WDE.Conditions.WPF/Properties/AssemblyInfo.cs b/WDE.Conditions.WPF/Properties/AssemblyInfo.cs deleted file mode 100644 index 89581ceef..000000000 --- a/WDE.Conditions.WPF/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Runtime.InteropServices; - -[assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)] - -// In SDK-style projects such as this one, several assembly attributes that were historically -// defined in this file are now automatically added during build and populated with -// values defined in project properties. For details of which attributes are included -// and how to customise this process see: https://aka.ms/assembly-info-properties - - -// Setting ComVisible to false makes the types in this assembly not visible to COM -// components. If you need to access a type in this assembly from COM, set the ComVisible -// attribute to true on that type. - -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM. - -[assembly: Guid("d7b9a8b5-b840-4455-b1ca-0c82364d59c9")] diff --git a/WDE.Conditions.WPF/Themes/Generic.xaml b/WDE.Conditions.WPF/Themes/Generic.xaml deleted file mode 100644 index ba78f7daf..000000000 --- a/WDE.Conditions.WPF/Themes/Generic.xaml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - diff --git a/WDE.Conditions.WPF/Views/ConditionsEditorView.xaml b/WDE.Conditions.WPF/Views/ConditionsEditorView.xaml deleted file mode 100644 index 2a9985356..000000000 --- a/WDE.Conditions.WPF/Views/ConditionsEditorView.xaml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WDE.Conditions.WPF/Views/ConditionsEditorView.xaml.cs b/WDE.Conditions.WPF/Views/ConditionsEditorView.xaml.cs deleted file mode 100644 index b0345c061..000000000 --- a/WDE.Conditions.WPF/Views/ConditionsEditorView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace WDE.Conditions.WPF.Views -{ - /// - /// Interaction logic for ConditionsEditorView.xaml - /// - public partial class ConditionsEditorView : UserControl - { - public ConditionsEditorView() - { - InitializeComponent(); - } - } -} diff --git a/WDE.Conditions.WPF/Views/DefinitionEditor/ConditionEditorView.xaml b/WDE.Conditions.WPF/Views/DefinitionEditor/ConditionEditorView.xaml deleted file mode 100644 index da0962541..000000000 --- a/WDE.Conditions.WPF/Views/DefinitionEditor/ConditionEditorView.xaml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Search: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WDE.DatabaseEditors.WPF/Views/Template/TemplateDbTableEditorView.xaml.cs b/WDE.DatabaseEditors.WPF/Views/Template/TemplateDbTableEditorView.xaml.cs deleted file mode 100644 index b7bbd2e0a..000000000 --- a/WDE.DatabaseEditors.WPF/Views/Template/TemplateDbTableEditorView.xaml.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Windows.Controls; -using System.Windows.Input; -using Prism.Commands; - -namespace WDE.DatabaseEditors.WPF.Views.Template -{ - public partial class TemplateDbTableEditorView : UserControl - { - public TemplateDbTableEditorView() - { - InitializeComponent(); - InputBindings.Add(new KeyBinding(new DelegateCommand(() => - { - TextBox tb = FindName("SearchTextBox") as TextBox; - tb?.Focus(); - }), new KeyGesture(Key.F, ModifierKeys.Control))); - } - } -} \ No newline at end of file diff --git a/WDE.DatabaseEditors.WPF/WDE.DatabaseEditors.WPF.csproj b/WDE.DatabaseEditors.WPF/WDE.DatabaseEditors.WPF.csproj deleted file mode 100644 index e69497895..000000000 --- a/WDE.DatabaseEditors.WPF/WDE.DatabaseEditors.WPF.csproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - net5.0-windows7.0 - true - Debug;Release - AnyCPU - enable - - - - ..\bin\$(Configuration)\ - - - - - - - - - - - - 7.2.0.1422 - - - diff --git a/WDE.SmartScriptEditor.WPF/AssemblyInfo.cs b/WDE.SmartScriptEditor.WPF/AssemblyInfo.cs deleted file mode 100644 index cf0b89ecd..000000000 --- a/WDE.SmartScriptEditor.WPF/AssemblyInfo.cs +++ /dev/null @@ -1,9 +0,0 @@ -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) -)] \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/Helpers/FocusBehavior.cs b/WDE.SmartScriptEditor.WPF/Editor/Helpers/FocusBehavior.cs deleted file mode 100644 index 39a0783d2..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/Helpers/FocusBehavior.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; - -namespace WDE.SmartScriptEditor.WPF.Editor.Helpers -{ - public static class FocusBehavior - { - public static readonly DependencyProperty FocusFirstProperty = DependencyProperty.RegisterAttached("FocusFirst", - typeof(bool), - typeof(FocusBehavior), - new PropertyMetadata(false, OnFocusFirstPropertyChanged)); - - public static bool GetFocusFirst(Control control) - { - return (bool) control.GetValue(FocusFirstProperty); - } - - public static void SetFocusFirst(Control control, bool value) - { - control.SetValue(FocusFirstProperty, value); - } - - private static void OnFocusFirstPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) - { - Control control = obj as Control; - if (control == null || !(args.NewValue is bool)) - return; - - if ((bool) args.NewValue) - control.Loaded += (sender, e) => control.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); - } - } -} \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/Helpers/InputBindingsBehavior.cs b/WDE.SmartScriptEditor.WPF/Editor/Helpers/InputBindingsBehavior.cs deleted file mode 100644 index 84d111c0d..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/Helpers/InputBindingsBehavior.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System.Linq; -using System.Windows; -using System.Windows.Input; - -namespace WDE.SmartScriptEditor.WPF.Editor.Helpers -{ - // https://stackoverflow.com/questions/12941707/keybinding-in-usercontrol-doesnt-work-when-textbox-has-the-focus - public class InputBindingsBehavior - { - public static readonly DependencyProperty TakesInputBindingPrecedenceProperty = - DependencyProperty.RegisterAttached("TakesInputBindingPrecedence", - typeof(bool), - typeof(InputBindingsBehavior), - new UIPropertyMetadata(false, OnTakesInputBindingPrecedenceChanged)); - - public static bool GetTakesInputBindingPrecedence(UIElement obj) - { - return (bool) obj.GetValue(TakesInputBindingPrecedenceProperty); - } - - public static void SetTakesInputBindingPrecedence(UIElement obj, bool value) - { - obj.SetValue(TakesInputBindingPrecedenceProperty, value); - } - - private static void OnTakesInputBindingPrecedenceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - ((UIElement) d).PreviewKeyDown += InputBindingsBehavior_PreviewKeyDown; - } - - private static void InputBindingsBehavior_PreviewKeyDown(object sender, KeyEventArgs e) - { - UIElement uielement = (UIElement) sender; - - KeyBinding? foundBinding = uielement.InputBindings.OfType() - .FirstOrDefault(kb => kb.Key == e.Key && kb.Modifiers == e.KeyboardDevice.Modifiers); - - if (foundBinding != null) - { - e.Handled = true; - if (foundBinding.Command.CanExecute(foundBinding.CommandParameter)) - foundBinding.Command.Execute(foundBinding.CommandParameter); - } - } - } -} \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/Helpers/IsNullConverter.cs b/WDE.SmartScriptEditor.WPF/Editor/Helpers/IsNullConverter.cs deleted file mode 100644 index ffbac61ef..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/Helpers/IsNullConverter.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; - -namespace WDE.SmartScriptEditor.WPF.Editor.Helpers -{ - public class IsNullConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - return value == null; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new InvalidOperationException("IsNullConverter can only be used OneWay."); - } - } -} \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/Helpers/NullToVisibilityConverter.cs b/WDE.SmartScriptEditor.WPF/Editor/Helpers/NullToVisibilityConverter.cs deleted file mode 100644 index 53816fbdb..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/Helpers/NullToVisibilityConverter.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; - -namespace WDE.SmartScriptEditor.WPF.Editor.Helpers -{ - public class NullToVisibilityConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - return value == null ? Visibility.Hidden : Visibility.Visible; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/README.md b/WDE.SmartScriptEditor.WPF/Editor/README.md deleted file mode 100644 index b3ee9ea83..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/README.md +++ /dev/null @@ -1 +0,0 @@ -Code in this folder is absolutely against any good WPF and MVVM practises, if you know how to write editor in a better way - any refactor (or rather - writing from the scratch) is welcome! \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/UserControls/ActionDataTemplateSelector.cs b/WDE.SmartScriptEditor.WPF/Editor/UserControls/ActionDataTemplateSelector.cs deleted file mode 100644 index 7e867aab3..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/UserControls/ActionDataTemplateSelector.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using WDE.SmartScriptEditor.Models; - -namespace WDE.SmartScriptEditor.WPF.Editor.UserControls -{ - public class ActionDataTemplateSelector : DataTemplateSelector - { - public DataTemplate ActionTemplate { get; set; } - public DataTemplate CommentTemplate { get; set; } - - public override DataTemplate SelectTemplate(object item, DependencyObject container) - { - if (item is SmartAction {Id: SmartConstants.ActionComment}) - return CommentTemplate; - - return ActionTemplate; - } - } - - public class SmartEventFlagPhaseDataSelector : DataTemplateSelector - { - public DataTemplate FlagTemplate { get; set; } - public DataTemplate PhaseTemplate { get; set; } - - public override DataTemplate SelectTemplate(object item, DependencyObject container) - { - if (item is SmartEventFlagsView.IconViewModel {IsPhaseFlag: true}) - return PhaseTemplate; - - return FlagTemplate; - } - } -} \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/UserControls/GlobalVaraiableView.cs b/WDE.SmartScriptEditor.WPF/Editor/UserControls/GlobalVaraiableView.cs deleted file mode 100644 index 5ff5aa36b..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/UserControls/GlobalVaraiableView.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Input; -using WDE.SmartScriptEditor.Models; - -namespace WDE.SmartScriptEditor.WPF.Editor.UserControls -{ - /// - /// Interaction logic for SmartActionView.xaml - /// - public class GlobalVariableView : Control - { - public static DependencyProperty IsSelectedProperty = DependencyProperty.Register(nameof(IsSelected), - typeof(bool), - typeof(GlobalVariableView), - new PropertyMetadata(false)); - - public static DependencyProperty DeselectAllRequestProperty = - DependencyProperty.Register(nameof(DeselectAllRequest), typeof(ICommand), typeof(GlobalVariableView)); - - public static DependencyProperty DeselectAllButGlobalVariablesRequestProperty = - DependencyProperty.Register(nameof(DeselectAllButGlobalVariablesRequest), typeof(ICommand), typeof(GlobalVariableView)); - - public static DependencyProperty EditGlobalVariableCommandProperty = - DependencyProperty.Register(nameof(EditGlobalVariableCommand), typeof(ICommand), typeof(GlobalVariableView)); - - static GlobalVariableView() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(GlobalVariableView), new FrameworkPropertyMetadata(typeof(GlobalVariableView))); - } - - public bool IsSelected - { - get => (bool) GetValue(IsSelectedProperty); - set => SetValue(IsSelectedProperty, value); - } - - public ICommand DeselectAllRequest - { - get => (ICommand) GetValue(DeselectAllRequestProperty); - set => SetValue(DeselectAllRequestProperty, value); - } - - public ICommand DeselectAllButGlobalVariablesRequest - { - get => (ICommand) GetValue(DeselectAllButGlobalVariablesRequestProperty); - set => SetValue(DeselectAllButGlobalVariablesRequestProperty, value); - } - - public ICommand EditGlobalVariableCommand - { - get => (ICommand) GetValue(EditGlobalVariableCommandProperty); - set => SetValue(EditGlobalVariableCommandProperty, value); - } - - - protected override void OnMouseDown(MouseButtonEventArgs e) - { - base.OnMouseDown(e); - if (e.ClickCount == 1) - { - DeselectAllButGlobalVariablesRequest?.Execute(null); - - if (!IsSelected) - { - if (!Keyboard.IsKeyDown(Key.LeftCtrl)) - DeselectAllRequest?.Execute(null); - IsSelected = true; - } - } - else if (e.ClickCount == 2) - EditGlobalVariableCommand?.Execute(DataContext); - } - } -} \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/UserControls/MiniEventIcon.cs b/WDE.SmartScriptEditor.WPF/Editor/UserControls/MiniEventIcon.cs deleted file mode 100644 index 4410e2caa..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/UserControls/MiniEventIcon.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Windows; -using System.Windows.Controls; - -namespace WDE.SmartScriptEditor.WPF.Editor.UserControls -{ - public class MiniEventIcon : Control - { - public static DependencyProperty TextProperty = - DependencyProperty.Register(nameof(Text), typeof(string), typeof(MiniEventIcon)); - - static MiniEventIcon() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(MiniEventIcon), new FrameworkPropertyMetadata(typeof(MiniEventIcon))); - } - - public string Text - { - get => (string) GetValue(TextProperty); - set => SetValue(TextProperty, value); - } - } -} \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartActionView.cs b/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartActionView.cs deleted file mode 100644 index d5cd31a34..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartActionView.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Input; -using WDE.SmartScriptEditor.Models; - -namespace WDE.SmartScriptEditor.WPF.Editor.UserControls -{ - /// - /// Interaction logic for SmartActionView.xaml - /// - public class SmartActionView : Control - { - public static DependencyProperty IsSelectedProperty = DependencyProperty.Register(nameof(IsSelected), - typeof(bool), - typeof(SmartActionView), - new PropertyMetadata(false)); - - public static DependencyProperty DeselectAllRequestProperty = - DependencyProperty.Register(nameof(DeselectAllRequest), typeof(ICommand), typeof(SmartActionView)); - - public static DependencyProperty DeselectAllButActionsRequestProperty = - DependencyProperty.Register(nameof(DeselectAllButActionsRequest), typeof(ICommand), typeof(SmartActionView)); - - public static DependencyProperty EditActionCommandProperty = - DependencyProperty.Register(nameof(EditActionCommand), typeof(ICommand), typeof(SmartActionView)); - - public static DependencyProperty DirectEditParameterProperty = - DependencyProperty.Register(nameof(DirectEditParameter), typeof(ICommand), typeof(SmartActionView)); - - static SmartActionView() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(SmartActionView), new FrameworkPropertyMetadata(typeof(SmartActionView))); - } - - public bool IsSelected - { - get => (bool) GetValue(IsSelectedProperty); - set => SetValue(IsSelectedProperty, value); - } - - public ICommand DeselectAllRequest - { - get => (ICommand) GetValue(DeselectAllRequestProperty); - set => SetValue(DeselectAllRequestProperty, value); - } - - public ICommand DeselectAllButActionsRequest - { - get => (ICommand) GetValue(DeselectAllButActionsRequestProperty); - set => SetValue(DeselectAllButActionsRequestProperty, value); - } - - public ICommand EditActionCommand - { - get => (ICommand) GetValue(EditActionCommandProperty); - set => SetValue(EditActionCommandProperty, value); - } - - public ICommand DirectEditParameter - { - get => (ICommand) GetValue(DirectEditParameterProperty); - set => SetValue(DirectEditParameterProperty, value); - } - - protected override void OnMouseDown(MouseButtonEventArgs e) - { - base.OnMouseDown(e); - if (e.ClickCount == 1) - { - if (DirectEditParameter != null) - { - if (e.OriginalSource is Run originalRun && originalRun.DataContext != null && - originalRun.DataContext != DataContext) - { - DirectEditParameter.Execute(originalRun.DataContext); - return; - } - } - - DeselectAllButActionsRequest?.Execute(null); - - if (!IsSelected) - { - if (!Keyboard.IsKeyDown(Key.LeftCtrl)) - DeselectAllRequest?.Execute(null); - IsSelected = true; - } - } - else if (e.ClickCount == 2) - EditActionCommand?.Execute(DataContext); - } - } -} \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartConditionView.cs b/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartConditionView.cs deleted file mode 100644 index 973d63178..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartConditionView.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Input; - -namespace WDE.SmartScriptEditor.WPF.Editor.UserControls -{ - /// - /// Interaction logic for SmartActionView.xaml - /// - public class SmartConditionView : Control - { - public static DependencyProperty IsSelectedProperty = DependencyProperty.Register(nameof(IsSelected), - typeof(bool), - typeof(SmartConditionView), - new PropertyMetadata(false)); - - public static DependencyProperty DeselectAllRequestProperty = - DependencyProperty.Register(nameof(DeselectAllRequest), typeof(ICommand), typeof(SmartConditionView)); - - public static DependencyProperty DeselectAllButConditionsRequestProperty = - DependencyProperty.Register(nameof(DeselectAllButConditionsRequest), typeof(ICommand), typeof(SmartConditionView)); - - public static DependencyProperty EditConditionCommandProperty = - DependencyProperty.Register(nameof(EditConditionCommand), typeof(ICommand), typeof(SmartConditionView)); - - public static DependencyProperty DirectEditParameterProperty = - DependencyProperty.Register(nameof(DirectEditParameter), typeof(ICommand), typeof(SmartConditionView)); - - static SmartConditionView() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(SmartConditionView), new FrameworkPropertyMetadata(typeof(SmartConditionView))); - } - - public bool IsSelected - { - get => (bool) GetValue(IsSelectedProperty); - set => SetValue(IsSelectedProperty, value); - } - - public ICommand DeselectAllRequest - { - get => (ICommand) GetValue(DeselectAllRequestProperty); - set => SetValue(DeselectAllRequestProperty, value); - } - - public ICommand DeselectAllButConditionsRequest - { - get => (ICommand) GetValue(DeselectAllButConditionsRequestProperty); - set => SetValue(DeselectAllButConditionsRequestProperty, value); - } - - public ICommand EditConditionCommand - { - get => (ICommand) GetValue(EditConditionCommandProperty); - set => SetValue(EditConditionCommandProperty, value); - } - - public ICommand DirectEditParameter - { - get => (ICommand) GetValue(DirectEditParameterProperty); - set => SetValue(DirectEditParameterProperty, value); - } - - protected override void OnMouseDown(MouseButtonEventArgs e) - { - base.OnMouseDown(e); - if (e.ClickCount == 1) - { - if (DirectEditParameter != null) - { - if (e.OriginalSource is Run originalRun && originalRun.DataContext != null && - originalRun.DataContext != DataContext) - { - DirectEditParameter.Execute(originalRun.DataContext); - return; - } - } - - DeselectAllButConditionsRequest?.Execute(null); - if (!IsSelected) - { - if (!Keyboard.IsKeyDown(Key.LeftCtrl)) - DeselectAllRequest?.Execute(null); - IsSelected = true; - } - } - else if (e.ClickCount == 2) - EditConditionCommand?.Execute(DataContext); - } - } -} \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartEventFlagsView.cs b/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartEventFlagsView.cs deleted file mode 100644 index cf6827760..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartEventFlagsView.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reactive.Linq; -using System.Windows; -using System.Windows.Controls; -using WDE.MVVM; -using WDE.MVVM.Observable; -using WDE.SmartScriptEditor.Models; - -namespace WDE.SmartScriptEditor.WPF.Editor.UserControls -{ - public class SmartEventFlagsView : Control - { - private System.IDisposable? flagsDisposable; - - public static DependencyProperty FlagsProperty = - DependencyProperty.Register(nameof(Flags), typeof(ObservableCollection), typeof(SmartEventFlagsView)); - - static SmartEventFlagsView() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(SmartEventFlagsView), new FrameworkPropertyMetadata(typeof(SmartEventFlagsView))); - } - - public SmartEventFlagsView() - { - Flags = new(); - Loaded += OnLoaded; - Unloaded += OnUnloaded; - DataContextChanged += OnDataContextChanged; - } - - private void OnDataContextChanged(object sender, DependencyPropertyChangedEventArgs e) - { - UpdatedDataContext(); - } - - private void OnUnloaded(object sender, RoutedEventArgs e) - { - flagsDisposable?.Dispose(); - flagsDisposable = null; - } - - private void OnLoaded(object sender, RoutedEventArgs e) - { - UpdatedDataContext(); - } - - public ObservableCollection Flags - { - get => (ObservableCollection) GetValue(FlagsProperty); - set => SetValue(FlagsProperty, value); - } - - protected void UpdatedDataContext() - { - flagsDisposable?.Dispose(); - flagsDisposable = null; - if (DataContext is SmartEvent se) - { - var flagsObservable = se.Flags.ToObservable(t => t.Value); - var phasesObservable = se.Phases.ToObservable(t => t.Value); - var combined = flagsObservable.CombineLatest(phasesObservable, (flags, phases) => (flags, phases)); - flagsDisposable = combined.SubscribeAction(tuple => - { - Flags.Clear(); - var (eventFlagsNum, eventPhasesNum) = tuple; - - if (eventFlagsNum > 0 && se.Flags.Parameter.HasItems) - { - foreach (var item in se.Flags.Parameter.Items!) - { - if (item.Key == 0) - continue; - - if ((eventFlagsNum & item.Key) > 0) - Flags.Add(new IconViewModel(FlagToIconTextSymbol(item.Key), item.Value.Name, item.Value.Description)); - } - } - - if (eventPhasesNum > 0 && se.Phases.Parameter.HasItems) - { - int totalPhases = se.Phases.Parameter.Items! - .Count(item => (eventPhasesNum & item.Key) > 0); - - var currentPhases = se.Phases.Parameter.Items! - .Where(item => item.Key != 0 && (eventPhasesNum & item.Key) > 0) - .Select(item => PhaseMaskToPhase((int) item.Key)); - - if (totalPhases > 3) - { - Flags.Add(new IconViewModel(currentPhases)); - } - else - { - foreach (var phase in currentPhases) - Flags.Add(new IconViewModel(phase)); - } - } - }); - } - } - - private static string FlagToIconTextSymbol(long flag) - { - SmartEventFlag f = (SmartEventFlag) flag; - if (f == SmartEventFlag.NotRepeatable) - return "I"; - if (f == SmartEventFlag.DebugOnly) - return "d"; - if (f == SmartEventFlag.WhileCharmed) - return "c"; - if (f == SmartEventFlag.DontReset) - return "r"; - if (f == SmartEventFlag.Difficulty0) - return "A"; - if (f == SmartEventFlag.Difficulty1) - return "B"; - if (f == SmartEventFlag.Difficulty2) - return "C"; - if (f == SmartEventFlag.Difficulty3) - return "D"; - return "?"; - } - - private static int PhaseMaskToPhase(int phaseMask) - { - for (int i = 0; i < 12; ++i) - { - if (((1 << i) & phaseMask) > 0) - return i + 1; - } - - return 0; - } - - public struct IconViewModel - { - public bool IsPhaseFlag { get; set; } - public string Text { get; set; } - public string ToolTip { get; set; } - - public IconViewModel(long phase) - { - IsPhaseFlag = true; - Text = phase.ToString(); - ToolTip = "Event will only activate in script phase " + phase; - } - - public IconViewModel(IEnumerable phases) - { - IsPhaseFlag = true; - Text = "..."; - ToolTip = "Event will only activate in script phases: " + string.Join(", ", phases); - } - - public IconViewModel(string text, string flagName, string? tooltip) - { - Text = text; - ToolTip = tooltip != null ? $"Event flag {flagName}: {tooltip}" : $"Event flag {flagName}"; - IsPhaseFlag = false; - } - } - } -} \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartEventView.cs b/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartEventView.cs deleted file mode 100644 index f2e5f2da9..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartEventView.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Input; -using WDE.SmartScriptEditor.Models; - -namespace WDE.SmartScriptEditor.WPF.Editor.UserControls -{ - /// - /// Interaction logic for SmartEventView.xaml - /// - public class SmartEventView : Control - { - public static DependencyProperty EditEventCommandProperty = - DependencyProperty.Register("EditEventCommand", typeof(ICommand), typeof(SmartEventView)); - - public static DependencyProperty DeselectAllRequestProperty = - DependencyProperty.Register(nameof(DeselectAllRequest), typeof(ICommand), typeof(SmartEventView)); - - public static DependencyProperty DeselectActionsOfDeselectedEventsRequestProperty = - DependencyProperty.Register(nameof(DeselectActionsOfDeselectedEventsRequest), typeof(ICommand), typeof(SmartEventView)); - - public static DependencyProperty DirectEditParameterProperty = - DependencyProperty.Register(nameof(DirectEditParameter), typeof(ICommand), typeof(SmartEventView)); - - public static DependencyProperty IsSelectedProperty = DependencyProperty.Register(nameof(IsSelected), - typeof(bool), - typeof(SmartEventView), - new PropertyMetadata(false)); - - static SmartEventView() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(SmartEventView), new FrameworkPropertyMetadata(typeof(SmartEventView))); - } - - public ICommand EditEventCommand - { - get => (ICommand) GetValue(EditEventCommandProperty); - set => SetValue(EditEventCommandProperty, value); - } - - public ICommand DeselectAllRequest - { - get => (ICommand) GetValue(DeselectAllRequestProperty); - set => SetValue(DeselectAllRequestProperty, value); - } - - public ICommand DeselectActionsOfDeselectedEventsRequest - { - get => (ICommand) GetValue(DeselectActionsOfDeselectedEventsRequestProperty); - set => SetValue(DeselectActionsOfDeselectedEventsRequestProperty, value); - } - - public ICommand DirectEditParameter - { - get => (ICommand) GetValue(DirectEditParameterProperty); - set => SetValue(DirectEditParameterProperty, value); - } - - public bool IsSelected - { - get => (bool) GetValue(IsSelectedProperty); - set => SetValue(IsSelectedProperty, value); - } - - protected override void OnPreviewMouseDown(MouseButtonEventArgs e) - { - if (e.ClickCount == 1) - { - if (DirectEditParameter != null) - { - if (e.OriginalSource is Run originalRun && originalRun.DataContext != null && - originalRun.DataContext != DataContext) - { - DirectEditParameter.Execute(originalRun.DataContext); - return; - } - } - - DeselectActionsOfDeselectedEventsRequest?.Execute(null); - - if (!IsSelected) - { - if (!Keyboard.IsKeyDown(Key.LeftCtrl)) - DeselectAllRequest?.Execute(null); - IsSelected = true; - } - e.Handled = true; - } - else if (e.ClickCount == 2) - { - EditEventCommand?.Execute(DataContext); - e.Handled = true; - } - base.OnPreviewMouseDown(e); - } - } -} \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartScriptPanelLayout.cs b/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartScriptPanelLayout.cs deleted file mode 100644 index a0239b996..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartScriptPanelLayout.cs +++ /dev/null @@ -1,809 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using System.Windows.Media; -using WDE.Common.Managers; -using WDE.SmartScriptEditor.Editor.UserControls; -using WDE.SmartScriptEditor.Editor.ViewModels; -using WDE.SmartScriptEditor.Models; - -namespace WDE.SmartScriptEditor.WPF.Editor.UserControls -{ - internal class SmartScriptPanelLayout : Panel - { - private readonly List<(float y, float height, int actionIndex, int eventIndex)> actionHeights = new(); - private readonly List<(float y, float height, int conditionIndex, int eventIndex)> conditionHeights = new(); - - private readonly List eventHeights = new(); - private readonly Dictionary actionToPresenter = new(); - private readonly Dictionary eventToPresenter = new(); - private readonly Dictionary conditionToPresenter = new(); - private readonly Dictionary presenterToCondition = new(); - private readonly Dictionary presenterToAction = new(); - private readonly Dictionary presenterToEvent = new(); - private readonly Dictionary variableToPresenter = new(); - private readonly Dictionary presenterToVariable = new(); - - private ContentPresenter addActionPresenter; - private NewActionViewModel addActionViewModel; - - private ContentPresenter addConditionPresenter; - private NewConditionViewModel addConditionViewModel; - private bool draggingActions; - private bool draggingEvents; - private bool draggingConditions; - - private Point mouseStartPosition; - private float mouseY; - - private (float y, float height, int conditionIndex, int eventIndex) overIndexCondition; - private (float y, float height, int actionIndex, int eventIndex) overIndexAction; - - private static float PaddingLeft = 20; - private float EventWidth => Math.Min(Math.Max((float) ActualWidth - 50, PaddingLeft + 10), 250); - - private float ConditionWidth => Math.Max(EventWidth - 22 - PaddingLeft, 0); - - protected override void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved) - { - base.OnVisualChildrenChanged(visualAdded, visualRemoved); - if (visualAdded is ContentPresenter visualAddedPresenter) - visualAddedPresenter.Loaded += OnLoadVisualChild; - - if (visualRemoved is ContentPresenter visualRemovedPresenter) - { - visualRemovedPresenter.Loaded -= OnLoadVisualChild; - if (visualRemovedPresenter.Content is SmartEvent @event) - { - presenterToEvent.Remove(visualRemovedPresenter); - eventToPresenter.Remove(@event); - } - else if (visualRemovedPresenter.Content is SmartAction action) - { - presenterToAction.Remove(visualRemovedPresenter); - actionToPresenter.Remove(action); - } - else if (visualRemovedPresenter.Content is SmartCondition condition) - { - presenterToCondition.Remove(visualRemovedPresenter); - conditionToPresenter.Remove(condition); - } - else if (visualRemovedPresenter.Content is GlobalVariable globalVariable) - { - presenterToVariable.Remove(visualRemovedPresenter); - variableToPresenter.Remove(globalVariable); - } - else if (visualRemovedPresenter.Content is NewActionViewModel) - { - addActionPresenter = null; - addActionViewModel = null; - } - else if (visualRemovedPresenter.Content is NewConditionViewModel) - { - addConditionPresenter = null; - addConditionViewModel = null; - } - } - - InvalidateArrange(); - InvalidateVisual(); - InvalidateMeasure(); - } - - private void OnLoadVisualChild(object sender, RoutedEventArgs e) - { - ContentPresenter visualAddedPresenter = sender as ContentPresenter; - if (visualAddedPresenter.Content is SmartEvent @event) - { - presenterToEvent[visualAddedPresenter] = @event; - eventToPresenter[@event] = visualAddedPresenter; - } - else if (visualAddedPresenter.Content is SmartAction action) - { - presenterToAction[visualAddedPresenter] = action; - actionToPresenter[action] = visualAddedPresenter; - } - else if (visualAddedPresenter.Content is SmartCondition condition) - { - presenterToCondition[visualAddedPresenter] = condition; - conditionToPresenter[condition] = visualAddedPresenter; - } - else if (visualAddedPresenter.Content is GlobalVariable globalVariable) - { - presenterToVariable[visualAddedPresenter] = globalVariable; - variableToPresenter[globalVariable] = visualAddedPresenter; - } - else if (visualAddedPresenter.Content is NewActionViewModel vm) - { - addActionPresenter = visualAddedPresenter; - addActionViewModel = vm; - } else if (visualAddedPresenter.Content is NewConditionViewModel cvm) - { - addConditionPresenter = visualAddedPresenter; - addConditionViewModel = cvm; - } - - InvalidateArrange(); - InvalidateVisual(); - InvalidateMeasure(); - } - - private IEnumerable Events() - { - foreach (ContentPresenter child in InternalChildren) - { - if (child.Content is SmartEvent) - yield return child; - } - } - - private IEnumerable GlobalVariables() - { - foreach (ContentPresenter child in InternalChildren) - { - if (child.Content is GlobalVariable) - yield return child; - } - } - - private Size MeasureGlobalVariables(Size availableSize) - { - double totalDesiredSize = EventSpacing; - foreach (ContentPresenter globalVariablePresenter in GlobalVariables()) - { - globalVariablePresenter.Measure(new Size(ActualWidth - PaddingLeft, availableSize.Height)); - totalDesiredSize += globalVariablePresenter.DesiredSize.Height + 2; - } - - return new Size(availableSize.Width, totalDesiredSize); - } - - protected override Size MeasureOverride(Size availableSize) - { - Size s = base.MeasureOverride(availableSize); - float totalDesiredHeight = (float)MeasureGlobalVariables(availableSize).Height; - foreach (ContentPresenter eventPresenter in Events()) - { - eventPresenter.Measure(new Size(EventWidth - PaddingLeft, availableSize.Height)); - - float actionsHeight = 26; - float conditionsHeight = 26; - - if (!presenterToEvent.ContainsKey(eventPresenter)) - continue; - - SmartEvent @event = presenterToEvent[eventPresenter]; - foreach (SmartAction action in @event.Actions) - { - if (!actionToPresenter.TryGetValue(action, out var actionPresenter)) - continue; - - actionPresenter.Measure(new Size(ActualWidth - EventWidth, availableSize.Height)); - - actionsHeight += (float) actionPresenter.DesiredSize.Height + ActionSpacing; - } - foreach (SmartCondition condition in @event.Conditions) - { - if (!conditionToPresenter.TryGetValue(condition, out var conditionPresenter)) - continue; - - conditionPresenter.Measure(new Size(ConditionWidth, availableSize.Height)); - - conditionsHeight += (float) conditionPresenter.DesiredSize.Height + ConditionSpacing; - } - - totalDesiredHeight += Math.Max(actionsHeight, (float) eventPresenter.DesiredSize.Height + conditionsHeight) + EventSpacing; - } - - return new Size(s.Width, Math.Max(0, totalDesiredHeight)); - } - - protected override void OnMouseDown(MouseButtonEventArgs e) - { - base.OnMouseDown(e); - if (e.LeftButton == MouseButtonState.Pressed) - { - if (!(e.Source is SmartEventView) && !(e.Source is SmartActionView)) - { - foreach (ContentPresenter @event in Events()) - SetSelected(@event, false); - } - - mouseStartPosition = e.GetPosition(this); - } - } - - protected override void OnMouseUp(MouseButtonEventArgs e) - { - base.OnMouseUp(e); - StopDragging(); - } - - private void StopDragging() - { - ReleaseMouseCapture(); - if (draggingEvents) - DropItems?.Execute(OverIndexEvent); - else if (draggingActions) - { - DropActions?.Execute(new DropActionsConditionsArgs - {EventIndex = overIndexAction.eventIndex, ActionIndex = overIndexAction.actionIndex}); - } - else if (draggingConditions) - { - DropConditions?.Execute(new DropActionsConditionsArgs - {EventIndex = overIndexCondition.eventIndex, ActionIndex = overIndexCondition.conditionIndex}); - } - - draggingEvents = false; - draggingActions = false; - draggingConditions = false; - InvalidateArrange(); - InvalidateVisual(); - } - - private static FormattedText? vvvvError; - private static FormattedText? vvvvWarning; - - private void DrawProblem(DrawingContext dc, int line, double yPos) - { - if (vvvvError == null) - { - vvvvError = new FormattedText("vvvv", CultureInfo.InvariantCulture, FlowDirection.LeftToRight, new Typeface("Calibri"), 7, Brushes.Red); - vvvvWarning = new FormattedText("vvvv", CultureInfo.InvariantCulture, FlowDirection.LeftToRight, new Typeface("Calibri"), 7, Brushes.Orange); - } - - if (Problems != null && Problems.TryGetValue(line, out var severity)) - { - dc.DrawText(severity == DiagnosticSeverity.Error ? vvvvError : vvvvWarning, new Point(0, yPos + 5 + 10)); - } - } - - protected override void OnRender(DrawingContext dc) - { - base.OnRender(dc); - if (draggingActions) - { - float x = EventWidth; - float y = overIndexAction.y - overIndexAction.height / 2 - 1; - dc.DrawLine(new Pen(Brushes.Gray, 1), new Point(x, y), new Point(x + 200, y)); - } - else if (draggingConditions) - { - float x = 1; - float y = overIndexCondition.y - overIndexCondition.height / 2 - 1; - dc.DrawLine(new Pen(Brushes.Gray, 1), new Point(x, y), new Point(x + ConditionWidth, y)); - } - - - int index = 1; - double yPos = 0; - foreach (var e in Script.Events) - { - if (e.Actions.Count == 0) - { - if (!eventToPresenter.TryGetValue(e, out var eventPresenter)) - continue; - yPos = eventPresenter.TransformToAncestor(this).Transform(new Point(0, 0)).Y; - - var ft = NumberCache.Get(index); - dc.DrawText(ft, new Point(0, yPos + 5)); - DrawProblem(dc, index, yPos); - index++; - } - else - { - foreach (var a in e.Actions) - { - if (!actionToPresenter.TryGetValue(a, out var actionPresenter)) - continue; - - yPos = actionPresenter.TransformToAncestor(this).Transform(new Point(0, 0)).Y; - - var ft = NumberCache.Get(index); - dc.DrawText(ft, new Point(0, yPos + 5)); - DrawProblem(dc, index, yPos); - - index++; - } - } - } - } - - - private static FormattedTextNumberCache NumberCache = new(); - public class FormattedTextNumberCache - { - private FormattedText[] cache = new FormattedText[0]; - - public FormattedTextNumberCache() - { - - } - - public FormattedText Get(int index) - { - if (cache.Length <= index) - EnsureCache(index + 1); - return cache[index]; - } - - private void EnsureCache(int size) - { - int old = cache.Length; - size = Math.Max(size, cache.Length * 2 + 1); - Array.Resize(ref cache, size); - for (int i = old; i < size; ++i) - { - cache[i] = new FormattedText(i.ToString(), CultureInfo.InvariantCulture, FlowDirection.LeftToRight, new Typeface("Calibri"), 10, Brushes.DarkGray); - } - } - } - - - private bool AnyActionSelected() - { - return actionToPresenter.Keys.Any(a => a.IsSelected); - } - - private bool AnyEventSelected() - { - return eventToPresenter.Keys.Any(a => a.IsSelected); - } - - private bool mouseStartPositionValid = false; - protected override void OnMouseMove(MouseEventArgs e) - { - base.OnMouseMove(e); - mouseY = (float) e.GetPosition(this).Y; - if (e.LeftButton != MouseButtonState.Pressed) - { - mouseStartPosition = e.GetPosition(this); - mouseStartPositionValid = true; - } - if (mouseStartPositionValid && - e.LeftButton == MouseButtonState.Pressed && - !draggingActions && !draggingEvents && !draggingConditions) - { - var dist = (float) Point.Subtract(mouseStartPosition, e.GetPosition(this)).Length; - if (dist > 10) - { - if (e.GetPosition(this).X < EventWidth) - { - if (AnyEventSelected()) - draggingEvents = true; - else - draggingConditions = true; - } - else - draggingActions = AnyActionSelected(); - - if (draggingEvents || draggingActions || draggingConditions) - { - mouseStartPositionValid = false; - CaptureMouse(); - } - } - } - - if (draggingEvents) - { - var eventIndex = 0; - var found = false; - foreach (float f in eventHeights) - { - if (f > mouseY) - { - OverIndexEvent = eventIndex; - found = true; - break; - } - - eventIndex++; - } - - if (!found) - { - OverIndexEvent = eventHeights.Count > 0 && mouseY > eventHeights[^1] - ? eventHeights.Count - 1 - : 0; - } - } - else if (draggingActions) - { - foreach ((float y, float height, int actionIndex, int eventIndex) tuple in actionHeights) - { - if (tuple.y > mouseY) - { - overIndexAction = tuple; - break; - } - } - InvalidateVisual(); - } - else if (draggingConditions) - { - foreach ((float y, float height, int conditionIndex, int eventIndex) tuple in conditionHeights) - { - if (tuple.y > mouseY) - { - overIndexCondition = tuple; - break; - } - } - InvalidateVisual(); - } - - InvalidateArrange(); - } - - protected override void OnMouseLeave(MouseEventArgs e) - { - base.OnMouseLeave(e); - mouseStartPositionValid = false; - } - - private Size ArrangeGlobalVariables(Size finalSize) - { - double totalHeight = EventSpacing; - foreach (GlobalVariable gv in Script.GlobalVariables) - { - if (!variableToPresenter.TryGetValue(gv, out var variablePresenter)) - continue; - - variablePresenter.Arrange(new Rect(PaddingLeft, totalHeight, finalSize.Width - PaddingLeft, variablePresenter.DesiredSize.Height)); - - totalHeight += variablePresenter.DesiredSize.Height + 2; - } - - return new Size(finalSize.Width, totalHeight); - } - - protected override Size ArrangeOverride(Size finalSize) - { - eventHeights.Clear(); - actionHeights.Clear(); - conditionHeights.Clear(); - Size globalVariablesArrangement = ArrangeGlobalVariables(finalSize); - float y = (float)globalVariablesArrangement.Height; - - float selectedHeight = 0; - foreach (SmartEvent ev in Script.Events) - { - if (!eventToPresenter.TryGetValue(ev, out var eventPresenter)) - continue; - - float height = Math.Max(MeasureActions(eventPresenter), (float) eventPresenter.DesiredSize.Height + MeasureConditions(eventPresenter)); - eventHeights.Add(y + (height + EventSpacing) / 2); - y += height + EventSpacing; - - if (!draggingEvents || !GetSelected(eventPresenter)) - continue; - selectedHeight += height + EventSpacing; - } - - eventHeights.Add(y); - - y = (float)globalVariablesArrangement.Height; - float start = 0; - if (OverIndexEvent == 0) - { - start = y; - y += selectedHeight; - } - - var eventIndex = 0; - if (addActionViewModel != null) - addActionViewModel.Event = null; - if (addConditionViewModel != null) - addConditionViewModel.Event = null; - - foreach (SmartEvent ev in Script.Events) - { - if (!eventToPresenter.TryGetValue(ev, out var eventPresenter)) - continue; - - var height = (float) eventPresenter.DesiredSize.Height; - if (!draggingEvents || !GetSelected(eventPresenter)) - { - float actionHeight = ArrangeActions(eventIndex, 0, finalSize, eventPresenter, y, height); - float conditionsHeight = ArrangeConditions(eventIndex, PaddingLeft, finalSize, eventPresenter, y, height); - float eventsConditionsHeight = height + conditionsHeight; - height = Math.Max(eventsConditionsHeight, actionHeight); - eventPresenter.Arrange(new Rect(PaddingLeft, y, EventWidth - PaddingLeft, height)); - - if (mouseY > y && mouseY < y + height && !draggingActions && !draggingEvents) - { - if (presenterToEvent.TryGetValue(eventPresenter, out SmartEvent smartEvent)) - { - if (addActionViewModel != null) - addActionViewModel.Event = smartEvent; - - if (addConditionViewModel != null) - addConditionViewModel.Event = smartEvent; - } - - addActionPresenter.Arrange(new Rect(EventWidth, - y + actionHeight - 26, - Math.Max(finalSize.Width - EventWidth, 0), - 24)); - - addConditionPresenter.Arrange(new Rect(PaddingLeft + 25, - y + eventsConditionsHeight - 26, - ConditionWidth, - 24)); - } - - y += height + EventSpacing; - } - - eventIndex++; - if (eventIndex == OverIndexEvent) - { - start = y; - y += selectedHeight; - } - } - - eventIndex = 0; - foreach (SmartEvent ev in Script.Events) - { - if (!eventToPresenter.TryGetValue(ev, out var eventPresenter)) - continue; - var height = (float) eventPresenter.DesiredSize.Height; - if (draggingEvents && GetSelected(eventPresenter)) - { - float conditionsHeight = ArrangeConditions(eventIndex, 20 + PaddingLeft, finalSize, eventPresenter, start, height); - height = Math.Max(height + conditionsHeight, ArrangeActions(eventIndex, 20, finalSize, eventPresenter, start, height)); - eventPresenter.Arrange(new Rect(20 + PaddingLeft, start, EventWidth - PaddingLeft, height)); - start += height + EventSpacing; - } - - eventIndex++; - } - - return finalSize; - } - - private float ArrangeActions(int eventIndex, - float x, - Size totalSize, - ContentPresenter eveentPresenter, - float y, - float eventHeight) - { - float totalHeight = 26; - if (!presenterToEvent.TryGetValue(eveentPresenter, out SmartEvent @event)) - return totalHeight; - - var actionIndex = 0; - foreach (SmartAction action in @event.Actions) - { - if (!actionToPresenter.TryGetValue(action, out ContentPresenter actionPresenter)) - continue; - - var height = (float) actionPresenter.DesiredSize.Height; - actionPresenter.Arrange(new Rect(EventWidth + x, y, Math.Max(totalSize.Width - EventWidth, 0), height)); - actionHeights.Add((y + (height + ActionSpacing) / 2, height + ActionSpacing, actionIndex, eventIndex)); - y += height + ActionSpacing; - - totalHeight += height + ActionSpacing; - actionIndex++; - } - - float rest = Math.Max(26, eventHeight - (totalHeight - 26)); - - actionHeights.Add((y + (rest + ActionSpacing) / 2, rest, actionIndex, eventIndex)); - - return totalHeight; - } - - private float MeasureActions(ContentPresenter eventPresenter) - { - float totalHeight = 26; - if (!presenterToEvent.TryGetValue(eventPresenter, out SmartEvent @event)) - return totalHeight; - - foreach (SmartAction action in @event.Actions) - { - if (!actionToPresenter.TryGetValue(action, out ContentPresenter actionPresenter)) - continue; - - var height = (float) actionPresenter.DesiredSize.Height; - totalHeight += height + ActionSpacing; - } - - return totalHeight; - } - - private float MeasureConditions(ContentPresenter eventPresenter) - { - float totalHeight = 26; - if (!presenterToEvent.TryGetValue(eventPresenter, out SmartEvent @event)) - return totalHeight; - - foreach (SmartCondition condition in @event.Conditions) - { - if (!conditionToPresenter.TryGetValue(condition, out ContentPresenter actionPresenter)) - continue; - - var height = (float) actionPresenter.DesiredSize.Height; - totalHeight += height + ConditionSpacing; - } - - return totalHeight; - } - - private float ArrangeConditions(int eventIndex, - float x, - Size totalSize, - ContentPresenter eveentPresenter, - float y, - float eventHeight) - { - float totalHeight = 26; - if (!presenterToEvent.TryGetValue(eveentPresenter, out SmartEvent @event)) - return totalHeight; - - var conditionIndex = 0; - y += eventHeight; - foreach (SmartCondition condition in @event.Conditions) - { - if (!conditionToPresenter.TryGetValue(condition, out ContentPresenter conditionPresenter)) - continue; - - var height = (float) conditionPresenter.DesiredSize.Height; - conditionPresenter.Arrange(new Rect(x + 21, y, ConditionWidth, height)); - conditionHeights.Add((y + (height + ConditionSpacing) / 2, height + ConditionSpacing, conditionIndex, eventIndex)); - y += height + ConditionSpacing; - - totalHeight += height + ConditionSpacing; - conditionIndex++; - } - - float rest = 5; - - conditionHeights.Add((y + (rest + ActionSpacing) / 2, rest, conditionIndex, eventIndex)); - - return totalHeight; - } - - protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo) - { - base.OnRenderSizeChanged(sizeInfo); - InvalidateMeasure(); - InvalidateArrange(); - } - - #region Properties - - public static readonly DependencyProperty SelectedProperty = DependencyProperty.RegisterAttached("Selected", - typeof(bool), - typeof(SmartScriptPanelLayout), - new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsParentArrange)); - - [AttachedPropertyBrowsableForChildren] - public static bool GetSelected(UIElement element) - { - if (element == null) - throw new ArgumentNullException("element"); - - return (bool) element.GetValue(SelectedProperty); - } - - [AttachedPropertyBrowsableForChildren] - public static void SetSelected(UIElement element, bool length) - { - if (element == null) - throw new ArgumentNullException("element"); - - element.SetValue(SelectedProperty, length); - } - - public int OverIndexEvent - { - get => (int) GetValue(OverIndexEventProperty); - set => SetValue(OverIndexEventProperty, value); - } - - public static readonly DependencyProperty OverIndexEventProperty = DependencyProperty.Register(nameof(OverIndexEvent), - typeof(int), - typeof(SmartScriptPanelLayout), - new PropertyMetadata(0)); - - - public SmartScript Script - { - get => (SmartScript) GetValue(ScriptProperty); - set => SetValue(ScriptProperty, value); - } - - public static readonly DependencyProperty ScriptProperty = DependencyProperty.Register(nameof(Script), - typeof(SmartScript), - typeof(SmartScriptPanelLayout), - new PropertyMetadata(null)); - - public Dictionary? Problems - { - get => (Dictionary?)GetValue(ProblemsProperty); - set => SetValue(ProblemsProperty, value); - } - - public static readonly DependencyProperty ProblemsProperty = DependencyProperty.Register(nameof(Problems), - typeof(Dictionary), - typeof(SmartScriptPanelLayout), - new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender)); - - public float EventSpacing - { - get => (float) GetValue(EventSpacingProperty); - set => SetValue(EventSpacingProperty, value); - } - - public static readonly DependencyProperty EventSpacingProperty = DependencyProperty.Register(nameof(EventSpacing), - typeof(float), - typeof(SmartScriptPanelLayout), - new PropertyMetadata(10f)); - - public float ConditionSpacing - { - get => (float) GetValue(ConditionSpacingProperty); - set => SetValue(ConditionSpacingProperty, value); - } - - public static readonly DependencyProperty ConditionSpacingProperty = DependencyProperty.Register(nameof(ConditionSpacing), - typeof(float), - typeof(SmartScriptPanelLayout), - new PropertyMetadata(1f)); - - public float ActionSpacing - { - get => (float) GetValue(ActionSpacingProperty); - set => SetValue(ActionSpacingProperty, value); - } - - public static readonly DependencyProperty ActionSpacingProperty = DependencyProperty.Register(nameof(ActionSpacing), - typeof(float), - typeof(SmartScriptPanelLayout), - new PropertyMetadata(2f)); - - public static readonly DependencyProperty DropItemsProperty = DependencyProperty.Register(nameof(DropItems), - typeof(ICommand), - typeof(SmartScriptPanelLayout), - new UIPropertyMetadata(null)); - - public ICommand DropItems - { - get => (ICommand) GetValue(DropItemsProperty); - set => SetValue(DropItemsProperty, value); - } - - public static readonly DependencyProperty DropActionsProperty = DependencyProperty.Register(nameof(DropActions), - typeof(ICommand), - typeof(SmartScriptPanelLayout), - new UIPropertyMetadata(null)); - - public ICommand DropActions - { - get => (ICommand) GetValue(DropActionsProperty); - set => SetValue(DropActionsProperty, value); - } - - public static readonly DependencyProperty DropConditionsProperty = DependencyProperty.Register(nameof(DropConditions), - typeof(ICommand), - typeof(SmartScriptPanelLayout), - new UIPropertyMetadata(null)); - - public ICommand DropConditions - { - get => (ICommand) GetValue(DropConditionsProperty); - set => SetValue(DropConditionsProperty, value); - } - - #endregion - } -} \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartScriptView.xaml b/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartScriptView.xaml deleted file mode 100644 index fe3527380..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartScriptView.xaml +++ /dev/null @@ -1,179 +0,0 @@ - - - - False - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartScriptView.xaml.cs b/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartScriptView.xaml.cs deleted file mode 100644 index 9f1e23357..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/UserControls/SmartScriptView.xaml.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; - -namespace WDE.SmartScriptEditor.WPF.Editor.UserControls -{ - /// - /// Interaction logic for SmartScriptView.xaml - /// - public partial class SmartScriptView : UserControl - { - public static DependencyProperty DeleteEventCommandProperty = - DependencyProperty.Register("DeleteEventCommand", typeof(ICommand), typeof(SmartScriptView)); - - public SmartScriptView() - { - InitializeComponent(); - } - - public ICommand DeleteEventCommand - { - get => (ICommand) GetValue(DeleteEventCommandProperty); - set => SetValue(DeleteEventCommandProperty, value); - } - - private void EventSetter_OnHandler(object sender, MouseButtonEventArgs e) - { - } - - private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e) - { - } - - private void UIElement_OnKeyDown(object sender, KeyEventArgs e) - { - if (e.Key == Key.Delete) - DeleteEventCommand?.Execute(this); - } - } -} \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/Views/Editing/ParameterEditorView.cs b/WDE.SmartScriptEditor.WPF/Editor/Views/Editing/ParameterEditorView.cs deleted file mode 100644 index fe42ceb0e..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/Views/Editing/ParameterEditorView.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; - -namespace WDE.SmartScriptEditor.WPF.Editor.Views.Editing -{ - /// - /// Interaction logic for ParameterEditorView - /// - public class ParameterEditorView : Control - { - static ParameterEditorView() - { - FocusableProperty.OverrideMetadata(typeof(ParameterEditorView), new FrameworkPropertyMetadata(false)); - KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(ParameterEditorView), new FrameworkPropertyMetadata(KeyboardNavigationMode.Local)); - DefaultStyleKeyProperty.OverrideMetadata(typeof(ParameterEditorView), new FrameworkPropertyMetadata(typeof(ParameterEditorView))); - } - } -} \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/Editor/Views/Editing/ParametersEditView.xaml b/WDE.SmartScriptEditor.WPF/Editor/Views/Editing/ParametersEditView.xaml deleted file mode 100644 index c48696c36..000000000 --- a/WDE.SmartScriptEditor.WPF/Editor/Views/Editing/ParametersEditView.xaml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WDE.SmartScriptEditor.WPF/WDE.SmartScriptEditor.WPF.csproj b/WDE.SmartScriptEditor.WPF/WDE.SmartScriptEditor.WPF.csproj deleted file mode 100644 index c354dae9b..000000000 --- a/WDE.SmartScriptEditor.WPF/WDE.SmartScriptEditor.WPF.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - net5.0-windows7.0 - true - 0.0.0.0 - 0.0.0.0 - Debug;Release - AnyCPU - - - - - - - - - - - 1.1.31 - - - 7.2.0.1422 - - - - ..\bin\$(Configuration)\ - - - - - diff --git a/WDE.ThemeChanger/App.config b/WDE.ThemeChanger/App.config deleted file mode 100644 index 917b33441..000000000 --- a/WDE.ThemeChanger/App.config +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/WDE.ThemeChanger/Data/ThemeSettings.cs b/WDE.ThemeChanger/Data/ThemeSettings.cs deleted file mode 100644 index 095532ea5..000000000 --- a/WDE.ThemeChanger/Data/ThemeSettings.cs +++ /dev/null @@ -1,14 +0,0 @@ -using WDE.Common.Services; - -namespace WDE.ThemeChanger.Data -{ - public struct ThemeSettings : ISettings - { - public string Name { get; } - - public ThemeSettings(string name) - { - Name = name; - } - } -} \ No newline at end of file diff --git a/WDE.ThemeChanger/Properties/AssemblyInfo.cs b/WDE.ThemeChanger/Properties/AssemblyInfo.cs deleted file mode 100644 index 6cce24fe1..000000000 --- a/WDE.ThemeChanger/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("WDE.ThemeChanger")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("WDE.ThemeChanger")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -[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) -)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/WDE.ThemeChanger/Properties/Resources.Designer.cs b/WDE.ThemeChanger/Properties/Resources.Designer.cs deleted file mode 100644 index cb2592f9c..000000000 --- a/WDE.ThemeChanger/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WDE.ThemeChanger.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WDE.ThemeChanger.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/WDE.ThemeChanger/Properties/Resources.resx b/WDE.ThemeChanger/Properties/Resources.resx deleted file mode 100644 index af7dbebba..000000000 --- a/WDE.ThemeChanger/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/WDE.ThemeChanger/Properties/Settings.Designer.cs b/WDE.ThemeChanger/Properties/Settings.Designer.cs deleted file mode 100644 index ac0a2d4db..000000000 --- a/WDE.ThemeChanger/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WDE.ThemeChanger.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff --git a/WDE.ThemeChanger/Properties/Settings.settings b/WDE.ThemeChanger/Properties/Settings.settings deleted file mode 100644 index 033d7a5e9..000000000 --- a/WDE.ThemeChanger/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/WDE.ThemeChanger/Providers/IThemeSettingsProvider.cs b/WDE.ThemeChanger/Providers/IThemeSettingsProvider.cs deleted file mode 100644 index 34ee6b969..000000000 --- a/WDE.ThemeChanger/Providers/IThemeSettingsProvider.cs +++ /dev/null @@ -1,11 +0,0 @@ -using WDE.Common.Managers; -using WDE.ThemeChanger.Data; - -namespace WDE.ThemeChanger.Providers -{ - public interface IThemeSettingsProvider - { - ThemeSettings GetSettings(); - void UpdateSettings(Theme themeName); - } -} \ No newline at end of file diff --git a/WDE.ThemeChanger/Providers/ThemeSettingsProvider.cs b/WDE.ThemeChanger/Providers/ThemeSettingsProvider.cs deleted file mode 100644 index 8a6b3a712..000000000 --- a/WDE.ThemeChanger/Providers/ThemeSettingsProvider.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.IO; -using Newtonsoft.Json; -using WDE.Common.Managers; -using WDE.Common.Services; -using WDE.Module.Attributes; -using WDE.ThemeChanger.Data; - -namespace WDE.ThemeChanger.Providers -{ - [AutoRegister] - [SingleInstance] - public class ThemeSettingsProvider : IThemeSettingsProvider - { - private readonly IUserSettings userSettings; - - public ThemeSettingsProvider(IUserSettings userSettings) - { - this.userSettings = userSettings; - Settings = userSettings.Get(); - } - - private ThemeSettings Settings { get; set; } - - public ThemeSettings GetSettings() - { - return Settings; - } - - public void UpdateSettings(Theme theme) - { - userSettings.Update(new ThemeSettings(theme.Name)); - } - } -} \ No newline at end of file diff --git a/WDE.ThemeChanger/ThemeChangerModule.cs b/WDE.ThemeChanger/ThemeChangerModule.cs deleted file mode 100644 index f7993d098..000000000 --- a/WDE.ThemeChanger/ThemeChangerModule.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Prism.Ioc; -using WDE.Common.Managers; -using WDE.Module; -using WDE.Module.Attributes; - -namespace WDE.ThemeChanger -{ - [AutoRegister] - [SingleInstance] - public class ThemeChangerModule : ModuleBase - { - public override void OnInitialized(IContainerProvider containerProvider) - { - containerProvider.Resolve(); - } - } -} \ No newline at end of file diff --git a/WDE.ThemeChanger/ThemeManager.cs b/WDE.ThemeChanger/ThemeManager.cs deleted file mode 100644 index b98e32450..000000000 --- a/WDE.ThemeChanger/ThemeManager.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows; -using WDE.Common.Managers; -using WDE.Module.Attributes; -using WDE.ThemeChanger.Providers; - -namespace WDE.ThemeChanger -{ - [AutoRegister] - [SingleInstance] - public class ThemeManager : IThemeManager - { - private readonly Theme defaultTheme = new("BlueTheme"); - - public ThemeManager(IThemeSettingsProvider themeSettings) - { - string currentThemeName = themeSettings.GetSettings().Name; - - Theme theme = new(currentThemeName); - - if (!IsValidTheme(theme)) - theme = defaultTheme; - - SetTheme(theme); - } - - private List themes => new() {new("DarkTheme"), new("BlueTheme")}; - - public Theme CurrentTheme { get; private set; } - - public IEnumerable Themes => themes; - - public void SetTheme(Theme theme) - { - if (!IsValidTheme(theme)) - return; - - var curentTheme = Application.Current.Resources.MergedDictionaries[1].Source.ToString(); - string compareStr = "/" + theme.Name + ".xaml"; - - if (!curentTheme.Contains(compareStr)) - { - Application.Current.Resources.MergedDictionaries.Clear(); - Uri uriOne = new("pack://application:,,,/AvalonDock.Themes.VS2013;component/" + theme.Name + ".xaml"); - Uri uriTwo = new("Themes/" + theme.Name + ".xaml", UriKind.RelativeOrAbsolute); - Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary {Source = uriOne}); - Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary {Source = uriTwo}); - } - - CurrentTheme = theme; - } - - private bool IsValidTheme(Theme theme) - { - return !string.IsNullOrEmpty(theme.Name) && themes.Select(t => t.Name).Contains(theme.Name); - } - } -} \ No newline at end of file diff --git a/WDE.ThemeChanger/ViewModels/ThemeConfigViewModel.cs b/WDE.ThemeChanger/ViewModels/ThemeConfigViewModel.cs deleted file mode 100644 index 5485f7d2b..000000000 --- a/WDE.ThemeChanger/ViewModels/ThemeConfigViewModel.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows.Input; -using Prism.Commands; -using Prism.Mvvm; -using WDE.Common; -using WDE.Common.Managers; -using WDE.Module.Attributes; -using WDE.ThemeChanger.Providers; - -namespace WDE.ThemeChanger.ViewModels -{ - [AutoRegister] - public class ThemeConfigViewModel : BindableBase, IConfigurable - { - private Theme name; - private List themes; - - public ThemeConfigViewModel(IThemeSettingsProvider settings, IThemeManager themeManager) - { - name = themeManager.CurrentTheme; - themes = themeManager.Themes.ToList(); - - Save = new DelegateCommand(() => - { - themeManager.SetTheme(ThemeName); - settings.UpdateSettings(ThemeName); - IsModified = false; - }); - } - - public Theme ThemeName - { - get => name; - set - { - IsModified = true; - SetProperty(ref name, value); - } - } - - public List Themes - { - get => themes; - set => SetProperty(ref themes, value); - } - - public ICommand Save { get; } - public string Name => "Appearance"; - public string ShortDescription => null; - public bool IsRestartRequired => false; - - private bool isModified; - public bool IsModified - { - get => isModified; - private set => SetProperty(ref isModified, value); - } - } -} \ No newline at end of file diff --git a/WDE.ThemeChanger/Views/ThemeConfigView.xaml b/WDE.ThemeChanger/Views/ThemeConfigView.xaml deleted file mode 100644 index 106eab1fd..000000000 --- a/WDE.ThemeChanger/Views/ThemeConfigView.xaml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/WDE.ThemeChanger/Views/ThemeConfigView.xaml.cs b/WDE.ThemeChanger/Views/ThemeConfigView.xaml.cs deleted file mode 100644 index 7661355b0..000000000 --- a/WDE.ThemeChanger/Views/ThemeConfigView.xaml.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Windows.Controls; - -namespace WDE.ThemeChanger.Views -{ - /// - /// Interaction logic for ThemeConfigView.xaml - /// - public partial class ThemeConfigView : UserControl - { - public ThemeConfigView() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WDE.ThemeChanger/WDE.ThemeChanger.csproj b/WDE.ThemeChanger/WDE.ThemeChanger.csproj deleted file mode 100644 index f96140d9a..000000000 --- a/WDE.ThemeChanger/WDE.ThemeChanger.csproj +++ /dev/null @@ -1,40 +0,0 @@ - - - net5.0-windows7.0 - Library - false - true - Debug;Release - AnyCPU - - - ..\bin\$(Configuration)\ - - - - - - - - - - - 2.0.5 - - - 12.0.3 - - - 7.2.0.1422 - - - 5.11.6 - - - 5.11.10 - - - 5.11.1 - - - \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/App.xaml b/WoWDatabaseEditorCore.WPF/App.xaml deleted file mode 100644 index 957acc18a..000000000 --- a/WoWDatabaseEditorCore.WPF/App.xaml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - diff --git a/WoWDatabaseEditorCore.WPF/App.xaml.cs b/WoWDatabaseEditorCore.WPF/App.xaml.cs deleted file mode 100644 index 0a1c7b715..000000000 --- a/WoWDatabaseEditorCore.WPF/App.xaml.cs +++ /dev/null @@ -1,312 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Runtime.Loader; -using System.Windows; -using Prism.Events; -using Prism.Ioc; -using Prism.Modularity; -using Prism.Unity; -using Prism.Unity.Ioc; -using Unity; -using Unity.RegistrationByConvention; -using WDE.Common.Events; -using WDE.Common.Managers; -using WDE.Common.Services; -using WDE.Common.Services.MessageBox; -using WDE.Common.Tasks; -using WDE.Common.Windows; -using WDE.Common.WPF; -using WDE.Common.WPF.Utils; -using WDE.Module; -using WDE.Module.Attributes; -using WoWDatabaseEditorCore.CoreVersion; -using WoWDatabaseEditorCore.ModulesManagement; -using WoWDatabaseEditorCore.ViewModels; -using WoWDatabaseEditorCore.WPF.Managers; -using WoWDatabaseEditorCore.WPF.Views; -using WoWDatabaseEditorCore.CoreVersion; -using WoWDatabaseEditorCore.Services.FileSystemService; -using WoWDatabaseEditorCore.Services.UserSettingsService; - -namespace WoWDatabaseEditorCore.WPF -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : PrismApplication - { - private IModulesManager? modulesManager; - private SplashScreenView? splash; - - public App() - { - System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; - /* - * .net core (and .net 5) changed the way assembly and type resolving work. - * Preferred way to implement "plugins" is using custom AssemblyLoadContext per plugin - * however, current Prism implementation is not AssemblyLoadContext friendly - * Therefore this workaround make assembly loading work more or less like in .net framework - * All assemblies are loaded to the default context and any type can be found via Type.GetType() - * - * The disadvantage is that assemblies cannot conflict with each other. If using AssemblyLoadContext - * there would be no problem with for instance different versions of a package. - */ - Dictionary assemblyToRequesting = new(); - string? executingAssemblyLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => - { - if (args.Name.EndsWith("resources") || args.RequestingAssembly == null) - return null; - - AssemblyName? name = new(args.Name); - - string? requestingAssemblyPath = executingAssemblyLocation + "/" + args.RequestingAssembly.GetName().Name + ".dll"; - - if (!File.Exists(requestingAssemblyPath)) - { - if (!assemblyToRequesting.TryGetValue(args.RequestingAssembly.GetName().Name ?? "", out requestingAssemblyPath)) - return null; - } - - assemblyToRequesting.Add(name.Name ?? "", requestingAssemblyPath); - - AssemblyDependencyResolver? dependencyPathResolver = new(requestingAssemblyPath); - string? path = dependencyPathResolver.ResolveAssemblyToPath(name); - - if (path == null) - return null; - - if (AssemblyLoadContext.Default.Assemblies.FirstOrDefault(t => t.GetName() == name) != null) - return AssemblyLoadContext.Default.Assemblies.FirstOrDefault(t => t.GetName() == name); - - return AssemblyLoadContext.Default.LoadFromAssemblyPath(path); - }; - - - if (ProgramBootstrap.TryLaunchUpdaterIfNeeded()) - Current.Shutdown(); - } - - protected override IContainerExtension CreateContainerExtension() - { - var unity = new UnityContainer().AddExtension(new Diagnostic()); - var container = new UnityContainerExtension(unity); - var mainScope = new ScopedContainer(container, unity); - container.RegisterInstance(mainScope); - return container; - } - - protected override Window CreateShell() - { - splash = Container.Resolve(); - - splash.Show(); - - return splash; - } - - protected override void RegisterTypes(IContainerRegistry containerRegistry) - { - containerRegistry.RegisterInstance(Container); - var vfs = new VirtualFileSystem(); - var fs = new FileSystem(vfs); - var userSettings = new UserSettings(fs, new DummyStatusBar()); - var currentCoreSettings = new CurrentCoreSettings(userSettings); - modulesManager = new ModulesManager(currentCoreSettings); - var mainThread = new MainThread(); - GlobalApplication.InitializeApplication(mainThread, GlobalApplication.AppBackend.WPF); - containerRegistry.RegisterInstance(mainThread); - containerRegistry.RegisterInstance(modulesManager); - } - - private class DummyStatusBar : IStatusBar - { - public void PublishNotification(INotification notification) { } - } - - protected override void RegisterRequiredTypes(IContainerRegistry containerRegistry) - { - base.RegisterRequiredTypes(containerRegistry); - containerRegistry.RegisterSingleton(); - - containerRegistry.RegisterSingleton(); - } - - protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog) - { - base.ConfigureModuleCatalog(moduleCatalog); - moduleCatalog.AddModule(typeof(MainModule)); - moduleCatalog.AddModule(typeof(CommonWpfModule)); - moduleCatalog.AddModule(typeof(MainModuleWPF)); - - List allAssemblies = GetPluginDlls() - .Select(AssemblyLoadContext.Default.LoadFromAssemblyPath) - .ToList(); - - allAssemblies.Sort(Comparer.Create((a, b) => - { - var aRequires = a.GetCustomAttributes(typeof(ModuleRequiresCoreAttribute), false); - var bRequires = b.GetCustomAttributes(typeof(ModuleRequiresCoreAttribute), false); - return bRequires.Length.CompareTo(aRequires.Length); - })); - - List loadAssemblies = allAssemblies - .Where(modulesManager!.ShouldLoad) - .ToList(); - - var conflicts = DetectConflicts(loadAssemblies); - - foreach (var conflict in conflicts) - { - MessageBox.Show( - $"Module {conflict.ConflictingAssembly.GetName().Name} conflicts with module {conflict.FirstAssembly.GetName().Name}. They provide same functionality. This is not allowed. Disablig {conflict.ConflictingAssembly.GetName().Name}"); - modulesManager!.AddConflicted(conflict.ConflictingAssembly, conflict.FirstAssembly); - allAssemblies.Remove(conflict.ConflictingAssembly); - } - - AddMoulesFromLoadedAssemblies(moduleCatalog, allAssemblies); - } - - private IEnumerable GetPluginDlls() - { - string? path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - if (path == null) - return ArraySegment.Empty; - return Directory.GetFiles(path, "WDE*.dll").Where(path => !path.Contains("Test.dll") && !path.Contains("WDE.Common.WPF")); - } - - private IList DetectConflicts(List allAssemblies) - { - Dictionary> providedInterfaces = new(); - - List conflictingAssemblies = new(); - - foreach (var assembly in allAssemblies) - { - var implementedInterfaces = AllClasses.FromAssemblies(assembly) - .Where(t => t.IsDefined(typeof(AutoRegisterAttribute), true)) - .SelectMany(t => t.GetInterfaces()) - .Where(t => t.IsDefined(typeof(UniqueProviderAttribute))) - .ToList(); - - if (!implementedInterfaces.Any()) - continue; - - foreach (var otherAssembly in providedInterfaces) - { - var intersection = otherAssembly.Value.Intersect(implementedInterfaces).ToList(); - - if (intersection.Count > 0) - conflictingAssemblies.Add(new Conflict(assembly, otherAssembly.Key)); - } - - providedInterfaces.Add(assembly, implementedInterfaces.ToList()); - } - - return conflictingAssemblies; - } - - private void AddMoulesFromLoadedAssemblies(IModuleCatalog moduleCatalog, List allAssemblies) - { - var modules = AllClasses.FromAssemblies(allAssemblies).Where(t => t.GetInterfaces().Contains(typeof(IModule))).ToList(); - - foreach (var module in modules) - { - bool load = modulesManager!.AddModule(module.Assembly); - if (load) - moduleCatalog.AddModule(new ModuleInfo - { - ModuleName = module.Name, - ModuleType = module.AssemblyQualifiedName, - Ref = "file://" + module.Assembly.Location - }); - } - } - - protected override IModuleCatalog CreateModuleCatalog() - { - return new ConfigurationModuleCatalog(); - } - - protected override void OnInitialized() - { - var loadedModules = Container.Resolve>(); - foreach (var module in loadedModules) - module.FinalizeRegistration((IContainerRegistry)Container); - - IMessageBoxService messageBoxService = Container.Resolve(); - IClipboardService clipboardService = Container.Resolve(); - ViewBind.AppViewLocator = Container.Resolve(); - // have no idea if it makes sense, but works - MainWindow? mainWindow = Container.Resolve(); - mainWindow.DataContext = Container.Resolve(); - - IEventAggregator? eventAggregator = Container.Resolve(); - eventAggregator.GetEvent().Publish(); - - mainWindow.ContentRendered += MainWindowOnContentRendered; - - #if DEBUG - mainWindow.ShowDialog(); - #else - try - { - mainWindow.ShowDialog(); - } - catch (Exception e) - { - var deploymentVersion = File.Exists("app.ini") ? File.ReadAllText("app.ini") : "unknown app data"; - Console.WriteLine(e.ToString()); - var logPath = Path.GetTempFileName() + ".WDE.log.txt"; - File.WriteAllText(logPath, deploymentVersion + "\n\n" + e.ToString()); - - var choice = messageBoxService.ShowDialog(new MessageBoxFactory().SetIcon(MessageBoxIcon.Error) - .SetTitle("Fatal error") - .SetMainInstruction("Sorry, fatal error has occured and the program had to stop") - .SetContent("You are welcome to report the bug at github. Reason: " + e.Message) - .SetFooter("Log file saved at: " + logPath) - .WithButton("Copy log path to clipboard", 2) - .WithButton("Open log file", 1) - .WithButton("Close", 0) - .Build()).Result; // in WPF in fact this is sync, so this is legal - if (choice == 2) - clipboardService.SetText(logPath); - else if (choice == 1) - Process.Start("explorer", logPath); - } - #endif - - Current.Shutdown(); - } - - private void MainWindowOnContentRendered(object? sender, EventArgs e) - { - splash!.Close(); - (sender! as MainWindow)!.ContentRendered -= MainWindowOnContentRendered; - } - - private class Conflict - { - public readonly Assembly ConflictingAssembly; - public readonly Assembly FirstAssembly; - - public Conflict(Assembly conflictingAssembly, Assembly firstAssembly) - { - ConflictingAssembly = conflictingAssembly; - FirstAssembly = firstAssembly; - } - } - } - - public class MainThread : IMainThread - { - public void Dispatch(Action action) - { - Application.Current.Dispatcher.Invoke(action); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/AssemblyInfo.cs b/WoWDatabaseEditorCore.WPF/AssemblyInfo.cs deleted file mode 100644 index 42e001a03..000000000 --- a/WoWDatabaseEditorCore.WPF/AssemblyInfo.cs +++ /dev/null @@ -1,13 +0,0 @@ -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) -)] - -[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] -[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/WoWDatabaseEditorCore.WPF/CoreVersion/Views/CoreVersionConfigView.xaml b/WoWDatabaseEditorCore.WPF/CoreVersion/Views/CoreVersionConfigView.xaml deleted file mode 100644 index f015e3f8b..000000000 --- a/WoWDatabaseEditorCore.WPF/CoreVersion/Views/CoreVersionConfigView.xaml +++ /dev/null @@ -1,23 +0,0 @@ - - - Core version - - - - - - - - - diff --git a/WoWDatabaseEditorCore.WPF/CoreVersion/Views/CoreVersionConfigView.xaml.cs b/WoWDatabaseEditorCore.WPF/CoreVersion/Views/CoreVersionConfigView.xaml.cs deleted file mode 100644 index d7c71d4c1..000000000 --- a/WoWDatabaseEditorCore.WPF/CoreVersion/Views/CoreVersionConfigView.xaml.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Windows.Controls; - -namespace WoWDatabaseEditorCore.WPF.CoreVersion.Views -{ - public partial class CoreVersionConfigView : UserControl - { - public CoreVersionConfigView() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Extensions/FocusBehavior.cs b/WoWDatabaseEditorCore.WPF/Extensions/FocusBehavior.cs deleted file mode 100644 index f778d042f..000000000 --- a/WoWDatabaseEditorCore.WPF/Extensions/FocusBehavior.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; - -namespace WoWDatabaseEditorCore.WPF.Extensions -{ - public static class FocusBehavior - { - public static readonly DependencyProperty FocusFirstProperty = DependencyProperty.RegisterAttached("FocusFirst", - typeof(bool), - typeof(FocusBehavior), - new PropertyMetadata(false, OnFocusFirstPropertyChanged)); - - public static bool GetFocusFirst(Control control) - { - return (bool) control.GetValue(FocusFirstProperty); - } - - public static void SetFocusFirst(Control control, bool value) - { - control.SetValue(FocusFirstProperty, value); - } - - private static void OnFocusFirstPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) - { - Control? control = obj as Control; - if (control == null || !(args.NewValue is bool)) - return; - - if ((bool) args.NewValue) - control.Loaded += ControlOnLoaded; - } - - private static void ControlOnLoaded(object sender, RoutedEventArgs e) - { - (sender as Control)!.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); - (sender as Control)!.Loaded -= ControlOnLoaded; - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Extensions/GlobalMenuHotKeys.cs b/WoWDatabaseEditorCore.WPF/Extensions/GlobalMenuHotKeys.cs deleted file mode 100644 index 4d12545aa..000000000 --- a/WoWDatabaseEditorCore.WPF/Extensions/GlobalMenuHotKeys.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using WDE.Common.Menu; - -namespace WoWDatabaseEditorCore.WPF.Extensions -{ - public static class GlobalMenuHotKeys - { - - public static readonly DependencyProperty MenuItemsGesturesProperty = DependencyProperty.RegisterAttached("MenuItemsGestures", - typeof(IList), - typeof(GlobalMenuHotKeys), - new PropertyMetadata(null, OnHotKeyPropertyChanged)); - - private static void OnHotKeyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var window = d as Window; - if (window == null) - return; - - var menus = GetMenuItemsGestures(window); - - if (menus == null) - return; - - foreach (var m in menus) - { - foreach (var subItem in m.SubItems) - { - if (subItem is not IMenuCommandItem cmd) - continue; - - if (!cmd.Shortcut.HasValue || !Enum.TryParse(cmd.Shortcut.Value.Key, out Key key)) - continue; - - var keyGesture = new KeyGesture(key, cmd.Shortcut.Value.Control ? ModifierKeys.Control : ModifierKeys.None); - window.InputBindings.Add(new InputBinding(cmd.ItemCommand, keyGesture)); - } - } - } - - public static IList? GetMenuItemsGestures(Control control) - { - return (IList?) control.GetValue(MenuItemsGesturesProperty); - } - - public static void SetMenuItemsGestures(Control control, IList? value) - { - control.SetValue(MenuItemsGesturesProperty, value); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Icon.ico b/WoWDatabaseEditorCore.WPF/Icon.ico deleted file mode 100644 index 1976b55be655fe253ff1170bd602e96b15d4b555..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19988 zcmb??XIN8BwDp`M^xk`urh;@SA`pszBIUKvOAw?;FVf4Q2q+*3N>QpJpdv-23KBX< zw-7o(dQp0ZaO1syzn@>`NpkX>latKMp1s#zdkp{(vHg2MfFBU_0bnH_KQ=PZp`qlY zBp%XS*VVf9@9e)PIVthY(!1E<-zN`mgFDc`YyX!3=+|D?Qoj>0_9uHknAzmh{xKmW zeDv6{VgK*cWTQ)#R7pjm^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a2550..000000000 --- a/WoWDatabaseEditorCore.WPF/MainModuleWPF.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Prism.Ioc; -using WoWDatabaseEditorCore.Services.ItemFromListSelectorService; -using WoWDatabaseEditorCore.WPF.Services.ItemFromListSelectorService; -using WDE.Common.Database; -using WDE.Common.Windows; -using WDE.Module; -using WoWDatabaseEditorCore.Services.CreatureEntrySelectorService; -using WoWDatabaseEditorCore.WPF.Services.CreatureEntrySelectorService; - -namespace WoWDatabaseEditorCore.WPF -{ - public class MainModuleWPF : ModuleBase - { - public override void OnInitialized(IContainerProvider containerProvider) - { - base.OnInitialized(containerProvider); - var viewLocator = containerProvider.Resolve(); - - viewLocator.Bind, GenericSelectorDialogView>(); - viewLocator.Bind, GenericSelectorDialogView>(); - viewLocator.Bind, GenericSelectorDialogView>(); - viewLocator.Bind, GenericSelectorDialogView>(); - - viewLocator.Bind(); - viewLocator.Bind(); - viewLocator.Bind(); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Managers/MessageBoxService.cs b/WoWDatabaseEditorCore.WPF/Managers/MessageBoxService.cs deleted file mode 100644 index ff5e611a3..000000000 --- a/WoWDatabaseEditorCore.WPF/Managers/MessageBoxService.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Ookii.Dialogs.Wpf; -using WDE.Common.Services.MessageBox; -using WDE.Module.Attributes; - -namespace WoWDatabaseEditorCore.WPF.Managers -{ - [SingleInstance] - [AutoRegister] - public class MessageBoxService : IMessageBoxService - { - public Task ShowDialog(IMessageBox messageBox) - { - using (TaskDialog dialog = new TaskDialog()) - { - dialog.WindowTitle = messageBox.Title; - dialog.MainInstruction = messageBox.MainInstruction; - dialog.Content = messageBox.Content; - dialog.ExpandedInformation = messageBox.ExpandedInformation; - dialog.Footer = messageBox.Footer; - dialog.FooterIcon = ToDialogIcon(messageBox.FooterIcon); - dialog.MainIcon = ToDialogIcon(messageBox.Icon); - - Dictionary buttonToValue = new(); - foreach (var buttonDefinition in messageBox.Buttons) - { - TaskDialogButton button = GenerateButton(buttonDefinition.Name); - buttonToValue[button] = buttonDefinition.ReturnValue; - dialog.Buttons.Add(button); - } - - TaskDialogButton returned = dialog.ShowDialog(); - - return Task.FromResult(buttonToValue[returned]); - } - } - - private TaskDialogButton GenerateButton(string name) - { - switch (name) - { - case "Ok": - return new TaskDialogButton(ButtonType.Ok); - case "Yes": - return new TaskDialogButton(ButtonType.Yes); - case "No": - return new TaskDialogButton(ButtonType.No); - case "Cancel": - return new TaskDialogButton(ButtonType.Cancel); - default: - return new TaskDialogButton(name); - } - } - - private TaskDialogIcon ToDialogIcon(MessageBoxIcon icon) - { - switch (icon) - { - case MessageBoxIcon.NoIcon: - return TaskDialogIcon.Custom; - case MessageBoxIcon.Warning: - return TaskDialogIcon.Warning; - case MessageBoxIcon.Error: - return TaskDialogIcon.Error; - case MessageBoxIcon.Information: - return TaskDialogIcon.Information; - case MessageBoxIcon.Shield: - return TaskDialogIcon.Shield; - default: - throw new ArgumentOutOfRangeException(nameof(icon), icon, null); - } - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Managers/ScopedContainer.cs b/WoWDatabaseEditorCore.WPF/Managers/ScopedContainer.cs deleted file mode 100644 index 6b0141ab5..000000000 --- a/WoWDatabaseEditorCore.WPF/Managers/ScopedContainer.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using Prism.Ioc; -using Prism.Unity.Ioc; -using Unity; -using WDE.Module; - -namespace WoWDatabaseEditorCore.WPF.Managers -{ - public class ScopedContainer : IScopedContainer - { - private IUnityContainer unity; - private IContainerExtension inner; - - public ScopedContainer(IContainerExtension containerExtension, IUnityContainer impl) - { - inner = containerExtension; - unity = impl; - } - - public object Resolve(Type type) => inner.Resolve(type); - - public object Resolve(Type type, params (Type Type, object Instance)[] parameters) => inner.Resolve(type, parameters); - - public object Resolve(Type type, string name) => inner.Resolve(type, name); - - public object Resolve(Type type, string name, params (Type Type, object Instance)[] parameters) => inner.Resolve(type, name, parameters); - - public IContainerRegistry RegisterInstance(Type type, object instance) => inner.RegisterInstance(type, instance); - - public IContainerRegistry RegisterInstance(Type type, object instance, string name) => inner.RegisterInstance(type, instance, name); - - public IContainerRegistry RegisterSingleton(Type @from, Type to) => inner.RegisterSingleton(@from, to); - - public IContainerRegistry RegisterSingleton(Type @from, Type to, string name) => inner.RegisterSingleton(@from, to, name); - - public IContainerRegistry Register(Type @from, Type to) => inner.Register(@from, to); - - public IContainerRegistry Register(Type @from, Type to, string name) => inner.Register(@from, to, name); - - public bool IsRegistered(Type type) => inner.IsRegistered(type); - - public bool IsRegistered(Type type, string name) => inner.IsRegistered(type, name); - - public void FinalizeExtension() => inner.FinalizeExtension(); - - public IScopedContainer CreateScope() - { - var childContainer = unity.CreateChildContainer(); - var extensions = new UnityContainerExtension(childContainer); - var scope = new ScopedContainer(extensions, childContainer); - extensions.RegisterInstance(scope); - extensions.RegisterInstance(scope); - extensions.RegisterInstance(scope); - extensions.RegisterInstance(scope); - return scope; - } - - public IUnityContainer Instance => unity; - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Managers/WindowManager.cs b/WoWDatabaseEditorCore.WPF/Managers/WindowManager.cs deleted file mode 100644 index bd246714a..000000000 --- a/WoWDatabaseEditorCore.WPF/Managers/WindowManager.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Threading.Tasks; -using Ookii.Dialogs.Wpf; -using WDE.Common.Managers; -using WDE.Module.Attributes; -using WoWDatabaseEditorCore.WPF.Views; - -namespace WoWDatabaseEditorCore.WPF.Managers -{ - [SingleInstance] - [AutoRegister] - public class WindowManager : IWindowManager - { - private readonly Lazy mainWindow; - - public WindowManager(Lazy mainWindow) - { - this.mainWindow = mainWindow; - } - - public Task ShowDialog(IDialog viewModel) - { - DialogWindow view = new DialogWindow(); - view.Height = viewModel.DesiredHeight; - view.Width = viewModel.DesiredWidth; - view.Owner = mainWindow.Value; - view.DataContext = viewModel; - return Task.FromResult(view.ShowDialog() ?? false); - } - - public Task ShowFolderPickerDialog(string defaultDirectory) - { - VistaFolderBrowserDialog dialog = new(); - dialog.SelectedPath = defaultDirectory; - bool? result = dialog.ShowDialog(); - - if (result.HasValue && result.Value) - return Task.FromResult(dialog.SelectedPath); - return Task.FromResult(null); - } - - public Task ShowOpenFileDialog(string filter, string? defaultDirectory = null) - { - VistaOpenFileDialog dialog = new(); - if (!string.IsNullOrEmpty(defaultDirectory)) - dialog.InitialDirectory = defaultDirectory; - dialog.Multiselect = false; - dialog.Filter = filter; - - bool? result = dialog.ShowDialog(); - if (result.HasValue && result.Value) - return Task.FromResult(dialog.FileName); - return Task.FromResult(null); - } - - public Task ShowSaveFileDialog(string filter, string? defaultDirectory = null) - { - throw new NotImplementedException(); - } - - public void OpenUrl(string url) - { - var psi = new System.Diagnostics.ProcessStartInfo - { - UseShellExecute = true, - FileName = url - }; - System.Diagnostics.Process.Start(psi); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/ModulesManagement/Configuration/Views/ModulesConfigView.xaml b/WoWDatabaseEditorCore.WPF/ModulesManagement/Configuration/Views/ModulesConfigView.xaml deleted file mode 100644 index 5f3a72b43..000000000 --- a/WoWDatabaseEditorCore.WPF/ModulesManagement/Configuration/Views/ModulesConfigView.xaml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/ModulesManagement/Configuration/Views/ModulesConfigView.xaml.cs b/WoWDatabaseEditorCore.WPF/ModulesManagement/Configuration/Views/ModulesConfigView.xaml.cs deleted file mode 100644 index 9811971c7..000000000 --- a/WoWDatabaseEditorCore.WPF/ModulesManagement/Configuration/Views/ModulesConfigView.xaml.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Windows.Controls; - -namespace WoWDatabaseEditorCore.WPF.ModulesManagement.Configuration.Views -{ - /// - /// Interaction logic for ModulesConfigView.xaml - /// - public partial class ModulesConfigView : UserControl - { - public ModulesConfigView() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Services/ClipboardService.cs b/WoWDatabaseEditorCore.WPF/Services/ClipboardService.cs deleted file mode 100644 index 18902a047..000000000 --- a/WoWDatabaseEditorCore.WPF/Services/ClipboardService.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Windows; -using System.Threading.Tasks; -using WDE.Common.Services; -using WDE.Module.Attributes; - -namespace WoWDatabaseEditorCore.WPF.Services -{ - [AutoRegister] - [SingleInstance] - public class ClipboardService : IClipboardService - { - public Task GetText() - { - return Task.FromResult(Clipboard.GetText()); - } - - public void SetText(string text) - { - Clipboard.SetText(text); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Services/ConfigurationService/Views/ConfigurationPanelView.xaml b/WoWDatabaseEditorCore.WPF/Services/ConfigurationService/Views/ConfigurationPanelView.xaml deleted file mode 100644 index bfd64e7e5..000000000 --- a/WoWDatabaseEditorCore.WPF/Services/ConfigurationService/Views/ConfigurationPanelView.xaml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Views/AboutView.xaml.cs b/WoWDatabaseEditorCore.WPF/Views/AboutView.xaml.cs deleted file mode 100644 index 35f60728e..000000000 --- a/WoWDatabaseEditorCore.WPF/Views/AboutView.xaml.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Windows.Controls; - -namespace WoWDatabaseEditorCore.WPF.Views -{ - /// - /// Interaction logic for AboutView - /// - public partial class AboutView : UserControl - { - public AboutView() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Views/DialogWindow.xaml b/WoWDatabaseEditorCore.WPF/Views/DialogWindow.xaml deleted file mode 100644 index 277bb5775..000000000 --- a/WoWDatabaseEditorCore.WPF/Views/DialogWindow.xaml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - diff --git a/WoWDatabaseEditorCore.WPF/Views/DialogWindow.xaml.cs b/WoWDatabaseEditorCore.WPF/Views/DialogWindow.xaml.cs deleted file mode 100644 index a405515dd..000000000 --- a/WoWDatabaseEditorCore.WPF/Views/DialogWindow.xaml.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System.ComponentModel; -using System.Windows; -using System.Windows.Input; -using MahApps.Metro.Controls; -using WDE.Common.Managers; - -namespace WoWDatabaseEditorCore.WPF.Views -{ - public partial class DialogWindow : MetroWindow - { - public DialogWindow() - { - InitializeComponent(); - Loaded += OnLoaded; - Unloaded += OnUnloaded; - } - - private void OnUnloaded(object sender, RoutedEventArgs e) - { - if (DataContext is IDialog dialogWindow) - { - dialogWindow.CloseCancel -= DialogWindowOnCloseCancel; - dialogWindow.CloseOk -= DialogWindowOnCloseOk; - } - } - - private void OnLoaded(object sender, RoutedEventArgs e) - { - if (DataContext is IDialog dialogWindow) - { - dialogWindow.CloseCancel += DialogWindowOnCloseCancel; - dialogWindow.CloseOk += DialogWindowOnCloseOk; - } - } - - private void DialogWindowOnCloseOk() - { - DialogResult = true; - Close(); - } - - private void DialogWindowOnCloseCancel() - { - DialogResult = false; - Close(); - } - - protected override void OnClosing(CancelEventArgs e) - { - base.OnClosing(e); - Keyboard.ClearFocus(); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Views/Helpers/ActiveDocumentConverter.cs b/WoWDatabaseEditorCore.WPF/Views/Helpers/ActiveDocumentConverter.cs deleted file mode 100644 index 262cd37fd..000000000 --- a/WoWDatabaseEditorCore.WPF/Views/Helpers/ActiveDocumentConverter.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using WDE.Common.Managers; - -namespace WoWDatabaseEditorCore.WPF.Views.Helpers -{ - public class ActiveDocumentConverter : IValueConverter - { - public object? Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is IDocument) - return value; - - return null; - } - - public object? ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is IDocument) - return value; - - return null; - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Views/Helpers/BoolToResizeModeConverter.cs b/WoWDatabaseEditorCore.WPF/Views/Helpers/BoolToResizeModeConverter.cs deleted file mode 100644 index ca5011c19..000000000 --- a/WoWDatabaseEditorCore.WPF/Views/Helpers/BoolToResizeModeConverter.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; - -namespace WoWDatabaseEditorCore.WPF.Views.Helpers -{ - public class BoolToResizeModeConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is bool boolValue) - { - return boolValue ? ResizeMode.CanResize : ResizeMode.NoResize; - } - - return ResizeMode.CanResize; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Views/Helpers/DocumentOrToolToTitleConverter.cs b/WoWDatabaseEditorCore.WPF/Views/Helpers/DocumentOrToolToTitleConverter.cs deleted file mode 100644 index 757ddcda4..000000000 --- a/WoWDatabaseEditorCore.WPF/Views/Helpers/DocumentOrToolToTitleConverter.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; - -namespace WoWDatabaseEditorCore.WPF.Views.Helpers -{ - public class DocumentOrToolToTitleConverter : IMultiValueConverter - { - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - if (values.Length != 3) - return ""; - - if (!(values[0] is string title)) - return ""; - - bool? isModified = null; - bool? isLoading = null; - - if (values[1] is bool modified) - isModified = modified; - - if (values[2] is bool loading) - isLoading = loading; - - if (isLoading ?? false) - return $"{title} (loading)"; - - if (isModified ?? false) - return $"{title}*"; - - return title; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Views/Helpers/DynamicMenuItemStyleSelector.cs b/WoWDatabaseEditorCore.WPF/Views/Helpers/DynamicMenuItemStyleSelector.cs deleted file mode 100644 index bbb28e6b3..000000000 --- a/WoWDatabaseEditorCore.WPF/Views/Helpers/DynamicMenuItemStyleSelector.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using WDE.Common.Menu; - -namespace WoWDatabaseEditorCore.WPF.Views.Helpers -{ - public class DynamicMenuItemStyleSelector: StyleSelector - { - public Style? MainMenuItemStyle { get; set; } - public Style? CategoryItemStyle { get; set; } - public Style? DocumentItemStyle { get; set; } - public Style? CommandItemStyle { get; set; } - public Style? SeparatorItemStyle { get; set; } - - public override Style SelectStyle(object item, DependencyObject container) - { - if (item is IMainMenuItem) - return MainMenuItemStyle!; - if (item is IMenuCategoryItem) - return CategoryItemStyle!; - if (item is IMenuDocumentItem) - return DocumentItemStyle!; - if (item is IMenuCommandItem) - return CommandItemStyle!; - if (item is IMenuSeparator) - return SeparatorItemStyle!; - - return base.SelectStyle(item, container); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Views/Helpers/PanesStyleSelector.cs b/WoWDatabaseEditorCore.WPF/Views/Helpers/PanesStyleSelector.cs deleted file mode 100644 index f08759e57..000000000 --- a/WoWDatabaseEditorCore.WPF/Views/Helpers/PanesStyleSelector.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using WDE.Common.Managers; -using WDE.Common.Windows; - -namespace WoWDatabaseEditorCore.WPF.Views.Helpers -{ - class PanesStyleSelector : StyleSelector - { - public Style? ToolStyle { get; set; } - - public Style? DocumentStyle { get; set; } - - public override Style SelectStyle(object item, DependencyObject container) - { - if (item is ITool) - return ToolStyle!; - - if (item is IDocument) - return DocumentStyle!; - - return base.SelectStyle(item, container); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Views/MainWindow.xaml b/WoWDatabaseEditorCore.WPF/Views/MainWindow.xaml deleted file mode 100644 index 78ef296bd..000000000 --- a/WoWDatabaseEditorCore.WPF/Views/MainWindow.xaml +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Views/StatusBarView.xaml.cs b/WoWDatabaseEditorCore.WPF/Views/StatusBarView.xaml.cs deleted file mode 100644 index 412523394..000000000 --- a/WoWDatabaseEditorCore.WPF/Views/StatusBarView.xaml.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Windows.Controls; - -namespace WoWDatabaseEditorCore.WPF.Views -{ - public partial class StatusBarView : UserControl - { - public StatusBarView() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/Views/TasksPanel.xaml b/WoWDatabaseEditorCore.WPF/Views/TasksPanel.xaml deleted file mode 100644 index a8bed6996..000000000 --- a/WoWDatabaseEditorCore.WPF/Views/TasksPanel.xaml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/WoWDatabaseEditorCore.WPF/Views/TasksPanel.xaml.cs b/WoWDatabaseEditorCore.WPF/Views/TasksPanel.xaml.cs deleted file mode 100644 index 7e79104f3..000000000 --- a/WoWDatabaseEditorCore.WPF/Views/TasksPanel.xaml.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Windows.Controls; - -namespace WoWDatabaseEditorCore.WPF.Views -{ - public partial class TasksPanel : UserControl - { - public TasksPanel() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/WoWDatabaseEditorCore.WPF/WoWDatabaseEditorCore.WPF.csproj b/WoWDatabaseEditorCore.WPF/WoWDatabaseEditorCore.WPF.csproj deleted file mode 100644 index bbfea16d8..000000000 --- a/WoWDatabaseEditorCore.WPF/WoWDatabaseEditorCore.WPF.csproj +++ /dev/null @@ -1,86 +0,0 @@ - - - - WinExe - net5.0-windows7.0 - true - enable - nullable - WoWDatabaseEditorCore.WPF - WoWDatabaseEditorCore.WPF - false - Icon.ico - Debug;Release - AnyCPU - - - - ..\bin\$(Configuration)\ - - - - - - - - - - - app.manifest - - - - - - - - - - - 2.0.5 - - - 2.3.2 - - - 3.14.0 - - - 2.4.3 - - - 1.3.1 - - - - 3.1.0 - - - 7.2.0.1422 - - - 7.2.0.1422 - - - 2.5.3 - - - - - - 5.11.6 - - - 5.11.1 - - - 1.1.31 - - - 4.50.1 - - - 4.50.1 - - - diff --git a/WoWDatabaseEditorCore.WPF/app.manifest b/WoWDatabaseEditorCore.WPF/app.manifest deleted file mode 100644 index fb21a8b05..000000000 --- a/WoWDatabaseEditorCore.WPF/app.manifest +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 0c677ad780d8cdfcc3c82f6e2a6bb60d3b84e2c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Korczy=C5=84ski?= Date: Mon, 22 Nov 2021 21:07:54 +0000 Subject: [PATCH 3/8] Fix building project in VS --- LoaderAvalonia/LoaderAvalonia.csproj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LoaderAvalonia/LoaderAvalonia.csproj b/LoaderAvalonia/LoaderAvalonia.csproj index 320a2e540..cc3222169 100644 --- a/LoaderAvalonia/LoaderAvalonia.csproj +++ b/LoaderAvalonia/LoaderAvalonia.csproj @@ -6,7 +6,9 @@ Debug;Release AnyCPU - + + ..\bin\$(Configuration)\ + From 8dca0898c874f444451edc7434f85921afb45ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Korczy=C5=84ski?= Date: Mon, 22 Nov 2021 21:13:02 +0000 Subject: [PATCH 4/8] Removed legacy projects --- WoWDatabaseEditor.sln | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/WoWDatabaseEditor.sln b/WoWDatabaseEditor.sln index 27890b765..206c8b0b1 100644 --- a/WoWDatabaseEditor.sln +++ b/WoWDatabaseEditor.sln @@ -21,14 +21,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WDE.SQLEditor", "WDE.SQLEdi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WDE.TrinityMySqlDatabase", "WoWDatabaseEditor.Common\WDE.TrinityMySqlDatabase\WDE.TrinityMySqlDatabase.csproj", "{C6BE1E01-CF2F-4FE5-A67C-AC783EB9D3F7}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WDE.Blueprints", "WDE.Blueprints\WDE.Blueprints.csproj", "{4A11961B-85AD-464E-B881-C90F8CAC5647}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeminiGraphEditor", "GeminiGraphEditor\GeminiGraphEditor.csproj", "{99F6C079-A4C1-4167-992C-B02EBAA70219}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WDE.QuestChainEditor", "WDE.QuestChainEditor\WDE.QuestChainEditor.csproj", "{F9373E23-7E19-44D2-8EC9-E638ED1243AA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuestChainTest", "QuestChainTest\QuestChainTest.csproj", "{8F5E8C3A-422A-47C6-AFC3-4A62997E5D27}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WDE.Conditions", "WDE.Conditions\WDE.Conditions.csproj", "{A55A533C-AE21-44BB-867B-1AD5BFFCCCBA}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WDE.MVVM", "WDE.MVVM\WDE.MVVM.csproj", "{0913A384-D1CD-4531-8077-E53C2B15C193}" @@ -115,6 +107,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WoWDatabaseEditorCore.Avalo {0A932EF2-830E-4409-AE4F-78A9C110E21F} = {0A932EF2-830E-4409-AE4F-78A9C110E21F} {0643A92F-D13C-493C-AE87-37EE67B17EF6} = {0643A92F-D13C-493C-AE87-37EE67B17EF6} # WPP end + {E78EDD8E-8908-4987-B450-4EB857839A98} = {E78EDD8E-8908-4987-B450-4EB857839A98} + {F63A6DDA-874A-41FF-A707-3B95862036A5} = {F63A6DDA-874A-41FF-A707-3B95862036A5} + {28C4ACA6-EFD8-4A21-BD32-B2404EB59D68} = {28C4ACA6-EFD8-4A21-BD32-B2404EB59D68} + {7A409931-190E-44E5-B5AC-159FA1743F07} = {7A409931-190E-44E5-B5AC-159FA1743F07} + {69F8EF91-D0BF-4131-AD7F-5ED4DCEBB4B9} = {69F8EF91-D0BF-4131-AD7F-5ED4DCEBB4B9} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoaderAvalonia", "LoaderAvalonia\LoaderAvalonia.csproj", "{8B25EEAE-2DDD-4D62-A426-619FE21D2711}" @@ -149,8 +146,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WDE.SmartScriptEditor.Test" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docking", "Docking", "{AE8F68E4-310D-4A59-9B78-5B44CAB1DBF6}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Legacy", "Legacy", "{84D7A851-140E-4077-9060-826F9D990C5B}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Cores", "Cores", "{0DA53E9B-250E-4D88-A456-35436FEA60F5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{6C7361F8-036F-4C9A-8002-A94B71005DDB}" @@ -291,14 +286,6 @@ Global {C6BE1E01-CF2F-4FE5-A67C-AC783EB9D3F7}.Debug|Any CPU.Build.0 = Debug|Any CPU {C6BE1E01-CF2F-4FE5-A67C-AC783EB9D3F7}.Release|Any CPU.ActiveCfg = Release|Any CPU {C6BE1E01-CF2F-4FE5-A67C-AC783EB9D3F7}.Release|Any CPU.Build.0 = Release|Any CPU - {4A11961B-85AD-464E-B881-C90F8CAC5647}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A11961B-85AD-464E-B881-C90F8CAC5647}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99F6C079-A4C1-4167-992C-B02EBAA70219}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99F6C079-A4C1-4167-992C-B02EBAA70219}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F9373E23-7E19-44D2-8EC9-E638ED1243AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F9373E23-7E19-44D2-8EC9-E638ED1243AA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8F5E8C3A-422A-47C6-AFC3-4A62997E5D27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8F5E8C3A-422A-47C6-AFC3-4A62997E5D27}.Release|Any CPU.ActiveCfg = Release|Any CPU {A55A533C-AE21-44BB-867B-1AD5BFFCCCBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A55A533C-AE21-44BB-867B-1AD5BFFCCCBA}.Debug|Any CPU.Build.0 = Debug|Any CPU {A55A533C-AE21-44BB-867B-1AD5BFFCCCBA}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -601,9 +588,6 @@ Global {80EDB0DB-C085-4AAD-BF82-EACC1EB30F44} = {AE8F68E4-310D-4A59-9B78-5B44CAB1DBF6} {F435BC90-7D12-4BDC-B337-F83A26EB77FD} = {AE8F68E4-310D-4A59-9B78-5B44CAB1DBF6} {5395540E-4AA8-4CC2-93E3-FF3AA02C1EB8} = {AE8F68E4-310D-4A59-9B78-5B44CAB1DBF6} - {99F6C079-A4C1-4167-992C-B02EBAA70219} = {84D7A851-140E-4077-9060-826F9D990C5B} - {8F5E8C3A-422A-47C6-AFC3-4A62997E5D27} = {84D7A851-140E-4077-9060-826F9D990C5B} - {4A11961B-85AD-464E-B881-C90F8CAC5647} = {84D7A851-140E-4077-9060-826F9D990C5B} {4A5E9E2A-DBC9-4290-ACEB-B108FA458F0E} = {0DA53E9B-250E-4D88-A456-35436FEA60F5} {AD615AB8-1CE6-474F-BC6C-8BF0D0C7AFBF} = {0DA53E9B-250E-4D88-A456-35436FEA60F5} {9D1A4E14-2FE1-403A-A042-ED7E49DB0438} = {6C7361F8-036F-4C9A-8002-A94B71005DDB} @@ -611,7 +595,6 @@ Global {5647D3F5-EDF9-4D44-AAB9-678B31D57E6C} = {6C7361F8-036F-4C9A-8002-A94B71005DDB} {0913A384-D1CD-4531-8077-E53C2B15C193} = {6C7361F8-036F-4C9A-8002-A94B71005DDB} {978E01E8-6BCF-4866-9567-301E7B6E6988} = {6C7361F8-036F-4C9A-8002-A94B71005DDB} - {F9373E23-7E19-44D2-8EC9-E638ED1243AA} = {84D7A851-140E-4077-9060-826F9D990C5B} {1879936C-7EB8-4A2F-9791-4EF49ED2B6B5} = {106EEB05-E9AB-453A-ADD0-96505F405D76} {DCD5F40C-139E-4404-8EF0-DC85DD595E44} = {106EEB05-E9AB-453A-ADD0-96505F405D76} {B060C7F1-97B0-4A26-B7A8-E47C9AF08D07} = {106EEB05-E9AB-453A-ADD0-96505F405D76} From 6d353e963ddd4c2c4d21dbe0ce560a932af775cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Korczy=C5=84ski?= Date: Mon, 22 Nov 2021 21:14:31 +0000 Subject: [PATCH 5/8] GetTargetPath error fix --- LoaderAvalonia/LoaderAvalonia.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LoaderAvalonia/LoaderAvalonia.csproj b/LoaderAvalonia/LoaderAvalonia.csproj index cc3222169..9dacbdce4 100644 --- a/LoaderAvalonia/LoaderAvalonia.csproj +++ b/LoaderAvalonia/LoaderAvalonia.csproj @@ -59,7 +59,7 @@ - + From 6f16d538c8aa1bb6af0b2d190d6b425dfcccca80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Korczy=C5=84ski?= Date: Mon, 22 Nov 2021 22:59:44 +0000 Subject: [PATCH 6/8] Fix LoaderAvalonia startup project --- LoaderAvalonia/LoaderAvalonia.csproj | 2 +- LoaderAvalonia/Program.cs | 1 + WoWDatabaseEditorCore.Avalonia/Program.cs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/LoaderAvalonia/LoaderAvalonia.csproj b/LoaderAvalonia/LoaderAvalonia.csproj index 9dacbdce4..756542c0e 100644 --- a/LoaderAvalonia/LoaderAvalonia.csproj +++ b/LoaderAvalonia/LoaderAvalonia.csproj @@ -1,7 +1,7 @@ - Exe + WinExe net6.0 Debug;Release AnyCPU diff --git a/LoaderAvalonia/Program.cs b/LoaderAvalonia/Program.cs index d44541121..92340fe13 100644 --- a/LoaderAvalonia/Program.cs +++ b/LoaderAvalonia/Program.cs @@ -4,6 +4,7 @@ public class Program { public static void Main(string[] args) { + WoWDatabaseEditorCore.Avalonia.Program.Main(args); } } } \ No newline at end of file diff --git a/WoWDatabaseEditorCore.Avalonia/Program.cs b/WoWDatabaseEditorCore.Avalonia/Program.cs index 0e26c53a6..c54aef841 100644 --- a/WoWDatabaseEditorCore.Avalonia/Program.cs +++ b/WoWDatabaseEditorCore.Avalonia/Program.cs @@ -15,7 +15,7 @@ namespace WoWDatabaseEditorCore.Avalonia { - class Program + public 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 From c29a96a281eae2ca0022fdf8766de62a5e17db77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Korczy=C5=84ski?= Date: Mon, 22 Nov 2021 22:59:59 +0000 Subject: [PATCH 7/8] Moved LoaderAvalonia to the top of sln, so that it is default startup project --- WoWDatabaseEditor.sln | 60 ++----------------------------------------- 1 file changed, 2 insertions(+), 58 deletions(-) diff --git a/WoWDatabaseEditor.sln b/WoWDatabaseEditor.sln index 206c8b0b1..994a31546 100644 --- a/WoWDatabaseEditor.sln +++ b/WoWDatabaseEditor.sln @@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29728.190 MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoaderAvalonia", "LoaderAvalonia\LoaderAvalonia.csproj", "{8B25EEAE-2DDD-4D62-A426-619FE21D2711}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WoWDatabaseEditorCore", "WoWDatabaseEditor\WoWDatabaseEditorCore.csproj", "{99C9E82C-C594-446D-AA59-8FFBC43AD226}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WDE.SmartScriptEditor", "WDE.SmartScriptEditor\WDE.SmartScriptEditor.csproj", "{B060C7F1-97B0-4A26-B7A8-E47C9AF08D07}" @@ -57,64 +59,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Solution Items", "Solution EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WoWDatabaseEditorCore.Avalonia", "WoWDatabaseEditorCore.Avalonia\WoWDatabaseEditorCore.Avalonia.csproj", "{D38826BA-F862-4895-80DB-32CB5821ED67}" - ProjectSection(ProjectDependencies) = postProject - {99C9E82C-C594-446D-AA59-8FFBC43AD226} = {99C9E82C-C594-446D-AA59-8FFBC43AD226} - {B060C7F1-97B0-4A26-B7A8-E47C9AF08D07} = {B060C7F1-97B0-4A26-B7A8-E47C9AF08D07} - {ACD1C8BC-B91A-40E8-865D-D6826758E7CC} = {ACD1C8BC-B91A-40E8-865D-D6826758E7CC} - {3CD1E251-D9BF-4061-A8D5-4AC65106C896} = {3CD1E251-D9BF-4061-A8D5-4AC65106C896} - {A6109F89-0148-4C39-8631-206FFEFBA055} = {A6109F89-0148-4C39-8631-206FFEFBA055} - {BC7E0845-C750-4DAF-8869-9170211465E6} = {BC7E0845-C750-4DAF-8869-9170211465E6} - {7E0DE187-A45C-406B-AAAE-608F40237CE6} = {7E0DE187-A45C-406B-AAAE-608F40237CE6} - {C6BE1E01-CF2F-4FE5-A67C-AC783EB9D3F7} = {C6BE1E01-CF2F-4FE5-A67C-AC783EB9D3F7} - {A55A533C-AE21-44BB-867B-1AD5BFFCCCBA} = {A55A533C-AE21-44BB-867B-1AD5BFFCCCBA} - {AD615AB8-1CE6-474F-BC6C-8BF0D0C7AFBF} = {AD615AB8-1CE6-474F-BC6C-8BF0D0C7AFBF} - {4A5E9E2A-DBC9-4290-ACEB-B108FA458F0E} = {4A5E9E2A-DBC9-4290-ACEB-B108FA458F0E} - {0913A384-D1CD-4531-8077-E53C2B15C193} = {0913A384-D1CD-4531-8077-E53C2B15C193} - {5647D3F5-EDF9-4D44-AAB9-678B31D57E6C} = {5647D3F5-EDF9-4D44-AAB9-678B31D57E6C} - {480A1F45-1C08-45AA-9268-CEC3468D7570} = {480A1F45-1C08-45AA-9268-CEC3468D7570} - {7ACFACDD-9DE8-4DF3-B283-171639FD9E1E} = {7ACFACDD-9DE8-4DF3-B283-171639FD9E1E} - {C238232F-57F1-465D-A251-578224F8EA25} = {C238232F-57F1-465D-A251-578224F8EA25} - {A094F0F9-C067-4B66-8FCA-ECA3747C6A4C} = {A094F0F9-C067-4B66-8FCA-ECA3747C6A4C} - {FF98ED22-0FFC-4C53-8946-437F5B84441F} = {FF98ED22-0FFC-4C53-8946-437F5B84441F} - {506C7413-6FD7-472C-99AA-A0580B4D2E3B} = {506C7413-6FD7-472C-99AA-A0580B4D2E3B} - {DCD5F40C-139E-4404-8EF0-DC85DD595E44} = {DCD5F40C-139E-4404-8EF0-DC85DD595E44} - {1879936C-7EB8-4A2F-9791-4EF49ED2B6B5} = {1879936C-7EB8-4A2F-9791-4EF49ED2B6B5} - {93427DB8-F7A4-43B2-9BCB-AF13544CE1DC} = {93427DB8-F7A4-43B2-9BCB-AF13544CE1DC} - {7DDB9C5A-AA34-42AB-99E3-1280D1E0311F} = {7DDB9C5A-AA34-42AB-99E3-1280D1E0311F} - {2B3DFEB9-808F-4EC4-B848-3C2533B40B39} = {2B3DFEB9-808F-4EC4-B848-3C2533B40B39} - {B0F1E33D-8CD2-4839-8F87-E8835F5F8D0B} = {B0F1E33D-8CD2-4839-8F87-E8835F5F8D0B} - {B421A454-BCA5-4B10-B0BD-BBEB5AAD3294} = {B421A454-BCA5-4B10-B0BD-BBEB5AAD3294} - {34D133BE-D86C-49F7-8536-45E202E1EE7B} = {34D133BE-D86C-49F7-8536-45E202E1EE7B} - {96B60B17-8A72-40B5-9D2E-09BF256D7B07} = {96B60B17-8A72-40B5-9D2E-09BF256D7B07} - {6E0C8CDD-031A-4318-B612-9F1A575163AC} = {6E0C8CDD-031A-4318-B612-9F1A575163AC} - {5AE7D201-A541-49F3-A980-3935D3FCA48D} = {5AE7D201-A541-49F3-A980-3935D3FCA48D} - - # WPP - {9C185B8A-052F-4240-9EC3-729496124402} = {9C185B8A-052F-4240-9EC3-729496124402} - {A0CD6DDC-E2B3-400E-ACB7-E2339B74FCF9} = {A0CD6DDC-E2B3-400E-ACB7-E2339B74FCF9} - {733875B9-E2B9-4EF5-8B5C-B8E98AF25975} = {733875B9-E2B9-4EF5-8B5C-B8E98AF25975} - {A072A641-D60D-4765-B8BD-F00F727B4F89} = {A072A641-D60D-4765-B8BD-F00F727B4F89} - {0330F689-A57E-4609-8F95-E766C0B8FFEC} = {0330F689-A57E-4609-8F95-E766C0B8FFEC} - {AA0F45A4-467B-41AF-AA00-843D013E0156} = {AA0F45A4-467B-41AF-AA00-843D013E0156} - {8C9313FD-A37C-45A2-9003-E84747E36188} = {8C9313FD-A37C-45A2-9003-E84747E36188} - {F12A19FD-BCA3-426D-A4DA-7DE75EB9E39E} = {F12A19FD-BCA3-426D-A4DA-7DE75EB9E39E} - {34CB52B4-2CB9-4E44-AF77-9F12C546775F} = {34CB52B4-2CB9-4E44-AF77-9F12C546775F} - {39A20758-BC18-4925-B22C-C16CF8943131} = {39A20758-BC18-4925-B22C-C16CF8943131} - {FB301202-68DD-4048-8734-C82E6FF42302} = {FB301202-68DD-4048-8734-C82E6FF42302} - {24D556A8-025D-4031-AB19-B87815750190} = {24D556A8-025D-4031-AB19-B87815750190} - {315B1ACB-A34C-4541-A547-E6701688874A} = {315B1ACB-A34C-4541-A547-E6701688874A} - {2FD96AE7-74EA-4608-8071-CAFE6948FB6D} = {2FD96AE7-74EA-4608-8071-CAFE6948FB6D} - {0A932EF2-830E-4409-AE4F-78A9C110E21F} = {0A932EF2-830E-4409-AE4F-78A9C110E21F} - {0643A92F-D13C-493C-AE87-37EE67B17EF6} = {0643A92F-D13C-493C-AE87-37EE67B17EF6} - # WPP end - {E78EDD8E-8908-4987-B450-4EB857839A98} = {E78EDD8E-8908-4987-B450-4EB857839A98} - {F63A6DDA-874A-41FF-A707-3B95862036A5} = {F63A6DDA-874A-41FF-A707-3B95862036A5} - {28C4ACA6-EFD8-4A21-BD32-B2404EB59D68} = {28C4ACA6-EFD8-4A21-BD32-B2404EB59D68} - {7A409931-190E-44E5-B5AC-159FA1743F07} = {7A409931-190E-44E5-B5AC-159FA1743F07} - {69F8EF91-D0BF-4131-AD7F-5ED4DCEBB4B9} = {69F8EF91-D0BF-4131-AD7F-5ED4DCEBB4B9} - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoaderAvalonia", "LoaderAvalonia\LoaderAvalonia.csproj", "{8B25EEAE-2DDD-4D62-A426-619FE21D2711}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WDE.DatabaseEditors", "WDE.DatabaseEditors\WDE.DatabaseEditors.csproj", "{1879936C-7EB8-4A2F-9791-4EF49ED2B6B5}" EndProject From 73ea12b5939c2e54eafe2312250cbd2b5836ff3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Korczy=C5=84ski?= Date: Mon, 22 Nov 2021 23:02:36 +0000 Subject: [PATCH 8/8] Update readme --- README.md | 2 +- WoWDatabaseEditor.sln | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dbf8077c6..515528089 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ WoW Database Editor is using [git submodules](https://git-scm.com/book/en/v2/Git git submodule update --init --recursive ``` -Now you can open the solution in Visual Studio or other C#/.NET IDE and build. Start "WoWDatabaseCore.Avalonia" project +Now you can open the solution in Visual Studio or other C#/.NET IDE and build. Start **LoaderAvalonia** project (this part is important!) **To build a version to distribute:** diff --git a/WoWDatabaseEditor.sln b/WoWDatabaseEditor.sln index 994a31546..0c58ba176 100644 --- a/WoWDatabaseEditor.sln +++ b/WoWDatabaseEditor.sln @@ -56,6 +56,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Solution Items", "Solution appveyor.yml = appveyor.yml Directory.Build.props = Directory.Build.props Avalonia.props = Avalonia.props + README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WoWDatabaseEditorCore.Avalonia", "WoWDatabaseEditorCore.Avalonia\WoWDatabaseEditorCore.Avalonia.csproj", "{D38826BA-F862-4895-80DB-32CB5821ED67}"