BootSound + non 64 bit os warnign

This commit is contained in:
NicoAICP 2020-04-25 08:40:38 +02:00
parent 2b3259cdb5
commit 5c1146f019
23 changed files with 621 additions and 165 deletions

View file

@ -5,6 +5,7 @@ using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using UWUVCI_AIO_WPF.UI.Windows;
namespace UWUVCI_AIO_WPF
{
@ -22,11 +23,20 @@ namespace UWUVCI_AIO_WPF
MessageBox.Show("Your screen resolution is not supported, please use a resolution of atleast 1152x864", "Resolution not supported", MessageBoxButton.OK, MessageBoxImage.Error);
Environment.Exit(1);
}
if (Environment.Is64BitOperatingSystem)
{
}
else
{
Custom_Message cm = new Custom_Message("Incompatible Operating System", "Your Operating System is not a 64Bit OS.\nThe Injector will run, but most likley many (if not all) features will not work.");
cm.ShowDialog();
}
MainWindow wnd = new MainWindow();
// The OpenFile() method is just an example of what you could do with the
// parameter. The method should be declared on your MainWindow class, where
// you could use a range of methods to process the passed file path
if(e.Args.Length == 1 && e.Args[0] == "--debug")
if (e.Args.Length == 1 && e.Args[0] == "--debug")
{
wnd.setDebug();
}

View file

@ -26,6 +26,8 @@ namespace UWUVCI_AIO_WPF
public string GameName { get; set; }

View file

@ -1,4 +1,5 @@
using GameBaseClassLibrary;
using NAudio.Wave;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@ -198,6 +199,14 @@ namespace UWUVCI_AIO_WPF
mvm.Progress = 90;
mvm.msg = "Changing Images...";
Images(Configuration);
if (File.Exists(mvm.BootSound))
{
mvm.Progress = 95;
mvm.msg = "Adding BootSound...";
bootsound(mvm.BootSound);
}
mvm.Progress = 100;
@ -255,6 +264,91 @@ namespace UWUVCI_AIO_WPF
}
}
static void bootsound(string sound)
{
FileInfo soundFile = new FileInfo(sound);
if(soundFile.Extension.Contains("mp3") || soundFile.Extension.Contains("wav"))
{
//Do Bootsound stuff
if (soundFile.Extension.Contains("mp3"))
{
using (Mp3FileReader mp3 = new Mp3FileReader(sound))
{
using (WaveStream pcm = WaveFormatConversionStream.CreatePcmStream(mp3))
{
WaveFileWriter.CreateWaveFile(Path.Combine(tempPath, "in.wav"), pcm);
}
}
}
else
{
File.Copy(sound, Path.Combine(tempPath, "in.wav"));
}
sound = Path.Combine(tempPath, "in.wav");
//extract SOX.zip
using(Process zip = new Process())
{
if (Directory.Exists(Path.Combine(toolsPath, "SOX"))) { Directory.Delete(Path.Combine(toolsPath, "SOX"), true); }
if (!mvvm.debug)
{
zip.StartInfo.UseShellExecute = false;
zip.StartInfo.CreateNoWindow = true;
}
zip.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe");
zip.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "SOX.zip")}\" -o\"{Path.Combine(toolsPath, "SOX")}\"";
zip.Start();
zip.WaitForExit();
}
//Convert stuff
using (Process p = new Process())
{
p.StartInfo.FileName = Path.Combine(toolsPath, "SOX", "sox.exe");
p.StartInfo.Arguments = $"\"{Path.Combine(tempPath, "in.wav")}\" -b 16 \"{Path.Combine(tempPath, "converted.wav")}\" channels 2 rate 48k trim 0 6";
p.Start();
p.WaitForExit();
File.Delete("in.wav");
}
//Delete SOX Folder
Directory.Delete(Path.Combine(toolsPath, "SOX"), true);
//extract IKVM.zip
using (Process zip = new Process())
{
if (Directory.Exists(Path.Combine(toolsPath, "IKVMW"))) { Directory.Delete(Path.Combine(toolsPath, "IKVMW"), true); }
if (!mvvm.debug)
{
zip.StartInfo.UseShellExecute = false;
zip.StartInfo.CreateNoWindow = true;
}
zip.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe");
zip.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "IKVMW.zip")}\" -o\"{Path.Combine(toolsPath, "IKVMW")}\"";
zip.Start();
zip.WaitForExit();
}
//convert to btsnd
using (Process wav2btsnd = new Process())
{
wav2btsnd.StartInfo.FileName = Path.Combine(toolsPath, "IKVMW", "wav2btsnd.exe");
wav2btsnd.StartInfo.Arguments = $"-in \"{Path.Combine(tempPath, "converted.wav")}\" -out \"{Path.Combine(tempPath, "sound.btsnd")}\"";
wav2btsnd.Start();
wav2btsnd.WaitForExit();
sound = Path.Combine(tempPath, "sound.btsnd");
}
//Delete IKVM.zip
Directory.Delete(Path.Combine(toolsPath, "IKVMW"), true);
}
//Copy BootSound to location
File.Delete(Path.Combine(baseRomPath, "meta", "bootSound.btsnd"));
File.Copy(sound, Path.Combine(baseRomPath, "meta", "bootSound.btsnd"));
}
static void timer_Tick(object sender, EventArgs e)
{
if(mvvm.Progress < 50)
@ -1151,9 +1245,16 @@ namespace UWUVCI_AIO_WPF
}
// This function changes TitleID, ProductCode and GameName in app.xml (ID) and meta.xml (ID, ProductCode, Name)
private static void EditXML(string gameNameOr, int index, string code)
{
string gameName = string.Empty;
if(gameNameOr != string.Empty && gameNameOr != null)
{
Regex reg = new Regex("[^a-zA-Z0-9 é -]");
string gameName = reg.Replace(String.Copy(gameNameOr),"");
gameName= reg.Replace(gameNameOr, "");
}
string metaXml = Path.Combine(baseRomPath, "meta", "meta.xml");
string appXml = Path.Combine(baseRomPath, "code", "app.xml");
Random random = new Random();

View file

@ -47,7 +47,9 @@ namespace UWUVCI_AIO_WPF.Classes
"ConvertToISO.exe",
"NKit.dll",
"SharpCompress.dll",
"NKit.dll.config"
"NKit.dll.config",
"IKVMW.zip",
"SOX.zip"
};
public static bool DoesToolsFolderExist()

View file

@ -24,6 +24,7 @@ using System.Windows.Threading;
using System.Diagnostics;
using Microsoft.WindowsAPICodePack.Dialogs;
using System.Text.RegularExpressions;
using MaterialDesignThemes.Wpf;
namespace UWUVCI_AIO_WPF
{
@ -282,6 +283,15 @@ namespace UWUVCI_AIO_WPF
OnPropertyChanged();
}
}
private string bootsound;
public string BootSound
{
get { return bootsound; }
set { bootsound = value;
OnPropertyChanged();
}
}
public System.Windows.Controls.ListViewItem curr = null;
@ -358,6 +368,25 @@ namespace UWUVCI_AIO_WPF
}
}
public bool ConfirmRiffWave(string path)
{
using (var reader = new BinaryReader(File.OpenRead(path)))
{
reader.BaseStream.Position = 0x00;
long WAVHeader1 = reader.ReadInt32();
reader.BaseStream.Position = 0x08;
long WAVHeader2 = reader.ReadInt32();
if (WAVHeader1 == 1179011410 & WAVHeader2 == 1163280727)
{
return true;
}
else
{
return false;
}
}
}
public void OpenDialog(string title, string msg)
{
@ -413,8 +442,10 @@ namespace UWUVCI_AIO_WPF
}
public string turbocd()
{
string ret = string.Empty;
Custom_Message cm = new Custom_Message("Information", "Please put a TurboGraf CD ROM into a folder and select said folder.\n\nThe Folder should atleast contain:\nEXACTLY ONE *.hcd file\nOne or more *.ogg files\nOne or More *.bin files\n\nNot doing so will result in a faulty Inject. You have been warned!");
Custom_Message cm = new Custom_Message("Information", "Please put a TurboGrafX CD ROM into a folder and select said folder.\n\nThe Folder should atleast contain:\nEXACTLY ONE *.hcd file\nOne or more *.ogg files\nOne or More *.bin files\n\nNot doing so will result in a faulty Inject. You have been warned!");
try
{
cm.Owner = mw;
@ -510,6 +541,7 @@ namespace UWUVCI_AIO_WPF
{
mw = mwi;
}
public void ExportFile()
{
string drcp = null;
@ -761,6 +793,7 @@ namespace UWUVCI_AIO_WPF
Injected = false;
GameConfiguration.CBasePath = null;
GC = false;
bootsound = "";
if(Directory.Exists(Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo"))) Directory.Delete(Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo"), true);
}
@ -1132,7 +1165,7 @@ namespace UWUVCI_AIO_WPF
{
Custom_Message cm;
string ret = string.Empty;
if (ROM)
if (ROM && !INI)
{
switch (GameConfiguration.Console)
{
@ -1163,7 +1196,11 @@ namespace UWUVCI_AIO_WPF
{
if (ROM)
{
if (GC)
if (INI)
{
dialog.Filter = "BootSound Files (*.mp3; *.wav; *.btsnd) | *.mp3;*.wav;*.btsnd";
}
else if (GC)
{
dialog.Filter = "GCN ROM (*.iso; *.gcm) | *.iso; *.gcm";
}
@ -1213,9 +1250,10 @@ namespace UWUVCI_AIO_WPF
}
else if(!INI)
{
dialog.Filter = "BootImages (*.png; *.tga) | *.png;*.tga";
}
else
else if(INI)
{
dialog.Filter = "N64 VC Configuration (*.ini) | *.ini";
}

View file

@ -18,7 +18,7 @@
<Button Content="Loadiine" HorizontalAlignment="Left" Margin="256,533,0,0" VerticalAlignment="Top" Width="137" IsEnabled="{Binding Injected}" Click="Button_Click_2"/>
<Frame Name="fLoadConfig" Width="643" Height="483" Margin="459,70,28,47"/>
<Frame Name="fLoadConfig" Width="643" Margin="459,55,28,35"/>

View file

@ -6,23 +6,23 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations"
mc:Ignorable="d"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
d:DesignHeight="483" d:DesignWidth="643"
d:DesignHeight="510" d:DesignWidth="643"
Title="N64Config">
<Grid DataContext="{StaticResource mvm}">
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,60,157,378" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding RomPath}" Name="rp"/>
<TextBox materialDesign:HintAssist.Hint="ICONTEX" Name="ic" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 32 and a Dimension of 128x128" Margin="10,181,157,257" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGAIco.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX (OPTIONAL) " Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,272,157,166" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,211" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,121" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,369,157,69" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,413,0,0" VerticalAlignment="Top" Width="127" Click="InjectGame" IsEnabled="{Binding CanInject}"/>
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Name="rp" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,60,157,406" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding RomPath}"/>
<TextBox materialDesign:HintAssist.Hint="ICONTEX" Name="ic" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 32 and a Dimension of 128x128" Margin="10,181,157,283" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGAIco.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX (OPTIONAL)" Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,272,157,193" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,238" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,149" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,413,157,52" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,457,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,329,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,239,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,284,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,193,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
<TextBox Name="ini" materialDesign:HintAssist.Hint="INI PATH (LEAVE EMPTY FOR BLANK INI)" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,121,157,317" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.N64Stuff.INIPath}" Height="45"/>
<TextBox Name="ini" materialDesign:HintAssist.Hint="INI PATH (LEAVE EMPTY FOR BLANK INI)" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,118,157,345" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.N64Stuff.INIPath}"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,133,0,0" VerticalAlignment="Top" Width="127" Click="Set_IniPath"/>
<StackPanel Margin="10,20,244,436" Orientation="Horizontal" >
@ -35,6 +35,8 @@
<Image HorizontalAlignment="Left" Height="32" Margin="446,239,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,283,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
</Grid>
</Page>

View file

@ -89,7 +89,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
mvm.GameConfiguration.TGALog.ImgPath = log.Text;
}
else if(!log.Text.Equals("Added via Config") && !log.Text.Equals("Downloaded from Cucholix Repo"))
else if (!log.Text.Equals("Added via Config") && !log.Text.Equals("Downloaded from Cucholix Repo"))
{
mvm.GameConfiguration.TGALog.ImgPath = null;
}
@ -114,7 +114,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
public void getInfoFromConfig()
{
if(rp != null)rp.Text = "";
if (rp != null) rp.Text = "";
mvm.RomPath = "";
mvm.RomSet = false;
mvm.gc2rom = "";
@ -293,5 +293,38 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
new LOGSHOW(log.Text).ShowDialog();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
string path = mvm.GetFilePath(true, true);
if (!CheckIfNull(path))
{
if (new FileInfo(path).Extension.Contains("wav"))
{
if (mvm.ConfirmRiffWave(path))
{
mvm.BootSound = path;
}
else
{
Custom_Message cm = new Custom_Message("Incompatible WAV file", "Your WAV file needs to be a RIFF WAVE file which is 16 bit stereo and also 48000khz");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.ShowDialog();
}
}
else
{
mvm.BootSound = path;
}
}
}
}
}

View file

@ -6,17 +6,17 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations"
mc:Ignorable="d"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
d:DesignHeight="483" d:DesignWidth="643"
d:DesignHeight="510" d:DesignWidth="643"
Title="OtherConfigs">
<Grid DataContext="{StaticResource mvm}">
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Name="rp" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,60,157,378" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding RomPath}"/>
<TextBox materialDesign:HintAssist.Hint="ICONTEX" Name="ic" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 32 and a Dimension of 128x128" Margin="10,181,157,257" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGAIco.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX (OPTIONAL)" Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,272,157,166" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,211" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,121" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,369,157,69" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,413,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Name="rp" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,60,157,406" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding RomPath}"/>
<TextBox materialDesign:HintAssist.Hint="ICONTEX" Name="ic" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 32 and a Dimension of 128x128" Margin="10,181,157,283" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGAIco.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX (OPTIONAL)" Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,272,157,193" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,238" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,149" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,413,157,52" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,457,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,329,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,239,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,284,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
@ -33,5 +33,7 @@
<Image HorizontalAlignment="Left" Height="32" Margin="446,239,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,283,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
</Grid>
</Page>

View file

@ -55,7 +55,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
path = mvm.GetFilePath(true, false);
if (!CheckIfNull(path)) {
if (!CheckIfNull(path))
{
mvm.RomPath = path;
mvm.RomSet = true;
if (mvm.BaseDownloaded)
@ -150,7 +151,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.ImageWarning();
}
string path = mvm.GetFilePath(false, false);
if (!CheckIfNull(path)) {
if (!CheckIfNull(path))
{
mvm.GameConfiguration.TGAIco.ImgPath = path;
mvm.GameConfiguration.TGAIco.extension = new FileInfo(path).Extension;
ic.Text = path;
@ -165,7 +167,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.ImageWarning();
}
string path = mvm.GetFilePath(false, false);
if (!CheckIfNull(path)) {
if (!CheckIfNull(path))
{
mvm.GameConfiguration.TGALog.ImgPath = path;
mvm.GameConfiguration.TGALog.extension = new FileInfo(path).Extension;
log.Text = path;
@ -203,7 +206,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
private bool CheckIfNull(string s)
{
if(s == null || s.Equals(string.Empty))
if (s == null || s.Equals(string.Empty))
{
return true;
}
@ -272,5 +275,39 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
new LOGSHOW(log.Text).ShowDialog();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
string path = mvm.GetFilePath(true, true);
if (!CheckIfNull(path))
{
if (new FileInfo(path).Extension.Contains("wav"))
{
if (mvm.ConfirmRiffWave(path))
{
mvm.BootSound = path;
}
else
{
Custom_Message cm = new Custom_Message("Incompatible WAV file", "Your WAV file needs to be a RIFF WAVE file which is 16 bit stereo and also 48000khz");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.ShowDialog();
}
}
else
{
mvm.BootSound = path;
}
}
}
}
}

View file

@ -6,24 +6,24 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations"
mc:Ignorable="d"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
d:DesignHeight="483" d:DesignWidth="643"
d:DesignHeight="510" d:DesignWidth="643"
Title="OtherConfigs">
<Grid DataContext="{StaticResource mvm}">
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Name="rp" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,60,157,378" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding RomPath}"/>
<TextBox materialDesign:HintAssist.Hint="ICONTEX" Name="ic" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 32 and a Dimension of 128x128" Margin="10,181,157,257" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGAIco.ImgPath}" Cursor="Help" TextChanged="ic_TextChanged"/>
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX (OPTIONAL)" Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,272,157,166" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help" TextChanged="drc_TextChanged"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,211" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help" TextChanged="tv_TextChanged"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,121" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}" TextChanged="log_TextChanged"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,369,157,69" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,413,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Name="rp" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,60,157,406" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding RomPath}"/>
<TextBox materialDesign:HintAssist.Hint="ICONTEX" Name="ic" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 32 and a Dimension of 128x128" Margin="10,181,157,283" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGAIco.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX (OPTIONAL)" Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,272,157,193" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,238" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,149" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,413,157,52" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,457,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,329,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,239,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,284,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,193,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
<TextBox Name="gc2" materialDesign:HintAssist.Hint="GAMECUBE DISC 2 (LEAVE BLANK IF NONE)" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,121,157,317" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding gc2rom}" Height="45"/>
<TextBox Name="gc2" materialDesign:HintAssist.Hint="GAMECUBE DISC 2 (LEAVE BLANK IF NONE)" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,120,157,345" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding gc2rom}" Height="45"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,133,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
<StackPanel Margin="10,20,244,436" Orientation="Horizontal" >
@ -35,6 +35,8 @@
<Image HorizontalAlignment="Left" Height="32" Margin="446,239,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,283,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click_1"/>
</Grid>
</Page>

View file

@ -53,9 +53,27 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
string path = string.Empty;
path = mvm.GetFilePath(true, false);
if (!CheckIfNull(path)) {
int TitleIDInt = 0;
bool isok = false;
if (!CheckIfNull(path))
{
using (var reader = new BinaryReader(File.OpenRead(path)))
{
reader.BaseStream.Position = 0x00;
TitleIDInt = reader.ReadInt32();
if (TitleIDInt != 65536 && TitleIDInt != 1397113431)
{
reader.BaseStream.Position = 0x18;
long GameType = reader.ReadInt64();
if (GameType == 4440324665927270400)
{
isok = true;
}
}
reader.Close();
}
if (isok)
{
mvm.RomPath = path;
mvm.RomSet = true;
if (mvm.BaseDownloaded)
@ -68,7 +86,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
gn.Text = reg.Replace(rom, string.Empty);
mvm.GameConfiguration.GameName = reg.Replace(rom, string.Empty);
mvm.gc2rom = "";
if(mvm.GameConfiguration.TGAIco.ImgPath != "" || mvm.GameConfiguration.TGAIco.ImgPath != null)
if (mvm.GameConfiguration.TGAIco.ImgPath != "" || mvm.GameConfiguration.TGAIco.ImgPath != null)
{
ic.Text = mvm.GameConfiguration.TGAIco.ImgPath;
}
@ -77,6 +95,22 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
tv.Text = mvm.GameConfiguration.TGATv.ImgPath;
}
}
else
{
Custom_Message cm = new Custom_Message("Wrong ROM", "The chosen ROM is not a supported GameCube Game");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.ShowDialog();
}
}
}
@ -163,7 +197,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.ImageWarning();
}
string path = mvm.GetFilePath(false, false);
if (!CheckIfNull(path)) {
if (!CheckIfNull(path))
{
mvm.GameConfiguration.TGAIco.ImgPath = path;
mvm.GameConfiguration.TGAIco.extension = new FileInfo(path).Extension;
ic.Text = path;
@ -178,7 +213,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.ImageWarning();
}
string path = mvm.GetFilePath(false, false);
if (!CheckIfNull(path)) {
if (!CheckIfNull(path))
{
mvm.GameConfiguration.TGALog.ImgPath = path;
mvm.GameConfiguration.TGALog.extension = new FileInfo(path).Extension;
log.Text = path;
@ -217,7 +253,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
private bool CheckIfNull(string s)
{
if(s == null || s.Equals(string.Empty))
if (s == null || s.Equals(string.Empty))
{
return true;
}
@ -248,7 +284,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void CheckBox_Click_1(object sender, RoutedEventArgs e)
{
if(mvm.Index == 1)
if (mvm.Index == 1)
{
mvm.Index = -1;
}
@ -346,5 +382,38 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
logIMG.Visibility = Visibility.Hidden;
}
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
string path = mvm.GetFilePath(true, true);
if (!CheckIfNull(path))
{
if (new FileInfo(path).Extension.Contains("wav"))
{
if (mvm.ConfirmRiffWave(path))
{
mvm.BootSound = path;
}
else
{
Custom_Message cm = new Custom_Message("Incompatible WAV file", "Your WAV file needs to be a RIFF WAVE file which is 16 bit stereo and also 48000khz");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.ShowDialog();
}
}
else
{
mvm.BootSound = path;
}
}
}
}
}

View file

@ -6,17 +6,17 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations"
mc:Ignorable="d"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
d:DesignHeight="483" d:DesignWidth="643"
d:DesignHeight="510" d:DesignWidth="643"
Title="OtherConfigs">
<Grid DataContext="{StaticResource mvm}">
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Name="rp" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,60,157,378" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding RomPath}"/>
<TextBox materialDesign:HintAssist.Hint="ICONTEX" Name="ic" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 32 and a Dimension of 128x128" Margin="10,181,157,257" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGAIco.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX (OPTIONAL)" Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,272,157,166" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,211" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,121" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,369,157,69" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,413,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Name="rp" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,60,157,406" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding RomPath}"/>
<TextBox materialDesign:HintAssist.Hint="ICONTEX" Name="ic" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 32 and a Dimension of 128x128" Margin="10,181,157,283" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGAIco.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX (OPTIONAL)" Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,272,157,193" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,238" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,149" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,413,157,52" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,457,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,329,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,239,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,284,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
@ -31,5 +31,8 @@
<Image HorizontalAlignment="Left" Height="32" Margin="446,239,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,283,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
</Grid>
</Page>

View file

@ -54,7 +54,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
if (!cd) path = mvm.GetFilePath(true, false);
else path = mvm.turbocd();
if (!CheckIfNull(path)) {
if (!CheckIfNull(path))
{
mvm.RomPath = path;
mvm.RomSet = true;
if (mvm.BaseDownloaded)
@ -148,7 +149,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.ImageWarning();
}
string path = mvm.GetFilePath(false, false);
if (!CheckIfNull(path)) {
if (!CheckIfNull(path))
{
mvm.GameConfiguration.TGAIco.ImgPath = path;
mvm.GameConfiguration.TGAIco.extension = new FileInfo(path).Extension;
ic.Text = path;
@ -165,7 +167,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.ImageWarning();
}
string path = mvm.GetFilePath(false, false);
if (!CheckIfNull(path)) {
if (!CheckIfNull(path))
{
mvm.GameConfiguration.TGALog.ImgPath = path;
mvm.GameConfiguration.TGALog.extension = new FileInfo(path).Extension;
log.Text = path;
@ -185,7 +188,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
tvIMG.Visibility = Visibility.Visible;
}
ic.Text = mvm.GameConfiguration.TGAIco.ImgPath;
if(ic.Text.Length > 0)
if (ic.Text.Length > 0)
{
icoIMG.Visibility = Visibility.Visible;
}
@ -204,7 +207,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
private bool CheckIfNull(string s)
{
if(s == null || s.Equals(string.Empty))
if (s == null || s.Equals(string.Empty))
{
return true;
}
@ -281,5 +284,38 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
new LOGSHOW(log.Text).ShowDialog();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
string path = mvm.GetFilePath(true, true);
if (!CheckIfNull(path))
{
if (new FileInfo(path).Extension.Contains("wav"))
{
if (mvm.ConfirmRiffWave(path))
{
mvm.BootSound = path;
}
else
{
Custom_Message cm = new Custom_Message("Incompatible WAV file", "Your WAV file needs to be a RIFF WAVE file which is 16 bit stereo and also 48000khz");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.ShowDialog();
}
}
else
{
mvm.BootSound = path;
}
}
}
}
}

View file

@ -6,18 +6,17 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations"
mc:Ignorable="d"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
d:DesignHeight="483" d:DesignWidth="643"
d:DesignHeight="510" d:DesignWidth="643"
Title="OtherConfigs">
<Grid DataContext="{StaticResource mvm}">
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Name ="rp" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,60,157,378" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding RomPath}"/>
<TextBox materialDesign:HintAssist.Hint="ICONTEX" Name="ic" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 32 and a Dimension of 128x128" Margin="10,181,157,257" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGAIco.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX (OPTIONAL)" Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,272,157,166" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,211" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,121" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,369,157,69" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,413,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Name="rp" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,60,157,406" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding RomPath}"/>
<TextBox materialDesign:HintAssist.Hint="ICONTEX" Name="ic" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 32 and a Dimension of 128x128" Margin="10,181,157,283" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGAIco.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX (OPTIONAL)" Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,272,157,193" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,238" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,149" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,413,157,52" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,457,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,329,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,239,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,284,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
@ -27,5 +26,7 @@
<Image HorizontalAlignment="Left" Height="32" Margin="446,239,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,283,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="WAV needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Text="{Binding BootSound}" Focusable="False" Cursor="Help"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
</Grid>
</Page>

View file

@ -31,6 +31,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm = FindResource("mvm") as MainViewModel;
mvm.setThing(this);
Injection.ToolTip = "Changing the extension of a ROM may result in a faulty inject.\nWe will not give any support in such cases";
sound.ToolTip += "\nWill be cut to 6 seconds of Length";
}
public OtherConfigs(GameConfig c)
{
@ -39,6 +40,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration = c.Clone(); getInfoFromConfig();
mvm.setThing(this);
Injection.ToolTip = "Changing the extension of a ROM may result in a faulty inject.\nWe will not give any support in such cases";
sound.ToolTip += "\nWill be cut to 6 seconds of Length";
}
public void Dispose()
{
@ -260,5 +262,39 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
new LOGSHOW(log.Text).ShowDialog();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
string path = mvm.GetFilePath(true, true);
if (!CheckIfNull(path))
{
if(new FileInfo(path).Extension.Contains("wav"))
{
if (mvm.ConfirmRiffWave(path))
{
mvm.BootSound = path;
}
else
{
Custom_Message cm = new Custom_Message("Incompatible WAV file", "Your WAV file needs to be a RIFF WAVE file which is 16 bit stereo and also 48000khz");
try
{
cm.Owner = mvm.mw;
}catch(Exception)
{
}
cm.ShowDialog();
}
}
else
{
mvm.BootSound = path;
}
}
}
}
}

View file

@ -6,21 +6,21 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations"
mc:Ignorable="d"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" d:DesignWidth="643"
Title="N64Config" Height="483">
Title="N64Config" Height="510">
<Grid DataContext="{StaticResource mvm}">
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,60,157,378" Background="{x:Null}" Name="rp" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding RomPath}"/>
<TextBox materialDesign:HintAssist.Hint="ICONTEX" x:Name="ic" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 32 and a Dimension of 128x128" Margin="10,181,157,257" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGAIco.ImgPath}" Cursor="Help" TextChanged="ic_TextChanged"/>
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX (OPTIONAL)" x:Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,272,157,166" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help" TextChanged="drc_TextChanged"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" x:Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,211" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help" TextChanged="tv_TextChanged"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" x:Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,121" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}" TextChanged="log_TextChanged"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,369,157,69" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" x:Name="gn" KeyUp="gn_KeyUp" KeyDown="gn_KeyDown" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,413,0,0" VerticalAlignment="Top" Width="127" Click="InjectGame" IsEnabled="{Binding CanInject}"/>
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Name="rp" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,60,157,406" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding RomPath}"/>
<TextBox materialDesign:HintAssist.Hint="ICONTEX" Name="ic" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 32 and a Dimension of 128x128" Margin="10,181,157,283" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGAIco.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTDRCTEX (OPTIONAL)" Name="drc" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 854x480" Margin="10,272,157,193" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGADrc.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,238" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,149" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,413,157,52" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,457,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,329,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,239,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,284,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,193,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" x:Name="Injection"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
<ComboBox HorizontalAlignment="Left" Margin="10,138,0,0" VerticalAlignment="Top" Width="476" x:Name="gamepad" SelectionChanged="gamepad_SelectionChanged"/>
<Label Content="Use GamePad as:" HorizontalAlignment="Left" Margin="6,113,0,0" VerticalAlignment="Top" FontSize="14"/>
<CheckBox Content="Swap L/R and ZL/ZR" HorizontalAlignment="Left" Margin="506,142,0,0" VerticalAlignment="Top" Width="137" x:Name="LR" IsEnabled="False" IsChecked="False"/>
@ -34,5 +34,8 @@
<Image HorizontalAlignment="Left" Height="32" Margin="446,239,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden" />
<Image HorizontalAlignment="Left" Height="32" Margin="446,283,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
</Grid>
</Page>

