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

@ -24,6 +24,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)
@ -1152,8 +1246,15 @@ 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)
{
Regex reg = new Regex("[^a-zA-Z0-9 é -]");
string gameName = reg.Replace(String.Copy(gameNameOr),"");
string gameName = string.Empty;
if(gameNameOr != string.Empty && gameNameOr != null)
{
Regex reg = new Regex("[^a-zA-Z0-9 é -]");
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,35 +6,37 @@
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" >
<Label Content="DarkFilter:" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="14" Width="102"/>
<RadioButton Content="Keep" Width="78" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="df" IsChecked="True" Click="RadioButton_Click"/>
<RadioButton x:Name="rbRDF" Width="111" Content="Remove" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="df" Click="rbRDF_Click"/>
</StackPanel>
</StackPanel>
<Image HorizontalAlignment="Left" Height="32" Margin="446,193,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden" />
<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"/>
</Grid>
<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

@ -33,7 +33,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
InitializeComponent();
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";
}
public N64Config(GameConfig c)
{
@ -60,7 +60,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
if (mvm.BaseDownloaded)
{
mvm.CanInject = true;
}
mvm.getBootIMGN64(mvm.RomPath);
}
@ -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;
}
@ -110,11 +110,11 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGADrc.ImgPath = null;
}
mvm.Inject(false);
}
public void getInfoFromConfig()
{
if(rp != null)rp.Text = "";
if (rp != null) rp.Text = "";
mvm.RomPath = "";
mvm.RomSet = false;
mvm.gc2rom = "";
@ -152,7 +152,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
if (gn != null) gn.Text = mvm.GameConfiguration.GameName;
if (ini != null) ini.Text = mvm.GameConfiguration.N64Stuff.INIPath;
}
private void Set_TvTex(object sender, RoutedEventArgs e)
{
@ -291,7 +291,40 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new LOGSHOW(log.Text).ShowDialog();
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,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="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"/>
<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"/>
<StackPanel Margin="10,20,244,436" Orientation="Horizontal" ToolTip="Patches Pokemon GBA games to work with GBA VC">
<StackPanel Margin="10,20,244,436" Orientation="Horizontal" ToolTip="Patches Pokemon GBA games to work with GBA VC">
<Label Content="PokePatch:" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="14" Width="102"/>
<RadioButton Content="Yes" Width="78" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="df" Click="RadioButton_Click"/>
@ -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

@ -32,10 +32,10 @@ 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";
}
public GBA(GameConfig c)
{
{
InitializeComponent();
mvm = FindResource("mvm") as MainViewModel;
@ -53,19 +53,20 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
string path = string.Empty;
path = mvm.GetFilePath(true, false);
if (!CheckIfNull(path)) {
if (!CheckIfNull(path))
{
mvm.RomPath = path;
mvm.RomSet = true;
if (mvm.BaseDownloaded)
{
mvm.CanInject = true;
}
mvm.getBootIMGGBA(mvm.RomPath);
}
}
}
private void InjectGame(object sender, RoutedEventArgs e)
@ -114,7 +115,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
mvm.ImageWarning();
}
string path = mvm.GetFilePath(false, false);
if (!CheckIfNull(path))
{
@ -142,7 +143,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
}
private void Set_IconTex(object sender, RoutedEventArgs e)
{
if (!Settings.Default.dont)
@ -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;
}
@ -230,7 +233,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
public void reset()
{
tv.Text = "";
drc.Text = "";
gn.Text = "";
@ -254,7 +257,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(tv.Text).ShowDialog();
new TDRSHOW(tv.Text).ShowDialog();
}
public void imgpath(string icon, string tv)
{
@ -270,7 +273,41 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new LOGSHOW(log.Text).ShowDialog();
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,35 +6,37 @@
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" >
<Label Content="Configuration:" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="14" Width="102"/>
<CheckBox Content="Force 4:3" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" Width="98" Click="CheckBox_Click" ToolTip="If checked Games will run in 4:3 instead of 16:9"/>
<CheckBox Content="Use GamePad" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" Width="98" Click="CheckBox_Click_1" ToolTip="If checked the GamePad will be used as a controller" Name="gp"/>
</StackPanel>
</StackPanel>
<Image HorizontalAlignment="Left" Height="32" Margin="446,193,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden" />
<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"/>
</Grid>
<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,31 +53,65 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
string path = string.Empty;
path = mvm.GetFilePath(true, false);
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)
{
mvm.CanInject = true;
if (!CheckIfNull(path)) {
mvm.RomPath = path;
mvm.RomSet = true;
if (mvm.BaseDownloaded)
{
mvm.CanInject = true;
}
string rom = mvm.getInternalWIIGCNName(mvm.RomPath, true);
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³´`éⓇ©™]");
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)
{
ic.Text = mvm.GameConfiguration.TGAIco.ImgPath;
}
if (mvm.GameConfiguration.TGATv.ImgPath != "" || mvm.GameConfiguration.TGATv.ImgPath != null)
{
tv.Text = mvm.GameConfiguration.TGATv.ImgPath;
}
}
string rom = mvm.getInternalWIIGCNName(mvm.RomPath, true);
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³´`éⓇ©™]");
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)
else
{
ic.Text = mvm.GameConfiguration.TGAIco.ImgPath;
}
if (mvm.GameConfiguration.TGATv.ImgPath != "" || mvm.GameConfiguration.TGATv.ImgPath != null)
{
tv.Text = mvm.GameConfiguration.TGATv.ImgPath;
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();
}
}
}
@ -155,7 +189,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
}
private void Set_IconTex(object sender, RoutedEventArgs e)
{
if (!Settings.Default.dont)
@ -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;
}
@ -268,7 +304,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
mvm.gc2rom = path;
}
}
}
public void reset()
{
gc2.Text = "";
@ -295,7 +331,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new LOGSHOW(log.Text).ShowDialog();
new LOGSHOW(log.Text).ShowDialog();
}
private void ic_TextChanged(object sender, TextChangedEventArgs e)
@ -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

