Repalced all messageboxes

This commit is contained in:
NicoAICP 2020-04-17 18:02:45 +02:00
parent 81aa7c155c
commit a2e71aeb0d
7 changed files with 162 additions and 121 deletions

View file

@ -85,22 +85,27 @@ namespace UWUVCI_AIO_WPF
return true;
}catch(Exception e)
{
mvm.Progress = 100;
code = null;
if (e.Message.Contains("Images")){
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);
mvm.OpenDialog("Injection Failed","Injection Failed due to wrong BitDepth, please check if your Files are in a different bitdepth than 32bit or 24bit");
}
else if (e.Message.Contains("Size"))
{
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);
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");
}
else if (e.Message.Contains("retro"))
{
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);
mvm.OpenDialog("Injection Failed","The ROM you want to Inject is to big for selected Base!\nPlease try again with different Base");
}
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.");
}
else
{
MessageBox.Show("Injection Failed due to unknown circumstances, please contact us on the UWUVCI discord", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
mvm.OpenDialog("Injection Failed", "Injection Failed due to unknown circumstances, please contact us on the UWUVCI discord");
}
Clean();
@ -108,9 +113,11 @@ namespace UWUVCI_AIO_WPF
}
finally
{
mvm.Index = -1;
mvm.LR = false;
mvm.msg = "";
mvm.Progress = 0;
}
}
@ -194,8 +201,7 @@ namespace UWUVCI_AIO_WPF
tik.WaitForExit();
if (!File.Exists(Path.Combine(tempPath, "pre.iso")))
{
Console.WriteLine("An error occured while converting WBFS to ISO");
throw new Exception();
throw new Exception("WIIAn error occured while converting WBFS to ISO");
}
if (File.Exists(Path.Combine(tempPath, "rom.wbfs"))) { File.Delete(Path.Combine(tempPath, "rom.wbfs")); }
romPath = Path.Combine(tempPath, "pre.iso");
@ -211,9 +217,8 @@ namespace UWUVCI_AIO_WPF
tik.WaitForExit();
if (!Directory.Exists(Path.Combine(tempPath, "IsoExt")))
{
Console.Clear();
Console.WriteLine("An error occured while trimming the ROM");
throw new Exception();
throw new Exception("WIIAn error occured while trimming the ROM");
}
mvvm.Progress = 40;
Console.WriteLine("Finished trimming");
@ -263,9 +268,7 @@ namespace UWUVCI_AIO_WPF
if (!File.Exists(Path.Combine(tempPath, "game.iso")))
{
Console.Clear();
Console.WriteLine("An error occured while Creating the ISO");
throw new Exception();
throw new Exception("WIIAn error occured while Creating the ISO");
}
romPath = Path.Combine(tempPath, "game.iso");
mvvm.Progress = 60;
@ -302,8 +305,8 @@ namespace UWUVCI_AIO_WPF
if (!File.Exists(Path.Combine(tempPath, "game.iso")))
{
Console.Clear();
Console.WriteLine("An error occured while Creating the ISO");
throw new Exception();
throw new Exception("WIIAn error occured while Creating the ISO");
}
romPath = Path.Combine(tempPath, "game.iso");
mvvm.Progress = 60;
@ -316,9 +319,7 @@ namespace UWUVCI_AIO_WPF
tik.WaitForExit();
if (!Directory.Exists(Path.Combine(tempPath, "tik")) || !File.Exists(Path.Combine(tempPath, "tik", "tmd.bin")) || !File.Exists(Path.Combine(tempPath, "tik", "ticket.bin")))
{
Console.Clear();
Console.WriteLine("An error occured while extracting the Ticket and TMD");
throw new Exception();
throw new Exception("WIIAn error occured while extracting the Ticket and TMD");
}
Console.WriteLine("Finished extracting");
mvvm.Progress = 65;
@ -331,8 +332,7 @@ namespace UWUVCI_AIO_WPF
if (!File.Exists(Path.Combine(baseRomPath, "code", "rvlt.tik")) || !File.Exists(Path.Combine(baseRomPath, "code", "rvlt.tmd")))
{
Console.Clear();
Console.WriteLine("An error occured while copying the Ticket and TMD");
throw new Exception();
throw new Exception("WIIAn error occured while copying the Ticket and TMD");
}
Console.WriteLine("Finished Copying");
mvvm.Progress = 70;
@ -709,7 +709,7 @@ namespace UWUVCI_AIO_WPF
}
catch (NullReferenceException)
{
//MessageBox.Show("Error when editing the meta.xml: Values seem to be missing.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
try
@ -721,7 +721,7 @@ namespace UWUVCI_AIO_WPF
}
catch (NullReferenceException)
{
// MessageBox.Show("Error when editing the app.xml: Values seem to be missing.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}

View file

@ -19,6 +19,7 @@ using UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases;
using UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations;
using UWUVCI_AIO_WPF.UI.Windows;
using AutoUpdaterDotNET;
using System.Threading;
namespace UWUVCI_AIO_WPF
{
@ -282,8 +283,12 @@ namespace UWUVCI_AIO_WPF
Properties.Settings.Default.Save();
}
}
public MainViewModel()
public void OpenDialog(string title, string msg)
{
new Custom_Message(title, msg).ShowDialog();
}
public MainViewModel()
{
//if (Directory.Exists(@"Tools")) Directory.Delete(@"Tools", true);
@ -318,7 +323,7 @@ namespace UWUVCI_AIO_WPF
GameConfiguration = new GameConfig();
if (!ValidatePathsStillExist() && Settings.Default.SetBaseOnce && Settings.Default.SetOutOnce)
{
MessageBox.Show("One of your added Paths seems to not exist anymore. Please check the paths in the Path menu!", "Issue", MessageBoxButtons.OK, MessageBoxIcon.Warning);
new Custom_Message("Issue", "One of your added Paths seems to not exist anymore. Please check the paths in the Path menu!").ShowDialog();
}
UpdatePathSet();
@ -327,7 +332,8 @@ namespace UWUVCI_AIO_WPF
public string turbocd()
{
string ret = string.Empty;
MessageBox.Show("Please put a TurboGraf CD ROM into a folder and select said folder.\n\nThe Folder should atleast contain:\nEXACTLY ONE *.hcd file\nOne or more *.ogg files\nOne or More *.bin files\n\nNot doing so will result in a faulty Inject. You have been warned!");
new Custom_Message("Information", "Please put a TurboGraf CD ROM into a folder and select said folder.\n\nThe Folder should atleast contain:\nEXACTLY ONE *.hcd file\nOne or more *.ogg files\nOne or More *.bin files\n\nNot doing so will result in a faulty Inject. You have been warned!").ShowDialog();
using (var dialog = new FolderBrowserDialog())
{
@ -338,13 +344,14 @@ namespace UWUVCI_AIO_WPF
{
if (DirectoryIsEmpty(dialog.SelectedPath))
{
System.Windows.Forms.MessageBox.Show("The folder is Empty. Please choose another folder");
new Custom_Message("Issue", "The folder is Empty. Please choose another folder").ShowDialog();
}
else
{
if (Directory.GetDirectories(dialog.SelectedPath).Length > 0)
{
MessageBox.Show("This folder mustn't contain any subfolders");
new Custom_Message("Issue", "This folder mustn't contain any subfolders.").ShowDialog();
}
else
{
@ -355,7 +362,8 @@ namespace UWUVCI_AIO_WPF
}
else
{
MessageBox.Show("This Folder does not contain needed minimum of Files");
new Custom_Message("Issue", "This Folder does not contain needed minimum of Files").ShowDialog();
}
}
@ -416,8 +424,8 @@ namespace UWUVCI_AIO_WPF
formatter.Serialize(compressedStream, GameConfiguration);
compressedStream.Close();
createConfigStream.Close();
MessageBox.Show($"Succesfully exported Config.\nYou can find your config under following Path:\n{Path.Combine(Directory.GetCurrentDirectory(),outputPath)}", "Successfully exported Config", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
new Custom_Message("Export success", "The Config was successfully exported.\nClick the Open Folder Button to open the Location where the Config is stored.", Path.Combine(Directory.GetCurrentDirectory(), outputPath)).ShowDialog();
}
public void ImportConfig(string configPath)
{
FileInfo fn = new FileInfo(configPath);
@ -548,14 +556,21 @@ namespace UWUVCI_AIO_WPF
GC = false;
}
[STAThread]
public void Inject(bool force)
public void runInjectThread(bool force)
{
Task.Run(() =>
var thread = new Thread(() =>
{
if (Injection.Inject(GameConfiguration, RomPath, this, force)) Injected = true;
else Injected = false;
});
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
}
public void Inject(bool force)
{
var task = new Task(() => runInjectThread(force));
task.Start();
new DownloadWait("Injecting Game - Please Wait", "",this).ShowDialog();
if (Injected)
{
@ -626,15 +641,17 @@ namespace UWUVCI_AIO_WPF
Progress = 100;
});
new DownloadWait("Updating Tools - Please Wait", "", this).ShowDialog();
MessageBox.Show("Finished Updating Tools! Restarting UWUVCI AIO");
new Custom_Message("Finished Updating Tools! Restarting UWUVCI AIO", "Finished Update").ShowDialog();
System.Diagnostics.Process.Start(System.Windows.Application.ResourceAssembly.Location);
Environment.Exit(0);
}
public void ResetTKQuest()
{
new Custom_Message("Resetting TitleKeys", "This Option will reset all entered TitleKeys meaning you will need to reenter them again!\nDo you still wish to continue?").ShowDialog();
}
public void ResetTitleKeys()
{
DialogResult res = MessageBox.Show("This Option will reset all entered TitleKeys meaning you will need to reenter them again!\nDo you still wish to continue?", "Resetting TitleKeys", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if(res == DialogResult.Yes)
{
File.Delete("bin/keys/gba.vck");
File.Delete("bin/keys/nds.vck");
File.Delete("bin/keys/nes.vck");
@ -643,10 +660,10 @@ namespace UWUVCI_AIO_WPF
File.Delete("bin/keys/tg16.vck");
File.Delete("bin/keys/snes.vck");
File.Delete("bin/keys/wii.vck");
MessageBox.Show("Reset complete! The Programm will now Restart!");
new Custom_Message("Reset Successfull", "The TitleKeys are now reseted.\nThe Programm will now restart.").ShowDialog();
System.Diagnostics.Process.Start(System.Windows.Application.ResourceAssembly.Location);
Environment.Exit(0);
}
}
public void UpdateBases()
@ -676,7 +693,7 @@ namespace UWUVCI_AIO_WPF
Progress = 100;
});
new DownloadWait("Updating Base Files - Please Wait", "", this).ShowDialog();
MessageBox.Show("Finished Updating Bases! Restarting UWUVCI AIO");
new Custom_Message("Finished Updating", "Finished Updating Bases! Restarting UWUVCI AIO").ShowDialog();
System.Diagnostics.Process.Start(System.Windows.Application.ResourceAssembly.Location);
Environment.Exit(0);
@ -736,11 +753,11 @@ namespace UWUVCI_AIO_WPF
if (GetConsoleOfConfig(ret, console))
{
ImportConfig(ret);
MessageBox.Show("Please re-select a base!");
new Custom_Message("Import Complete", "Importing of Config completed.\nPlease reselect a Base!").ShowDialog();
}
else
{
MessageBox.Show($"The config you are trying to import is not made for {console.ToString()} Injections. \nPlease choose a config made for these kind of Injections or choose a different kind of Injection","Issue Importing", MessageBoxButtons.OK, MessageBoxIcon.Warning);
new Custom_Message("Import Failed", $"The config you are trying to import is not made for {console.ToString()} Injections. \nPlease choose a config made for these kind of Injections or choose a different kind of Injection").ShowDialog();
}
}
}
@ -753,10 +770,12 @@ namespace UWUVCI_AIO_WPF
switch (GameConfiguration.Console)
{
case GameConsoles.NDS:
MessageBox.Show("You can only inject NDS ROMs that are not DSi Enhanced (example for not working: Pokémon Black & White)\n\nIf attempting to inject a DSi Enhanced ROM, we will not give you any support with fixing said injection", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
new Custom_Message("Information", "You can only inject NDS ROMs that are not DSi Enhanced (example for not working: Pokémon Black & White)\n\nIf attempting to inject a DSi Enhanced ROM, we will not give you any support with fixing said injection").ShowDialog();
break;
case GameConsoles.SNES:
MessageBox.Show("You can only inject SNES ROMs that are not using any Co-Processors (example for not working: Star Fox)\n\nIf attempting to inject a ROM in need of a Co-Processor, we will not give you any support with fixing said injection", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
new Custom_Message("Information", "You can only inject SNES ROMs that are not using any Co-Processors (example for not working: Star Fox)\n\nIf attempting to inject a ROM in need of a Co-Processor, we will not give you any support with fixing said injection").ShowDialog();
break;
}
using (var dialog = new System.Windows.Forms.OpenFileDialog())
@ -879,7 +898,7 @@ namespace UWUVCI_AIO_WPF
}catch(Exception e)
{
Console.WriteLine(e.Message);
MessageBox.Show("There was an Error downloading the VCB Base File.\nThe Programm will now terminate.", "Error 005: \"Unable to Download VCB Base\"", MessageBoxButtons.OK, MessageBoxIcon.Error);
new Custom_Message("Error 005: \"Unable to Download VCB Base\"", "There was an Error downloading the VCB Base File.\nThe Programm will now terminate.").ShowDialog();
Environment.Exit(1);
}
Directory.SetCurrentDirectory(olddir);
@ -903,7 +922,8 @@ namespace UWUVCI_AIO_WPF
catch (Exception e)
{
Console.WriteLine(e.Message);
MessageBox.Show("There was an Error downloading the Tool.\nThe Programm will now terminate.", "Error 006: \"Unable to Download Tool\"", MessageBoxButtons.OK, MessageBoxIcon.Error);
new Custom_Message("Error 006: \"Unable to Download Tool\"", "There was an Error downloading the Tool.\nThe Programm will now terminate.").ShowDialog();
Environment.Exit(1);
}
Directory.SetCurrentDirectory(olddir);
@ -1315,15 +1335,19 @@ namespace UWUVCI_AIO_WPF
}
public void ImageWarning()
{
MessageBox.Show("Images need to either be in a Bit Depth of 32bit or 24bit. \nIf using Tools like paint.net do not choose the Auto function.", "Image Warning", MessageBoxButtons.OK, MessageBoxIcon.Information);
new Custom_Message("Image Warning", "Images need to either be in a Bit Depth of 32bit or 24bit. \nIf using Tools like paint.net do not choose the Auto function.").ShowDialog();
}
public bool choosefolder = false;
public bool CBaseConvertInfo()
{
bool ret = false;
DialogResult res = MessageBox.Show("You seem to have added a NUS format Custom Base.\nDo you want it to be converted to be used with the Injector?", "NUS Custom Base", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
if(res == DialogResult.Yes)
new Custom_Message("NUS Custom Base", "You seem to have added a NUS format Custom Base.\nDo you want it to be converted to be used with the Injector?").ShowDialog();
if(choosefolder)
{
ret = true;
choosefolder = false;
}
return ret;
}
@ -1470,8 +1494,8 @@ namespace UWUVCI_AIO_WPF
}
return info;
}
public void SetInjectPath()
{
using (var dialog = new System.Windows.Forms.FolderBrowserDialog())
@ -1490,13 +1514,15 @@ namespace UWUVCI_AIO_WPF
}
else
{
DialogResult r = MessageBox.Show("Folder contains Files or Subfolders, do you really want to use this folder as the Inject Folder?", "Information", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (r == DialogResult.Yes)
new Custom_Message("Information", "Folder contains Files or Subfolders, do you really want to use this folder as the Inject Folder?").ShowDialog();
if (choosefolder)
{
choosefolder = false;
Settings.Default.OutPath = dialog.SelectedPath;
Settings.Default.SetOutOnce = true;
Settings.Default.Save();
UpdatePathSet();
}
else
{
@ -1506,7 +1532,7 @@ namespace UWUVCI_AIO_WPF
}catch(Exception e)
{
Console.WriteLine(e.Message);
MessageBox.Show("An Error occured, please try again!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
new Custom_Message("Error", "An Error occured, please try again!").ShowDialog();
}
}
@ -1531,9 +1557,11 @@ namespace UWUVCI_AIO_WPF
}
else
{
DialogResult r = MessageBox.Show("Folder contains Files or Subfolders, do you really want to use this folder as the Base Folder?", "Information", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (r == DialogResult.Yes)
new Custom_Message("Information", "Folder contains Files or Subfolders, do you really want to use this folder as the Base Folder?").ShowDialog();
if (choosefolder)
{
choosefolder = false;
Settings.Default.BasePath = dialog.SelectedPath;
Settings.Default.SetBaseOnce = true;
Settings.Default.Save();
@ -1548,7 +1576,7 @@ namespace UWUVCI_AIO_WPF
catch (Exception e)
{
Console.WriteLine(e.Message);
MessageBox.Show("An Error occured, please try again!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
new Custom_Message("Error", "An Error occured, please try again!").ShowDialog();
}
}
@ -1589,37 +1617,46 @@ namespace UWUVCI_AIO_WPF
public string getInternalName(string OpenGame)
{
string ret = "";
using (var reader = new BinaryReader(File.OpenRead(OpenGame)))
try
{
reader.BaseStream.Position = 0x00;
char TempChar;
//WBFS Check
if (new FileInfo(OpenGame).Extension.Contains("wbfs")) //Performs actions if the header indicates a WBFS file
using (var reader = new BinaryReader(File.OpenRead(OpenGame)))
{
reader.BaseStream.Position = 0x00;
char TempChar;
//WBFS Check
if (new FileInfo(OpenGame).Extension.Contains("wbfs")) //Performs actions if the header indicates a WBFS file
{
reader.BaseStream.Position = 0x200;
reader.BaseStream.Position = 0x200;
reader.BaseStream.Position = 0x218;
reader.BaseStream.Position = 0x220;
while ((int)(TempChar = reader.ReadChar()) != 0) ret = ret + TempChar;
}
else
{
reader.BaseStream.Position = 0x218;
reader.BaseStream.Position = 0x220;
while ((int)(TempChar = reader.ReadChar()) != 0) ret = ret + TempChar;
}
else
{
reader.BaseStream.Position = 0x18;
reader.BaseStream.Position = 0x20;
while ((int)(TempChar = reader.ReadChar()) != 0) ret = ret + TempChar;
}
}
}catch(Exception e)
{
new Custom_Message("Unknown ROM", "It seems that you inserted an unknown ROM as a Wii or GameCube game.\nIt is not recommended continuing with said ROM!").ShowDialog();
ret = "";
}
return ret;
}
}

View file

@ -17,7 +17,7 @@ using UWUVCI_AIO_WPF.Classes;
using GameBaseClassLibrary;
using System.Windows.Forms;
using System.IO;
using MessageBox = System.Windows.Forms.MessageBox;
using UWUVCI_AIO_WPF.UI.Windows;
namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases
{
@ -58,10 +58,12 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases
tbMeta.Foreground = new SolidColorBrush(Color.FromRgb(205, 50, 50));
mvm.BaseDownloaded = false;
mvm.CBasePath = null;
//warning if using custom bases programm may crash
DialogResult res = System.Windows.Forms.MessageBox.Show("If using Custom Bases there will be a chance that the programm 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 select Yes", "Custom base Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
if(res == DialogResult.Yes)
{ //get folder
//warning if using custom bases programm may crash
new Custom_Message("Information", "If using Custom Bases there will be a chance that the programm 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();
if(mvm.choosefolder)
{
mvm.choosefolder = false; //get folder
using (var dialog = new System.Windows.Forms.FolderBrowserDialog())
{
System.Windows.Forms.DialogResult result = dialog.ShowDialog();
@ -71,13 +73,15 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases
{
if (mvm.DirectoryIsEmpty(dialog.SelectedPath))
{
System.Windows.Forms.MessageBox.Show("The folder is Empty. Please choose another folder");
new Custom_Message("Issue", "The Folder is Empty. Please choose another Folder.").ShowDialog();
}
else
{
if(Directory.GetDirectories(dialog.SelectedPath).Length > 3)
{
MessageBox.Show("This folder has too many subfolders. Please choose another folder");
new Custom_Message("Issue", "This Folder has too many subfolders. Please choose another folder").ShowDialog();
}
else
{
@ -104,7 +108,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases
}
else
{
MessageBox.Show("This Folder is not in the \"loadiine\" format");
new Custom_Message("Issue", "This folder is not in the \"loadiine\" format").ShowDialog();
}
}
else
@ -136,7 +140,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases
}
else
{
MessageBox.Show("This Folder does not contain needed NUS files");
new Custom_Message("Issue", "This Folder does not contain needed NUS files").ShowDialog();
}
}
}

View file

@ -59,12 +59,12 @@ namespace UWUVCI_AIO_WPF.UI.Frames
private void Button_Click_4(object sender, RoutedEventArgs e)
{
Process.Start(@"Tools\INICreator.exe");
Process.Start(@"bin\Tools\INICreator.exe");
}
private void Button_Click_5(object sender, RoutedEventArgs e)
{
MessageBox.Show("UWUVCI AIO - NicoAICP, Morilli, Lreiia Bot\nBeta Testers/Contributors - wowjinxy, Danis, Adolfobenjaminv\n\n7za - Igor Pavlov\nBuildPcePkg & BuildTurboCDPcePkg - JohnnyGo\nCdecrypt - crediar\nCNUSPACKER - NicoAICP, Morilli\nINICreator - NicoAICP\nN64Converter - Morilli\npng2tga - Easy2Convert\ninject_gba_c (psb) - Morilli\nRetroInject_C - Morilli\ntga_verify - Morilli\nWiiUDownloader - Morilli\nwiiurpxtool - 0CHB0\nGoomba - FluBBa\nDarkFilter Removal N64 - MelonSpeedruns\nNintendont SD Card Menu - TeconMoon\nwit - Wiimm\nGetExtTypePatcher - Fix94\nnfs2iso2nfs - sabykos, piratesephiroth, Fix94 and many more", "Credits");
new Custom_Message("Credits", "UWUVCI AIO - NicoAICP, Morilli, Lreiia Bot\nBeta Testers/Contributors - wowjinxy, Danis, Adolfobenjaminv\n\n7za - Igor Pavlov\nBuildPcePkg & BuildTurboCDPcePkg - JohnnyGo\nCdecrypt - crediar\nCNUSPACKER - NicoAICP, Morilli\nINICreator - NicoAICP\nN64Converter - Morilli\npng2tga - Easy2Convert\ninject_gba_c (psb) - Morilli\nRetroInject_C - Morilli\ntga_verify - Morilli\nWiiUDownloader - Morilli\nwiiurpxtool - 0CHB0\nGoomba - FluBBa\nDarkFilter Removal N64 - MelonSpeedruns\nNintendont SD Card Menu - TeconMoon\nwit - Wiimm\nGetExtTypePatcher - Fix94\nnfs2iso2nfs - sabykos, piratesephiroth, Fix94 and many more\nWii-VMC - wanikoko").ShowDialog();
}
private void Button_Click_6(object sender, RoutedEventArgs e)
@ -82,12 +82,12 @@ namespace UWUVCI_AIO_WPF.UI.Frames
private void Button_Click_8(object sender, RoutedEventArgs e)
{
MainViewModel mvm = FindResource("mvm") as MainViewModel;
mvm.ResetTitleKeys();
mvm.ResetTKQuest();
}
private void Button_Click_9(object sender, RoutedEventArgs e)
{
Process.Start(@"Tools\NintendontConfig.exe");
Process.Start(@"bin\Tools\NintendontConfig.exe");
}
}
}

View file

@ -23,7 +23,8 @@
<Label HorizontalAlignment="Left" Margin="2,10,0,0" VerticalAlignment="Top" Height="Auto" Width="Auto" FontSize="18" Foreground="Black" x:Name="Message" HorizontalContentAlignment="Left" Content="" VerticalContentAlignment="Center" Grid.Row="1" />
<Button Content="Close" HorizontalAlignment="Left" Margin="7,8,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click" RenderTransformOrigin="0.5,0.5" Grid.Row="2" Grid.Column="2"/>
<Button Content="Open Folder" HorizontalAlignment="Left" Margin="5,8,0,0" VerticalAlignment="Top" Width="121" Name="Folder" Click="Folder_Click" RenderTransformOrigin="1,1" Grid.Row="2" Grid.Column="1"/>
<Button Content="Continue" HorizontalAlignment="Left" Margin="5,8,0,0" VerticalAlignment="Top" Width="121" x:Name="Reset" Click="Reset_Click" RenderTransformOrigin="1,1" Grid.Row="2" Grid.Column="1" Visibility="Hidden"/>
</Grid>
</Window>

View file

@ -21,6 +21,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
public partial class Custom_Message : Window
{
string path;
bool reset = false;
public Custom_Message(string title, string message)
{
InitializeComponent();
@ -30,6 +31,14 @@ namespace UWUVCI_AIO_WPF.UI.Windows
Title.Text = title;
Message.Content = message;
Folder.Visibility = Visibility.Hidden;
if (title.Contains("Resetting") || message.Contains("NUS format") || message.Contains("Folder contains Files or Subfolders, do you really want to use this") || message.Contains("If using Custom Bases"))
{
Reset.Visibility = Visibility.Visible;
if (title.Contains("Resetting"))
{
reset = true;
}
}
}
public Custom_Message(string title, string message, string Path)
@ -48,6 +57,21 @@ namespace UWUVCI_AIO_WPF.UI.Windows
private void Folder_Click(object sender, RoutedEventArgs e)
{
Process.Start(path);
this.Close();
}
private void Reset_Click(object sender, RoutedEventArgs e)
{
if (reset)
{
((MainViewModel)FindResource("mvm")).ResetTitleKeys();
}
else
{
((MainViewModel)FindResource("mvm")).choosefolder = true;
}
this.Close();
}
}
}

View file

@ -66,54 +66,29 @@ namespace UWUVCI_AIO_WPF.UI.Windows
if (mvm.checkcKey(tbKey.Text))
{
this.Close();
MessageBox.Show("The entered CommonKey is correct!", "Correct Key", MessageBoxButton.OK, MessageBoxImage.Information);
new Custom_Message("Correct Key", "The entered CommonKey is correct!").ShowDialog();
mvm.ArePathsSet();
}
else
{
MessageBox.Show("The entered CommonKey is incorrect!", "Incorrect Key", MessageBoxButton.OK, MessageBoxImage.Error);
new Custom_Message("Incorrect Key", "The entered CommonKey is incorrect!").ShowDialog();
}
}
else if (wiiu)
{
MainViewModel mvm = (MainViewModel)FindResource("mvm");
if (sys1)
{
if (mvm.checkSysKey1(tbKey.Text))
{
MessageBox.Show("The entered TitleKey is correct!", "Correct Key", MessageBoxButton.OK, MessageBoxImage.Information);
this.Close();
}
else
{
MessageBox.Show("The entered TitleKey is incorrect!", "Incorrect Key", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
else
{
if (mvm.checkSysKey(tbKey.Text))
{
MessageBox.Show("The entered TitleKey is correct!", "Correct Key", MessageBoxButton.OK, MessageBoxImage.Information);
this.Close();
}
else
{
MessageBox.Show("The entered TitleKey is incorrect!", "Incorrect Key", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
}
else
{
MainViewModel mvm = (MainViewModel)FindResource("mvm");
if (mvm.checkKey(tbKey.Text))
{
MessageBox.Show("The entered TitleKey is correct!", "Correct Key", MessageBoxButton.OK, MessageBoxImage.Information);
new Custom_Message("Correct Key", "The entered TitleKey is correct!").ShowDialog();
this.Close();
}
else
{
MessageBox.Show("The entered TitleKey is incorrect!", "Incorrect Key", MessageBoxButton.OK, MessageBoxImage.Error);
new Custom_Message("Incorrect Key", "The entered TitleKey is incorrect!").ShowDialog();
}
}