View file

@ -71,6 +71,30 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
string path = mvm.GetFilePath(true, false);
if (!CheckIfNull(path))
{
int TitleIDInt = 0;
bool isok = false;
using (var reader = new BinaryReader(File.OpenRead(path)))
{
reader.BaseStream.Position = 0x00;
TitleIDInt = reader.ReadInt32();
if (TitleIDInt == 1397113431) //Performs actions if the header indicates a WBFS file
{ isok = true; }
else if (TitleIDInt != 65536)
{
long GameType = 0;
reader.BaseStream.Position = 0x18;
GameType = reader.ReadInt64();
if (GameType == 2745048157)
{
isok = true;
}
}
reader.Close();
}
if (isok)
{
mvm.RomPath = path;
mvm.RomSet = true;
@ -92,6 +116,21 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
tv.Text = mvm.GameConfiguration.TGATv.ImgPath;
}
}
else
{
Custom_Message cm = new Custom_Message("Wrong ROM", "The chosen ROM is not a supported WII Game");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.ShowDialog();
}
}
}
@ -132,7 +171,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGADrc.ImgPath = null;
}
mvm.Index = gamepad.SelectedIndex;
if(LR.IsChecked == true)
if (LR.IsChecked == true)
{
mvm.LR = true;
}
@ -274,7 +313,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void gamepad_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if(gamepad.SelectedIndex == 1 || gamepad.SelectedIndex == 4)
if (gamepad.SelectedIndex == 1 || gamepad.SelectedIndex == 4)
{
LR.IsEnabled = true;
}
@ -385,10 +424,43 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void gn_KeyDown(object sender, KeyEventArgs e)
{
if (Keyboard.IsKeyDown(Key.Up) || Keyboard.IsKeyDown(Key.Down)|| Keyboard.IsKeyDown(Key.Left) || Keyboard.IsKeyDown(Key.Right))
if (Keyboard.IsKeyDown(Key.Up) || Keyboard.IsKeyDown(Key.Down) || Keyboard.IsKeyDown(Key.Left) || Keyboard.IsKeyDown(Key.Right))
{
dont = false;
}
}
private void Button_Click(object sender, RoutedEventArgs e)
{
string path = mvm.GetFilePath(true, true);
if (!CheckIfNull(path))
{
if (new FileInfo(path).Extension.Contains("wav"))
{
if (mvm.ConfirmRiffWave(path))
{
mvm.BootSound = path;
}
else
{
Custom_Message cm = new Custom_Message("Incompatible WAV file", "Your WAV file needs to be a RIFF WAVE file which is 16 bit stereo and also 48000khz");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.ShowDialog();
}
}
else
{
mvm.BootSound = path;
}
}
}
}
}

