mirror of
https://github.com/stuff-by-3-random-dudes/UWUVCI-AIO-WPF
synced 2024-11-26 04:50:19 +00:00
backup
This commit is contained in:
parent
db2a39deff
commit
52aa5d487c
24 changed files with 1027 additions and 354 deletions
|
@ -15,6 +15,13 @@ namespace UWUVCI_AIO_WPF
|
|||
{
|
||||
private void Application_Startup(object sender, StartupEventArgs e)
|
||||
{
|
||||
double height = System.Windows.SystemParameters.PrimaryScreenHeight;
|
||||
double witdh = System.Windows.SystemParameters.PrimaryScreenWidth;
|
||||
if (witdh < 1150 || height < 700)
|
||||
{
|
||||
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);
|
||||
}
|
||||
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
|
||||
|
|
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -42,10 +43,27 @@ 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.
|
||||
*/
|
||||
private static string FormatBytes(long bytes)
|
||||
{
|
||||
string[] Suffix = { "B", "KB", "MB", "GB", "TB" };
|
||||
int i;
|
||||
double dblSByte = bytes;
|
||||
for (i = 0; i < Suffix.Length && bytes >= 1024; i++, bytes /= 1024)
|
||||
{
|
||||
dblSByte = bytes / 1024.0;
|
||||
}
|
||||
|
||||
return String.Format("{0:0.##} {1}", dblSByte, Suffix[i]);
|
||||
}
|
||||
[STAThread]
|
||||
public static bool Inject(GameConfig Configuration, string RomPath, MainViewModel mvm, bool force)
|
||||
{
|
||||
Clean();
|
||||
long gamesize = new FileInfo(RomPath).Length;
|
||||
var drive = new DriveInfo(tempPath);
|
||||
long neededspace = 0;
|
||||
long freeSpaceInBytes = drive.AvailableFreeSpace;
|
||||
|
||||
mvvm = mvm;
|
||||
|
||||
|
||||
|
@ -59,7 +77,22 @@ namespace UWUVCI_AIO_WPF
|
|||
mvm.msg = "Copying Base...";
|
||||
try
|
||||
{
|
||||
if (Configuration.Console == GameConsoles.WII || Configuration.Console == GameConsoles.GCN)
|
||||
{
|
||||
|
||||
if (mvm.GC)
|
||||
{
|
||||
neededspace = 10000000000;
|
||||
}
|
||||
else
|
||||
{
|
||||
neededspace = gamesize * 2 + 7000000000;
|
||||
}
|
||||
if (freeSpaceInBytes < neededspace)
|
||||
{
|
||||
throw new Exception("12G");
|
||||
}
|
||||
}
|
||||
if (Configuration.BaseRom.Name != "Custom")
|
||||
{
|
||||
//Normal Base functionality here
|
||||
|
@ -93,26 +126,32 @@ namespace UWUVCI_AIO_WPF
|
|||
}catch(Exception e)
|
||||
{
|
||||
mvm.Progress = 100;
|
||||
|
||||
code = null;
|
||||
if (e.Message.Contains("Images")){
|
||||
mvm.OpenDialog("Injection Failed","Injection Failed due to wrong BitDepth, please check if your Files are in a different bitdepth than 32bit or 24bit");
|
||||
|
||||
MessageBox.Show("Injection Failed due to wrong BitDepth, please check if your Files are in a different bitdepth than 32bit or 24bit", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
else if (e.Message.Contains("Size"))
|
||||
{
|
||||
mvm.OpenDialog("Injection Failed","Injection Failed due to Image Issues.Please check if your Images are made using following Information:\n\niconTex: \nDimensions: 128x128\nBitDepth: 32\n\nbootDrcTex: \nDimensions: 854x480\nBitDepth: 24\n\nbootTvTex: \nDimensions: 1280x720\nBitDepth: 24\n\nbootLogoTex: \nDimensions: 170x42\nBitDepth: 32");
|
||||
MessageBox.Show("Injection Failed due to Image Issues.Please check if your Images are made using following Information:\n\niconTex: \nDimensions: 128x128\nBitDepth: 32\n\nbootDrcTex: \nDimensions: 854x480\nBitDepth: 24\n\nbootTvTex: \nDimensions: 1280x720\nBitDepth: 24\n\nbootLogoTex: \nDimensions: 170x42\nBitDepth: 32", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
|
||||
}
|
||||
else if (e.Message.Contains("retro"))
|
||||
{
|
||||
mvm.OpenDialog("Injection Failed","The ROM you want to Inject is to big for selected Base!\nPlease try again with different Base");
|
||||
MessageBox.Show("The ROM you want to Inject is to big for selected Base!\nPlease try again with different Base", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
else if (e.Message.Contains("WII"))
|
||||
{
|
||||
mvm.OpenDialog("Injection Failed", $"{e.Message.Replace("WII", "")}\nPlease make sure that your ROM isn't flawed and that you have atleast 12 GB of free Storage left.");
|
||||
MessageBox.Show( $"{e.Message.Replace("WII", "")}\nPlease make sure that your ROM isn't flawed and that you have atleast 12 GB of free Storage left.", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
else if (e.Message.Contains("12G"))
|
||||
{
|
||||
MessageBox.Show($"\nPlease make sure to have atleast {FormatBytes(neededspace + 3000000000)} of storage left on the drive where you stored the Injector.", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.OpenDialog("Injection Failed", "Injection Failed due to unknown circumstances, please contact us on the UWUVCI discord");
|
||||
MessageBox.Show("Injection Failed due to unknown circumstances, please contact us on the UWUVCI discord", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
|
||||
}
|
||||
Clean();
|
||||
|
@ -132,7 +171,7 @@ namespace UWUVCI_AIO_WPF
|
|||
{
|
||||
if(mvvm.Progress < 50)
|
||||
{
|
||||
mvvm.Progress += 5;
|
||||
mvvm.Progress += 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -165,15 +204,283 @@ namespace UWUVCI_AIO_WPF
|
|||
MSX(RomPath);
|
||||
break;
|
||||
case GameConsoles.WII:
|
||||
WII(RomPath, mvm, false);
|
||||
WII(RomPath, mvm);
|
||||
break;
|
||||
case GameConsoles.GCN:
|
||||
WII(RomPath, mvm, force);
|
||||
GC(RomPath, mvm, force);
|
||||
break;
|
||||
}
|
||||
}
|
||||
private static void WII(string romPath, MainViewModel mvm)
|
||||
{
|
||||
string savedir = Directory.GetCurrentDirectory();
|
||||
if (new FileInfo(romPath).Extension.Contains("wbfs"))
|
||||
{
|
||||
mvm.msg = "Converting WBFS to ISO...";
|
||||
using (Process toiso = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
|
||||
toiso.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
toiso.StartInfo.FileName = Path.Combine(toolsPath, "wbfs_file.exe");
|
||||
toiso.StartInfo.Arguments = $"\"{romPath}\" convert \"{Path.Combine(tempPath, "pre.iso")}\" -t";
|
||||
toiso.Start();
|
||||
toiso.WaitForExit();
|
||||
mvm.Progress = 15;
|
||||
}
|
||||
}
|
||||
else if (new FileInfo(romPath).Extension.Contains("iso"))
|
||||
{
|
||||
mvm.msg = "Copying ROM...";
|
||||
File.Copy(romPath, Path.Combine(tempPath, "pre.iso"));
|
||||
mvm.Progress = 15;
|
||||
}
|
||||
using (Process trimm = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
|
||||
trimm.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
mvm.msg = "Trimming ROM...";
|
||||
trimm.StartInfo.FileName = Path.Combine(toolsPath, "wit.exe");
|
||||
trimm.StartInfo.Arguments = $"extract \"{Path.Combine(tempPath, "pre.iso")}\" --DEST \"{Path.Combine(tempPath, "TEMP")}\" --psel data -vv1";
|
||||
trimm.Start();
|
||||
trimm.WaitForExit();
|
||||
mvm.Progress = 30;
|
||||
}
|
||||
if (mvm.Index == 4)
|
||||
{
|
||||
mvvm.msg = "Patching ROM (Force CC)...";
|
||||
Console.WriteLine("Patching the ROM to force Classic Controller input");
|
||||
using(Process tik = new Process())
|
||||
{
|
||||
tik.StartInfo.FileName = Path.Combine(toolsPath, "GetExtTypePatcher.exe");
|
||||
tik.StartInfo.Arguments = $"\"{Path.Combine(tempPath, "TEMP", "sys", "main.dol")}\" -nc";
|
||||
tik.StartInfo.UseShellExecute = false;
|
||||
tik.StartInfo.CreateNoWindow = true;
|
||||
tik.StartInfo.RedirectStandardOutput = true;
|
||||
tik.StartInfo.RedirectStandardInput = true;
|
||||
tik.Start();
|
||||
Thread.Sleep(2000);
|
||||
tik.StandardInput.WriteLine();
|
||||
tik.WaitForExit();
|
||||
mvm.Progress = 35;
|
||||
}
|
||||
|
||||
}
|
||||
if (mvm.Patch)
|
||||
{
|
||||
mvm.msg = "Video Patching ROM...";
|
||||
using (Process vmc = new Process())
|
||||
{
|
||||
|
||||
File.Copy(Path.Combine(toolsPath, "wii-vmc.exe"), Path.Combine(tempPath, "TEMP", "sys", "wii-vmc.exe"));
|
||||
|
||||
private static void WII(string romPath, MainViewModel mvm, bool force)
|
||||
Directory.SetCurrentDirectory(Path.Combine(tempPath, "TEMP", "sys"));
|
||||
vmc.StartInfo.FileName = "wii-vmc.exe";
|
||||
vmc.StartInfo.Arguments = "main.dol";
|
||||
vmc.StartInfo.UseShellExecute = false;
|
||||
vmc.StartInfo.CreateNoWindow = true;
|
||||
vmc.StartInfo.RedirectStandardOutput = true;
|
||||
vmc.StartInfo.RedirectStandardInput = true;
|
||||
|
||||
vmc.Start();
|
||||
Thread.Sleep(1000);
|
||||
vmc.StandardInput.WriteLine("a");
|
||||
Thread.Sleep(2000);
|
||||
if (mvm.toPal) vmc.StandardInput.WriteLine("1");
|
||||
else vmc.StandardInput.WriteLine("2");
|
||||
Thread.Sleep(2000);
|
||||
vmc.StandardInput.WriteLine();
|
||||
vmc.WaitForExit();
|
||||
File.Delete("wii-vmc.exe");
|
||||
|
||||
|
||||
Directory.SetCurrentDirectory(savedir);
|
||||
mvm.Progress = 40;
|
||||
}
|
||||
|
||||
}
|
||||
mvm.msg = "Creating ISO from trimmed ROM...";
|
||||
using (Process repack = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
|
||||
repack.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
repack.StartInfo.FileName = Path.Combine(toolsPath, "wit.exe");
|
||||
repack.StartInfo.Arguments = $"copy \"{Path.Combine(tempPath, "TEMP")}\" --DEST \"{Path.Combine(tempPath, "game.iso")}\" -ovv --links --iso";
|
||||
repack.Start();
|
||||
repack.WaitForExit();
|
||||
Directory.Delete(Path.Combine(tempPath, "TEMP"), true);
|
||||
File.Delete(Path.Combine(tempPath, "pre.iso"));
|
||||
}
|
||||
mvm.Progress = 50;
|
||||
mvm.msg = "Replacing TIK and TMD...";
|
||||
using (Process extract = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
|
||||
extract.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
extract.StartInfo.FileName = Path.Combine(toolsPath, "wit.exe");
|
||||
extract.StartInfo.Arguments = $"extract \"{Path.Combine(tempPath, "game.iso")}\" --psel data --files +tmd.bin --files +ticket.bin --DEST \"{Path.Combine(tempPath, "TIKTMD")}\" -vv1";
|
||||
extract.Start();
|
||||
extract.WaitForExit();
|
||||
foreach (string sFile in Directory.GetFiles(Path.Combine(baseRomPath, "code"), "rvlt.*"))
|
||||
{
|
||||
File.Delete(sFile);
|
||||
}
|
||||
File.Copy(Path.Combine(tempPath, "TIKTMD", "tmd.bin"), Path.Combine(baseRomPath, "code", "rvlt.tmd"));
|
||||
File.Copy(Path.Combine(tempPath, "TIKTMD", "ticket.bin"), Path.Combine(baseRomPath, "code", "rvlt.tik"));
|
||||
Directory.Delete(Path.Combine(tempPath, "TIKTMD"), true);
|
||||
}
|
||||
mvm.Progress = 60;
|
||||
mvm.msg = "Injecting ROM...";
|
||||
foreach (string sFile in Directory.GetFiles(Path.Combine(baseRomPath, "content"), "*.nfs"))
|
||||
{
|
||||
File.Delete(sFile);
|
||||
}
|
||||
File.Move(Path.Combine(tempPath, "game.iso"), Path.Combine(baseRomPath, "content", "game.iso"));
|
||||
File.Copy(Path.Combine(toolsPath, "nfs2iso2nfs.exe"), Path.Combine(baseRomPath, "content", "nfs2iso2nfs.exe"));
|
||||
Directory.SetCurrentDirectory(Path.Combine(baseRomPath, "content"));
|
||||
using (Process iso2nfs = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
|
||||
iso2nfs.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
iso2nfs.StartInfo.FileName = "nfs2iso2nfs.exe";
|
||||
string extra = "";
|
||||
if (mvm.Index == 2)
|
||||
{
|
||||
extra = "-horizontal ";
|
||||
}
|
||||
if (mvm.Index == 3) { extra = "-wiimote "; }
|
||||
if (mvm.Index == 4) { extra = "-instantcc "; }
|
||||
if (mvm.Index == 5) { extra = "-nocc "; }
|
||||
if (mvm.LR) { extra += "-lrpatch "; }
|
||||
iso2nfs.StartInfo.Arguments = $"-enc {extra}-iso game.iso";
|
||||
iso2nfs.Start();
|
||||
iso2nfs.WaitForExit();
|
||||
File.Delete("nfs2iso2nfs.exe");
|
||||
File.Delete("game.iso");
|
||||
}
|
||||
Directory.SetCurrentDirectory(savedir);
|
||||
mvm.Progress = 80;
|
||||
}
|
||||
private static void GC(string romPath, MainViewModel mvm, bool force)
|
||||
{
|
||||
string savedir = Directory.GetCurrentDirectory();
|
||||
mvvm.msg = "Extracting Nintendont Base...";
|
||||
if (Directory.Exists(Path.Combine(tempPath, "TempBase"))) Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
|
||||
Directory.CreateDirectory(Path.Combine(tempPath, "TempBase"));
|
||||
using (Process zip = new Process()){
|
||||
if (!mvm.debug)
|
||||
{
|
||||
|
||||
zip.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
zip.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe");
|
||||
zip.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "BASE.zip")}\" -o\"{Path.Combine(tempPath)}\"";
|
||||
zip.Start();
|
||||
zip.WaitForExit();
|
||||
}
|
||||
|
||||
DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true);
|
||||
mvvm.Progress = 20;
|
||||
mvvm.msg = "Applying Nintendont";
|
||||
if (force)
|
||||
{
|
||||
mvvm.msg += " force 4:3...";
|
||||
File.Copy(Path.Combine(toolsPath, "nintendont_force.dol"), Path.Combine(tempPath, "TempBase", "sys", "main.dol"));
|
||||
}
|
||||
else
|
||||
{
|
||||
mvvm.msg += "...";
|
||||
File.Copy(Path.Combine(toolsPath, "nintendont.dol"), Path.Combine(tempPath, "TempBase", "sys", "main.dol"));
|
||||
}
|
||||
mvm.Progress = 40;
|
||||
mvvm.msg = "Injecting GameCube Game into NintendontBase...";
|
||||
File.Copy(romPath, Path.Combine(tempPath, "TempBase", "files", "game.iso"));
|
||||
if (mvm.gc2rom != "" && File.Exists(mvm.gc2rom)) File.Copy(mvm.gc2rom, Path.Combine(tempPath, "TempBase", "files", "disc2.iso"));
|
||||
using(Process wit = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
|
||||
wit.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
wit.StartInfo.FileName = Path.Combine(toolsPath, "wit.exe");
|
||||
wit.StartInfo.Arguments = $"copy \"{Path.Combine(tempPath, "TempBase")}\" --DEST \"{Path.Combine(tempPath, "game.iso")}\" -ovv --links --iso";
|
||||
wit.Start();
|
||||
wit.WaitForExit();
|
||||
}
|
||||
|
||||
Thread.Sleep(6000);
|
||||
if (!File.Exists(Path.Combine(tempPath, "game.iso")))
|
||||
{
|
||||
Console.Clear();
|
||||
|
||||
throw new Exception("WIIAn error occured while Creating the ISO");
|
||||
}
|
||||
Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
|
||||
romPath = Path.Combine(tempPath, "game.iso");
|
||||
mvvm.Progress = 50;
|
||||
|
||||
mvm.msg = "Replacing TIK and TMD...";
|
||||
using (Process extract = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
extract.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
extract.StartInfo.FileName = Path.Combine(toolsPath, "wit.exe");
|
||||
extract.StartInfo.Arguments = $"extract \"{Path.Combine(tempPath, "game.iso")}\" --psel data --files +tmd.bin --files +ticket.bin --DEST \"{Path.Combine(tempPath, "TIKTMD")}\" -vv1";
|
||||
extract.Start();
|
||||
extract.WaitForExit();
|
||||
foreach (string sFile in Directory.GetFiles(Path.Combine(baseRomPath, "code"), "rvlt.*"))
|
||||
{
|
||||
File.Delete(sFile);
|
||||
}
|
||||
File.Copy(Path.Combine(tempPath, "TIKTMD", "tmd.bin"), Path.Combine(baseRomPath, "code", "rvlt.tmd"));
|
||||
File.Copy(Path.Combine(tempPath, "TIKTMD", "ticket.bin"), Path.Combine(baseRomPath, "code", "rvlt.tik"));
|
||||
Directory.Delete(Path.Combine(tempPath, "TIKTMD"), true);
|
||||
}
|
||||
mvm.Progress = 60;
|
||||
mvm.msg = "Injecting ROM...";
|
||||
foreach (string sFile in Directory.GetFiles(Path.Combine(baseRomPath, "content"), "*.nfs"))
|
||||
{
|
||||
File.Delete(sFile);
|
||||
}
|
||||
File.Move(Path.Combine(tempPath, "game.iso"), Path.Combine(baseRomPath, "content", "game.iso"));
|
||||
File.Copy(Path.Combine(toolsPath, "nfs2iso2nfs.exe"), Path.Combine(baseRomPath, "content", "nfs2iso2nfs.exe"));
|
||||
Directory.SetCurrentDirectory(Path.Combine(baseRomPath, "content"));
|
||||
using (Process iso2nfs = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
|
||||
iso2nfs.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
iso2nfs.StartInfo.FileName = "nfs2iso2nfs.exe";
|
||||
iso2nfs.StartInfo.Arguments = $"-enc -homebrew -passthrough -iso game.iso";
|
||||
iso2nfs.Start();
|
||||
iso2nfs.WaitForExit();
|
||||
File.Delete("nfs2iso2nfs.exe");
|
||||
File.Delete("game.iso");
|
||||
}
|
||||
Directory.SetCurrentDirectory(savedir);
|
||||
mvm.Progress = 80;
|
||||
|
||||
}
|
||||
private static void WIIold(string romPath, MainViewModel mvm, bool force)
|
||||
{
|
||||
mvvm.msg = "Removing unnecessary Files...";
|
||||
|
||||
|
@ -254,12 +561,12 @@ namespace UWUVCI_AIO_WPF
|
|||
{
|
||||
process.StartInfo.FileName = Path.Combine(toolsPath,"wii-vmc.exe");
|
||||
process.StartInfo.Arguments = $"\"{Path.Combine(tempPath, "IsoExt", "sys", "main.dol")}\"";
|
||||
process.StartInfo.RedirectStandardInput = true;
|
||||
process.StartInfo.UseShellExecute = false;
|
||||
process.StartInfo.CreateNoWindow = true;
|
||||
//process.StartInfo.RedirectStandardInput = true;
|
||||
// process.StartInfo.UseShellExecute = false;
|
||||
// process.StartInfo.CreateNoWindow = true;
|
||||
|
||||
process.Start();
|
||||
Thread.Sleep(2000);
|
||||
/* Thread.Sleep(2000);
|
||||
process.StandardInput.WriteLine("a");
|
||||
Thread.Sleep(2000);
|
||||
if (mvm.toPal)
|
||||
|
@ -273,7 +580,7 @@ namespace UWUVCI_AIO_WPF
|
|||
|
||||
Thread.Sleep(2000);
|
||||
process.StandardInput.WriteLine();
|
||||
|
||||
*/
|
||||
process.WaitForExit();
|
||||
}
|
||||
mvvm.Progress = 50;
|
||||
|
@ -511,16 +818,104 @@ namespace UWUVCI_AIO_WPF
|
|||
|
||||
{
|
||||
|
||||
mvm.InjcttoolCheck();
|
||||
GameBases b = mvm.getBasefromName(mvm.SelectedBaseAsString);
|
||||
|
||||
//GetKeyOfBase
|
||||
TKeys key = mvm.getTkey(b);
|
||||
if (mvm.GameConfiguration.Console == GameConsoles.WII || mvm.GameConfiguration.Console == GameConsoles.GCN)
|
||||
{
|
||||
using (Process zip = new Process())
|
||||
mvm.InjcttoolCheck();
|
||||
GameBases b = mvm.getBasefromName(mvm.SelectedBaseAsString);
|
||||
|
||||
//GetKeyOfBase
|
||||
TKeys key = mvm.getTkey(b);
|
||||
if (mvm.GameConfiguration.Console == GameConsoles.WII || mvm.GameConfiguration.Console == GameConsoles.GCN)
|
||||
{
|
||||
|
||||
using (Process zip = new Process())
|
||||
{
|
||||
|
||||
if (Directory.Exists(tempPath)) Directory.Delete(tempPath, true);
|
||||
Directory.CreateDirectory(tempPath);
|
||||
using (Process download = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
download.StartInfo.UseShellExecute = false;
|
||||
download.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
|
||||
download.StartInfo.FileName = Path.Combine(toolsPath, "WiiUDownloader.exe");
|
||||
download.StartInfo.Arguments = $"{b.Tid} {key.Tkey} \"{Path.Combine(tempPath, "download")}\"";
|
||||
|
||||
download.Start();
|
||||
download.WaitForExit();
|
||||
}
|
||||
mvm.Progress = 75;
|
||||
|
||||
using (Process decrypt = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
decrypt.StartInfo.UseShellExecute = false;
|
||||
decrypt.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
|
||||
decrypt.StartInfo.FileName = Path.Combine(toolsPath, "Cdecrypt.exe");
|
||||
decrypt.StartInfo.Arguments = $"{Properties.Settings.Default.Ckey} \"{Path.Combine(tempPath, "download")}\" \"{Path.Combine(Properties.Settings.Default.BasePath, $"{b.Name.Replace(":", "")} [{b.Region.ToString()}]")}\"";
|
||||
|
||||
decrypt.Start();
|
||||
decrypt.WaitForExit();
|
||||
}
|
||||
mvm.Progress += 10;
|
||||
File.Delete(Path.Combine(Properties.Settings.Default.BasePath, $"{b.Name.Replace(":", "")} [{b.Region.ToString()}]", "code", "fw.img"));
|
||||
|
||||
File.Delete(Path.Combine(Properties.Settings.Default.BasePath, $"{b.Name.Replace(":", "")} [{b.Region.ToString()}]", "code", "fw.tmd"));
|
||||
|
||||
if (Directory.Exists(Path.Combine(toolsPath, "IKVM"))) { Directory.Delete(Path.Combine(toolsPath, "IKVM"), true); }
|
||||
if (!mvm.debug)
|
||||
{
|
||||
zip.StartInfo.UseShellExecute = false;
|
||||
zip.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
|
||||
zip.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe");
|
||||
zip.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "IKVM.zip")}\" -o\"{Path.Combine(toolsPath, "IKVM")}\"";
|
||||
zip.Start();
|
||||
zip.WaitForExit();
|
||||
mvm.Progress += 10;
|
||||
string[] JNUSToolConfig = { "http://ccs.cdn.wup.shop.nintendo.net/ccs/download", Properties.Settings.Default.Ckey };
|
||||
string savedir = Directory.GetCurrentDirectory();
|
||||
File.WriteAllLines(Path.Combine(toolsPath, "IKVM", "config"), JNUSToolConfig);
|
||||
Directory.SetCurrentDirectory(Path.Combine(toolsPath, "IKVM"));
|
||||
zip.StartInfo.FileName = "JNUSTool.exe";
|
||||
zip.StartInfo.Arguments = $"{b.Tid} {key.Tkey} -file /code/fw.img";
|
||||
zip.Start();
|
||||
zip.WaitForExit();
|
||||
|
||||
zip.StartInfo.Arguments = $"{b.Tid} {key.Tkey} -file /code/fw.tmd";
|
||||
zip.Start();
|
||||
zip.WaitForExit();
|
||||
|
||||
Directory.SetCurrentDirectory(savedir);
|
||||
var directories = Directory.GetDirectories(Path.Combine(toolsPath, "IKVM"));
|
||||
string name = "";
|
||||
foreach (var s in directories)
|
||||
{
|
||||
if (s.Contains(b.Name))
|
||||
{
|
||||
var split = s.Split('\\');
|
||||
name = split[split.Length - 1];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
File.Copy(Path.Combine(toolsPath, "IKVM", name, "code", "fw.img"), Path.Combine(Properties.Settings.Default.BasePath, $"{b.Name.Replace(":", "")} [{b.Region.ToString()}]", "code", "fw.img"));
|
||||
|
||||
File.Copy(Path.Combine(toolsPath, "IKVM", name, "code", "fw.tmd"), Path.Combine(Properties.Settings.Default.BasePath, $"{b.Name.Replace(":", "")} [{b.Region.ToString()}]", "code", "fw.tmd"));
|
||||
|
||||
Directory.Delete(Path.Combine(toolsPath, "IKVM"), true);
|
||||
mvm.Progress += 5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
|
||||
if (Directory.Exists(tempPath)) Directory.Delete(tempPath, true);
|
||||
Directory.CreateDirectory(tempPath);
|
||||
using (Process download = new Process())
|
||||
|
@ -530,7 +925,7 @@ namespace UWUVCI_AIO_WPF
|
|||
download.StartInfo.UseShellExecute = false;
|
||||
download.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
|
||||
|
||||
download.StartInfo.FileName = Path.Combine(toolsPath, "WiiUDownloader.exe");
|
||||
download.StartInfo.Arguments = $"{b.Tid} {key.Tkey} \"{Path.Combine(tempPath, "download")}\"";
|
||||
|
||||
|
@ -538,7 +933,6 @@ namespace UWUVCI_AIO_WPF
|
|||
download.WaitForExit();
|
||||
}
|
||||
mvm.Progress = 75;
|
||||
|
||||
using (Process decrypt = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
|
@ -546,100 +940,16 @@ namespace UWUVCI_AIO_WPF
|
|||
decrypt.StartInfo.UseShellExecute = false;
|
||||
decrypt.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
|
||||
decrypt.StartInfo.FileName = Path.Combine(toolsPath, "Cdecrypt.exe");
|
||||
decrypt.StartInfo.Arguments = $"{Properties.Settings.Default.Ckey} \"{Path.Combine(tempPath, "download")}\" \"{Path.Combine(Properties.Settings.Default.BasePath, $"{b.Name.Replace(":", "")} [{b.Region.ToString()}]")}\"";
|
||||
|
||||
decrypt.Start();
|
||||
decrypt.WaitForExit();
|
||||
}
|
||||
mvm.Progress += 10;
|
||||
File.Delete(Path.Combine(Properties.Settings.Default.BasePath, $"{b.Name.Replace(":", "")} [{b.Region.ToString()}]","code","fw.img"));
|
||||
|
||||
File.Delete(Path.Combine(Properties.Settings.Default.BasePath, $"{b.Name.Replace(":", "")} [{b.Region.ToString()}]", "code", "fw.tmd"));
|
||||
|
||||
if (Directory.Exists(Path.Combine(toolsPath, "IKVM"))) { Directory.Delete(Path.Combine(toolsPath, "IKVM"), true); }
|
||||
if (!mvm.debug)
|
||||
{
|
||||
zip.StartInfo.UseShellExecute = false;
|
||||
zip.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
|
||||
zip.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe");
|
||||
zip.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "IKVM.zip")}\" -o\"{Path.Combine(toolsPath, "IKVM")}\"";
|
||||
zip.Start();
|
||||
zip.WaitForExit();
|
||||
mvm.Progress += 10;
|
||||
string[] JNUSToolConfig = { "http://ccs.cdn.wup.shop.nintendo.net/ccs/download", Properties.Settings.Default.Ckey };
|
||||
string savedir = Directory.GetCurrentDirectory();
|
||||
File.WriteAllLines(Path.Combine(toolsPath, "IKVM", "config"), JNUSToolConfig);
|
||||
Directory.SetCurrentDirectory(Path.Combine(toolsPath, "IKVM"));
|
||||
zip.StartInfo.FileName = "JNUSTool.exe";
|
||||
zip.StartInfo.Arguments = $"{b.Tid} {key.Tkey} -file /code/fw.img";
|
||||
zip.Start();
|
||||
zip.WaitForExit();
|
||||
|
||||
zip.StartInfo.Arguments = $"{b.Tid} {key.Tkey} -file /code/fw.tmd";
|
||||
zip.Start();
|
||||
zip.WaitForExit();
|
||||
|
||||
Directory.SetCurrentDirectory(savedir);
|
||||
var directories = Directory.GetDirectories(Path.Combine(toolsPath, "IKVM"));
|
||||
string name = "";
|
||||
foreach (var s in directories)
|
||||
{
|
||||
if (s.Contains(b.Name))
|
||||
{
|
||||
var split = s.Split('\\');
|
||||
name = split[split.Length - 1];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
File.Copy(Path.Combine(toolsPath, "IKVM", name, "code", "fw.img"), Path.Combine(Properties.Settings.Default.BasePath, $"{b.Name.Replace(":", "")} [{b.Region.ToString()}]","code","fw.img"));
|
||||
|
||||
File.Copy(Path.Combine(toolsPath, "IKVM", name, "code", "fw.tmd"), Path.Combine(Properties.Settings.Default.BasePath, $"{b.Name.Replace(":", "")} [{b.Region.ToString()}]", "code", "fw.tmd"));
|
||||
|
||||
Directory.Delete(Path.Combine(toolsPath, "IKVM"), true);
|
||||
mvm.Progress += 5;
|
||||
mvm.Progress = 100;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
|
||||
if (Directory.Exists(tempPath)) Directory.Delete(tempPath, true);
|
||||
Directory.CreateDirectory(tempPath);
|
||||
using (Process download = new Process())
|
||||
{
|
||||
if (!mvm.debug){
|
||||
download.StartInfo.UseShellExecute = false;
|
||||
download.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
|
||||
download.StartInfo.FileName = Path.Combine(toolsPath, "WiiUDownloader.exe");
|
||||
download.StartInfo.Arguments = $"{b.Tid} {key.Tkey} \"{Path.Combine(tempPath, "download")}\"";
|
||||
|
||||
download.Start();
|
||||
download.WaitForExit();
|
||||
}
|
||||
mvm.Progress = 75;
|
||||
using (Process decrypt = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
decrypt.StartInfo.UseShellExecute = false;
|
||||
decrypt.StartInfo.CreateNoWindow = true;
|
||||
}
|
||||
decrypt.StartInfo.FileName = Path.Combine(toolsPath, "Cdecrypt.exe");
|
||||
decrypt.StartInfo.Arguments = $"{Properties.Settings.Default.Ckey} \"{Path.Combine(tempPath, "download")}\" \"{Path.Combine(Properties.Settings.Default.BasePath, $"{b.Name.Replace(":", "")} [{b.Region.ToString()}]")}\"";
|
||||
|
||||
decrypt.Start();
|
||||
decrypt.WaitForExit();
|
||||
}
|
||||
mvm.Progress =100;
|
||||
}
|
||||
|
||||
|
||||
//GetCurrentSelectedBase
|
||||
|
||||
}
|
||||
|
@ -1367,5 +1677,6 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -261,7 +261,17 @@ namespace UWUVCI_AIO_WPF
|
|||
public bool Patch = false;
|
||||
public bool toPal = false;
|
||||
private string Msg;
|
||||
|
||||
|
||||
private string Gc2rom = "";
|
||||
|
||||
public string gc2rom
|
||||
{
|
||||
get { return Gc2rom; }
|
||||
set { Gc2rom = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string msg
|
||||
{
|
||||
|
@ -272,35 +282,48 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
|
||||
|
||||
private bool ckeys;
|
||||
|
||||
public bool Ckeys
|
||||
{
|
||||
get { return ckeys; }
|
||||
set { ckeys = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public MainWindow mw;
|
||||
private CustomBaseFrame cb = null;
|
||||
DispatcherTimer timer = new DispatcherTimer();
|
||||
Thread injct;
|
||||
|
||||
public void Update(bool button)
|
||||
{
|
||||
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
|
||||
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
|
||||
string version = fvi.FileVersion;
|
||||
if (CheckForInternetConnection())
|
||||
{
|
||||
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
|
||||
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
|
||||
string version = fvi.FileVersion;
|
||||
|
||||
AutoUpdater.Start("https://raw.githubusercontent.com/Hotbrawl20/testing/master/update.xml");
|
||||
if (Properties.Settings.Default.UpgradeRequired)
|
||||
{
|
||||
Properties.Settings.Default.Upgrade();
|
||||
Properties.Settings.Default.UpgradeRequired = false;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
if (button && Convert.ToInt32(version.Split('.')[3]) >= GetNewVersion())
|
||||
{
|
||||
Custom_Message cm = new Custom_Message("No Updates available", "You are currently using the newest version of UWUVCI AIO");
|
||||
try
|
||||
AutoUpdater.Start("https://raw.githubusercontent.com/Hotbrawl20/testing/master/update.xml");
|
||||
if (Properties.Settings.Default.UpgradeRequired)
|
||||
{
|
||||
cm.Owner = mw;
|
||||
Properties.Settings.Default.Upgrade();
|
||||
Properties.Settings.Default.UpgradeRequired = false;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
catch (Exception) { }
|
||||
cm.ShowDialog();
|
||||
if (button && Convert.ToInt32(version.Split('.')[3]) >= GetNewVersion())
|
||||
{
|
||||
Custom_Message cm = new Custom_Message("No Updates available", "You are currently using the newest version of UWUVCI AIO");
|
||||
try
|
||||
{
|
||||
cm.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
cm.ShowDialog();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private int GetNewVersion()
|
||||
|
@ -379,7 +402,7 @@ namespace UWUVCI_AIO_WPF
|
|||
GameConfiguration = new GameConfig();
|
||||
if (!ValidatePathsStillExist() && Settings.Default.SetBaseOnce && Settings.Default.SetOutOnce)
|
||||
{
|
||||
new Custom_Message("Issue", "One of your added Paths seems to not exist anymore. Please check the paths in the Path menu!").ShowDialog();
|
||||
new Custom_Message("Issue", "One of your added Paths seems to not exist anymore.\nThe Tool is now using it's default Paths\nPlease check the paths in the Path menu!").ShowDialog();
|
||||
}
|
||||
UpdatePathSet();
|
||||
|
||||
|
@ -615,6 +638,7 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
public void Pack(bool loadiine)
|
||||
{
|
||||
ValidatePathsStillExist();
|
||||
if (loadiine)
|
||||
{
|
||||
Injection.Loadiine(GameConfiguration.GameName);
|
||||
|
@ -636,7 +660,7 @@ namespace UWUVCI_AIO_WPF
|
|||
string extra = "";
|
||||
if (GameConfiguration.Console == GameConsoles.WII) extra = "\nSome games cannot reboot into the WiiU Menu. Shut down via the GamePad.\nIf Stuck in a BlackScreen, you need to unplug your WiiU.";
|
||||
if (GC) extra = "\nMake sure to have Nintendon't + config on your SD.\nYou can add them under Settings -> \"Start Nintendont Config Tool\".";
|
||||
|
||||
gc2rom = "";
|
||||
Custom_Message cm = new Custom_Message("Injection Complete", $"Only Install to USB!{extra}\nConfig will stay filled, choose a Console again to clear it!\nTo Open the Location of the Inject press Open Folder.", Settings.Default.OutPath);
|
||||
try
|
||||
{
|
||||
|
@ -683,6 +707,7 @@ namespace UWUVCI_AIO_WPF
|
|||
|
||||
public void Inject(bool force)
|
||||
{
|
||||
ValidatePathsStillExist();
|
||||
/* var task = new Task(() => runInjectThread(true));
|
||||
task.Start();*/
|
||||
Task.Run(() =>
|
||||
|
@ -690,7 +715,12 @@ namespace UWUVCI_AIO_WPF
|
|||
if (Injection.Inject(GameConfiguration, RomPath, this, force)) Injected = true;
|
||||
else Injected = false;
|
||||
});
|
||||
new DownloadWait("Injecting Game - Please Wait", "", this).ShowDialog();
|
||||
DownloadWait dw = new DownloadWait("Injecting Game - Please Wait", "", this);
|
||||
try
|
||||
{
|
||||
dw.Owner = mw;
|
||||
}catch(Exception e) { }
|
||||
dw.ShowDialog();
|
||||
Progress = 0;
|
||||
if (Injected)
|
||||
{
|
||||
|
@ -711,6 +741,51 @@ namespace UWUVCI_AIO_WPF
|
|||
var test = GetMissingVCBs();
|
||||
if (test.Count > 0)
|
||||
{
|
||||
if (CheckForInternetConnection())
|
||||
{
|
||||
Progress = 0;
|
||||
Task.Run(() =>
|
||||
{
|
||||
double stuff = 100 / test.Count;
|
||||
foreach (string s in test)
|
||||
{
|
||||
DownloadBase(s, this);
|
||||
Progress += Convert.ToInt32(stuff);
|
||||
}
|
||||
Progress = 100;
|
||||
});
|
||||
DownloadWait dw = new DownloadWait("Downloading needed Data - Please Wait", "", this);
|
||||
try
|
||||
{
|
||||
dw.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
dw.ShowDialog();
|
||||
|
||||
BaseCheck();
|
||||
}
|
||||
else
|
||||
{
|
||||
Custom_Message dw = new Custom_Message("No Internet connection", "You have files missing, which need to be downloaded but you dont have an Internet Connection.\nThe Program will now terminate");
|
||||
try
|
||||
{
|
||||
dw.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
dw.ShowDialog();
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CheckForInternetConnection())
|
||||
{
|
||||
Directory.CreateDirectory(@"bin\bases");
|
||||
var test = GetMissingVCBs();
|
||||
Progress = 0;
|
||||
Task.Run(() =>
|
||||
{
|
||||
|
@ -729,77 +804,64 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
catch (Exception) { }
|
||||
dw.ShowDialog();
|
||||
|
||||
Progress = 0;
|
||||
BaseCheck();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Directory.CreateDirectory(@"bin\bases");
|
||||
var test = GetMissingVCBs();
|
||||
Progress = 0;
|
||||
Task.Run(() =>
|
||||
else
|
||||
{
|
||||
double stuff = 100 / test.Count;
|
||||
foreach (string s in test)
|
||||
Custom_Message dw = new Custom_Message("No Internet connection", "You have files missing, which need to be downloaded but you dont have an Internet Connection.\nThe Program will now terminate");
|
||||
try
|
||||
{
|
||||
DownloadBase(s, this);
|
||||
Progress += Convert.ToInt32(stuff);
|
||||
dw.Owner = mw;
|
||||
}
|
||||
Progress = 100;
|
||||
});
|
||||
DownloadWait dw = new DownloadWait("Downloading needed Data - Please Wait", "",this);
|
||||
try
|
||||
{
|
||||
dw.Owner = mw;
|
||||
catch (Exception) { }
|
||||
dw.ShowDialog();
|
||||
Environment.Exit(1);
|
||||
}
|
||||
catch (Exception) { }
|
||||
dw.ShowDialog();
|
||||
Progress = 0;
|
||||
BaseCheck();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public void UpdateTools()
|
||||
{
|
||||
string[] bases = ToolCheck.ToolNames;
|
||||
Task.Run(() =>
|
||||
if (CheckForInternetConnection())
|
||||
{
|
||||
Progress = 0;
|
||||
double l = 100 / bases.Length;
|
||||
foreach (string s in bases)
|
||||
string[] bases = ToolCheck.ToolNames;
|
||||
Task.Run(() =>
|
||||
{
|
||||
DeleteTool(s);
|
||||
DownloadTool(s,this);
|
||||
Progress += Convert.ToInt32(l);
|
||||
Progress = 0;
|
||||
double l = 100 / bases.Length;
|
||||
foreach (string s in bases)
|
||||
{
|
||||
DeleteTool(s);
|
||||
DownloadTool(s, this);
|
||||
Progress += Convert.ToInt32(l);
|
||||
}
|
||||
Progress = 100;
|
||||
});
|
||||
|
||||
DownloadWait dw = new DownloadWait("Updating Tools - Please Wait", "", this);
|
||||
try
|
||||
{
|
||||
dw.Owner = mw;
|
||||
}
|
||||
Progress = 100;
|
||||
});
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
DownloadWait dw = new DownloadWait("Updating Tools - Please Wait", "", this);
|
||||
try
|
||||
{
|
||||
dw.Owner = mw;
|
||||
}
|
||||
dw.ShowDialog();
|
||||
Custom_Message cm = new Custom_Message("Finished Update", "Finished Updating Tools! Restarting UWUVCI AIO");
|
||||
try
|
||||
{
|
||||
cm.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
cm.ShowDialog();
|
||||
System.Diagnostics.Process.Start(System.Windows.Application.ResourceAssembly.Location);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
dw.ShowDialog();
|
||||
Custom_Message cm = new Custom_Message("Finished Update","Finished Updating Tools! Restarting UWUVCI AIO" );
|
||||
try
|
||||
{
|
||||
cm.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
cm.ShowDialog();
|
||||
System.Diagnostics.Process.Start(System.Windows.Application.ResourceAssembly.Location);
|
||||
Environment.Exit(0);
|
||||
|
||||
}
|
||||
public void ResetTKQuest()
|
||||
{
|
||||
|
@ -836,50 +898,53 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
public void UpdateBases()
|
||||
{
|
||||
|
||||
string[] bases = { "bases.vcbnds", "bases.vcbn64", "bases.vcbgba", "bases.vcbsnes", "bases.vcbnes", "bases.vcbtg16", "bases.vcbmsx", "bases.vcbwii" };
|
||||
Task.Run(() => {
|
||||
Progress = 0;
|
||||
double l = 100 / bases.Length;
|
||||
foreach (string s in bases)
|
||||
if (CheckForInternetConnection())
|
||||
{
|
||||
string[] bases = { "bases.vcbnds", "bases.vcbn64", "bases.vcbgba", "bases.vcbsnes", "bases.vcbnes", "bases.vcbtg16", "bases.vcbmsx", "bases.vcbwii" };
|
||||
Task.Run(() => {
|
||||
Progress = 0;
|
||||
double l = 100 / bases.Length;
|
||||
foreach (string s in bases)
|
||||
{
|
||||
DeleteBase(s);
|
||||
DownloadBase(s, this);
|
||||
|
||||
GameConsoles g = new GameConsoles();
|
||||
if (s.Contains("nds")) g = GameConsoles.NDS;
|
||||
if (s.Contains("nes")) g = GameConsoles.NES;
|
||||
if (s.Contains("snes")) g = GameConsoles.SNES;
|
||||
if (s.Contains("n64")) g = GameConsoles.N64;
|
||||
if (s.Contains("gba")) g = GameConsoles.GBA;
|
||||
if (s.Contains("tg16")) g = GameConsoles.TG16;
|
||||
if (s.Contains("msx")) g = GameConsoles.MSX;
|
||||
if (s.Contains("wii")) g = GameConsoles.WII;
|
||||
UpdateKeyFile(VCBTool.ReadBasesFromVCB($@"bin/bases/{s}"), g);
|
||||
Progress += Convert.ToInt32(l);
|
||||
}
|
||||
Progress = 100;
|
||||
});
|
||||
DownloadWait dw = new DownloadWait("Updating Base Files - Please Wait", "", this);
|
||||
try
|
||||
{
|
||||
DeleteBase(s);
|
||||
DownloadBase(s, this);
|
||||
|
||||
GameConsoles g = new GameConsoles();
|
||||
if (s.Contains("nds")) g = GameConsoles.NDS;
|
||||
if (s.Contains("nes")) g = GameConsoles.NES;
|
||||
if (s.Contains("snes")) g = GameConsoles.SNES;
|
||||
if (s.Contains("n64")) g = GameConsoles.N64;
|
||||
if (s.Contains("gba")) g = GameConsoles.GBA;
|
||||
if (s.Contains("tg16")) g = GameConsoles.TG16;
|
||||
if (s.Contains("msx")) g = GameConsoles.MSX;
|
||||
if (s.Contains("wii")) g = GameConsoles.WII;
|
||||
UpdateKeyFile(VCBTool.ReadBasesFromVCB($@"bin/bases/{s}"), g);
|
||||
Progress += Convert.ToInt32(l);
|
||||
dw.Owner = mw;
|
||||
}
|
||||
Progress = 100;
|
||||
});
|
||||
DownloadWait dw = new DownloadWait("Updating Base Files - Please Wait", "", this);
|
||||
try
|
||||
{
|
||||
dw.Owner = mw;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
dw.ShowDialog();
|
||||
|
||||
Custom_Message cm = new Custom_Message("Finished Updating", "Finished Updating Bases! Restarting UWUVCI AIO");
|
||||
try
|
||||
{
|
||||
cm.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
cm.ShowDialog();
|
||||
System.Diagnostics.Process.Start(System.Windows.Application.ResourceAssembly.Location);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
dw.ShowDialog();
|
||||
|
||||
Custom_Message cm = new Custom_Message("Finished Updating", "Finished Updating Bases! Restarting UWUVCI AIO");
|
||||
try
|
||||
{
|
||||
cm.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
cm.ShowDialog();
|
||||
System.Diagnostics.Process.Start(System.Windows.Application.ResourceAssembly.Location);
|
||||
Environment.Exit(0);
|
||||
|
||||
}
|
||||
public bool checkSysKey(string key)
|
||||
|
@ -1263,7 +1328,7 @@ namespace UWUVCI_AIO_WPF
|
|||
if (Progress == 100)
|
||||
{
|
||||
Injectwait.Close();
|
||||
injct.Abort();
|
||||
|
||||
timer.Stop();
|
||||
|
||||
Progress = 0;
|
||||
|
@ -1278,12 +1343,27 @@ namespace UWUVCI_AIO_WPF
|
|||
|
||||
if(missingTools.Count > 0)
|
||||
{
|
||||
Task.Run(() => ThreadDownload(missingTools));
|
||||
new DownloadWait("Downloading Tools - Please Wait", "", this).ShowDialog();
|
||||
Thread.Sleep(200);
|
||||
//Download Tools
|
||||
Progress = 0;
|
||||
if (CheckForInternetConnection())
|
||||
{
|
||||
Task.Run(() => ThreadDownload(missingTools));
|
||||
new DownloadWait("Downloading Tools - Please Wait", "", this).ShowDialog();
|
||||
Thread.Sleep(200);
|
||||
//Download Tools
|
||||
Progress = 0;
|
||||
toolCheck();
|
||||
}
|
||||
else
|
||||
{
|
||||
Custom_Message dw = new Custom_Message("No Internet connection", "You have files missing, which need to be downloaded but you dont have an Internet Connection.\nThe Program will now terminate");
|
||||
try
|
||||
{
|
||||
dw.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
dw.ShowDialog();
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1322,8 +1402,9 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
else
|
||||
{
|
||||
Settings.Default.BasePath = string.Empty;
|
||||
Settings.Default.PathsSet = false;
|
||||
if (!Directory.Exists(Path.Combine(Directory.GetCurrentDirectory(), "bin","BaseGames"))) Directory.CreateDirectory(Path.Combine(Directory.GetCurrentDirectory(), "bin", "BaseGames"));
|
||||
Settings.Default.BasePath = Path.Combine(Directory.GetCurrentDirectory(), "bin", "BaseGames");
|
||||
Settings.Default.PathsSet = true;
|
||||
Settings.Default.Save();
|
||||
}
|
||||
if (Directory.Exists(Settings.Default.OutPath))
|
||||
|
@ -1335,8 +1416,9 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
else
|
||||
{
|
||||
Settings.Default.OutPath = string.Empty;
|
||||
Settings.Default.PathsSet = false;
|
||||
if (!Directory.Exists(Path.Combine(Directory.GetCurrentDirectory(), "InjectedGames"))) Directory.CreateDirectory(Path.Combine(Directory.GetCurrentDirectory(), "InjectedGames"));
|
||||
Settings.Default.OutPath = Path.Combine(Directory.GetCurrentDirectory(), "InjectedGames");
|
||||
Settings.Default.PathsSet = true;
|
||||
Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
|
@ -1539,6 +1621,10 @@ namespace UWUVCI_AIO_WPF
|
|||
public void EnterKey(bool ck)
|
||||
{
|
||||
EnterKey ek = new EnterKey(ck);
|
||||
try
|
||||
{
|
||||
ek.Owner = mw;
|
||||
}catch(Exception e) { }
|
||||
ek.ShowDialog();
|
||||
}
|
||||
public bool checkcKey(string key)
|
||||
|
@ -1546,20 +1632,24 @@ namespace UWUVCI_AIO_WPF
|
|||
if (1274359530 == key.ToLower().GetHashCode())
|
||||
{
|
||||
Settings.Default.Ckey = key;
|
||||
ckeys = true;
|
||||
Settings.Default.Save();
|
||||
|
||||
return true;
|
||||
}
|
||||
ckeys = false;
|
||||
return false;
|
||||
}
|
||||
public bool isCkeySet()
|
||||
{
|
||||
if (Settings.Default.Ckey.GetHashCode() == 487391367)
|
||||
{
|
||||
ckeys = true;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ckeys = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1657,17 +1747,21 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
public void Download()
|
||||
{
|
||||
|
||||
Task.Run(() => { Injection.Download(this); });
|
||||
|
||||
DownloadWait dw = new DownloadWait("Downloading Base - Please Wait", "", this);
|
||||
try
|
||||
ValidatePathsStillExist();
|
||||
if (CheckForInternetConnection())
|
||||
{
|
||||
dw.Owner = mw;
|
||||
Task.Run(() => { Injection.Download(this); });
|
||||
|
||||
DownloadWait dw = new DownloadWait("Downloading Base - Please Wait", "", this);
|
||||
try
|
||||
{
|
||||
dw.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
dw.ShowDialog();
|
||||
Progress = 0;
|
||||
}
|
||||
catch (Exception) { }
|
||||
dw.ShowDialog();
|
||||
Progress = 0;
|
||||
|
||||
|
||||
}
|
||||
public GameConsoles GetConsoleOfBase(GameBases gb)
|
||||
|
@ -1984,5 +2078,43 @@ namespace UWUVCI_AIO_WPF
|
|||
|
||||
return ret;
|
||||
}
|
||||
public bool CheckForInternetConnection()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var client = new WebClient())
|
||||
using (client.OpenRead("http://google.com/generate_204"))
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
Custom_Message cm = new Custom_Message("No Internet Connection", "To Download Tools, Bases or required Files you need to be connected to the Internet");
|
||||
try
|
||||
{
|
||||
cm.Owner = mw;
|
||||
|
||||
}
|
||||
|
||||
|
||||
catch (Exception) { }
|
||||
cm.ShowDialog();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public bool CheckForInternetConnectionWOWarning()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var client = new WebClient())
|
||||
using (client.OpenRead("http://google.com/generate_204"))
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<TextBlock Text="Choose a Base from the dropdown menu" Margin="10,5,10,381" VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center" FontSize="15" Width="383"></TextBlock>
|
||||
<ComboBox x:Name="cbCombo" HorizontalAlignment="Left" Margin="10,27,0,0" VerticalAlignment="Top" Width="383" Background="#FFCFCFCF" BorderBrush="#FF008BFF" ItemsSource="{Binding LGameBasesString}" SelectionChanged="ComboBox_SelectionChanged" SelectedItem="{Binding SelectedBaseAsString}">
|
||||
</ComboBox>
|
||||
<Frame Name="fLoadFrame" HorizontalAlignment="Left" Height="198" Margin="10,126,0,0" VerticalAlignment="Top" Width="383"/>
|
||||
<Frame Name="fLoadFrame" HorizontalAlignment="Left" Height="239" Margin="10,116,0,0" VerticalAlignment="Top" Width="383"/>
|
||||
<Button Content="Copy ID" HorizontalAlignment="Left" Margin="298,61,0,0" VerticalAlignment="Top" Width="94" Height="31" Name="id" Click="id_Click" Visibility="Hidden" />
|
||||
<Label Content="" HorizontalAlignment="Left" Margin="179,64,0,0" VerticalAlignment="Top" Width="114" Name="idtxt" Visibility="Hidden" Foreground="Black"/>
|
||||
|
||||
|
|
|
@ -5,16 +5,15 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases"
|
||||
mc:Ignorable="d"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
d:DesignHeight="198" d:DesignWidth="383"
|
||||
Title="CustomBaseFrame">
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" d:DesignWidth="383"
|
||||
Title="CustomBaseFrame" Height="239">
|
||||
|
||||
<Grid DataContext="{StaticResource mvm}">
|
||||
<TextBox materialDesign:HintAssist.Hint="BASE PATH" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="0,5,108,145" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding CBasePath}" IsReadOnly="True" Focusable="False" />
|
||||
<Button Content="Set Path" HorizontalAlignment="Left" Margin="280,21,0,0" VerticalAlignment="Top" Width="103" Height="26" Click="Button_Click"/>
|
||||
<TextBlock x:Name="tbCode" HorizontalAlignment="Center" Margin="10,84,10,0" TextWrapping="Wrap" Text="Code folder not found" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
|
||||
<TextBlock x:Name="tbContent" HorizontalAlignment="Center" Margin="10,119,10,0" TextWrapping="Wrap" Text="Content folder not found" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
|
||||
<TextBlock x:Name="tbMeta" HorizontalAlignment="Center" Margin="10,154,10,0" TextWrapping="Wrap" Text="Meta folder not found" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
|
||||
|
||||
<TextBox materialDesign:HintAssist.Hint="BASE PATH" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="0,5,108,191" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding CBasePath}" IsReadOnly="True" Focusable="False" />
|
||||
<Button Content="Set Path" HorizontalAlignment="Left" Margin="280,21,0,0" VerticalAlignment="Top" Width="103" Height="26" Click="Button_Click" IsEnabled="{Binding Ckeys}" Name="path"/>
|
||||
<TextBlock x:Name="tbCode" HorizontalAlignment="Center" Margin="10,67,10,0" TextWrapping="Wrap" Text="Code folder not found" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
|
||||
<TextBlock x:Name="tbContent" HorizontalAlignment="Center" Margin="10,102,10,0" TextWrapping="Wrap" Text="Content folder not found" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
|
||||
<TextBlock x:Name="tbMeta" HorizontalAlignment="Center" Margin="10,137,10,0" TextWrapping="Wrap" Text="Meta folder not found" VerticalAlignment="Top" TextAlignment="Center" Width="363" FontSize="20" Foreground="DarkRed"/>
|
||||
<Button x:Name="CK" Content="Enter CKey" HorizontalAlignment="Left" Margin="280,178,0,0" VerticalAlignment="Top" Width="102" Click="CK_Click" />
|
||||
</Grid>
|
||||
</Page>
|
||||
|
|
|
@ -44,6 +44,10 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases
|
|||
this.existing = existing;
|
||||
this.console = console;
|
||||
mvm.SetCBASE(this);
|
||||
if (mvm.Ckeys)
|
||||
{
|
||||
CK.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -59,7 +63,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases
|
|||
mvm.BaseDownloaded = false;
|
||||
mvm.CBasePath = null;
|
||||
//warning if using custom bases program may crash
|
||||
new Custom_Message("Information", "If using Custom Bases there will be a chance that the program crashes if adding a wrong base (example: a normal wiiu game instead of a nds vc game).\nIf you add a wrong base, we will not assist you fixing it, other than telling you to use another base.\nIf you agree to this please hit continue").ShowDialog();
|
||||
new Custom_Message("Information", "If using Custom Bases there will be a chance that the program crashes if adding a wrong base (example: a normal wiiu game instead of a nds vc game).\nA custom base is containing either the code/content/meta folders or Installable files (*.h3, *.app, ...)\nIf you add a wrong base, we will not assist you fixing it, other than telling you to use another base.\nIf you agree to this please hit continue").ShowDialog();
|
||||
|
||||
if(mvm.choosefolder)
|
||||
{
|
||||
|
@ -169,5 +173,16 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases
|
|||
tbMeta.Foreground = new SolidColorBrush(Color.FromRgb(205, 50, 50));
|
||||
mvm = (MainViewModel)FindResource("mvm");
|
||||
}
|
||||
|
||||
private void CK_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
mvm.EnterKey(true);
|
||||
if (mvm.Ckeys)
|
||||
{
|
||||
CK.Visibility = Visibility.Hidden;
|
||||
path.IsEnabled = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
xmlns:local="clr-namespace:UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases"
|
||||
mc:Ignorable="d"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
d:DesignHeight="198" d:DesignWidth="383"
|
||||
d:DesignHeight="239" d:DesignWidth="383"
|
||||
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="258,158,0,0" VerticalAlignment="Top" Width="111" IsEnabled="False" Click="btnDwnlnd_Click"/>
|
||||
<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" />
|
||||
|
||||
|
|
|
@ -10,22 +10,26 @@
|
|||
Title="N64Config">
|
||||
|
||||
<Grid DataContext="{StaticResource mvm}">
|
||||
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,50,157,388" 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,171,157,267" 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,262,157,176" 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,216,157,221" 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,307,157,124" 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,359,157,77" 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,402,0,0" VerticalAlignment="Top" Width="127" Click="InjectGame" IsEnabled="{Binding CanInject}"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,319,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,228,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,274,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,183,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,61,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
|
||||
<RadioButton x:Name="rbRDF" Content="Remove DarkFilter" HorizontalAlignment="Left" Margin="11,411,0,0" VerticalAlignment="Top" GroupName="df" IsChecked="{Binding GameConfiguration.N64Stuff.DarkFilter}"/>
|
||||
<RadioButton Content="Keep DarkFilter" HorizontalAlignment="Left" Margin="151,411,0,0" VerticalAlignment="Top" GroupName="df" IsChecked="True"/>
|
||||
<TextBox Name="ini" materialDesign:HintAssist.Hint="INI PATH (LEAVE EMPTY FOR BLANK INI)" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,100,157,339" 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,112,0,0" VerticalAlignment="Top" Width="127" Click="Set_IniPath"/>
|
||||
<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="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}"/>
|
||||
<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"/>
|
||||
<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" ToolTip="This may not work with every Game">
|
||||
|
||||
<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"/>
|
||||
|
||||
<RadioButton x:Name="rbRDF" Width="111" Content="Remove" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="df" IsChecked="{Binding GameConfiguration.N64Stuff.DarkFilter}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
|
|
@ -53,6 +53,39 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void InjectGame(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (File.Exists(tv.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = tv.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = null;
|
||||
}
|
||||
if (File.Exists(ic.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = ic.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = null;
|
||||
|
||||
}
|
||||
if (File.Exists(log.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGALog.ImgPath = log.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGALog.ImgPath = null;
|
||||
}
|
||||
if (File.Exists(drc.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = drc.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = null;
|
||||
}
|
||||
mvm.Inject(false);
|
||||
|
||||
}
|
||||
|
@ -137,7 +170,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void gn_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³]");
|
||||
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³´`éⓇ©™]");
|
||||
gn.Text = reg.Replace(gn.Text, string.Empty);
|
||||
gn.CaretIndex = gn.Text.Length;
|
||||
gn.ScrollToHorizontalOffset(double.MaxValue);
|
||||
|
|
|
@ -10,22 +10,27 @@
|
|||
Title="OtherConfigs">
|
||||
|
||||
<Grid DataContext="{StaticResource mvm}">
|
||||
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,67,157,372" 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,150,157,287" 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,241,157,197" 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,196,157,242" 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" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,286,157,152" 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,358,157,79" 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,401,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,299,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,209,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,254,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,163,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,79,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
|
||||
<CheckBox Content="Force 4:3" HorizontalAlignment="Left" Margin="10,39,0,0" VerticalAlignment="Top" Width="98" Click="CheckBox_Click" ToolTip="If checked Games will run in 4:3 instead of 16:9">
|
||||
|
||||
</CheckBox>
|
||||
<CheckBox Content="Use GamePad" HorizontalAlignment="Left" Margin="113,39,0,0" VerticalAlignment="Top" Width="98" Click="CheckBox_Click_1" ToolTip="If checked the GamePad will be used as a controller" Name="gp"/>
|
||||
<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="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"/>
|
||||
|
||||
<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"/>
|
||||
<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" ToolTip="This may not work with every Game">
|
||||
|
||||
<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>
|
||||
</Grid>
|
||||
|
||||
</Page>
|
||||
|
|
|
@ -54,9 +54,10 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
}
|
||||
string rom = mvm.getInternalName(mvm.RomPath);
|
||||
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³]");
|
||||
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³´`éⓇ©™]");
|
||||
gn.Text = reg.Replace(rom, string.Empty);
|
||||
mvm.GameConfiguration.GameName = reg.Replace(rom, string.Empty);
|
||||
mvm.gc2rom = "";
|
||||
}
|
||||
|
||||
|
||||
|
@ -64,6 +65,39 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void InjectGame(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (File.Exists(tv.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = tv.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = null;
|
||||
}
|
||||
if (File.Exists(ic.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = ic.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = null;
|
||||
|
||||
}
|
||||
if (File.Exists(log.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGALog.ImgPath = log.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGALog.ImgPath = null;
|
||||
}
|
||||
if (File.Exists(drc.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = drc.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = null;
|
||||
}
|
||||
mvm.GC = true;
|
||||
mvm.Inject(cd);
|
||||
mvm.Index = -1;
|
||||
|
@ -159,5 +193,17 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
mvm.Index = 1;
|
||||
}
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string path = string.Empty;
|
||||
path = mvm.GetFilePath(true, false);
|
||||
|
||||
|
||||
if (!CheckIfNull(path))
|
||||
{
|
||||
mvm.gc2rom = path;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,19 +10,22 @@
|
|||
Title="OtherConfigs">
|
||||
|
||||
<Grid DataContext="{StaticResource mvm}">
|
||||
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,73,157,366" 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,156,157,281" 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,247,157,191" 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,202,157,236" 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,292,157,146" 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,364,157,73" 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,407,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,305,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,215,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,260,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,169,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,85,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
|
||||
<CheckBox Content="TurboGrafxCD" HorizontalAlignment="Left" Margin="10,45,0,0" VerticalAlignment="Top" Width="98" Click="CheckBox_Click" ToolTip="If checked alows you to inject TurboGrafx-CD ROMs"/>
|
||||
<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="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="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>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
|
|
@ -58,6 +58,39 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void InjectGame(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (File.Exists(tv.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = tv.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = null;
|
||||
}
|
||||
if (File.Exists(ic.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = ic.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = null;
|
||||
|
||||
}
|
||||
if (File.Exists(log.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGALog.ImgPath = log.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGALog.ImgPath = null;
|
||||
}
|
||||
if (File.Exists(drc.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = drc.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = null;
|
||||
}
|
||||
mvm.Inject(false);
|
||||
}
|
||||
|
||||
|
@ -148,7 +181,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void gn_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³]");
|
||||
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³´`éⓇ©™]");
|
||||
gn.Text = reg.Replace(gn.Text, string.Empty);
|
||||
gn.CaretIndex = gn.Text.Length;
|
||||
gn.ScrollToHorizontalOffset(double.MaxValue);
|
||||
|
|
|
@ -11,18 +11,18 @@
|
|||
|
||||
<Grid DataContext="{StaticResource mvm}">
|
||||
|
||||
<TextBox materialDesign:HintAssist.Hint="ROM PATH" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,63,157,376" 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,146,157,291" 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,237,157,201" 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,192,157,246" 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,282,157,156" 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,354,157,84" 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,397,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,295,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,205,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,250,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,159,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,75,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
|
||||
<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="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"/>
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
|
|
|
@ -53,6 +53,39 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void InjectGame(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (File.Exists(tv.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = tv.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = null;
|
||||
}
|
||||
if (File.Exists(ic.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = ic.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = null;
|
||||
|
||||
}
|
||||
if (File.Exists(log.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGALog.ImgPath = log.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGALog.ImgPath = null;
|
||||
}
|
||||
if (File.Exists(drc.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = drc.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = null;
|
||||
}
|
||||
mvm.Inject(false);
|
||||
}
|
||||
|
||||
|
@ -123,7 +156,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void gn_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³]");
|
||||
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³´`éⓇ©™]");
|
||||
gn.Text = reg.Replace(gn.Text, string.Empty);
|
||||
gn.CaretIndex = gn.Text.Length;
|
||||
gn.ScrollToHorizontalOffset(double.MaxValue);
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
}
|
||||
string rom = mvm.getInternalName(mvm.RomPath);
|
||||
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³]");
|
||||
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³´`éⓇ©™]");
|
||||
gn.Text = reg.Replace(rom, string.Empty);
|
||||
mvm.GameConfiguration.GameName = reg.Replace(rom, string.Empty);
|
||||
|
||||
|
@ -69,6 +69,39 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void InjectGame(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (File.Exists(tv.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = tv.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = null;
|
||||
}
|
||||
if (File.Exists(ic.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = ic.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = null;
|
||||
|
||||
}
|
||||
if (File.Exists(log.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGALog.ImgPath = log.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGALog.ImgPath = null;
|
||||
}
|
||||
if (File.Exists(drc.Text))
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = drc.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = null;
|
||||
}
|
||||
mvm.Index = gamepad.SelectedIndex;
|
||||
if(LR.IsChecked == true)
|
||||
{
|
||||
|
|
|
@ -9,23 +9,23 @@
|
|||
Title="SettingsFrame">
|
||||
|
||||
<Grid Margin="0,2,0,-2">
|
||||
<TextBlock HorizontalAlignment="Left" Margin="325,170,0,0" TextWrapping="Wrap" Text="Set Injector Paths:" VerticalAlignment="Top" FontSize="20" />
|
||||
<TextBlock HorizontalAlignment="Left" Margin="325,217,0,0" TextWrapping="Wrap" Text="Enter CommonKey:" VerticalAlignment="Top" FontSize="20" />
|
||||
<TextBlock HorizontalAlignment="Left" Margin="325,228,0,0" TextWrapping="Wrap" Text="Set Injector Paths:" VerticalAlignment="Top" FontSize="20" />
|
||||
<TextBlock HorizontalAlignment="Left" Margin="325,482,0,0" TextWrapping="Wrap" Text="Enter CommonKey:" VerticalAlignment="Top" FontSize="20" Visibility="Hidden" />
|
||||
<TextBlock HorizontalAlignment="Left" Margin="325,541,0,0" TextWrapping="Wrap" Text="Enter TitleKeys:" VerticalAlignment="Top" FontSize="20" Visibility="Hidden" />
|
||||
<TextBlock HorizontalAlignment="Left" Margin="325,257,0,0" TextWrapping="Wrap" Text="Injector Theme:" VerticalAlignment="Top" FontSize="20" />
|
||||
<RadioButton Content="Light Theme" HorizontalAlignment="Left" Margin="494,264,0,0" VerticalAlignment="Top" GroupName="theme" x:Name="rblight" IsChecked="True"/>
|
||||
<Button Content="Change Theme" HorizontalAlignment="Left" Margin="605,257,0,0" VerticalAlignment="Top" Width="145" RenderTransformOrigin="-0.099,0.116"/>
|
||||
<Button Content="Open CK Menu" HorizontalAlignment="Left" Margin="605,212,0,0" VerticalAlignment="Top" Width="145" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_1"/>
|
||||
<Button Content="Open Path Menu" HorizontalAlignment="Left" Margin="605,165,0,0" VerticalAlignment="Top" Width="145" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_2"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="325,67,0,0" TextWrapping="Wrap" Text="Injector Theme:" VerticalAlignment="Top" FontSize="20" Visibility="Hidden" />
|
||||
<RadioButton Content="Light Theme" HorizontalAlignment="Left" Margin="494,74,0,0" VerticalAlignment="Top" GroupName="theme" x:Name="rblight" IsChecked="True" Visibility="Hidden"/>
|
||||
<Button Content="Change Theme" HorizontalAlignment="Left" Margin="605,67,0,0" VerticalAlignment="Top" Width="145" RenderTransformOrigin="-0.099,0.116" Visibility="Hidden"/>
|
||||
<Button Content="Open CK Menu" HorizontalAlignment="Left" Margin="605,478,0,0" VerticalAlignment="Top" Width="145" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_1" Visibility="Hidden"/>
|
||||
<Button Content="Open Path Menu" HorizontalAlignment="Left" Margin="605,223,0,0" VerticalAlignment="Top" Width="145" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_2"/>
|
||||
<Button Content="Open TK Menu" HorizontalAlignment="Left" Margin="605,537,0,0" VerticalAlignment="Top" Width="145" RenderTransformOrigin="-0.099,0.116" Click="Button_Click" Visibility="Hidden"/>
|
||||
<Button Content="Update Base Files" HorizontalAlignment="Left" Margin="605,302,0,0" VerticalAlignment="Top" Width="145" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_3"/>
|
||||
<Button Content="Start N64 Virtual Console INI Creator" HorizontalAlignment="Left" Margin="325,345,0,0" VerticalAlignment="Top" Width="425" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_4"/>
|
||||
<Button Content="Update Base Files" HorizontalAlignment="Left" Margin="605,266,0,0" VerticalAlignment="Top" Width="145" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_3"/>
|
||||
<Button Content="Start N64 Virtual Console INI Creator" HorizontalAlignment="Left" Margin="325,309,0,0" VerticalAlignment="Top" Width="425" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_4"/>
|
||||
<Button Content="Credits" HorizontalAlignment="Left" Margin="1040,558,0,0" VerticalAlignment="Top" Width="80" Click="Button_Click_5"/>
|
||||
<Button Content="Update Tools" HorizontalAlignment="Left" Margin="483,302,0,0" VerticalAlignment="Top" Width="117" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_7"/>
|
||||
<Button Content="Check For Updates" HorizontalAlignment="Left" Margin="597,386,0,0" VerticalAlignment="Top" Width="153" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_6"/>
|
||||
<Button Content="Update Tools" HorizontalAlignment="Left" Margin="483,266,0,0" VerticalAlignment="Top" Width="117" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_7"/>
|
||||
<Button Content="Check For Updates" HorizontalAlignment="Left" Margin="597,350,0,0" VerticalAlignment="Top" Width="153" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_6"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="1022,10,0,0" TextWrapping="Wrap" Text="v2.1 BETA" VerticalAlignment="Top" FontSize="20" Width="98"/>
|
||||
<Button Content="Reset TitleKeys" HorizontalAlignment="Left" Margin="325,302,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,386,0,0" VerticalAlignment="Top" Width="267" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_9"/>
|
||||
<Button Content="Reset TitleKeys" HorizontalAlignment="Left" Margin="325,266,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,350,0,0" VerticalAlignment="Top" Width="267" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_9"/>
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
Title="SettingsFrame">
|
||||
|
||||
<Grid>
|
||||
<TextBlock x:Name="tb" Margin="10,10,0,0" TextWrapping="Wrap" Text="If this is your first time using UWUVCI AIO, or you updated from v1.x, please click on the Settings Icon to set your Paths and the CommonKey to begin Injecting. It is recommended to also set the TitleKeys." FontSize="20" Height="143" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" />
|
||||
|
||||
<TextBlock x:Name="tb" Margin="10,172,10,192" TextWrapping="Wrap" Text="Welcome to UWUVCI AIO v2.1. To start Injecting select a Console to your left." FontSize="20" Height="116" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Width="1110" />
|
||||
|
||||
|
||||
</Grid>
|
||||
</Page>
|
|
@ -23,7 +23,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames
|
|||
public StartFrame()
|
||||
{
|
||||
InitializeComponent();
|
||||
tb.Text += "\n\nIf any Issues happen during injection and you updated from the old version using the AutoUpdater, please go to settings and click Update Tools.";
|
||||
tb.Text+= "\n\nIf any Issues happen during injection and you updated from the old version using the AutoUpdater, please go to settings and click Update Tools.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
|
||||
private void Folder_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Process.Start(new FileInfo(path).DirectoryName);
|
||||
Process.Start(path);
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -52,13 +52,13 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
{
|
||||
if(mvm.Progress < 70)
|
||||
{
|
||||
mvm.Progress += 5;
|
||||
mvm.Progress += 1;
|
||||
}
|
||||
}
|
||||
if(mvm.Progress == 100)
|
||||
{
|
||||
Close();
|
||||
mvm.Progress = 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
xmlns:local="clr-namespace:UWUVCI_AIO_WPF"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d"
|
||||
Title="MAIN" Height="160.656" Width="500" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False">
|
||||
Title="MAIN" Height="160.656" Width="500" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/a.ico" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False" GotFocus="Window_GotFocus">
|
||||
<Grid DataContext="{StaticResource mvm}">
|
||||
<Button Content="Check" HorizontalAlignment="Left" Margin="315,104,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_1"/>
|
||||
<Button Content="Abort" HorizontalAlignment="Left" Margin="405,104,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
|
||||
<Button Content="Cancel" HorizontalAlignment="Left" Margin="405,104,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
|
||||
<StackPanel Margin="10,10,10,126" Orientation="Horizontal">
|
||||
|
||||
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding GbTemp.Region}" VerticalAlignment="Top" Height="25" Width="Auto" FontSize="18" Foreground="Black" x:Name="region"/>
|
||||
|
@ -18,7 +18,10 @@
|
|||
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text=" " VerticalAlignment="Top" Height="25" Width="Auto" FontSize="18" Foreground="Black"/>
|
||||
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Height="25" Width="Auto" FontSize="18" Foreground="Black" x:Name="ID"/>
|
||||
</StackPanel>
|
||||
<TextBox Name="tbKey" materialDesign:HintAssist.Hint="ENTER KEY" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,35,20,78" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18"/>
|
||||
<StackPanel FocusManager.FocusedElement="{Binding ElementName=tbKey }">
|
||||
<TextBox Name="tbKey" materialDesign:HintAssist.Hint="ENTER KEY" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,35,20,78" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18"/>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
public partial class EnterKey : Window
|
||||
{
|
||||
bool ckey = false;
|
||||
|
||||
Custom_Message cm;
|
||||
public EnterKey(bool ckey)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
@ -70,11 +70,15 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
{
|
||||
if(tbKey.Text.Length > 32)
|
||||
{
|
||||
new Custom_Message("Wrong Key", "The entered Key is too long").ShowDialog();
|
||||
cm = new Custom_Message("Wrong Key", "The entered Key is too long");
|
||||
cm.Owner = this;
|
||||
cm.ShowDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
new Custom_Message("Wrong Key", "The entered Key is too short").ShowDialog();
|
||||
cm = new Custom_Message("Wrong Key", "The entered Key is too short");
|
||||
cm.Owner = this;
|
||||
cm.ShowDialog();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -85,14 +89,18 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
MainViewModel mvm = (MainViewModel)FindResource("mvm");
|
||||
if (mvm.checkcKey(tbKey.Text))
|
||||
{
|
||||
|
||||
cm = new Custom_Message("Correct Key", "The entered CommonKey is correct!");
|
||||
cm.Owner = this;
|
||||
cm.ShowDialog();
|
||||
this.Close();
|
||||
new Custom_Message("Correct Key", "The entered CommonKey is correct!").ShowDialog();
|
||||
|
||||
mvm.ArePathsSet();
|
||||
}
|
||||
else
|
||||
{
|
||||
new Custom_Message("Incorrect Key", "The entered CommonKey is incorrect!").ShowDialog();
|
||||
cm = new Custom_Message("Incorrect Key", "The entered CommonKey is incorrect!");
|
||||
cm.Owner = this;
|
||||
cm.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -101,19 +109,27 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
MainViewModel mvm = (MainViewModel)FindResource("mvm");
|
||||
if (mvm.checkKey(tbKey.Text))
|
||||
{
|
||||
new Custom_Message("Correct Key", "The entered TitleKey is correct!").ShowDialog();
|
||||
|
||||
cm = new Custom_Message("Correct Key", "The entered TitleKey is correct!");
|
||||
cm.Owner = this;
|
||||
cm.ShowDialog();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
new Custom_Message("Incorrect Key", "The entered TitleKey is incorrect!").ShowDialog();
|
||||
|
||||
cm = new Custom_Message("Incorrect Key", "The entered TitleKey is incorrect!");
|
||||
cm.Owner = this;
|
||||
cm.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void Window_GotFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
tbKey.Focus();
|
||||
tbKey.Select(0,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
xmlns:local="clr-namespace:UWUVCI_AIO_WPF"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d"
|
||||
Title="MAIN" Height="670" Width="1194.525" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" MouseDown="MoveWindow" Background="LightGray" ResizeMode="NoResize">
|
||||
Title="MAIN" Width="1194.525" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" MouseDown="MoveWindow" Background="LightGray" ResizeMode="NoResize" Height="670">
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue