more stuff

This commit is contained in:
NicoAICP 2020-04-21 04:05:19 +02:00
parent cb4c31d47e
commit 43807cbb86
31 changed files with 1271 additions and 44 deletions

View file

@ -7,6 +7,10 @@ namespace UWUVCI_AIO_WPF
[Serializable]
public class GameConfig
{
public GameConfig Clone()
{
return this.MemberwiseClone() as GameConfig;
}
public GameConsoles Console { get; set; }
public GameBases BaseRom { get; set; }

View file

@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
@ -43,6 +44,77 @@ namespace UWUVCI_AIO_WPF
* iniPath = Only used for N64. Path to the INI configuration. If "blank", a blank ini will be used.
* darkRemoval = Only used for N64. Indicates whether the dark filter should be removed.
*/
static List<int> fiind(this byte[] buffer, byte[] pattern, int startIndex)
{
List<int> positions = new List<int>();
int i = Array.IndexOf<byte>(buffer, pattern[0], startIndex);
while (i >= 0 && i <= buffer.Length - pattern.Length)
{
byte[] segment = new byte[pattern.Length];
Buffer.BlockCopy(buffer, i, segment, 0, pattern.Length);
if (segment.SequenceEqual<byte>(pattern))
positions.Add(i);
i = Array.IndexOf<byte>(buffer, pattern[0], i + 1);
}
return positions;
}
static void PokePatch(string rom)
{
byte[] search = { 0xD0, 0x88, 0x8D, 0x83, 0x42 };
byte[] test;
test = new byte[new FileInfo(rom).Length];
using (var fs = new FileStream(rom,
FileMode.Open,
FileAccess.ReadWrite))
{
try
{
fs.Read(test, 0, test.Length - 1);
var l = fiind(test, search, 0);
byte[] check = new byte[4];
fs.Seek(l[0] + 5, SeekOrigin.Begin);
fs.Read(check, 0, 4);
fs.Seek(0, SeekOrigin.Begin);
if (check[3] != 0x24)
{
fs.Seek(l[0] + 5, SeekOrigin.Begin);
fs.Write(new byte[] { 0x00, 0x00, 0x00, 0x00 }, 0, 4);
}
else
{
fs.Seek(l[0] + 5, SeekOrigin.Begin);
fs.Write(new byte[] { 0x00, 0x00, 0x00 }, 0, 3);
}
check = new byte[4];
fs.Seek(l[1] + 5, SeekOrigin.Begin);
fs.Read(check, 0, 4);
fs.Seek(0, SeekOrigin.Begin);
if (check[3] != 0x24)
{
fs.Seek(l[1] + 5, SeekOrigin.Begin);
fs.Write(new byte[] { 0x00, 0x00, 0x00, 0x00 }, 0, 4);
}
else
{
fs.Seek(l[1] + 5, SeekOrigin.Begin);
fs.Write(new byte[] { 0x00, 0x00, 0x00 }, 0, 3);
}
}
catch (Exception e)
{
}
fs.Close();
}
}
private static string FormatBytes(long bytes)
{
string[] Suffix = { "B", "KB", "MB", "GB", "TB" };
@ -1195,7 +1267,16 @@ namespace UWUVCI_AIO_WPF
delete = true;
mvvm.Progress = 40;
}
if (mvvm.PokePatch)
{
mvvm.msg = "Applying PokePatch";
File.Copy(injectRomPath, Path.Combine(tempPath, "rom.gba"));
injectRomPath = Path.Combine(tempPath, "rom.gba");
PokePatch(injectRomPath);
delete = true;
mvvm.PokePatch = false;
mvvm.Progress = 40;
}
using (Process psb = new Process())
{
@ -1212,7 +1293,7 @@ namespace UWUVCI_AIO_WPF
if (delete)
{
File.Delete(injectRomPath);
File.Delete(Path.Combine(toolsPath, "goombamenu.gba"));
if(File.Exists(Path.Combine(toolsPath, "goombamenu.gba")))File.Delete(Path.Combine(toolsPath, "goombamenu.gba"));
}
}
private static void DownloadSysTitle(MainViewModel mvm)

View file

@ -282,6 +282,7 @@ namespace UWUVCI_AIO_WPF
}
}
public System.Windows.Controls.ListViewItem curr = null;
private bool ckeys;
@ -296,7 +297,7 @@ namespace UWUVCI_AIO_WPF
public MainWindow mw;
private CustomBaseFrame cb = null;
DispatcherTimer timer = new DispatcherTimer();
public bool PokePatch = false;
public void Update(bool button)
{
if (CheckForInternetConnection())
@ -487,6 +488,7 @@ namespace UWUVCI_AIO_WPF
return ret;
}
public GameConfig saveconf = null;
public void resetCBASE()
{
if (cb != null) cb.Reset();
@ -509,6 +511,17 @@ namespace UWUVCI_AIO_WPF
}
public void ExportFile()
{
string drcp = null;
string tvcp = null;
string iccp = null;
string lgcp = null;
string incp = null;
if(GameConfiguration.TGADrc.ImgPath != null || GameConfiguration.TGADrc.ImgPath == "") drcp = String.Copy(GameConfiguration.TGADrc.ImgPath);
if (GameConfiguration.TGATv.ImgPath != null || GameConfiguration.TGATv.ImgPath == "") tvcp = String.Copy(GameConfiguration.TGATv.ImgPath);
if (GameConfiguration.TGAIco.ImgPath != null || GameConfiguration.TGAIco.ImgPath == "") iccp = String.Copy(GameConfiguration.TGAIco.ImgPath);
if (GameConfiguration.TGALog.ImgPath != null || GameConfiguration.TGALog.ImgPath == "") lgcp = String.Copy(GameConfiguration.TGALog.ImgPath);
if (GameConfiguration.N64Stuff.INIPath != null || GameConfiguration.N64Stuff.INIPath == "") incp = String.Copy(GameConfiguration.N64Stuff.INIPath);
ReadImagesIntoConfig();
if (GameConfiguration.Console == GameConsoles.N64)
{
@ -543,9 +556,20 @@ namespace UWUVCI_AIO_WPF
}
catch (Exception) { }
cm.ShowDialog();
GameConfiguration = new GameConfig();
gameConfiguration.Console = backup.Console;
if (GameConfiguration.Console == GameConsoles.N64)
GameConfiguration.TGADrc.ImgPath = drcp;
GameConfiguration.TGATv.ImgPath = tvcp;
GameConfiguration.TGAIco.ImgPath = iccp;
GameConfiguration.TGALog.ImgPath = lgcp;
GameConfiguration.TGADrc.ImgBin = null;
GameConfiguration.TGATv.ImgBin = null;
GameConfiguration.TGAIco.ImgBin = null;
GameConfiguration.TGALog.ImgBin = null;
if (incp != null)
{
GameConfiguration.N64Stuff.INIBin = null;
GameConfiguration.N64Stuff.INIPath = incp;
}
/*if (GameConfiguration.Console == GameConsoles.N64)
{
(thing as N64Config).reset();
}
@ -571,7 +595,7 @@ namespace UWUVCI_AIO_WPF
{
(thing as GCConfig).reset();
}
}
}*/
}
public void ImportConfig(string configPath)
{
@ -596,6 +620,9 @@ namespace UWUVCI_AIO_WPF
}else if (test == GameConsoles.GCN)
{
(thing as GCConfig).getInfoFromConfig();
}else if(gameConfiguration.Console == GameConsoles.GBA)
{
(thing as GBA).getInfoFromConfig();
}
else
{

View file

@ -15,7 +15,7 @@
<Frame Name="fBaseFrame" Width="403" Margin="20,64,706,130"/>
</Grid>
<Button Content="WUP Installable" HorizontalAlignment="Left" Margin="51,533,0,0" VerticalAlignment="Top" Width="137" IsEnabled="{Binding Injected}" Click="Button_Click_3"/>
<Button Content="Loadiine" HorizontalAlignment="Left" Margin="270,533,0,0" VerticalAlignment="Top" Width="99" IsEnabled="{Binding Injected}" Click="Button_Click_2"/>
<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"/>

View file

@ -34,6 +34,10 @@ namespace UWUVCI_AIO_WPF.UI.Frames
{
fLoadConfig.Content = new InjectFrames.Configurations.TurboGrafX();
}
else if (console == GameConsoles.GBA)
{
fLoadConfig.Content = new InjectFrames.Configurations.GBA();
}
else if (console == GameConsoles.WII)
{
fLoadConfig.Content = new InjectFrames.Configurations.WiiConfig();
@ -49,6 +53,38 @@ namespace UWUVCI_AIO_WPF.UI.Frames
fBaseFrame.Content = new InjectFrames.Bases.BaseContainerFrame(console);
}
public INJECTFRAME(GameConsoles console, GameConfig c)
{
mvm = FindResource("mvm") as MainViewModel;
InitializeComponent();
this.console = console;
if (console == GameConsoles.N64)
{
fLoadConfig.Content = new InjectFrames.Configurations.N64Config(c);
}
else if (console == GameConsoles.TG16)
{
fLoadConfig.Content = new InjectFrames.Configurations.TurboGrafX(c);
}
else if (console == GameConsoles.GBA)
{
fLoadConfig.Content = new InjectFrames.Configurations.GBA(c);
}
else if (console == GameConsoles.WII)
{
fLoadConfig.Content = new InjectFrames.Configurations.WiiConfig(c);
}
else if (console == GameConsoles.GCN)
{
fLoadConfig.Content = new InjectFrames.Configurations.GCConfig(c);
}
else
{
fLoadConfig.Content = new InjectFrames.Configurations.OtherConfigs(c);
}
fBaseFrame.Content = new InjectFrames.Bases.BaseContainerFrame(console);
}
public void Dispose()
{

View file

@ -10,12 +10,12 @@
Title="NonCustomBaseFrame">
<Grid>
<TextBlock x:Name="tbDWNL" HorizontalAlignment="Center" Margin="10,32,10,0" TextWrapping="Wrap" Text="Base not downloaded" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
<TextBlock x:Name="tbTK" HorizontalAlignment="Center" Margin="10,67,10,0" TextWrapping="Wrap" Text="TitleKey missing" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
<TextBlock x:Name="tbCK" HorizontalAlignment="Center" Margin="10,102,10,0" TextWrapping="Wrap" Text="CommonKey missing" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
<Button x:Name="btnDwnlnd" Content="Download" HorizontalAlignment="Left" Margin="272,158,0,0" VerticalAlignment="Top" Width="111" IsEnabled="False" Click="btnDwnlnd_Click"/>
<Button x:Name="TK" Content="Enter TKey" HorizontalAlignment="Left" Margin="151,158,0,0" VerticalAlignment="Top" Width="102" Click="btnDwnlnd_Copy_Click" Visibility="Hidden"/>
<Button x:Name="CK" Content="Enter CKey" HorizontalAlignment="Left" Margin="44,158,0,0" VerticalAlignment="Top" Width="102" Click="btnDwnlnd_Copy1_Click" Visibility="Hidden" />
<TextBlock x:Name="tbDWNL" HorizontalAlignment="Center" Margin="10,58,10,0" TextWrapping="Wrap" Text="Base not downloaded" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
<TextBlock x:Name="tbTK" HorizontalAlignment="Center" Margin="10,93,10,0" TextWrapping="Wrap" Text="TitleKey missing" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
<TextBlock x:Name="tbCK" HorizontalAlignment="Center" Margin="10,128,10,0" TextWrapping="Wrap" Text="CommonKey missing" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
<Button x:Name="btnDwnlnd" Content="Download" HorizontalAlignment="Left" Margin="272,184,0,0" VerticalAlignment="Top" Width="111" IsEnabled="False" Click="btnDwnlnd_Click"/>
<Button x:Name="TK" Content="Enter TKey" HorizontalAlignment="Left" Margin="151,184,0,0" VerticalAlignment="Top" Width="102" Click="btnDwnlnd_Copy_Click" Visibility="Hidden" />
<Button x:Name="CK" Content="Enter CKey" HorizontalAlignment="Left" Margin="44,184,0,0" VerticalAlignment="Top" Width="102" Click="btnDwnlnd_Copy1_Click" Visibility="Hidden" />
</Grid>
</Page>

View file

@ -10,7 +10,7 @@
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}"/>
<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"/>
@ -31,5 +31,10 @@
<RadioButton x:Name="rbRDF" Width="111" Content="Remove" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="df" Click="rbRDF_Click"/>
</StackPanel>
<Image HorizontalAlignment="Left" Height="30" Margin="454,194,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="454,240,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="453,285,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="453,330,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
</Grid>
</Page>

View file

@ -16,6 +16,7 @@ using System.Windows.Navigation;
using System.Windows.Shapes;
using UWUVCI_AIO_WPF.Classes;
using UWUVCI_AIO_WPF.Properties;
using UWUVCI_AIO_WPF.UI.Windows;
namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
@ -34,7 +35,15 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
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)
{
mvm = (MainViewModel)FindResource("mvm");
mvm.GameConfiguration = c.Clone(); getInfoFromConfig();
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";
}
private void Set_Rom_Path(object sender, RoutedEventArgs e)
@ -100,10 +109,30 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
public void getInfoFromConfig()
{
rp.Text = "";
mvm.RomPath = "";
mvm.RomSet = false;
mvm.gc2rom = "";
tv.Text = mvm.GameConfiguration.TGATv.ImgPath;
if (tv.Text.Length > 0)
{
tvIMG.Visibility = Visibility.Visible;
}
ic.Text = mvm.GameConfiguration.TGAIco.ImgPath;
if (ic.Text.Length > 0)
{
icoIMG.Visibility = Visibility.Visible;
}
drc.Text = mvm.GameConfiguration.TGADrc.ImgPath;
if (drc.Text.Length > 0)
{
drcIMG.Visibility = Visibility.Visible;
}
log.Text = mvm.GameConfiguration.TGALog.ImgPath;
if (log.Text.Length > 0)
{
logIMG.Visibility = Visibility.Visible;
}
gn.Text = mvm.GameConfiguration.GameName;
ini.Text = mvm.GameConfiguration.N64Stuff.INIPath;
@ -120,6 +149,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGATv.ImgPath = path;
mvm.GameConfiguration.TGATv.extension = new FileInfo(path).Extension;
tv.Text = path;
tvIMG.Visibility = Visibility.Visible;
}
}
@ -136,6 +166,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGADrc.ImgPath = path;
mvm.GameConfiguration.TGADrc.extension = new FileInfo(path).Extension;
drc.Text = path;
drcIMG.Visibility = Visibility.Visible;
}
}
@ -152,6 +183,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGAIco.ImgPath = path;
mvm.GameConfiguration.TGAIco.extension = new FileInfo(path).Extension;
ic.Text = path;
icoIMG.Visibility = Visibility.Visible;
}
}
@ -167,6 +199,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGALog.ImgPath = path;
mvm.GameConfiguration.TGALog.extension = new FileInfo(path).Extension;
log.Text = path;
logIMG.Visibility = Visibility.Visible;
}
}
@ -215,5 +248,24 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
ic.Text = "";
log.Text = "";
}
private void icoIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new ICOSHOW(ic.Text).ShowDialog());
}
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new TDRSHOW(tv.Text).ShowDialog());
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new TDRSHOW(drc.Text).ShowDialog());
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new LOGSHOW(log.Text).ShowDialog());
}
}
}

