mirror of
https://github.com/4sval/FModel.git
synced 2026-04-18 15:47:43 -05:00
random stuff
This commit is contained in:
parent
4c195134bc
commit
61c1c67733
|
|
@ -1 +1 @@
|
|||
Subproject commit 012641af35e1c3c2f8978c38d9c6e4574e68d595
|
||||
Subproject commit 0a91f0da6103d2f8c35f5a586b0aac6b40f9bd0b
|
||||
|
|
@ -33,6 +33,7 @@ public static class AvalonExtensions
|
|||
case "csv":
|
||||
return _iniHighlighter;
|
||||
case "xml":
|
||||
case "tps":
|
||||
return _xmlHighlighter;
|
||||
case "h":
|
||||
case "cpp":
|
||||
|
|
@ -43,6 +44,7 @@ public static class AvalonExtensions
|
|||
return _ulangHighlighter;
|
||||
case "bat":
|
||||
case "txt":
|
||||
case "pem":
|
||||
case "po":
|
||||
return null;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@
|
|||
<TextBlock Grid.Row="0" Grid.Column="1" Text="Packages Count" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding SelectedItem.FoldersView.Count, ElementName=AssetsFolderName, FallbackValue=0}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="Folders Count" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="{Binding SelectedItem.Package, ElementName=AssetsFolderName, FallbackValue='None'}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="{Binding SelectedItem.Archive, ElementName=AssetsFolderName, FallbackValue='None'}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="Included In Archive" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="{Binding SelectedItem.MountPoint, ElementName=AssetsFolderName, FallbackValue='/', Converter={x:Static converters:TrimRightToLeftConverter.Instance}, ConverterParameter=275}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Text="Archive Mount Point" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
|
|
@ -640,7 +640,7 @@
|
|||
<TextBlock Grid.Row="2" Grid.Column="1" Text="Compression Method" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="{Binding SelectedItem.IsEncrypted, ElementName=AssetsListName, FallbackValue='False'}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Text="Is Encrypted" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="{Binding SelectedItem.Package, ElementName=AssetsListName, FallbackValue='None'}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="{Binding SelectedItem.Archive, ElementName=AssetsListName, FallbackValue='None'}" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Text="Included In Archive" VerticalAlignment="Center" HorizontalAlignment="Right" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using CUE4Parse.UE4.Versions;
|
||||
using CUE4Parse.UE4.Vfs;
|
||||
using FModel.Framework;
|
||||
using FModel.Services;
|
||||
|
|
@ -35,11 +33,11 @@ public class TreeItem : ViewModel
|
|||
set => SetProperty(ref _isSelected, value);
|
||||
}
|
||||
|
||||
private string _package;
|
||||
public string Package
|
||||
private string _archive;
|
||||
public string Archive
|
||||
{
|
||||
get => _package;
|
||||
private set => SetProperty(ref _package, value);
|
||||
get => _archive;
|
||||
private set => SetProperty(ref _archive, value);
|
||||
}
|
||||
|
||||
private string _mountPoint;
|
||||
|
|
@ -61,10 +59,10 @@ public class TreeItem : ViewModel
|
|||
public RangeObservableCollection<TreeItem> Folders { get; }
|
||||
public ICollectionView FoldersView { get; }
|
||||
|
||||
public TreeItem(string header, string package, string mountPoint, int version, string pathHere)
|
||||
public TreeItem(string header, string archive, string mountPoint, int version, string pathHere)
|
||||
{
|
||||
Header = header;
|
||||
Package = package;
|
||||
Archive = archive;
|
||||
MountPoint = mountPoint;
|
||||
Version = version;
|
||||
PathAtThisPoint = pathHere;
|
||||
|
|
@ -129,7 +127,7 @@ public class AssetsFolderViewModel
|
|||
if (lastNode == null)
|
||||
{
|
||||
var nodePath = builder.ToString();
|
||||
lastNode = new TreeItem(folder, item.Package, entry.Vfs.MountPoint, entry.Vfs.Ver.Value, nodePath[..^1]);
|
||||
lastNode = new TreeItem(folder, item.Archive, entry.Vfs.MountPoint, entry.Vfs.Ver.Value, nodePath[..^1]);
|
||||
lastNode.Folders.SetSuppressionState(true);
|
||||
lastNode.AssetsList.Assets.SetSuppressionState(true);
|
||||
parentNode.Add(lastNode);
|
||||
|
|
@ -167,4 +165,4 @@ public class AssetsFolderViewModel
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,11 +35,11 @@ public class AssetItem : ViewModel
|
|||
private set => SetProperty(ref _size, value);
|
||||
}
|
||||
|
||||
private string _package;
|
||||
public string Package
|
||||
private string _archive;
|
||||
public string Archive
|
||||
{
|
||||
get => _package;
|
||||
private set => SetProperty(ref _package, value);
|
||||
get => _archive;
|
||||
private set => SetProperty(ref _archive, value);
|
||||
}
|
||||
|
||||
private CompressionMethod _compression;
|
||||
|
|
@ -49,13 +49,13 @@ public class AssetItem : ViewModel
|
|||
private set => SetProperty(ref _compression, value);
|
||||
}
|
||||
|
||||
public AssetItem(string fullPath, bool isEncrypted, long offset, long size, string package, CompressionMethod compression)
|
||||
public AssetItem(string fullPath, bool isEncrypted, long offset, long size, string archive, CompressionMethod compression)
|
||||
{
|
||||
FullPath = fullPath;
|
||||
IsEncrypted = isEncrypted;
|
||||
Offset = offset;
|
||||
Size = size;
|
||||
Package = package;
|
||||
Archive = archive;
|
||||
Compression = compression;
|
||||
}
|
||||
|
||||
|
|
@ -75,4 +75,4 @@ public class AssetsListViewModel
|
|||
SortDescriptions = { new SortDescription("FullPath", ListSortDirection.Ascending) }
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -562,6 +562,8 @@ public class CUE4ParseViewModel : ViewModel
|
|||
case "xml":
|
||||
case "css":
|
||||
case "csv":
|
||||
case "pem":
|
||||
case "tps":
|
||||
case "js":
|
||||
case "po":
|
||||
case "h":
|
||||
|
|
|
|||
|
|
@ -22,6 +22,13 @@ public class SettingsViewModel : ViewModel
|
|||
private ApiEndpointViewModel _apiEndpointView => ApplicationService.ApiEndpointView;
|
||||
private readonly DiscordHandler _discordHandler = DiscordService.DiscordHandler;
|
||||
|
||||
private bool _useCustomOutputFolders;
|
||||
public bool UseCustomOutputFolders
|
||||
{
|
||||
get => _useCustomOutputFolders;
|
||||
set => SetProperty(ref _useCustomOutputFolders, value);
|
||||
}
|
||||
|
||||
private EUpdateMode _selectedUpdateMode;
|
||||
public EUpdateMode SelectedUpdateMode
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,8 +57,12 @@
|
|||
<TextBox x:Name="ImStockBro" Grid.Row="0" Grid.Column="2" Text="{Binding OutputDirectory, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="0 0 0 5" />
|
||||
<Button Grid.Row="0" Grid.Column="4" Content="..." HorizontalAlignment="Right" Click="OnBrowseOutput" Margin="0 0 0 5" />
|
||||
|
||||
<CheckBox x:Name="CustomOutputFolders" Grid.Row="0" Grid.Column="6" IsChecked="False" Margin="5 0 0 5" ToolTip="Customize the directory of more output folders" />
|
||||
<Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="7" HorizontalAlignment="Right" Visibility="{Binding IsChecked, ElementName=CustomOutputFolders, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<CheckBox Grid.Row="0" Grid.Column="6" Margin="5 0 0 5" ToolTip="Customize the directory of more output folders"
|
||||
DataContext="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:Views.SettingsView}}}"
|
||||
IsChecked="{Binding SettingsView.UseCustomOutputFolders, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="7" HorizontalAlignment="Right"
|
||||
DataContext="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:Views.SettingsView}}}"
|
||||
Visibility="{Binding SettingsView.UseCustomOutputFolders, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
|
|
|
|||
|
|
@ -57,7 +57,15 @@ public partial class SettingsView
|
|||
|
||||
private void OnBrowseOutput(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (TryBrowse(out var path)) UserSettings.Default.OutputDirectory = path;
|
||||
if (!TryBrowse(out var path)) return;
|
||||
UserSettings.Default.OutputDirectory = path;
|
||||
if (_applicationView.SettingsView.UseCustomOutputFolders) return;
|
||||
|
||||
path = Path.Combine(path, "Exports");
|
||||
UserSettings.Default.RawDataDirectory = path;
|
||||
UserSettings.Default.PropertiesDirectory = path;
|
||||
UserSettings.Default.TextureDirectory = path;
|
||||
UserSettings.Default.AudioDirectory = path;
|
||||
}
|
||||
|
||||
private void OnBrowseDirectories(object sender, RoutedEventArgs e)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user