Skip to content

Commit

Permalink
config_tool: migrate to common config library (#1491)
Browse files Browse the repository at this point in the history
This migrates to the common config library in libtrx, meaning a minimal
solution is all that is needed for the TR1X specifics.
  • Loading branch information
lahm86 authored Sep 5, 2024
1 parent 603f95c commit 48f40c4
Show file tree
Hide file tree
Showing 54 changed files with 51 additions and 2,515 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Release/
.vs/
*.vcxproj
*.filters
.dotnet/

# libtrx artefacts
subprojects/packagecache/
Expand Down
2 changes: 1 addition & 1 deletion subprojects/libtrx
Submodule libtrx updated 55 files
+7 −0 include/libtrx/enum_str.h
+1 −0 meson.build
+16 −0 src/enum_str.c
+15 −0 tools/config/.gitignore
+25 −0 tools/config/TRX_ConfigToolLib.sln
+69 −0 tools/config/TRX_ConfigToolLib/Controls/AboutWindow.xaml
+20 −0 tools/config/TRX_ConfigToolLib/Controls/AboutWindow.xaml.cs
+44 −0 tools/config/TRX_ConfigToolLib/Controls/CategoryControl.xaml
+17 −0 tools/config/TRX_ConfigToolLib/Controls/CategoryControl.xaml.cs
+91 −0 tools/config/TRX_ConfigToolLib/Controls/NumericUpDown.xaml
+240 −0 tools/config/TRX_ConfigToolLib/Controls/NumericUpDown.xaml.cs
+56 −0 tools/config/TRX_ConfigToolLib/Controls/PropertyControl.xaml
+11 −0 tools/config/TRX_ConfigToolLib/Controls/PropertyControl.xaml.cs
+221 −0 tools/config/TRX_ConfigToolLib/Controls/TRXConfigWindow.xaml
+47 −0 tools/config/TRX_ConfigToolLib/Controls/TRXConfigWindow.xaml.cs
+11 −0 tools/config/TRX_ConfigToolLib/Models/AboutWindowViewModel.cs
+9 −0 tools/config/TRX_ConfigToolLib/Models/BaseLanguageViewModel.cs
+32 −0 tools/config/TRX_ConfigToolLib/Models/CategoryViewModel.cs
+49 −0 tools/config/TRX_ConfigToolLib/Models/Lang/Language.cs
+7 −0 tools/config/TRX_ConfigToolLib/Models/Lang/PropertyText.cs
+334 −0 tools/config/TRX_ConfigToolLib/Models/MainWindowViewModel.cs
+26 −0 tools/config/TRX_ConfigToolLib/Models/Specification/BaseProperty.cs
+12 −0 tools/config/TRX_ConfigToolLib/Models/Specification/Category.cs
+150 −0 tools/config/TRX_ConfigToolLib/Models/Specification/Configuration.cs
+8 −0 tools/config/TRX_ConfigToolLib/Models/Specification/DataType.cs
+11 −0 tools/config/TRX_ConfigToolLib/Models/Specification/EnumOption.cs
+42 −0 tools/config/TRX_ConfigToolLib/Models/Specification/Specification.cs
+44 −0 tools/config/TRX_ConfigToolLib/Models/Specification/Types/BoolProperty.cs
+54 −0 tools/config/TRX_ConfigToolLib/Models/Specification/Types/EnumProperty.cs
+54 −0 tools/config/TRX_ConfigToolLib/Models/Specification/Types/NumericProperty.cs
+23 −0 tools/config/TRX_ConfigToolLib/Models/TRXConstants.cs
+37 −0 tools/config/TRX_ConfigToolLib/Resources/Lang/en.json
+37 −0 tools/config/TRX_ConfigToolLib/Resources/Lang/es.json
+37 −0 tools/config/TRX_ConfigToolLib/Resources/Lang/fr.json
+37 −0 tools/config/TRX_ConfigToolLib/Resources/Lang/it.json
+ tools/config/TRX_ConfigToolLib/Resources/arrow-down.png
+ tools/config/TRX_ConfigToolLib/Resources/arrow-up.png
+4 −0 tools/config/TRX_ConfigToolLib/Resources/const.json
+189 −0 tools/config/TRX_ConfigToolLib/Resources/styles.xaml
+35 −0 tools/config/TRX_ConfigToolLib/TRX_ConfigToolLib.csproj
+35 −0 tools/config/TRX_ConfigToolLib/Utils/AssemblyUtils.cs
+14 −0 tools/config/TRX_ConfigToolLib/Utils/BaseNotifyPropertyChanged.cs
+22 −0 tools/config/TRX_ConfigToolLib/Utils/BindingProxy.cs
+28 −0 tools/config/TRX_ConfigToolLib/Utils/Converters/BoolToVisibilityConverter.cs
+26 −0 tools/config/TRX_ConfigToolLib/Utils/Converters/ConditionalMarkupConverter.cs
+12 −0 tools/config/TRX_ConfigToolLib/Utils/Converters/ConditionalViewTextConverter.cs
+17 −0 tools/config/TRX_ConfigToolLib/Utils/Json/NumericConverter.cs
+41 −0 tools/config/TRX_ConfigToolLib/Utils/Json/PropertyConverter.cs
+15 −0 tools/config/TRX_ConfigToolLib/Utils/Json/PropertyResolver.cs
+31 −0 tools/config/TRX_ConfigToolLib/Utils/JsonUtils.cs
+21 −0 tools/config/TRX_ConfigToolLib/Utils/MessageBoxUtils.cs
+72 −0 tools/config/TRX_ConfigToolLib/Utils/NumericValidationRule.cs
+20 −0 tools/config/TRX_ConfigToolLib/Utils/ProcessUtils.cs
+125 −0 tools/config/TRX_ConfigToolLib/Utils/RelayCommand.cs
+28 −0 tools/config/TRX_ConfigToolLib/Utils/VisualUtils.cs
1 change: 1 addition & 0 deletions tools/config/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
bin/
obj/
out/
*.pubxml
12 changes: 2 additions & 10 deletions tools/config/TR1X_ConfigTool/App.xaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
<Application
x:Class="TR1X_ConfigTool.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Controls/MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Resources/styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"/>

14 changes: 5 additions & 9 deletions tools/config/TR1X_ConfigTool/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
using System.Globalization;
using System.Windows;
using System.Windows.Markup;
using System.Windows;
using TRX_ConfigToolLib;

namespace TR1X_ConfigTool;

public partial class App : Application
{
static App()
public App()
{
FrameworkElement.LanguageProperty.OverrideMetadata
(
typeof(FrameworkElement),
new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.Name))
);
Current.MainWindow = new TRXConfigWindow();
Current.MainWindow.Show();
}
}
65 changes: 0 additions & 65 deletions tools/config/TR1X_ConfigTool/Controls/AboutWindow.xaml

This file was deleted.

20 changes: 0 additions & 20 deletions tools/config/TR1X_ConfigTool/Controls/AboutWindow.xaml.cs

This file was deleted.

40 changes: 0 additions & 40 deletions tools/config/TR1X_ConfigTool/Controls/CategoryControl.xaml

This file was deleted.

17 changes: 0 additions & 17 deletions tools/config/TR1X_ConfigTool/Controls/CategoryControl.xaml.cs

This file was deleted.

Loading

0 comments on commit 48f40c4

Please sign in to comment.