-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add soundbank audio parameter utility
- Loading branch information
Showing
14 changed files
with
316 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<Application x:Class="PD2SoundBankEditor.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:PD2SoundBankEditor" | ||
xmlns:adonisUi="clr-namespace:AdonisUI;assembly=AdonisUI" | ||
Startup="ApplicationStartup"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary Source="pack://application:,,,/AdonisUI;component/ColorSchemes/Dark.xaml"/> | ||
<ResourceDictionary Source="pack://application:,,,/AdonisUI.ClassicTheme;component/Resources.xaml"/> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:PD2SoundBankEditor" | ||
xmlns:adonisUi="clr-namespace:AdonisUI;assembly=AdonisUI" | ||
Startup="ApplicationStartup"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary Source="pack://application:,,,/AdonisUI;component/ColorSchemes/Dark.xaml"/> | ||
<ResourceDictionary Source="pack://application:,,,/AdonisUI.ClassicTheme;component/Resources.xaml"/> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
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) | ||
ResourceDictionaryLocation.None, | ||
ResourceDictionaryLocation.SourceAssembly | ||
)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,97 @@ | ||
<adonisControls:AdonisWindow x:Class="PD2SoundBankEditor.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:adonisUi="clr-namespace:AdonisUI;assembly=AdonisUI" | ||
xmlns:adonisControls="clr-namespace:AdonisUI.Controls;assembly=AdonisUI" | ||
xmlns:adonisExtensions="clr-namespace:AdonisUI.Extensions;assembly=AdonisUI" | ||
Closed="OnWindowClosed" | ||
Title="PD2 Soundbank Editor" | ||
Height="360" | ||
Width="640"> | ||
<Window.Style> | ||
<Style TargetType="Window" BasedOn="{StaticResource {x:Type Window}}"/> | ||
</Window.Style> | ||
<Window.CommandBindings> | ||
<CommandBinding Command="Save" CanExecute="CommandSaveCanExecute" Executed="CommandSaveExecuted" /> | ||
<CommandBinding Command="SaveAs" CanExecute="CommandSaveAsCanExecute" Executed="CommandSaveAsExecuted" /> | ||
</Window.CommandBindings> | ||
<Grid> | ||
<Grid Name="mainGrid" Margin="8,0,8,32"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="3*"/> | ||
<ColumnDefinition Width="1*"/> | ||
</Grid.ColumnDefinitions> | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:adonisControls="clr-namespace:AdonisUI.Controls;assembly=AdonisUI" | ||
xmlns:adonisExtensions="clr-namespace:AdonisUI.Extensions;assembly=AdonisUI" | ||
Closed="OnWindowClosed" | ||
Title="PD2 Soundbank Editor" | ||
Height="480" | ||
Width="720"> | ||
<Window.Style> | ||
<Style TargetType="Window" BasedOn="{StaticResource {x:Type Window}}"/> | ||
</Window.Style> | ||
<Window.CommandBindings> | ||
<CommandBinding Command="Save" CanExecute="CommandSaveCanExecute" Executed="CommandSaveExecuted" /> | ||
<CommandBinding Command="SaveAs" CanExecute="CommandSaveAsCanExecute" Executed="CommandSaveAsExecuted" /> | ||
</Window.CommandBindings> | ||
<Grid> | ||
<Grid Name="mainGrid" Margin="8,0,8,32"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="3*"/> | ||
<ColumnDefinition Width="1*"/> | ||
</Grid.ColumnDefinitions> | ||
|
||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="*"/> | ||
</Grid.RowDefinitions> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="*"/> | ||
</Grid.RowDefinitions> | ||
|
||
<Menu IsMainMenu="True" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Margin="0,0,0,8" HorizontalAlignment="Stretch"> | ||
<MenuItem Header="_File"> | ||
<MenuItem Header="_Open..." Click="OnOpenButtonClick"/> | ||
<Separator /> | ||
<MenuItem Header="_Save" Command="Save"/> | ||
<MenuItem Header="Save _as..." Command="SaveAs"/> | ||
<Separator /> | ||
<MenuItem Header="Recent _files" Name="recentFilesList"> | ||
<MenuItem.ItemContainerStyle> | ||
<Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource {x:Type MenuItem}}"> | ||
<Setter Property="Header" Value="{Binding}"/> | ||
<EventSetter Event="Click" Handler="OnRecentFileClick"/> | ||
</Style> | ||
</MenuItem.ItemContainerStyle> | ||
</MenuItem> | ||
<Separator /> | ||
<MenuItem Header="_Exit" Click="OnExitButtonClick"/> | ||
</MenuItem> | ||
<MenuItem Header="_Tools"> | ||
<MenuItem Header="_Convert loose files..." Click="OnConvertLooseFilesClick"/> | ||
</MenuItem> | ||
<MenuItem Header="_View"> | ||
<MenuItem Header="_Hide unreferenced files" IsCheckable="True" IsChecked="{Binding HideUnreferencedEnabled, Mode=TwoWay}" Checked="OnFilterChanged" Unchecked="OnFilterChanged"/> | ||
</MenuItem> | ||
<MenuItem Header="_Help"> | ||
<MenuItem Header="_Suppress playback errors" IsCheckable="True" IsChecked="{Binding SuppressErrorsEnabled, Mode=TwoWay}"/> | ||
<MenuItem Header="Check for _updates on startup" IsCheckable="True" IsChecked="{Binding UpdateCheckEnabled, Mode=TwoWay}"/> | ||
<Separator /> | ||
<MenuItem Header="_About..." Click="OnAboutButtonClick"/> | ||
</MenuItem> | ||
</Menu> | ||
<Menu IsMainMenu="True" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Margin="0,0,0,8" HorizontalAlignment="Stretch"> | ||
<MenuItem Header="_File"> | ||
<MenuItem Header="_Open..." Click="OnOpenButtonClick"/> | ||
<Separator /> | ||
<MenuItem Header="_Save" Command="Save"/> | ||
<MenuItem Header="Save _as..." Command="SaveAs"/> | ||
<Separator /> | ||
<MenuItem Header="Recent _files" Name="recentFilesList"> | ||
<MenuItem.ItemContainerStyle> | ||
<Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource {x:Type MenuItem}}"> | ||
<Setter Property="Header" Value="{Binding}"/> | ||
<EventSetter Event="Click" Handler="OnRecentFileClick"/> | ||
</Style> | ||
</MenuItem.ItemContainerStyle> | ||
</MenuItem> | ||
<Separator /> | ||
<MenuItem Header="_Exit" Click="OnExitButtonClick"/> | ||
</MenuItem> | ||
<MenuItem Header="_Tools"> | ||
<MenuItem Header="_Convert loose files..." Click="OnConvertLooseFilesClick"/> | ||
<MenuItem Name="setAudioPropertiedMenuItem" Header="_Set audio properties..." Click="OnSetAudioPropertiesClick" IsEnabled="False"/> | ||
</MenuItem> | ||
<MenuItem Header="_View"> | ||
<MenuItem Header="_Hide unreferenced files" IsCheckable="True" IsChecked="{Binding HideUnreferencedEnabled, Mode=TwoWay}" Checked="OnFilterChanged" Unchecked="OnFilterChanged"/> | ||
</MenuItem> | ||
<MenuItem Header="_Help"> | ||
<MenuItem Header="_Suppress playback errors" IsCheckable="True" IsChecked="{Binding SuppressErrorsEnabled, Mode=TwoWay}"/> | ||
<MenuItem Header="Check for _updates on startup" IsCheckable="True" IsChecked="{Binding UpdateCheckEnabled, Mode=TwoWay}"/> | ||
<Separator /> | ||
<MenuItem Header="_About..." Click="OnAboutButtonClick"/> | ||
</MenuItem> | ||
</Menu> | ||
|
||
<DataGrid Name="dataGrid" AutoGenerateColumns="False" Grid.Column="0" Grid.Row="1" SelectionChanged="OnDataGridSelectionChanged" HorizontalScrollBarVisibility="Disabled"> | ||
<DataGrid.Columns> | ||
<DataGridTemplateColumn SortMemberPath="Offset" IsReadOnly="True"> | ||
<DataGridTemplateColumn.CellTemplate> | ||
<DataTemplate> | ||
<Button Content="▶" Click="OnPlayButtonClick" Width="20" Height="20" Padding="0,0,0,0"/> | ||
</DataTemplate> | ||
</DataGridTemplateColumn.CellTemplate> | ||
</DataGridTemplateColumn> | ||
<DataGridTextColumn Header="ID" Binding="{Binding Id}" IsReadOnly="True"/> | ||
<DataGridTextColumn Header="Size" Binding="{Binding Size, StringFormat={}{0:0.0} KB}" IsReadOnly="True"/> | ||
<DataGridTextColumn Width="*" Header="Note" Binding="{Binding Note}" IsReadOnly="False"/> | ||
<DataGridTextColumn Width="*" Header="Replacement" Binding="{Binding ReplacementFile}" IsReadOnly="True"/> | ||
</DataGrid.Columns> | ||
</DataGrid> | ||
<Grid Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="8,0,0,0"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="*"/> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="Auto"/> | ||
</Grid.RowDefinitions> | ||
<Button Grid.Row="0" Name="extractAllButton" Content="Extract all" Click="OnExtractButtonClick" IsEnabled="False" Height="24"/> | ||
<Button Grid.Row="1" Name="extractSelectedButton" Content="Extract selected" Click="OnExtractButtonClick" IsEnabled="False" Height="24"/> | ||
<Button Grid.Row="2" Name="replaceSelectedButton" Content="Replace selected..." Click="OnReplaceButtonClick" IsEnabled="False" Height="24" Margin="0,8,0,0"/> | ||
<Button Grid.Row="3" Name="replaceByNamesButton" Content="Replace by ID..." Click="OnReplaceByNamesButtonClick" IsEnabled="False" Height="24" Margin="0,0,0,0"/> | ||
<TextBox Grid.Row="5" Name="filterTextBox" adonisExtensions:WatermarkExtension.Watermark="Filter" TextChanged="OnFilterChanged" Height="24"/> | ||
</Grid> | ||
</Grid> | ||
<ProgressBar Name="progressBar" Margin="8,8,8,8" VerticalAlignment="Bottom" Height="16"/> | ||
</Grid> | ||
<DataGrid Name="dataGrid" AutoGenerateColumns="False" Grid.Column="0" Grid.Row="1" SelectionChanged="OnDataGridSelectionChanged" HorizontalScrollBarVisibility="Disabled"> | ||
<DataGrid.Columns> | ||
<DataGridTemplateColumn SortMemberPath="Offset" IsReadOnly="True"> | ||
<DataGridTemplateColumn.CellTemplate> | ||
<DataTemplate> | ||
<Button Content="▶" Click="OnPlayButtonClick" Width="20" Height="20" Padding="0,0,0,0"/> | ||
</DataTemplate> | ||
</DataGridTemplateColumn.CellTemplate> | ||
</DataGridTemplateColumn> | ||
<DataGridTextColumn Header="ID" Binding="{Binding Id}" IsReadOnly="True"/> | ||
<DataGridTextColumn Header="Size" Binding="{Binding Size, StringFormat={}{0:0.0} KB}" IsReadOnly="True"/> | ||
<DataGridTextColumn Width="*" Header="Note" Binding="{Binding Note}" IsReadOnly="False"/> | ||
<DataGridTextColumn Width="*" Header="Replacement" Binding="{Binding ReplacementFile}" IsReadOnly="True"/> | ||
</DataGrid.Columns> | ||
</DataGrid> | ||
|
||
<Grid Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="8,0,0,0"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="*"/> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="Auto"/> | ||
</Grid.RowDefinitions> | ||
<Button Grid.Row="0" Name="extractAllButton" Content="Extract all" Click="OnExtractButtonClick" IsEnabled="False" Height="24"/> | ||
<Button Grid.Row="1" Name="extractSelectedButton" Content="Extract selected" Click="OnExtractButtonClick" IsEnabled="False" Height="24"/> | ||
<Button Grid.Row="2" Name="replaceSelectedButton" Content="Replace selected..." Click="OnReplaceButtonClick" IsEnabled="False" Height="24" Margin="0,8,0,0"/> | ||
<Button Grid.Row="3" Name="replaceByNamesButton" Content="Replace by ID..." Click="OnReplaceByNamesButtonClick" IsEnabled="False" Height="24" Margin="0,0,0,0"/> | ||
<TextBox Grid.Row="5" Name="filterTextBox" adonisExtensions:WatermarkExtension.Watermark="Filter" TextChanged="OnFilterChanged" Height="24"/> | ||
</Grid> | ||
</Grid> | ||
<ProgressBar Name="progressBar" Margin="8,8,8,8" VerticalAlignment="Bottom" Height="16"/> | ||
</Grid> | ||
</adonisControls:AdonisWindow> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.