View file

@ -27,6 +27,7 @@
<Button Content="Reset TitleKeys" HorizontalAlignment="Left" Margin="325,254,0,0" VerticalAlignment="Top" Width="153" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_8"/>
<Button Content="Start Nintendont Config Tool" HorizontalAlignment="Left" Margin="325,342,0,0" VerticalAlignment="Top" Width="267" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_9"/>
<Button Content="Reset Don't show this again Option" HorizontalAlignment="Left" Margin="410,387,0,0" VerticalAlignment="Top" Width="266" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_10"/>
<WebBrowser HorizontalAlignment="Left" Height="181" Margin="38,387,0,0" VerticalAlignment="Top" Width="262" Name="wb"/>
</Grid>
</Page>

View file

@ -28,6 +28,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames
{
InitializeComponent();
parent = mw;
wb.Navigate("https://google.com");
}
public void Dispose()
{
@ -69,7 +70,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames
private void Button_Click_5(object sender, RoutedEventArgs e)
{
new Custom_Message("Credits", "UWUVCI AIO - NicoAICP, Morilli, Lreiia Bot\nBeta Testers/Contributors - wowjinxy, Danis, Adolfobenjaminv\n\n7za - Igor Pavlov\nBuildPcePkg & BuildTurboCDPcePkg - JohnnyGo\nCdecrypt - crediar\nCNUSPACKER - NicoAICP, Morilli\nINICreator - NicoAICP\nN64Converter - Morilli\npng2tga - Easy2Convert\ninject_gba_c (psb) - Morilli\nRetroInject_C - Morilli\ntga_verify - Morilli\nWiiUDownloader - Morilli\nwiiurpxtool - 0CHB0\nGoomba - FluBBa\nDarkFilter Removal N64 - MelonSpeedruns\nNintendont SD Card Menu - TeconMoon\nwit - Wiimm\nGetExtTypePatcher - Fix94\nnfs2iso2nfs - sabykos, piratesephiroth, Fix94 and many more\nWii-VMC - wanikoko\nWii/GC Bootimages - Cucholix").ShowDialog();
new Custom_Message("Credits", "UWUVCI AIO - NicoAICP, Morilli, Lreiia Bot\nBeta Testers/Contributors - wowjinxy, Danis, Adolfobenjaminv\n\n7za - Igor Pavlov\nBuildPcePkg & BuildTurboCDPcePkg - JohnnyGo\nCdecrypt - crediar\nCNUSPACKER - NicoAICP, Morilli\nINICreator - NicoAICP\nN64Converter - Morilli\npng2tga - Easy2Convert\ninject_gba_c (psb) - Morilli\nRetroInject_C - Morilli\ntga_verify - Morilli\nWiiUDownloader - Morilli\nwiiurpxtool - 0CHB0\nGoomba - FluBBa\nDarkFilter Removal N64 - MelonSpeedruns\nNintendont SD Card Menu - TeconMoon\nwit - Wiimm\nGetExtTypePatcher - Fix94\nnfs2iso2nfs - sabykos, piratesephiroth, Fix94 and many more\nWii-VMC - wanikoko\nIcon/TV Bootimages - Flump\nNKit - nanook").ShowDialog();
}
private void Button_Click_6(object sender, RoutedEventArgs e)

View file

@ -227,6 +227,7 @@ namespace UWUVCI_AIO_WPF
DestroyFrame();
tbTitleBar.Text = "UWUVCI AIO - SETTINGS";
load_frame.Content = new SettingsFrame(this);
break;
}

View file

@ -81,6 +81,9 @@
<Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\WindowsAPICodePack-Shell.1.1.1\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
</Reference>
<Reference Include="NAudio, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NAudio.1.10.0\lib\net35\NAudio.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.IO.Compression" />

View file

@ -5,6 +5,7 @@
<package id="Fody" version="6.0.0" targetFramework="net472" developmentDependency="true" />
<package id="MaterialDesignColors" version="1.2.2" targetFramework="net472" />
<package id="MaterialDesignThemes" version="3.0.1" targetFramework="net472" />
<package id="NAudio" version="1.10.0" targetFramework="net472" />
<package id="WindowsAPICodePack-Core" version="1.1.1" targetFramework="net472" />
<package id="WindowsAPICodePack-Shell" version="1.1.1" targetFramework="net472" />
</packages>