View file

@ -0,0 +1,37 @@
<Page x:Class="UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations.GBA"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
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"
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"/>
<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="This may not work with every Game">
<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"/>
<RadioButton x:Name="rbRDF" Width="111" Content="No" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="df" Click="rbRDF_Click" IsChecked="True"/>
</StackPanel>
<Image HorizontalAlignment="Left" Height="30" Margin="454,194,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="454,240,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="453,285,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="453,330,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
</Grid>
</Page>

View file

@ -0,0 +1,260 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using UWUVCI_AIO_WPF.Properties;
using UWUVCI_AIO_WPF.UI.Windows;
namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
/// <summary>
/// Interaktionslogik für OtherConfigs.xaml
/// </summary>
public partial class GBA : Page, IDisposable
{
MainViewModel mvm;
bool cd = false;
public GBA()
{
InitializeComponent();
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;
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";
}
public void Dispose()
{
}
private void Set_Rom_Path(object sender, RoutedEventArgs e)
{
string path = string.Empty;
if (!cd) path = mvm.GetFilePath(true, false);
else path = mvm.turbocd();
if (!CheckIfNull(path)) {
mvm.RomPath = path;
mvm.RomSet = true;
if (mvm.BaseDownloaded)
{
mvm.CanInject = true;
}
}
}
private void InjectGame(object sender, RoutedEventArgs e)
{
if (File.Exists(tv.Text))
{
mvm.GameConfiguration.TGATv.ImgPath = tv.Text;
}
else if (!tv.Text.Equals("Added via Config") && !tv.Text.Equals("Downloaded from Cucholix Repo"))
{
mvm.GameConfiguration.TGATv.ImgPath = null;
}
if (File.Exists(ic.Text))
{
mvm.GameConfiguration.TGAIco.ImgPath = ic.Text;
}
else if (!ic.Text.Equals("Added via Config") && !ic.Text.Equals("Downloaded from Cucholix Repo"))
{
mvm.GameConfiguration.TGAIco.ImgPath = null;
}
if (File.Exists(log.Text))
{
mvm.GameConfiguration.TGALog.ImgPath = log.Text;
}
else if (!log.Text.Equals("Added via Config") && !log.Text.Equals("Downloaded from Cucholix Repo"))
{
mvm.GameConfiguration.TGALog.ImgPath = null;
}
if (File.Exists(drc.Text))
{
mvm.GameConfiguration.TGADrc.ImgPath = drc.Text;
}
else if (!drc.Text.Equals("Added via Config") && !drc.Text.Equals("Downloaded from Cucholix Repo"))
{
mvm.GameConfiguration.TGADrc.ImgPath = null;
}
mvm.Inject(false);
mvm.PokePatch = false;
rbRDF.IsChecked = true;
}
private void Set_TvTex(object sender, RoutedEventArgs e)
{
if (!Settings.Default.dont)
{
mvm.ImageWarning();
}
string path = mvm.GetFilePath(false, false);
if (!CheckIfNull(path))
{
mvm.GameConfiguration.TGATv.ImgPath = path;
mvm.GameConfiguration.TGATv.extension = new FileInfo(path).Extension;
tv.Text = path;
tvIMG.Visibility = Visibility.Visible;
}
}
private void Set_DrcTex(object sender, RoutedEventArgs e)
{
if (!Settings.Default.dont)
{
mvm.ImageWarning();
}
string path = mvm.GetFilePath(false, false);
if (!CheckIfNull(path))
{
mvm.GameConfiguration.TGADrc.ImgPath = path;
mvm.GameConfiguration.TGADrc.extension = new FileInfo(path).Extension;
drc.Text = path;
drcIMG.Visibility = Visibility.Visible;
}
}
private void Set_IconTex(object sender, RoutedEventArgs e)
{
if (!Settings.Default.dont)
{
mvm.ImageWarning();
}
string path = mvm.GetFilePath(false, false);
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)
{
if (!Settings.Default.dont)
{
mvm.ImageWarning();
}
string path = mvm.GetFilePath(false, false);
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()
{
rp.Text = "";
mvm.RomPath = "";
mvm.RomSet = false;
mvm.gc2rom = "";
tv.Text = mvm.GameConfiguration.TGATv.ImgPath;
if (tv.Text.Length > 0)
{
tvIMG.Visibility = Visibility.Visible;
}
ic.Text = mvm.GameConfiguration.TGAIco.ImgPath;
if (ic.Text.Length > 0)
{
icoIMG.Visibility = Visibility.Visible;
}
drc.Text = mvm.GameConfiguration.TGADrc.ImgPath;
if (drc.Text.Length > 0)
{
drcIMG.Visibility = Visibility.Visible;
}
log.Text = mvm.GameConfiguration.TGALog.ImgPath;
if (log.Text.Length > 0)
{
logIMG.Visibility = Visibility.Visible;
}
gn.Text = mvm.GameConfiguration.GameName;
}
private bool CheckIfNull(string s)
{
if(s == null || s.Equals(string.Empty))
{
return true;
}
return false;
}
private void gn_KeyUp(object sender, KeyEventArgs e)
{
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³´`éⓇ©™]");
gn.Text = reg.Replace(gn.Text, string.Empty);
gn.CaretIndex = gn.Text.Length;
gn.ScrollToHorizontalOffset(double.MaxValue);
}
public void reset()
{
tv.Text = "";
drc.Text = "";
gn.Text = "";
ic.Text = "";
log.Text = "";
}
private void RadioButton_Click(object sender, RoutedEventArgs e)
{
mvm.PokePatch = true;
}
private void rbRDF_Click(object sender, RoutedEventArgs e)
{
mvm.PokePatch = false;
}
private void icoIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new ICOSHOW(ic.Text).ShowDialog());
}
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new TDRSHOW(tv.Text).ShowDialog());
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new TDRSHOW(drc.Text).ShowDialog());
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new LOGSHOW(log.Text).ShowDialog());
}
}
}

View file

@ -10,7 +10,7 @@
Title="OtherConfigs">
<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}"/>
<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"/>
@ -31,6 +31,10 @@
<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>
<Image HorizontalAlignment="Left" Height="30" Margin="454,194,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="454,240,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="453,285,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="453,330,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
</Grid>
</Page>

View file

@ -16,6 +16,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using UWUVCI_AIO_WPF.Properties;
using UWUVCI_AIO_WPF.UI.Windows;
namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
@ -34,6 +35,15 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
Injection.ToolTip = "Changing the extension of a ROM may result in a faulty inject.\nWe will not give any support in such cases";
mvm.test = GameConsoles.GCN;
}
public GCConfig(GameConfig c)
{
InitializeComponent();
mvm = FindResource("mvm") as MainViewModel;
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";
mvm.test = GameConsoles.GCN;
}
public void Dispose()
{
@ -124,6 +134,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGATv.ImgPath = path;
mvm.GameConfiguration.TGATv.extension = new FileInfo(path).Extension;
tv.Text = path;
tvIMG.Visibility = Visibility.Visible;
}
}
@ -140,6 +151,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGADrc.ImgPath = path;
mvm.GameConfiguration.TGADrc.extension = new FileInfo(path).Extension;
drc.Text = path;
drcIMG.Visibility = Visibility.Visible;
}
}
@ -155,7 +167,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
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)
@ -169,14 +182,36 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGALog.ImgPath = path;
mvm.GameConfiguration.TGALog.extension = new FileInfo(path).Extension;
log.Text = path;
}
logIMG.Visibility = Visibility.Visible;
}
}
public void getInfoFromConfig()
{
rp.Text = "";
mvm.RomPath = "";
mvm.RomSet = false;
mvm.gc2rom = "";
gc2.Text = "";
tv.Text = mvm.GameConfiguration.TGATv.ImgPath;
if (tv.Text.Length > 0)
{
tvIMG.Visibility = Visibility.Visible;
}
ic.Text = mvm.GameConfiguration.TGAIco.ImgPath;
if (ic.Text.Length > 0)
{
icoIMG.Visibility = Visibility.Visible;
}
drc.Text = mvm.GameConfiguration.TGADrc.ImgPath;
if (drc.Text.Length > 0)
{
drcIMG.Visibility = Visibility.Visible;
}
log.Text = mvm.GameConfiguration.TGALog.ImgPath;
if (log.Text.Length > 0)
{
logIMG.Visibility = Visibility.Visible;
}
gn.Text = mvm.GameConfiguration.GameName;
}
@ -234,5 +269,24 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
ic.Text = "";
log.Text = "";
}
private void icoIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new ICOSHOW(ic.Text).ShowDialog());
}
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new TDRSHOW(tv.Text).ShowDialog());
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new TDRSHOW(drc.Text).ShowDialog());
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new LOGSHOW(log.Text).ShowDialog());
}
}
}

View file

@ -10,7 +10,7 @@
Title="OtherConfigs">
<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}"/>
<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"/>
@ -27,5 +27,9 @@
<Label Content="ROM Type:" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="14" Width="102"/>
<CheckBox Content="TurboGrafxCD" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" Width="98" Click="CheckBox_Click" ToolTip="If checked alows you to inject TurboGrafx-CD ROMs"/>
</StackPanel>
<Image HorizontalAlignment="Left" Height="30" Margin="454,194,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="454,240,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="453,285,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="453,330,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
</Grid>
</Page>

View file

@ -15,6 +15,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using UWUVCI_AIO_WPF.Properties;
using UWUVCI_AIO_WPF.UI.Windows;
namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
@ -32,6 +33,15 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
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)
{
InitializeComponent();
mvm = FindResource("mvm") as MainViewModel;
mvm.setThing(this);
mvm.GameConfiguration = c.Clone(); getInfoFromConfig();
Injection.ToolTip = "Changing the extension of a ROM may result in a faulty inject.\nWe will not give any support in such cases";
}
public void Dispose()
{
@ -107,7 +117,9 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGATv.ImgPath = path;
mvm.GameConfiguration.TGATv.extension = new FileInfo(path).Extension;
tv.Text = path;
tvIMG.Visibility = Visibility.Visible;
}
}
@ -123,7 +135,9 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGADrc.ImgPath = path;
mvm.GameConfiguration.TGADrc.extension = new FileInfo(path).Extension;
drc.Text = path;
drcIMG.Visibility = Visibility.Visible;
}
}
@ -138,7 +152,10 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
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)
@ -152,14 +169,36 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGALog.ImgPath = path;
mvm.GameConfiguration.TGALog.extension = new FileInfo(path).Extension;
log.Text = path;
}
logIMG.Visibility = Visibility.Visible;
}
}
public void getInfoFromConfig()
{
rp.Text = "";
mvm.RomPath = "";
mvm.RomSet = false;
mvm.gc2rom = "";
tv.Text = mvm.GameConfiguration.TGATv.ImgPath;
if (tv.Text.Length > 0)
{
tvIMG.Visibility = Visibility.Visible;
}
ic.Text = mvm.GameConfiguration.TGAIco.ImgPath;
if(ic.Text.Length > 0)
{
icoIMG.Visibility = Visibility.Visible;
}
drc.Text = mvm.GameConfiguration.TGADrc.ImgPath;
if (drc.Text.Length > 0)
{
drcIMG.Visibility = Visibility.Visible;
}
log.Text = mvm.GameConfiguration.TGALog.ImgPath;
if (log.Text.Length > 0)
{
logIMG.Visibility = Visibility.Visible;
}
gn.Text = mvm.GameConfiguration.GameName;
}
@ -208,5 +247,30 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
ic.Text = "";
log.Text = "";
}
private void icoIMG_MouseDown(object sender, MouseButtonEventArgs e)
{
}
private void icoIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new ICOSHOW(ic.Text).ShowDialog());
}
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new TDRSHOW(tv.Text).ShowDialog());
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new TDRSHOW(drc.Text).ShowDialog());
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new LOGSHOW(log.Text).ShowDialog());
}
}
}

View file

@ -11,7 +11,7 @@
<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}"/>
<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"/>
@ -23,6 +23,9 @@
<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"/>
<Image HorizontalAlignment="Left" Height="30" Margin="454,194,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="454,240,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="453,285,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="453,330,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
</Grid>
</Page>

View file

@ -15,6 +15,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using UWUVCI_AIO_WPF.Properties;
using UWUVCI_AIO_WPF.UI.Windows;
namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
@ -31,6 +32,14 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
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 OtherConfigs(GameConfig c)
{
InitializeComponent();
mvm = FindResource("mvm") as MainViewModel;
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";
}
public void Dispose()
{
@ -101,7 +110,10 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGATv.ImgPath = path;
mvm.GameConfiguration.TGATv.extension = new FileInfo(path).Extension;
tv.Text = path;
tvIMG.Visibility = Visibility.Visible;
}
}
@ -117,7 +129,9 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGADrc.ImgPath = path;
mvm.GameConfiguration.TGADrc.extension = new FileInfo(path).Extension;
drc.Text = path;
drcIMG.Visibility = Visibility.Visible;
}
}
@ -132,7 +146,9 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
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)
@ -146,14 +162,36 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGALog.ImgPath = path;
mvm.GameConfiguration.TGALog.extension = new FileInfo(path).Extension;
log.Text = path;
}
logIMG.Visibility = Visibility.Visible;
}
}
public void getInfoFromConfig()
{
rp.Text = "";
mvm.RomPath = "";
mvm.RomSet = false;
mvm.gc2rom = "";
tv.Text = mvm.GameConfiguration.TGATv.ImgPath;
if (tv.Text.Length > 0)
{
tvIMG.Visibility = Visibility.Visible;
}
ic.Text = mvm.GameConfiguration.TGAIco.ImgPath;
if (ic.Text.Length > 0)
{
icoIMG.Visibility = Visibility.Visible;
}
drc.Text = mvm.GameConfiguration.TGADrc.ImgPath;
if (drc.Text.Length > 0)
{
drcIMG.Visibility = Visibility.Visible;
}
log.Text = mvm.GameConfiguration.TGALog.ImgPath;
if (log.Text.Length > 0)
{
logIMG.Visibility = Visibility.Visible;
}
gn.Text = mvm.GameConfiguration.GameName;
}
@ -187,5 +225,24 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
ic.Text = "";
log.Text = "";
}
private void icoIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new ICOSHOW(ic.Text).ShowDialog());
}
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new TDRSHOW(tv.Text).ShowDialog());
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new TDRSHOW(drc.Text).ShowDialog());
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Task.Run(() => new LOGSHOW(log.Text).ShowDialog());
}
}
}

View file

@ -9,7 +9,7 @@
Title="N64Config" Height="483">
<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}"/>
<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"/>
<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"/>
<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"/>
@ -30,5 +30,9 @@
<RadioButton Content="NTSC TO PAL" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="VMC" Click="RadioButton_Click" Width="111"/>
<RadioButton Content="PAL TO NTSC" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="VMC" Click="RadioButton_Click_1"/>
</StackPanel>
<Image HorizontalAlignment="Left" Height="30" Margin="454,194,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="454,240,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="tvIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="tvIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="453,285,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="drcIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="drcIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<Image HorizontalAlignment="Left" Height="30" Margin="453,330,0,0" VerticalAlignment="Top" Width="34" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/image.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
</Grid>
</Page>

View file

@ -15,6 +15,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using UWUVCI_AIO_WPF.Properties;
using UWUVCI_AIO_WPF.UI.Windows;
namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
@ -41,6 +42,25 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
gamepad.SelectedIndex = 0;
mvm.test = GameBaseClassLibrary.GameConsoles.WII;
}
public WiiConfig(GameConfig c)
{
InitializeComponent();
mvm = FindResource("mvm") as MainViewModel;
getInfoFromConfig();
mvm.GameConfiguration = c.Clone();
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";
List<string> gpEmu = new List<string>();
gpEmu.Add("None");
gpEmu.Add("Classic Controller");
gpEmu.Add("Horizontal WiiMote");
gpEmu.Add("Vertical WiiMote");
gpEmu.Add("Force Classic Controller");
gpEmu.Add("Force No Classic Controller");
gamepad.ItemsSource = gpEmu;
gamepad.SelectedIndex = 0;
mvm.test = GameBaseClassLibrary.GameConsoles.WII;
}
public void Dispose()
{
@ -134,7 +154,9 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGATv.ImgPath = path;
mvm.GameConfiguration.TGATv.extension = new FileInfo(path).Extension;
tv.Text = path;
tvIMG.Visibility = Visibility.Visible;
}
}
@ -150,7 +172,9 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGADrc.ImgPath = path;
mvm.GameConfiguration.TGADrc.extension = new FileInfo(path).Extension;
drc.Text = path;
drcIMG.Visibility = Visibility.Visible;
}
}
@ -166,7 +190,9 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
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)
@ -181,14 +207,36 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
mvm.GameConfiguration.TGALog.ImgPath = path;
mvm.GameConfiguration.TGALog.extension = new FileInfo(path).Extension;
log.Text = path;
logIMG.Visibility = Visibility.Visible;
}
}
public void getInfoFromConfig()
{
rp.Text = "";
mvm.RomPath = "";
mvm.RomSet = false;
mvm.gc2rom = "";
tv.Text = mvm.GameConfiguration.TGATv.ImgPath;
if (tv.Text.Length > 0)
{
tvIMG.Visibility = Visibility.Visible;
}
ic.Text = mvm.GameConfiguration.TGAIco.ImgPath;
if (ic.Text.Length > 0)
{
icoIMG.Visibility = Visibility.Visible;
}
drc.Text = mvm.GameConfiguration.TGADrc.ImgPath;
if (drc.Text.Length > 0)
{
drcIMG.Visibility = Visibility.Visible;
}
log.Text = mvm.GameConfiguration.TGALog.ImgPath;
if (log.Text.Length > 0)
{
logIMG.Visibility = Visibility.Visible;
}
gn.Text = mvm.GameConfiguration.GameName;
}
@ -254,5 +302,26 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
private void icoIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new ICOSHOW(ic.Text).ShowDialog();
}
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(tv.Text).ShowDialog();
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
TDRSHOW t = new TDRSHOW(drc.Text);
t.ShowDialog();
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new LOGSHOW(log.Text).ShowDialog();
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -49,6 +49,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
public Custom_Message(string title, string message, string Path)
{
InitializeComponent();
dont.Visibility = Visibility.Hidden;
Title.Text = title;
Message.Content = message;
this.path = Path;

View file

@ -0,0 +1,20 @@
<Window x:Class="UWUVCI_AIO_WPF.UI.Windows.LOGSHOW"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:UWUVCI_AIO_WPF"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="MAIN" Height="98.501" Width="187.44" MinHeight="98.501" MinWidth="187.44" MaxHeight="98.501" MaxWidth="187.44" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" Name="wind" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False" SizeToContent="WidthAndHeight">
<Grid Margin="0,0,-4,0">
<Grid.RowDefinitions>
</Grid.RowDefinitions>
<Button Content="Close" HorizontalAlignment="Left" Margin="102,57,0,0" VerticalAlignment="Top" Width="74" Click="Canc_Click" RenderTransformOrigin="0.5,0.5"/>
<Image HorizontalAlignment="Left" Height="42" Width="170" Margin="6,10,0,0" VerticalAlignment="Top" Name="img"/>
</Grid>
</Window>

View file

@ -0,0 +1,90 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations;
namespace UWUVCI_AIO_WPF.UI.Windows
{
/// <summary>
/// Interaktionslogik für IMG_Message.xaml
/// </summary>
public partial class LOGSHOW : Window, IDisposable
{
private static readonly string tempPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "temp");
private static readonly string toolsPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "Tools");
string copy = "";
string pat = "";
BitmapImage bitmap = new BitmapImage();
public LOGSHOW(string path)
{
pat = path;
InitializeComponent();
if (Directory.Exists(System.IO.Path.Combine(tempPath, "image"))) Directory.Delete(System.IO.Path.Combine(tempPath, "image"), true);
Directory.CreateDirectory(System.IO.Path.Combine(tempPath, "image"));
if (new FileInfo(path).Extension.Contains("tga"))
{
using (Process conv = new Process())
{
conv.StartInfo.UseShellExecute = false;
conv.StartInfo.CreateNoWindow = true;
conv.StartInfo.FileName = System.IO.Path.Combine(toolsPath, "tga2png.exe");
conv.StartInfo.Arguments = $"-i \"{path}\" -o \"{System.IO.Path.Combine(tempPath, "image")}\"";
conv.Start();
conv.WaitForExit();
foreach (string sFile in Directory.GetFiles(System.IO.Path.Combine(tempPath, "image"), "*.png"))
{
copy = sFile;
}
}
}
else
{
copy = path;
}
BitmapImage image = new BitmapImage();
image.BeginInit();
image.CacheOption = BitmapCacheOption.OnLoad;
image.UriSource = new Uri(copy);
image.EndInit();
img.Source = image;
}
public void Dispose()
{
}
private void Canc_Click(object sender, RoutedEventArgs e)
{
bitmap.UriSource = null;
this.Close();
}
}
}

View file

@ -0,0 +1,20 @@
<Window x:Class="UWUVCI_AIO_WPF.UI.Windows.ICOSHOW"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:UWUVCI_AIO_WPF"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="MAIN" Height="186" Width="145" MinHeight="186" MinWidth="145" MaxHeight="186" MaxWidth="145" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" Name="wind" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False" SizeToContent="WidthAndHeight">
<Grid Margin="0,0,-4,0">
<Grid.RowDefinitions>
</Grid.RowDefinitions>
<Button Content="Close" HorizontalAlignment="Left" Margin="61,143,0,0" VerticalAlignment="Top" Width="74" Click="Canc_Click" RenderTransformOrigin="0.5,0.5"/>
<Image HorizontalAlignment="Left" Height="128" Width="128" Margin="6,10,0,0" VerticalAlignment="Top" Name="img"/>
</Grid>
</Window>

View file

@ -0,0 +1,93 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations;
namespace UWUVCI_AIO_WPF.UI.Windows
{
/// <summary>
/// Interaktionslogik für IMG_Message.xaml
/// </summary>
public partial class ICOSHOW : Window, IDisposable
{
private static readonly string tempPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "temp");
private static readonly string toolsPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "Tools");
string copy = "";
string pat = "";
BitmapImage bitmap = new BitmapImage();
public ICOSHOW(string path)
{
pat = path;
InitializeComponent();
if (Directory.Exists(System.IO.Path.Combine(tempPath, "image"))) Directory.Delete(System.IO.Path.Combine(tempPath, "image"), true);
Directory.CreateDirectory(System.IO.Path.Combine(tempPath, "image"));
if (new FileInfo(path).Extension.Contains("tga"))
{
using (Process conv = new Process())
{
conv.StartInfo.UseShellExecute = false;
conv.StartInfo.CreateNoWindow = true;
conv.StartInfo.FileName = System.IO.Path.Combine(toolsPath, "tga2png.exe");
conv.StartInfo.Arguments = $"-i \"{path}\" -o \"{System.IO.Path.Combine(tempPath, "image")}\"";
conv.Start();
conv.WaitForExit();
foreach (string sFile in Directory.GetFiles(System.IO.Path.Combine(tempPath, "image"), "*.png"))
{
copy = sFile;
}
}
}
else
{
copy = path;
}
BitmapImage image = new BitmapImage();
image.BeginInit();
image.CacheOption = BitmapCacheOption.OnLoad;
image.UriSource = new Uri(copy);
image.EndInit();
img.Source = image;
}
public void Dispose()
{
}
private void Canc_Click(object sender, RoutedEventArgs e)
{
bitmap.UriSource = null;
this.Close();
}
}
}

View file

@ -0,0 +1,20 @@
<Window x:Class="UWUVCI_AIO_WPF.UI.Windows.TDRSHOW"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:UWUVCI_AIO_WPF"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="MAIN" Height="250" Width="340" MinHeight="250" MinWidth="340" MaxHeight="250" MaxWidth="340" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" Name="wind" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False" SizeToContent="WidthAndHeight">
<Grid Margin="0,0,-4,0">
<Grid.RowDefinitions>
</Grid.RowDefinitions>
<Button Content="Close" HorizontalAlignment="Left" Margin="256,204,0,0" VerticalAlignment="Top" Width="74" Click="Canc_Click" RenderTransformOrigin="0.5,0.5"/>
<Image HorizontalAlignment="Left" Height="180" Width="320" Margin="8,10,0,0" VerticalAlignment="Top" Name="img"/>
</Grid>
</Window>

View file

@ -0,0 +1,93 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations;
namespace UWUVCI_AIO_WPF.UI.Windows
{
/// <summary>
/// Interaktionslogik für IMG_Message.xaml
/// </summary>
public partial class TDRSHOW : Window, IDisposable
{
private static readonly string tempPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "temp");
private static readonly string toolsPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "Tools");
string copy = "";
string pat = "";
BitmapImage bitmap = new BitmapImage();
public TDRSHOW(string path)
{
pat = path;
InitializeComponent();
if (Directory.Exists(System.IO.Path.Combine(tempPath, "image"))) Directory.Delete(System.IO.Path.Combine(tempPath, "image"),true);
Directory.CreateDirectory(System.IO.Path.Combine(tempPath, "image"));
if (new FileInfo(path).Extension.Contains("tga"))
{
using (Process conv = new Process())
{
conv.StartInfo.UseShellExecute = false;
conv.StartInfo.CreateNoWindow = true;
conv.StartInfo.FileName = System.IO.Path.Combine(toolsPath, "tga2png.exe");
conv.StartInfo.Arguments = $"-i \"{path}\" -o \"{System.IO.Path.Combine(tempPath, "image")}\"";
conv.Start();
conv.WaitForExit();
foreach (string sFile in Directory.GetFiles(System.IO.Path.Combine(tempPath, "image"), "*.png"))
{
copy = sFile;
}
}
}
else
{
copy = path;
}
BitmapImage image = new BitmapImage();
image.BeginInit();
image.CacheOption = BitmapCacheOption.OnLoad;
image.UriSource = new Uri(copy);
image.EndInit();
img.Source = image;
}
public void Dispose()
{
}
private void Canc_Click(object sender, RoutedEventArgs e)
{
bitmap.UriSource = null;
this.Close();
}
}
}

View file

@ -71,22 +71,22 @@ namespace UWUVCI_AIO_WPF.UI.Windows
mvm.GameConfiguration.TGAIco.extension = ".png";
if (mvm.test == GameBaseClassLibrary.GameConsoles.GCN)
{
(mvm.Thing as GCConfig).ic.Text = "Downloaded from Cucholix Repo";
(mvm.Thing as GCConfig).icoIMG.Visibility = Visibility.Visible;
}
else if(mvm.GameConfiguration.Console == GameBaseClassLibrary.GameConsoles.WII)
{
(mvm.Thing as WiiConfig).ic.Text = "Downloaded from Cucholix Repo";
(mvm.Thing as WiiConfig).icoIMG.Visibility = Visibility.Visible;
}
client.DownloadFile(tvs, System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "bootTvTex.png"));
mvm.GameConfiguration.TGATv.ImgPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "bootTvTex.png");
mvm.GameConfiguration.TGATv.extension = ".png";
if (mvm.test == GameBaseClassLibrary.GameConsoles.GCN)
{
(mvm.Thing as GCConfig).tv.Text = "Downloaded from Cucholix Repo";
(mvm.Thing as GCConfig).tvIMG.Visibility = Visibility.Visible;
}
else if (mvm.GameConfiguration.Console == GameBaseClassLibrary.GameConsoles.WII)
{
(mvm.Thing as WiiConfig).tv.Text = "Downloaded from Cucholix Repo";
(mvm.Thing as WiiConfig).tvIMG.Visibility = Visibility.Visible;
}
this.Close();
}

View file

@ -69,7 +69,8 @@
<materialDesign:PackIcon Foreground="White" Kind="HamburgerMenu" Height="25" Width="25"/>
</Button>
</Grid>
<ListView Foreground="White" ScrollViewer.HorizontalScrollBarVisibility="Disabled" PreviewMouseLeftButtonUp="ListView_Click">
<ListView Foreground="White" ScrollViewer.HorizontalScrollBarVisibility="Disabled" PreviewMouseLeftButtonUp="ListView_Click" >
<!--NDS-->
<ListViewItem Height="60" x:Name="NDS" IsEnabled="{Binding PathsSet}" Cursor="Hand">
<StackPanel Orientation="Horizontal">
@ -129,7 +130,7 @@
</StackPanel>
</ListViewItem>
<!--GC-->
<ListViewItem Height="60" x:Name="GC" IsEnabled="{Binding PathsSet}" Cursor="Hand">
<ListViewItem Height="60" x:Name="GC" IsEnabled="{Binding PathsSet}" Cursor="Hand" >
<StackPanel Orientation="Horizontal">
<Image Source="/UI/Images/NGC.png"></Image>
<TextBlock Text="GC VC Inject" VerticalAlignment="Center" Margin="20 10"/>

View file

@ -61,7 +61,18 @@ namespace UWUVCI_AIO_WPF
}
private void ListView_Click(object sender, MouseButtonEventArgs e)
{
MainViewModel mvm = FindResource("mvm") as MainViewModel;
if(mvm.GameConfiguration != new GameConfig() && mvm.GameConfiguration != null && mvm.saveconf == null)
{
mvm.saveconf = mvm.GameConfiguration.Clone();
}
if(mvm.curr != null)
{
mvm.curr.Background = null;
}
mvm.curr = (sender as ListView).SelectedItem as ListViewItem;
mvm.curr.Background = new SolidColorBrush(Color.FromArgb(25, 255, 255, 255));
mvm.GameConfiguration = new GameConfig();
mvm.LGameBasesString.Clear();
mvm.CanInject = false;
@ -70,55 +81,140 @@ namespace UWUVCI_AIO_WPF
mvm.RomPath = null;
mvm.Injected = false;
mvm.CBasePath = null;
mvm.GC = false;
mvm.setThing(null);
switch ((sender as ListView).SelectedIndex)
{
case 0:
DestroyFrame();
mvm.GC = false;
tbTitleBar.Text = "UWUVCI AIO - NDS VC INJECT";
load_frame.Content = new INJECTFRAME(GameConsoles.NDS);
if(mvm.saveconf != null && mvm.saveconf.Console == GameConsoles.NDS)
{
load_frame.Content = new INJECTFRAME(GameConsoles.NDS, mvm.saveconf);
}
else
{
load_frame.Content = new INJECTFRAME(GameConsoles.NDS);
mvm.saveconf = null;
}
break;
case 1:
DestroyFrame();
mvm.GC = false;
tbTitleBar.Text = "UWUVCI AIO - GBA VC INJECT";
load_frame.Content = new INJECTFRAME(GameConsoles.GBA);
if (mvm.saveconf != null && mvm.saveconf.Console == GameConsoles.GBA)
{
load_frame.Content = new INJECTFRAME(GameConsoles.GBA, mvm.saveconf);
}
else
{
load_frame.Content = new INJECTFRAME(GameConsoles.GBA);
mvm.saveconf = null;
}
break;
case 2:
DestroyFrame();
mvm.GC = false;
tbTitleBar.Text = "UWUVCI AIO - N64 VC INJECT";
load_frame.Content = new INJECTFRAME(GameConsoles.N64);
mvm.GameConfiguration.N64Stuff = new Classes.N64Conf();
if (mvm.saveconf != null && mvm.saveconf.Console == GameConsoles.N64)
{
load_frame.Content = new INJECTFRAME(GameConsoles.N64, mvm.saveconf);
}
else
{
mvm.GameConfiguration.N64Stuff = new Classes.N64Conf();
load_frame.Content = new INJECTFRAME(GameConsoles.N64);
mvm.saveconf = null;
}
break;
case 4:
DestroyFrame();
mvm.GC = false;
tbTitleBar.Text = "UWUVCI AIO - NES VC INJECT";
load_frame.Content = new INJECTFRAME(GameConsoles.NES);
if (mvm.saveconf != null && mvm.saveconf.Console == GameConsoles.NES)
{
load_frame.Content = new INJECTFRAME(GameConsoles.NES, mvm.saveconf);
}
else
{
load_frame.Content = new INJECTFRAME(GameConsoles.NES);
mvm.saveconf = null;
}
break;
case 3:
DestroyFrame();
mvm.GC = false;
tbTitleBar.Text = "UWUVCI AIO - SNES VC INJECT";
load_frame.Content = new INJECTFRAME(GameConsoles.SNES);
if (mvm.saveconf != null && mvm.saveconf.Console == GameConsoles.SNES)
{
load_frame.Content = new INJECTFRAME(GameConsoles.SNES, mvm.saveconf);
}
else
{
load_frame.Content = new INJECTFRAME(GameConsoles.SNES);
mvm.saveconf = null;
}
break;
case 5:
DestroyFrame();
mvm.GC = false;
tbTitleBar.Text = "UWUVCI AIO - TurboGrafX-16 VC INJECT";
load_frame.Content = new INJECTFRAME(GameConsoles.TG16);
if (mvm.saveconf != null && mvm.saveconf.Console == GameConsoles.TG16 )
{
load_frame.Content = new INJECTFRAME(GameConsoles.TG16, mvm.saveconf);
}
else
{
load_frame.Content = new INJECTFRAME(GameConsoles.TG16);
mvm.saveconf = null;
}
break;
case 6:
DestroyFrame();
mvm.GC = false;
tbTitleBar.Text = "UWUVCI AIO - MSX VC INJECT";
load_frame.Content = new INJECTFRAME(GameConsoles.MSX);
if (mvm.saveconf != null && mvm.saveconf.Console == GameConsoles.MSX)
{
load_frame.Content = new INJECTFRAME(GameConsoles.MSX, mvm.saveconf);
}
else
{
load_frame.Content = new INJECTFRAME(GameConsoles.MSX);
mvm.saveconf = null;
}
break;
case 7:
DestroyFrame();
mvm.GC = false;
tbTitleBar.Text = "UWUVCI AIO - Wii VC INJECT";
load_frame.Content = new INJECTFRAME(GameConsoles.WII);
if (mvm.saveconf != null && mvm.saveconf.Console == GameConsoles.WII)
{
load_frame.Content = new INJECTFRAME(GameConsoles.WII, mvm.saveconf);
}
else
{
load_frame.Content = new INJECTFRAME(GameConsoles.WII);
mvm.saveconf = null;
}
break;
case 8:
DestroyFrame();
tbTitleBar.Text = "UWUVCI AIO - GC VC INJECT";
load_frame.Content = new INJECTFRAME(GameConsoles.GCN);
if (mvm.saveconf != null && (mvm.saveconf.Console == GameConsoles.WII || mvm.saveconf.Console == GameConsoles.GCN) && mvm.GC == true)
{
load_frame.Content = new INJECTFRAME(GameConsoles.GCN, mvm.saveconf);
}
else
{
load_frame.Content = new INJECTFRAME(GameConsoles.GCN);
mvm.saveconf = null;
}
break;
case 9:
DestroyFrame();
@ -126,6 +222,7 @@ namespace UWUVCI_AIO_WPF
load_frame.Content = new SettingsFrame(this);
break;
}
}
public void paths(bool remove)

View file

@ -128,7 +128,7 @@
<!--WIIGCN-->
<ListViewItem Height="60" x:Name="WIIGCN" Cursor="Hand">
<StackPanel Orientation="Horizontal">
<Image Source="/UI/Images/WIIGC.png"></Image>
<materialDesign:PackIcon Foreground="White" Kind="Images" Height="45" Width="45"/>
<TextBlock Text="WII/GCN Title Keys" VerticalAlignment="Center" Margin="20 10"/>
</StackPanel>
</ListViewItem>

View file

@ -110,6 +110,9 @@
<Compile Include="UI\Done.xaml.cs">
<DependentUpon>Done.xaml</DependentUpon>
</Compile>
<Compile Include="UI\Frames\InjectFrames\Configurations\OtherConfigs - Kopieren - Kopieren %282%29.xaml.cs">
<DependentUpon>OtherConfigs - Kopieren - Kopieren %282%29.xaml</DependentUpon>
</Compile>
<Compile Include="UI\Frames\InjectFrames\Configurations\OtherConfigs - Kopieren - Kopieren.xaml.cs">
<DependentUpon>OtherConfigs - Kopieren - Kopieren.xaml</DependentUpon>
</Compile>
@ -137,6 +140,15 @@
<Compile Include="UI\Windows\EnterKey.xaml.cs">
<DependentUpon>EnterKey.xaml</DependentUpon>
</Compile>
<Compile Include="UI\Windows\IMG_Message - Kopieren - Kopieren - Kopieren.xaml.cs">
<DependentUpon>IMG_Message - Kopieren - Kopieren - Kopieren.xaml</DependentUpon>
</Compile>
<Compile Include="UI\Windows\IMG_Message - Kopieren - Kopieren.xaml.cs">
<DependentUpon>IMG_Message - Kopieren - Kopieren.xaml</DependentUpon>
</Compile>
<Compile Include="UI\Windows\IMG_Message - Kopieren.xaml.cs">
<DependentUpon>IMG_Message - Kopieren.xaml</DependentUpon>
</Compile>
<Compile Include="UI\Windows\IMG_Message.xaml.cs">
<DependentUpon>IMG_Message.xaml</DependentUpon>
</Compile>
@ -170,6 +182,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UI\Frames\InjectFrames\Configurations\OtherConfigs - Kopieren - Kopieren %282%29.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UI\Frames\InjectFrames\Configurations\OtherConfigs - Kopieren - Kopieren.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@ -218,6 +234,18 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UI\Windows\IMG_Message - Kopieren - Kopieren - Kopieren.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UI\Windows\IMG_Message - Kopieren - Kopieren.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UI\Windows\IMG_Message - Kopieren.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UI\Windows\IMG_Message.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@ -410,6 +438,9 @@
<Resource Include="UI\Images\iconborder.png" />
<Resource Include="UI\Images\tvborder.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="UI\Images\image.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets" Condition="Exists('..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">