@ -32,7 +32,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";
}
public TurboGrafX(GameConfig c)
{
@ -54,16 +54,17 @@ 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)
{
mvm.CanInject = true;
}
}
}
}
private void InjectGame(object sender, RoutedEventArgs e)
@ -110,7 +111,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
mvm.ImageWarning();
}
string path = mvm.GetFilePath(false, false);
if (!CheckIfNull(path))
{
@ -119,7 +120,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
tv.Text = path;
tvIMG.Visibility = Visibility.Visible;
}
}
@ -137,10 +138,10 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
drc.Text = path;
drcIMG.Visibility = Visibility.Visible;
}
}
private void Set_IconTex(object sender, RoutedEventArgs e)
{
if (!Settings.Default.dont)
@ -148,14 +149,15 @@ 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;
icoIMG.Visibility = Visibility.Visible;
}
}
private void Set_LogoTex(object sender, RoutedEventArgs e)
@ -165,13 +167,14 @@ 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;
logIMG.Visibility = Visibility.Visible;
}
}
public void getInfoFromConfig()
{
@ -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;
}
@ -223,7 +226,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
Injection.Content = "Select File";
}
else
else
{
cd = true;
mvm.mw.tbTitleBar.Text = "UWUVCI AIO - TurboGrafX-CD VC INJECT";
@ -249,7 +252,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
public void reset()
{
tv.Text = "";
drc.Text = "";
gn.Text = "";
@ -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,26 +71,65 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
string path = mvm.GetFilePath(true, false);
if (!CheckIfNull(path))
{
mvm.RomPath = path;
mvm.RomSet = true;
if (mvm.BaseDownloaded)
{
mvm.CanInject = true;
}
string rom = mvm.getInternalWIIGCNName(mvm.RomPath, false);
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³´`éⓇ©™]");
gn.Text = reg.Replace(rom, string.Empty);
mvm.GameConfiguration.GameName = reg.Replace(rom, string.Empty);
if (mvm.GameConfiguration.TGAIco.ImgPath != "" || mvm.GameConfiguration.TGAIco.ImgPath != null)
{
int TitleIDInt = 0;
bool isok = false;
using (var reader = new BinaryReader(File.OpenRead(path)))
{
ic.Text = mvm.GameConfiguration.TGAIco.ImgPath;
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 (mvm.GameConfiguration.TGATv.ImgPath != "" || mvm.GameConfiguration.TGATv.ImgPath != null)
if (isok)
{
tv.Text = mvm.GameConfiguration.TGATv.ImgPath;
mvm.RomPath = path;
mvm.RomSet = true;
if (mvm.BaseDownloaded)
{
mvm.CanInject = true;
}
string rom = mvm.getInternalWIIGCNName(mvm.RomPath, false);
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³´`éⓇ©™]");
gn.Text = reg.Replace(rom, string.Empty);
mvm.GameConfiguration.GameName = reg.Replace(rom, string.Empty);
if (mvm.GameConfiguration.TGAIco.ImgPath != "" || mvm.GameConfiguration.TGAIco.ImgPath != null)
{
ic.Text = mvm.GameConfiguration.TGAIco.ImgPath;
}
if (mvm.GameConfiguration.TGATv.ImgPath != "" || mvm.GameConfiguration.TGATv.ImgPath != null)
{
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;
}
@ -157,7 +196,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
tv.Text = path;
tvIMG.Visibility = Visibility.Visible;
}
}
@ -175,7 +214,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
drc.Text = path;
drcIMG.Visibility = Visibility.Visible;
}
}
@ -193,7 +232,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
ic.Text = path;
icoIMG.Visibility = Visibility.Visible;
}
}
private void Set_LogoTex(object sender, RoutedEventArgs e)
@ -210,7 +249,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
log.Text = path;
logIMG.Visibility = Visibility.Visible;
}
}
public void getInfoFromConfig()
{
@ -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;
}
@ -309,12 +348,12 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
gn.Text = "";
ic.Text = "";
log.Text = "";
}
private void icoIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new ICOSHOW(ic.Text).ShowDialog();
new ICOSHOW(ic.Text).ShowDialog();
}
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
@ -326,7 +365,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
TDRSHOW t = new TDRSHOW(drc.Text);
t.ShowDialog();
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
@ -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>