Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 35 additions & 0 deletions ConverterApp/App.axaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:views="using:LSTools.DivineGUI"
x:DataType="views:App"
RequestedThemeVariant="Default">

<Application.Resources>
<ControlTheme x:Key="GroupBoxTheme" TargetType="HeaderedContentControl">
<Setter Property="Template">
<ControlTemplate>
<Border BorderBrush="{DynamicResource SystemControlTransientBorderBrush}"
BorderThickness="1"
CornerRadius="4"
Padding="4"
Margin="0,4">
<Grid RowDefinitions="Auto,*">
<ContentPresenter Grid.Row="0"
Content="{TemplateBinding Header}"
FontWeight="SemiBold"
Margin="8,4" />
<ContentPresenter Grid.Row="1"
Content="{TemplateBinding Content}" />
</Grid>
</Border>
</ControlTemplate>
</Setter>
</ControlTheme>
</Application.Resources>

<Application.Styles>
<FluentTheme />
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml"/>
</Application.Styles>

</Application>
86 changes: 86 additions & 0 deletions ConverterApp/App.axaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using ReactiveUI;
using ReactiveUI.Avalonia;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Windows.Input;

namespace LSTools.DivineGUI;

public class BatchProcessItem : ReactiveObject
{
private bool _isChecked;
private string _name = string.Empty;
private string _type = string.Empty;
private string _batchStatusText = string.Empty;
private double _batchProgressValue;

public bool IsChecked { get => _isChecked; set => this.RaiseAndSetIfChanged(ref _isChecked, value); }
public string Name { get => _name; set => this.RaiseAndSetIfChanged(ref _name, value); }
public string Type { get => _type; set => this.RaiseAndSetIfChanged(ref _type, value); }

public ConverterAppSettings Settings { get; set; } = new();

public bool FlipUVs { get; set; }
public bool MirrorSkeletons { get; set; }
public bool ApplyBasisTransforms { get; set; }
public bool MeshRigidChecked { get; set; }
public bool MeshRigidEnabled { get; set; }
public bool MeshClothChecked { get; set; }
public bool MeshClothEnabled { get; set; }
public bool MeshProxyChecked { get; set; }
public bool MeshProxyEnabled { get; set; }

public string BatchStatusText { get => _batchStatusText; set => this.RaiseAndSetIfChanged(ref _batchStatusText, value); }
public double BatchProgressValue { get => _batchProgressValue; set => this.RaiseAndSetIfChanged(ref _batchProgressValue, value); }
}

public class MainSettingsProvider : ISettingsDataSource
{
public ConverterAppSettings Settings { get; set; } = new();
}

public partial class App : Application
{
public ObservableCollection<BatchProcessItem> BatchProcessItemsCollection { get; } = [];
public ICommand? BrowsePathCommand { get; set; }
public ICommand? SaveOutputCommand { get; set; }

[STAThread]
public static void Main(string[] args)
{
CultureInfo customCulture = (CultureInfo)CultureInfo.CurrentCulture.Clone();
customCulture.NumberFormat.NumberDecimalSeparator = ".";

Thread.CurrentThread.CurrentCulture = customCulture;
Thread.CurrentThread.CurrentUICulture = customCulture;
CultureInfo.DefaultThreadCurrentCulture = customCulture;
CultureInfo.DefaultThreadCurrentUICulture = customCulture;

AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace()
.UseReactiveUI(rxui => { })
.RegisterReactiveUIViewsFromEntryAssembly()
.StartWithClassicDesktopLifetime(args);
}

public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}

public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
var mainSettingsContext = new MainSettingsProvider();
desktop.MainWindow = new MainWindow(mainSettingsContext);
}

base.OnFrameworkInitializationCompleted();
}
}
6 changes: 0 additions & 6 deletions ConverterApp/App.config

This file was deleted.

136 changes: 43 additions & 93 deletions ConverterApp/ConverterApp.csproj
Original file line number Diff line number Diff line change
@@ -1,94 +1,44 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
<DefineConstants>
</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>Always</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Editor Debug|AnyCPU'">
<OutputPath>bin\Editor Debug\</OutputPath>
<Optimize>true</Optimize>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Compile Update="DebugPane.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Update="ExportItemSelection.cs">
<SubType>Component</SubType>
</Compile>
<Compile Update="GR2Pane.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Update="LocalizationPane.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Update="OsirisPane.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Update="PackagePane.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Update="ResourcePane.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Update="VirtualTexturesPane.cs">
<SubType>UserControl</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LSLib\LSLib.csproj" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>
<PropertyGroup />
</Project>

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<OutputType>WinExe</OutputType>
<RootNamespace>LSTools.DivineGUI</RootNamespace>
<StartupObject>LSTools.DivineGUI.App</StartupObject>

<LangVersion>14</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

<PublishAot>true</PublishAot>
<TrimMode>link</TrimMode>
<OptimizationPreference>Speed</OptimizationPreference>

<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>

<PlatformTarget>x64</PlatformTarget>
<Platforms>AnyCPU;x64</Platforms>

<AssemblyTitle>LSLib - Divine Cross-Platform GUI Tool</AssemblyTitle>
<Product>LSLib</Product>
<Copyright>Copyright © Norbyte 2012-2026</Copyright>
<AssemblyVersion>1.18.5.0</AssemblyVersion>
<FileVersion>1.18.5.0</FileVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="12.0.3" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="12.0.0" />
<PackageReference Include="Avalonia.Desktop" Version="12.0.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="12.0.3" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="12.0.3" />
<PackageReference Include="ReactiveUI.Avalonia" Version="12.0.1" />
<PackageReference Include="Xaml.Behaviors.Avalonia" Version="12.0.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\LSLib\LSLib.csproj" />
</ItemGroup>

</Project>
Loading