bootsound support, ini + bootsoun d + images from repo, ckey fix, help window

This commit is contained in:
NicoAICP 2020-04-29 01:40:54 +02:00
parent 5c1146f019
commit 4304726557
29 changed files with 946 additions and 466 deletions

View file

@ -1249,9 +1249,13 @@ namespace UWUVCI_AIO_WPF
string gameName = string.Empty;
if(gameNameOr != string.Empty && gameNameOr != null)
{
Regex reg = new Regex("[^a-zA-Z0-9 é -]");
gameName= reg.Replace(gameNameOr, "");
Regex reg = new Regex("[^a-zA-Z0-9 é - |]");
gameName= reg.Replace(gameNameOr, "");
if (gameName.Contains('|'))
{
var split = gameName.Split('|');
gameName = split[0] + ", " + split[1];
}
}
@ -1266,18 +1270,18 @@ namespace UWUVCI_AIO_WPF
doc.Load(metaXml);
if (gameName != null && gameName != string.Empty)
{
doc.SelectSingleNode("menu/longname_ja").InnerText = gameName;
doc.SelectSingleNode("menu/longname_en").InnerText = gameName;
doc.SelectSingleNode("menu/longname_fr").InnerText = gameName;
doc.SelectSingleNode("menu/longname_de").InnerText = gameName;
doc.SelectSingleNode("menu/longname_it").InnerText = gameName;
doc.SelectSingleNode("menu/longname_es").InnerText = gameName;
doc.SelectSingleNode("menu/longname_zhs").InnerText = gameName;
doc.SelectSingleNode("menu/longname_ko").InnerText = gameName;
doc.SelectSingleNode("menu/longname_nl").InnerText = gameName;
doc.SelectSingleNode("menu/longname_pt").InnerText = gameName;
doc.SelectSingleNode("menu/longname_ru").InnerText = gameName;
doc.SelectSingleNode("menu/longname_zht").InnerText = gameName;
doc.SelectSingleNode("menu/longname_ja").InnerText = gameName.Replace(",", "" );
doc.SelectSingleNode("menu/longname_en").InnerText = gameName.Replace(",", "");
doc.SelectSingleNode("menu/longname_fr").InnerText = gameName.Replace(",", "");
doc.SelectSingleNode("menu/longname_de").InnerText = gameName.Replace(",", "");
doc.SelectSingleNode("menu/longname_it").InnerText = gameName.Replace(",", "");
doc.SelectSingleNode("menu/longname_es").InnerText = gameName.Replace(",", "");
doc.SelectSingleNode("menu/longname_zhs").InnerText = gameName.Replace(",", "");
doc.SelectSingleNode("menu/longname_ko").InnerText = gameName.Replace(",", "");
doc.SelectSingleNode("menu/longname_nl").InnerText = gameName.Replace(",", "");
doc.SelectSingleNode("menu/longname_pt").InnerText = gameName.Replace(",", "");
doc.SelectSingleNode("menu/longname_ru").InnerText = gameName.Replace(",", "");
doc.SelectSingleNode("menu/longname_zht").InnerText = gameName.Replace(",", "");
}
if(code != null)
@ -1296,18 +1300,18 @@ namespace UWUVCI_AIO_WPF
doc.SelectSingleNode("menu/group_id").InnerText = $"0000{ID}";
if (gameName != null && gameName != string.Empty)
{
doc.SelectSingleNode("menu/shortname_ja").InnerText = gameName;
doc.SelectSingleNode("menu/shortname_fr").InnerText = gameName;
doc.SelectSingleNode("menu/shortname_de").InnerText = gameName;
doc.SelectSingleNode("menu/shortname_en").InnerText = gameName;
doc.SelectSingleNode("menu/shortname_it").InnerText = gameName;
doc.SelectSingleNode("menu/shortname_es").InnerText = gameName;
doc.SelectSingleNode("menu/shortname_zhs").InnerText = gameName;
doc.SelectSingleNode("menu/shortname_ko").InnerText = gameName;
doc.SelectSingleNode("menu/shortname_nl").InnerText = gameName;
doc.SelectSingleNode("menu/shortname_pt").InnerText = gameName;
doc.SelectSingleNode("menu/shortname_ru").InnerText = gameName;
doc.SelectSingleNode("menu/shortname_zht").InnerText = gameName;
doc.SelectSingleNode("menu/shortname_ja").InnerText = gameName.Split(',')[0];
doc.SelectSingleNode("menu/shortname_fr").InnerText = gameName.Split(',')[0];
doc.SelectSingleNode("menu/shortname_de").InnerText = gameName.Split(',')[0];
doc.SelectSingleNode("menu/shortname_en").InnerText = gameName.Split(',')[0];
doc.SelectSingleNode("menu/shortname_it").InnerText = gameName.Split(',')[0];
doc.SelectSingleNode("menu/shortname_es").InnerText = gameName.Split(',')[0];
doc.SelectSingleNode("menu/shortname_zhs").InnerText = gameName.Split(',')[0];
doc.SelectSingleNode("menu/shortname_ko").InnerText = gameName.Split(',')[0];
doc.SelectSingleNode("menu/shortname_nl").InnerText = gameName.Split(',')[0];
doc.SelectSingleNode("menu/shortname_pt").InnerText = gameName.Split(',')[0];
doc.SelectSingleNode("menu/shortname_ru").InnerText = gameName.Split(',')[0];
doc.SelectSingleNode("menu/shortname_zht").InnerText = gameName.Split(',')[0];
}
doc.Save(metaXml);
@ -1922,7 +1926,17 @@ namespace UWUVCI_AIO_WPF
{
png2tga.StartInfo.UseShellExecute = false;
png2tga.StartInfo.CreateNoWindow = true;
png2tga.StartInfo.FileName = Path.Combine(toolsPath, "png2tga.exe");
if(new FileInfo(inputPath).Extension.Contains("png"))
{
png2tga.StartInfo.FileName = Path.Combine(toolsPath, "png2tga.exe");
}else if (new FileInfo(inputPath).Extension.Contains("jpg"))
{
png2tga.StartInfo.FileName = Path.Combine(toolsPath, "jpg2tga.exe");
}else if (new FileInfo(inputPath).Extension.Contains("bmp"))
{
png2tga.StartInfo.FileName = Path.Combine(toolsPath, "bmp2tga.exe");
}
png2tga.StartInfo.Arguments = $"-i \"{inputPath}\" -o \"{outputPath}\" --width={widht} --height={height} --tga-bpp={bit} --tga-compression=none";
png2tga.Start();

View file

@ -10,7 +10,7 @@ namespace UWUVCI_AIO_WPF.Classes
class ToolCheck
{
static string FolderName = "bin\\Tools";
public static string[] ToolNames =
public static string[] ToolNames =
{
"CDecrypt.exe",
"CNUSPACKER.exe",
@ -49,7 +49,9 @@ namespace UWUVCI_AIO_WPF.Classes
"SharpCompress.dll",
"NKit.dll.config",
"IKVMW.zip",
"SOX.zip"
"SOX.zip",
"jpg2tga.exe",
"bmp2tga.exe"
};
public static bool DoesToolsFolderExist()

View file

@ -33,7 +33,7 @@ namespace UWUVCI_AIO_WPF
//public GameConfig GameConfiguration { get; set; }
private GameConfig gameConfiguration = new GameConfig();
public bool addi = false;
public GameConfig GameConfiguration
{
get { return gameConfiguration; }
@ -155,7 +155,7 @@ namespace UWUVCI_AIO_WPF
OnPropertyChanged();
}
}
public BaseContainerFrame bcf = null;
#region TKLIST
private List<GameBases> lNDS = new List<GameBases>();
@ -761,8 +761,12 @@ namespace UWUVCI_AIO_WPF
}
else
{
Regex reg = new Regex("[^a-zA-Z0-9 é -]");
gameConfiguration.GameName = reg.Replace(gameConfiguration.GameName, "");
if(gameConfiguration.GameName != null)
{
Regex reg = new Regex("[^a-zA-Z0-9 é -]");
gameConfiguration.GameName = reg.Replace(gameConfiguration.GameName, "");
}
Task.Run(() => { Injection.Packing(GameConfiguration.GameName, this); });
DownloadWait dw = new DownloadWait("Packing Inject - Please Wait", "", this);
@ -778,7 +782,7 @@ namespace UWUVCI_AIO_WPF
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);
Custom_Message cm = new Custom_Message("Injection Complete", $"It's recommended to install onto USB to avoid brick risks.{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
{
cm.Owner = mw;
@ -1251,7 +1255,7 @@ namespace UWUVCI_AIO_WPF
else if(!INI)
{
dialog.Filter = "BootImages (*.png; *.tga) | *.png;*.tga";
dialog.Filter = "BootImages (*.png; *.jpg; *.bmp; *.tga) | *.png;*.jpg;*.bmp;*.tga";
}
else if(INI)
{
@ -1776,7 +1780,7 @@ namespace UWUVCI_AIO_WPF
{
if (1274359530 == key.ToLower().GetHashCode())
{
Settings.Default.Ckey = key;
Settings.Default.Ckey = key.ToLower();
ckeys = true;
Settings.Default.Save();
@ -1787,7 +1791,7 @@ namespace UWUVCI_AIO_WPF
}
public bool isCkeySet()
{
if (Settings.Default.Ckey.GetHashCode() == 487391367)
if (Settings.Default.Ckey.ToLower().GetHashCode() == 1274359530)
{
ckeys = true;
return true;
@ -2196,51 +2200,61 @@ namespace UWUVCI_AIO_WPF
fs.Close();
Console.WriteLine("prodcode after scramble: " + repoid);
}
string[] ext = { "png", "jpg", "tga", "bmp" };
if (CheckForInternetConnectionWOWarning())
{
if (RemoteFileExists(linkbase + SystemType + repoid + "/iconTex.png") == true)
foreach(var e in ext)
{
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
if (RemoteFileExists(linkbase + SystemType + repoid + $"/iconTex.{e}") == true)
{
img.Owner = mw;
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog();
break;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "E";
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + $"/iconTex.{e}") == true)
{
img.Owner = mw;
repoid = repoid.Substring(0, 3) + "E";
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog();
break;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "P";
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + $"/iconTex.{e}") == true)
{
img.Owner = mw;
repoid = repoid.Substring(0, 3) + "P";
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}g", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog();
break;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "J";
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + $"/iconTex.{e}") == true)
{
img.Owner = mw;
repoid = repoid.Substring(0, 3) + "J";
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog();
break;
}
catch (Exception) { }
img.ShowDialog();
}
@ -2269,52 +2283,55 @@ namespace UWUVCI_AIO_WPF
fs.Close();
Console.WriteLine("prodcode after scramble: " + repoid);
}
string[] ext = { "png", "jpg", "tga", "bmp" };
if (CheckForInternetConnectionWOWarning())
{
if (RemoteFileExists(linkbase + SystemType + repoid + "/iconTex.png") == true)
foreach (var e in ext)
{
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
if (RemoteFileExists(linkbase + SystemType + repoid + $"/iconTex.{e}") == true)
{
img.Owner = mw;
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog(); break;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "E";
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + $"/iconTex.png") == true)
{
img.Owner = mw;
repoid = repoid.Substring(0, 3) + "E";
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog(); break;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "P";
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + $"/iconTex.{e}") == true)
{
img.Owner = mw;
repoid = repoid.Substring(0, 3) + "P";
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + "/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog(); break;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "J";
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + $"/iconTex.{e}") == true)
{
img.Owner = mw;
repoid = repoid.Substring(0, 3) + "J";
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog(); break;
}
catch (Exception) { }
img.ShowDialog();
}
}
@ -2341,96 +2358,109 @@ namespace UWUVCI_AIO_WPF
fs.Close();
Console.WriteLine("prodcode after scramble: "+repoid);
}
bool found = false;
string[] ext = { "png", "jpg", "tga", "bmp" };
if (CheckForInternetConnectionWOWarning())
{
if (RemoteFileExists(linkbase + SystemType + repoid + "/iconTex.png") == true)
foreach (var e in ext)
{
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
if (RemoteFileExists(linkbase + SystemType + repoid + $"/iconTex.{e}") == true)
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "E" ;
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "P" ;
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "J" ;
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog();
}
else
{
repoid = new string(new char[] { repoid[0], repoid[2], repoid[1], repoid[3] });
if (RemoteFileExists(linkbase + SystemType + repoid + "/iconTex.png") == true)
{
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog();
found = true;
img.ShowDialog(); break;
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + "/iconTex.png") == true)
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + $"/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "E";
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog();
found = true;
img.ShowDialog(); break;
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + "/iconTex.png") == true)
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + $"/iconTex.{e}") == true)
{
repoid = repoid.Substring(0, 3) + "P";
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog();
found = true;
img.ShowDialog(); break;
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + "/iconTex.png") == true)
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + $"/iconTex.{e}") == true)
{
repoid = repoid.Substring(0, 3) + "J";
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog();
found = true;
img.ShowDialog(); break;
}
else
{
repoid = new string(new char[] { repoid[0], repoid[2], repoid[1], repoid[3] });
if (RemoteFileExists(linkbase + SystemType + repoid + $"/iconTex.{e}") == true)
{
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog(); break;
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + $"/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "E";
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
found = true;
img.ShowDialog(); break;
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + $"/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "P";
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.png", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog(); break;
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "J";
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
found = true;
img.ShowDialog(); break;
}
}
}
@ -2462,6 +2492,7 @@ namespace UWUVCI_AIO_WPF
reader.BaseStream.Position = 0x00;
char TempChar;
//WBFS Check
string[] ext = { "tga", "jpg", "png", "bmp" };
if (new FileInfo(OpenGame).Extension.Contains("wbfs")) //Performs actions if the header indicates a WBFS file
{
@ -2478,49 +2509,53 @@ namespace UWUVCI_AIO_WPF
if (CheckForInternetConnectionWOWarning())
{
if (RemoteFileExists(linkbase + SystemType + repoid + "/iconTex.png") == true)
foreach(var e in ext)
{
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
if (RemoteFileExists(linkbase + SystemType + repoid + $"/iconTex.{e}") == true)
{
img.Owner = mw;
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog(); break;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + repoid.Substring(4, 2) + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "E" + repoid.Substring(4, 2);
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + repoid.Substring(4, 2) + $"/iconTex.{e}") == true)
{
img.Owner = mw;
repoid = repoid.Substring(0, 3) + "E" + repoid.Substring(4, 2);
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog(); break;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + repoid.Substring(4, 2) + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "P" + repoid.Substring(4, 2);
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + repoid.Substring(4, 2) + $"/iconTex.{e}") == true)
{
img.Owner = mw;
repoid = repoid.Substring(0, 3) + "P" + repoid.Substring(4, 2);
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog(); break;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + repoid.Substring(4, 2) + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "J" + repoid.Substring(4, 2);
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + repoid.Substring(4, 2) + $"/iconTex.{e}") == true)
{
img.Owner = mw;
repoid = repoid.Substring(0, 3) + "J" + repoid.Substring(4, 2);
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog(); break;
}
catch (Exception) { }
img.ShowDialog();
}
}
}
else
@ -2539,48 +2574,51 @@ namespace UWUVCI_AIO_WPF
if (CheckForInternetConnectionWOWarning())
{
if (RemoteFileExists(linkbase + SystemType + repoid + "/iconTex.png") == true)
foreach (var e in ext)
{
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
if (RemoteFileExists(linkbase + SystemType + repoid + $"/iconTex.{e}") == true)
{
img.Owner = mw;
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog(); break;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + repoid.Substring(4, 2) + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "E" + repoid.Substring(4, 2);
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + repoid.Substring(4, 2) + $"/iconTex.{e}") == true)
{
img.Owner = mw;
repoid = repoid.Substring(0, 3) + "E" + repoid.Substring(4, 2);
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog(); break;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + repoid.Substring(4, 2) + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "P" + repoid.Substring(4, 2);
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + repoid.Substring(4, 2) + $"/iconTex.{e}") == true)
{
img.Owner = mw;
repoid = repoid.Substring(0, 3) + "P" + repoid.Substring(4, 2);
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog(); break;
}
catch (Exception) { }
img.ShowDialog();
}
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + repoid.Substring(4, 2) + "/iconTex.png") == true)
{
repoid = repoid.Substring(0, 3) + "J" + repoid.Substring(4, 2);
img = new IMG_Message(linkbase + SystemType + repoid + "/iconTex.png", linkbase + SystemType + repoid + "/bootTvTex.png");
try
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + repoid.Substring(4, 2) + $"/iconTex.{e}") == true)
{
img.Owner = mw;
repoid = repoid.Substring(0, 3) + "J" + repoid.Substring(4, 2);
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
try
{
img.Owner = mw;
}
catch (Exception) { }
img.ShowDialog(); break;
}
catch (Exception) { }
img.ShowDialog();
}
}
@ -2639,5 +2677,25 @@ namespace UWUVCI_AIO_WPF
return false;
}
}
public string GetURL(string console)
{
WebRequest request;
//get download link from uwuvciapi
request = WebRequest.Create("https://uwuvciapi.azurewebsites.net/GetURL?cns=" + console.ToLower());
var response = request.GetResponse();
using (Stream dataStream = response.GetResponseStream())
{
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader(dataStream);
// Read the content.
string responseFromServer = reader.ReadToEnd();
// Display the content.
return responseFromServer;
}
}
}
}

View file

@ -38,6 +38,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Bases
if (console == GameConsoles.GCN) this.console = GameConsoles.WII;
else this.console = console;
mvm.GetBases(this.console);
mvm.bcf = this;
if (console == GameConsoles.NES)
{
cbCombo.ToolTip = "We recommend Metal Slader Glory for NES Injection!";

View file

@ -16,7 +16,7 @@
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,238" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,149" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,413,157,52" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,457,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,478,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"/>
@ -37,6 +37,8 @@
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
<Image HorizontalAlignment="Left" Height="36" Margin="599,10,0,0" VerticalAlignment="Top" Width="36" Cursor="Hand" Source="/UWUVCI AIO WPF;component/UI/Images/help.png" MouseLeftButtonDown="Image_MouseLeftButtonDown"/>
<Label Content="Use | for 2 lines" HorizontalAlignment="Left" Margin="506,428,0,0" VerticalAlignment="Top" Width="127" HorizontalContentAlignment="Center" ToolTip="e.g. Wii|Sports"/>
</Grid>
</Page>

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
@ -281,12 +282,12 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(tv.Text).ShowDialog();
new TDRSHOW(tv.Text, false).ShowDialog();
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(drc.Text).ShowDialog();
new TDRSHOW(drc.Text, true).ShowDialog();
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
@ -326,5 +327,37 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
}
}
private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
try
{
string url = mvm.GetURL("n64");
if (url == null || url == "") throw new Exception();
TitleKeys webbrowser = new TitleKeys(url);
try
{
webbrowser.Owner = mvm.mw;
}
catch (Exception)
{
}
webbrowser.ShowDialog();
}
catch (Exception)
{
Custom_Message cm = new Custom_Message("Not Implemented", "The Helppage for N64 is not implemented yet");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.Show();
}
}
}
}

View file

@ -16,7 +16,7 @@
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,238" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,149" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,413,157,52" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,457,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,478,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"/>
@ -35,5 +35,7 @@
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
<Image HorizontalAlignment="Left" Height="36" Margin="599,10,0,0" VerticalAlignment="Top" Width="36" Cursor="Hand" Source="/UWUVCI AIO WPF;component/UI/Images/help.png" MouseLeftButtonDown="Image_MouseLeftButtonDown"/>
<Label Content="Use | for 2 lines" HorizontalAlignment="Left" Margin="506,428,0,0" VerticalAlignment="Top" Width="127" HorizontalContentAlignment="Center" ToolTip="e.g. Wii|Sports"/>
</Grid>
</Page>

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
@ -257,7 +258,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(tv.Text).ShowDialog();
new TDRSHOW(tv.Text,false).ShowDialog();
}
public void imgpath(string icon, string tv)
{
@ -268,7 +269,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(drc.Text).ShowDialog();
new TDRSHOW(drc.Text,true).ShowDialog();
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
@ -308,6 +309,38 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
}
}
private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
try
{
string url = mvm.GetURL("gba");
if (url == null || url == "") throw new Exception();
TitleKeys webbrowser = new TitleKeys(url);
try
{
webbrowser.Owner = mvm.mw;
}
catch (Exception)
{
}
webbrowser.ShowDialog();
}
catch (Exception)
{
Custom_Message cm = new Custom_Message("Not Implemented", "The Helppage for GBA is not implemented yet");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.Show();
}
}
}
}

View file

@ -16,7 +16,7 @@
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,238" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,149" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,413,157,52" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,457,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,478,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"/>
@ -37,6 +37,8 @@
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click_1"/>
<Image HorizontalAlignment="Left" Height="36" Margin="599,10,0,0" VerticalAlignment="Top" Width="36" Cursor="Hand" Source="/UWUVCI AIO WPF;component/UI/Images/help.png" MouseLeftButtonDown="Image_MouseLeftButtonDown"/>
<Label Content="Use | for 2 lines" HorizontalAlignment="Left" Margin="506,428,0,0" VerticalAlignment="Top" Width="127" HorizontalContentAlignment="Center" ToolTip="e.g. Wii|Sports"/>
</Grid>
</Page>

View file

@ -1,6 +1,7 @@
using GameBaseClassLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
@ -321,12 +322,12 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(tv.Text).ShowDialog();
new TDRSHOW(tv.Text,false).ShowDialog();
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(drc.Text).ShowDialog();
new TDRSHOW(drc.Text,true).ShowDialog();
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
@ -415,5 +416,39 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
}
}
private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
try
{
string url = mvm.GetURL("gcn");
if (url == null || url == "") throw new Exception();
TitleKeys webbrowser = new TitleKeys(url);
try
{
webbrowser.Owner = mvm.mw;
}
catch (Exception)
{
}
webbrowser.ShowDialog();
}
catch (Exception)
{
Custom_Message cm = new Custom_Message("Not Implemented", "The Helppage for GCN is not implemented yet");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.Show();
}
//
}
}
}

View file

@ -16,7 +16,7 @@
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,238" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,149" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,413,157,52" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,457,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,478,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,329,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,239,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,284,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
@ -33,6 +33,7 @@
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
<Image HorizontalAlignment="Left" Height="36" Margin="599,10,0,0" VerticalAlignment="Top" Width="36" Cursor="Hand" Source="/UWUVCI AIO WPF;component/UI/Images/help.png" MouseLeftButtonDown="Image_MouseLeftButtonDown"/>
<Label Content="Use | for 2 lines" HorizontalAlignment="Left" Margin="506,428,0,0" VerticalAlignment="Top" Width="127" HorizontalContentAlignment="Center" ToolTip="e.g. Wii|Sports"/>
</Grid>
</Page>

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
@ -272,12 +273,12 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(tv.Text).ShowDialog();
new TDRSHOW(tv.Text,false).ShowDialog();
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(drc.Text).ShowDialog();
new TDRSHOW(drc.Text,true).ShowDialog();
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
@ -317,5 +318,72 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
}
}
private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (cd)
{
try
{
string url = mvm.GetURL("tgcd");
if (url == null || url == "") throw new Exception();
TitleKeys webbrowser = new TitleKeys(url);
try
{
webbrowser.Owner = mvm.mw;
}
catch (Exception)
{
}
webbrowser.ShowDialog();
}
catch (Exception)
{
Custom_Message cm = new Custom_Message("Not Implemented", "The Helppage for TGxCD is not implemented yet");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.Show();
}
}
else
{
try
{
string url = mvm.GetURL("tg16");
if (url == null || url == "") throw new Exception();
TitleKeys webbrowser = new TitleKeys(url);
try
{
webbrowser.Owner = mvm.mw;
}
catch (Exception)
{
}
webbrowser.ShowDialog();
}
catch (Exception)
{
Custom_Message cm = new Custom_Message("Not Implemented", "The Helppage for TGx16 is not implemented yet");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.Show();
}
}
}
}
}

View file

@ -16,7 +16,7 @@
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,238" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,149" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,413,157,52" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,457,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,478,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"/>
@ -28,5 +28,7 @@
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="WAV needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Text="{Binding BootSound}" Focusable="False" Cursor="Help"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
<Image HorizontalAlignment="Left" Height="36" Margin="599,10,0,0" VerticalAlignment="Top" Width="36" Cursor="Hand" Source="/UWUVCI AIO WPF;component/UI/Images/help.png" MouseLeftButtonDown="Image_MouseLeftButtonDown"/>
<Label Content="Use | for 2 lines" HorizontalAlignment="Left" Margin="506,428,0,0" VerticalAlignment="Top" Width="127" HorizontalContentAlignment="Center" ToolTip="e.g. Wii|Sports"/>
</Grid>
</Page>

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
@ -250,12 +251,12 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(tv.Text).ShowDialog();
new TDRSHOW(tv.Text,false).ShowDialog();
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(drc.Text).ShowDialog();
new TDRSHOW(drc.Text,true).ShowDialog();
}
private void logIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
@ -296,5 +297,39 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
}
private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
try
{
string url = mvm.GetURL(mvm.GameConfiguration.Console.ToString().ToLower());
if (url == null || url == "") throw new Exception();
TitleKeys webbrowser = new TitleKeys(url);
try
{
webbrowser.Owner = mvm.mw;
}
catch (Exception)
{
}
webbrowser.ShowDialog();
}
catch (Exception)
{
Custom_Message cm = new Custom_Message("Not Implemented", $"The Helppage for {mvm.GameConfiguration.Console.ToString()} is not implemented yet");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.Show();
}
}
}
}

View file

@ -15,7 +15,7 @@
<TextBox materialDesign:HintAssist.Hint="BOOTTVTEX" Name="tv" Style="{StaticResource MaterialDesignFloatingHintTextBox}" ToolTip="Needs a BitDepth of 24 and a Dimension of 1280x720" Margin="10,227,157,238" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.TGATv.ImgPath}" Cursor="Help"/>
<TextBox materialDesign:HintAssist.Hint="BOOTLOGOTEX (OPTIONAL)" ToolTip="Needs a BitDepth of 32 and a Dimension of 170x42" Name="log" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,317,157,149" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help" Text="{Binding GameConfiguration.TGALog.ImgPath}"/>
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,413,157,52" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" Text="{Binding GameConfiguration.GameName}" Name="gn" KeyUp="gn_KeyUp" MaxLength="250"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,457,0,0" VerticalAlignment="Top" Width="127" IsEnabled="{Binding CanInject}" Click="InjectGame"/>
<Button Content="Inject" HorizontalAlignment="Left" Margin="506,478,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"/>
@ -36,6 +36,8 @@
<Image HorizontalAlignment="Left" Height="32" Margin="446,328,0,0" VerticalAlignment="Top" Width="40" OpacityMask="LightGray" Name="logIMG" Source="/UWUVCI AIO WPF;component/UI/Images/camera3.png" Cursor="Hand" MouseLeftButtonDown="logIMG_MouseLeftButtonDown" Visibility="Hidden"/>
<TextBox materialDesign:HintAssist.Hint="BOOTSOUND (OPTIONAL)" ToolTip="Needs to be a RIFF WAVE file 48000khz and 16bit stereo." x:Name="sound" Text="{Binding BootSound}" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,365,157,101" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Cursor="Help"/>
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,377,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
<Image HorizontalAlignment="Left" Height="36" Margin="599,10,0,0" VerticalAlignment="Top" Width="36" Cursor="Hand" Source="/UWUVCI AIO WPF;component/UI/Images/help.png" MouseLeftButtonDown="Image_MouseLeftButtonDown"/>
<Label Content="Use | for 2 lines" HorizontalAlignment="Left" Margin="506,428,0,0" VerticalAlignment="Top" Width="127" HorizontalContentAlignment="Center" ToolTip="e.g. Wii|Sports"/>
</Grid>
</Page>

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
@ -358,12 +359,12 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
private void tvIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
new TDRSHOW(tv.Text).ShowDialog();
new TDRSHOW(tv.Text,false).ShowDialog();
}
private void drcIMG_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
TDRSHOW t = new TDRSHOW(drc.Text);
TDRSHOW t = new TDRSHOW(drc.Text,true);
t.ShowDialog();
}
@ -462,5 +463,37 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
}
}
private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
try
{
string url = mvm.GetURL("wii");
if (url == null || url == "") throw new Exception();
TitleKeys webbrowser = new TitleKeys(url);
try
{
webbrowser.Owner = mvm.mw;
}
catch (Exception)
{
}
webbrowser.ShowDialog();
}
catch (Exception)
{
Custom_Message cm = new Custom_Message("Not Implemented", "The Helppage for Wii is not implemented yet");
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.Show();
}
}
}
}

View file

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

View file

@ -28,7 +28,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames
{
InitializeComponent();
parent = mw;
wb.Navigate("https://google.com");
}
public void Dispose()
{
@ -37,8 +37,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames
private void Button_Click(object sender, RoutedEventArgs e)
{
TitleKeys tk = new TitleKeys();
tk.ShowDialog();
/* TitleKeys tk = new TitleKeys();
tk.ShowDialog();*/
}
private void Button_Click_1(object sender, RoutedEventArgs e)

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -23,6 +23,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
{
string path;
bool reset = false;
bool add = false;
public Custom_Message(string title, string message)
{
InitializeComponent();
@ -32,13 +33,19 @@ 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"))
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") || title.Contains("Found additional Files"))
{
Reset.Visibility = Visibility.Visible;
if (title.Contains("Resetting"))
{
reset = true;
}
if(title.Contains("Found additional Files"))
{
add = true;
Reset.Content = "Yes";
}
}
if(title.Equals("Image Warning"))
{
@ -102,6 +109,10 @@ namespace UWUVCI_AIO_WPF.UI.Windows
this.Close();
((MainViewModel)FindResource("mvm")).ResetTitleKeys();
}
else if (add)
{
((MainViewModel)FindResource("mvm")).addi = true;
}
else
{
((MainViewModel)FindResource("mvm")).choosefolder = true;

View file

@ -31,11 +31,16 @@ namespace UWUVCI_AIO_WPF.UI.Windows
public LOGSHOW(string path)
{
pat = path;
pat = String.Copy(path);
InitializeComponent();
if (Directory.Exists(System.IO.Path.Combine(tempPath, "image"))) Directory.Delete(System.IO.Path.Combine(tempPath, "image"), true);
Directory.CreateDirectory(System.IO.Path.Combine(tempPath, "image"));
if (new FileInfo(path).Extension.Contains("tga"))
if (path == "Added via Config")
{
File.WriteAllBytes(System.IO.Path.Combine(tempPath, "image", "log." + (FindResource("mvm") as MainViewModel).GameConfiguration.TGALog.extension), (FindResource("mvm") as MainViewModel).GameConfiguration.TGALog.ImgBin);
pat = System.IO.Path.Combine(tempPath, "image", "log." + (FindResource("mvm") as MainViewModel).GameConfiguration.TGALog.extension);
}
if (new FileInfo(pat).Extension.Contains("tga"))
{
using (Process conv = new Process())
{
@ -45,7 +50,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
conv.StartInfo.FileName = System.IO.Path.Combine(toolsPath, "tga2png.exe");
conv.StartInfo.Arguments = $"-i \"{path}\" -o \"{System.IO.Path.Combine(tempPath, "image")}\"";
conv.StartInfo.Arguments = $"-i \"{pat}\" -o \"{System.IO.Path.Combine(tempPath, "image")}\"";
conv.Start();
conv.WaitForExit();
@ -58,16 +63,21 @@ namespace UWUVCI_AIO_WPF.UI.Windows
}
else
{
copy = path;
copy = pat;
}
BitmapImage image = new BitmapImage();
image.BeginInit();
image.CacheOption = BitmapCacheOption.OnLoad;
image.UriSource = new Uri(copy);
image.UriSource = new Uri(copy, UriKind.Absolute);
image.EndInit();
image.Freeze();
img.Source = image;
if(path == "Added via Config")
{
File.Delete(pat);
}
}

View file

@ -31,11 +31,17 @@ namespace UWUVCI_AIO_WPF.UI.Windows
public ICOSHOW(string path)
{
pat = path;
pat = String.Copy(path);
InitializeComponent();
if (Directory.Exists(System.IO.Path.Combine(tempPath, "image"))) Directory.Delete(System.IO.Path.Combine(tempPath, "image"), true);
Directory.CreateDirectory(System.IO.Path.Combine(tempPath, "image"));
if (new FileInfo(path).Extension.Contains("tga"))
if(path == "Added via Config")
{
File.WriteAllBytes(System.IO.Path.Combine(tempPath, "image", "ico." + (FindResource("mvm") as MainViewModel).GameConfiguration.TGAIco.extension), (FindResource("mvm") as MainViewModel).GameConfiguration.TGAIco.ImgBin);
pat = System.IO.Path.Combine(tempPath, "image", "ico." + (FindResource("mvm") as MainViewModel).GameConfiguration.TGAIco.extension);
}
if (new FileInfo(pat).Extension.Contains("tga"))
{
using (Process conv = new Process())
{
@ -45,7 +51,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
conv.StartInfo.FileName = System.IO.Path.Combine(toolsPath, "tga2png.exe");
conv.StartInfo.Arguments = $"-i \"{path}\" -o \"{System.IO.Path.Combine(tempPath, "image")}\"";
conv.StartInfo.Arguments = $"-i \"{pat}\" -o \"{System.IO.Path.Combine(tempPath, "image")}\"";
conv.Start();
conv.WaitForExit();
@ -58,7 +64,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
}
else
{
copy = path;
copy = pat;
}
@ -69,11 +75,15 @@ namespace UWUVCI_AIO_WPF.UI.Windows
BitmapImage image = new BitmapImage();
image.BeginInit();
image.CacheOption = BitmapCacheOption.OnLoad;
image.UriSource = new Uri(copy);
image.UriSource = new Uri(copy, UriKind.Absolute);
image.EndInit();
img.Source = image;
if (path == "Added via Config")
{
File.Delete(pat);
}
}
public void Dispose()

View file

@ -28,15 +28,34 @@ namespace UWUVCI_AIO_WPF.UI.Windows
string copy = "";
string pat = "";
BitmapImage bitmap = new BitmapImage();
public TDRSHOW(string path)
public TDRSHOW(string path, bool drc)
{
pat = path;
pat = String.Copy(path);
InitializeComponent();
if (Directory.Exists(System.IO.Path.Combine(tempPath, "image"))) Directory.Delete(System.IO.Path.Combine(tempPath, "image"),true);
Directory.CreateDirectory(System.IO.Path.Combine(tempPath, "image"));
if (new FileInfo(path).Extension.Contains("tga"))
if (pat == "Added via Config")
{
string ext = "";
byte[] imageb = new byte[] { };
if (drc)
{
ext = (FindResource("mvm") as MainViewModel).GameConfiguration.TGADrc.extension;
imageb = (FindResource("mvm") as MainViewModel).GameConfiguration.TGADrc.ImgBin;
File.WriteAllBytes(System.IO.Path.Combine(tempPath, "image", "drc." + ext), imageb);
pat = System.IO.Path.Combine(tempPath, "image", "drc." + ext);
}
else
{
ext = (FindResource("mvm") as MainViewModel).GameConfiguration.TGATv.extension;
imageb = (FindResource("mvm") as MainViewModel).GameConfiguration.TGATv.ImgBin;
File.WriteAllBytes(System.IO.Path.Combine(tempPath, "image", "tv." + ext), imageb);
pat = System.IO.Path.Combine(tempPath, "image", "tv." + ext);
}
}
if (new FileInfo(pat).Extension.Contains("tga"))
{
using (Process conv = new Process())
{
@ -46,7 +65,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
conv.StartInfo.FileName = System.IO.Path.Combine(toolsPath, "tga2png.exe");
conv.StartInfo.Arguments = $"-i \"{path}\" -o \"{System.IO.Path.Combine(tempPath, "image")}\"";
conv.StartInfo.Arguments = $"-i \"{pat}\" -o \"{System.IO.Path.Combine(tempPath, "image")}\"";
conv.Start();
conv.WaitForExit();
@ -59,7 +78,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
}
else
{
copy = path;
copy = pat;
}
@ -68,11 +87,15 @@ namespace UWUVCI_AIO_WPF.UI.Windows
BitmapImage image = new BitmapImage();
image.BeginInit();
image.CacheOption = BitmapCacheOption.OnLoad;
image.UriSource = new Uri(copy);
image.UriSource = new Uri(copy, UriKind.Absolute);
image.EndInit();
image.Freeze();
img.Source = image;
if (path == "Added via Config")
{
File.Delete(pat);
}
}
public void Dispose()

View file

@ -16,16 +16,18 @@
<RowDefinition Height="18*"/>
</Grid.RowDefinitions>
<TextBlock HorizontalAlignment="Left" Margin="7,2,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="32" Width="463" FontSize="15" Foreground="Black" Name="Title" Grid.Row="0" FontWeight="Bold" Text="Do you want to use these BootImages?" Grid.RowSpan="2"/>
<Image Margin="352,15,10,8" Grid.Row="1" Source="/UWUVCI AIO WPF;component/UI/Images/iconborder.png" />
<Image Margin="352,15,10,8" Grid.Row="1" Source="/UWUVCI AIO WPF;component/UI/Images/iconborder.png" Name="icb"/>
<Image Name="icon" Margin="354,17,12,10" Grid.Row="1" />
<Image Grid.Column="0" Margin="9,17,155,2" Grid.Row="1" Grid.RowSpan="2" Source="/UWUVCI AIO WPF;component/UI/Images/tvborder.png"/>
<Image Grid.Column="0" Margin="9,17,155,2" Grid.Row="1" Grid.RowSpan="2" Source="/UWUVCI AIO WPF;component/UI/Images/tvborder.png" Name="tvb"/>
<Image Name="tv" Grid.Column="0" Margin="15,18,160,3" Grid.Row="1" Grid.RowSpan="2"/>
<Button Content="Yes" HorizontalAlignment="Left" Margin="354,14,0,0" VerticalAlignment="Top" Width="53" Click="Yes_Click" RenderTransformOrigin="0.5,0.5" Grid.Row="2"/>
<Button Content="No" HorizontalAlignment="Left" Margin="423,14,0,0" VerticalAlignment="Top" Width="53" Click="Canc_Click" RenderTransformOrigin="0.5,0.5" Grid.Row="2"/>
<Label Content="bootTvTex" HorizontalAlignment="Left" Margin="10,26,0,0" VerticalAlignment="Top" Grid.RowSpan="2" Height="24" Width="62"/>
<Label Content="iconTex" HorizontalAlignment="Left" Margin="354,26,0,0" VerticalAlignment="Top" Grid.RowSpan="2" Height="24" Width="47"/>
<Label Content="bootTvTex" HorizontalAlignment="Left" Margin="10,26,0,0" VerticalAlignment="Top" Grid.RowSpan="2" Height="24" Width="62" Name="tvl"/>
<Label Content="iconTex" HorizontalAlignment="Left" Margin="354,26,0,0" VerticalAlignment="Top" Grid.RowSpan="2" Height="24" Width="47" Name="icl"/>
<TextBlock HorizontalAlignment="Left" Margin="145,81,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="32" Width="196" FontSize="15" Foreground="Black" Grid.Row="1" FontWeight="Bold" Text="Cannot display TGA Images" Name="tgtv" Visibility="Hidden"/>
<TextBlock HorizontalAlignment="Left" Margin="369,65,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="32" Width="92" FontSize="11" Foreground="Black" Grid.Row="1" FontWeight="Bold" Text="Cannot display TGA Images" Name="tgic" Visibility="Hidden"/>
</Grid>
</Window>

View file

@ -1,4 +1,5 @@
using System;
using GameBaseClassLibrary;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@ -13,6 +14,7 @@ using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using UWUVCI_AIO_WPF.Classes;
using UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations;
namespace UWUVCI_AIO_WPF.UI.Windows
@ -24,15 +26,29 @@ namespace UWUVCI_AIO_WPF.UI.Windows
{
string ic = "";
string tvs = "";
public IMG_Message(string icon, string tv)
string repoid = "";
string icback = "";
string tvback = "";
public IMG_Message(string icon, string tv, string repoid)
{
InitializeComponent();
ic = icon;
tvs = tv;
BitmapImage bitmap = new BitmapImage();
if (ic.Contains("tga")){
icb.Visibility = Visibility.Hidden;
icl.Visibility = Visibility.Hidden;
//tgic.Visibility = Visibility.Visible;
}
if (tvs.Contains("tga"))
{
tvb.Visibility = Visibility.Hidden;
tvl.Visibility = Visibility.Hidden;
tgtv.Visibility = Visibility.Visible;
}
BitmapImage bitmap = new BitmapImage();
bitmap.BeginInit();
bitmap.UriSource = new Uri(icon, UriKind.Absolute);
bitmap.EndInit();
@ -44,7 +60,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
bmp2.UriSource = new Uri(tv, UriKind.Absolute);
bmp2.EndInit();
this.tv.Source = bmp2;
this.repoid = repoid;
}
private void Button_Click(object sender, RoutedEventArgs e)
{
@ -66,9 +82,9 @@ namespace UWUVCI_AIO_WPF.UI.Windows
Directory.Delete(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo"), true);
}
Directory.CreateDirectory(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo"));
client.DownloadFile(ic, System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "iconTex.png"));
mvm.GameConfiguration.TGAIco.ImgPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "iconTex.png");
mvm.GameConfiguration.TGAIco.extension = ".png";
client.DownloadFile(ic, System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"iconTex.{ic.Split('.')[3]}"));
mvm.GameConfiguration.TGAIco.ImgPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"iconTex.{ic.Split('.')[3]}");
mvm.GameConfiguration.TGAIco.extension = $".{ic.Split('.')[3]}";
if (mvm.test == GameBaseClassLibrary.GameConsoles.GCN)
{
(mvm.Thing as GCConfig).icoIMG.Visibility = Visibility.Visible;
@ -89,9 +105,9 @@ namespace UWUVCI_AIO_WPF.UI.Windows
{
(mvm.Thing as OtherConfigs).icoIMG.Visibility = Visibility.Visible;
}
client.DownloadFile(tvs, System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "bootTvTex.png"));
mvm.GameConfiguration.TGATv.ImgPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "bootTvTex.png");
mvm.GameConfiguration.TGATv.extension = ".png";
client.DownloadFile(tvs, System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootTvTex.{tvs.Split('.')[3]}"));
mvm.GameConfiguration.TGATv.ImgPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootTvTex.{tvs.Split('.')[3]}");
mvm.GameConfiguration.TGATv.extension = $".{tvs.Split('.')[3]}";
if (mvm.test == GameBaseClassLibrary.GameConsoles.GCN)
{
(mvm.Thing as GCConfig).tvIMG.Visibility = Visibility.Visible;
@ -103,21 +119,223 @@ namespace UWUVCI_AIO_WPF.UI.Windows
else if (mvm.GameConfiguration.Console == GameBaseClassLibrary.GameConsoles.N64)
{
(mvm.Thing as N64Config).tvIMG.Visibility = Visibility.Visible;
(mvm.Thing as N64Config).imgpath(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "iconTex.png"), System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "bootTvTex.png"));
(mvm.Thing as N64Config).imgpath(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"iconTex.{ic.Split('.')[3]}"), System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootTvTex.{tvs.Split('.')[3]}"));
}
else if (mvm.GameConfiguration.Console == GameBaseClassLibrary.GameConsoles.GBA)
{
(mvm.Thing as GBA).tvIMG.Visibility = Visibility.Visible;
(mvm.Thing as GBA).imgpath(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "iconTex.png"), System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "bootTvTex.png"));
(mvm.Thing as GBA).imgpath(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"iconTex.{ic.Split('.')[3]}"), System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootTvTex.{tvs.Split('.')[3]}"));
}
else if (mvm.GameConfiguration.Console == GameBaseClassLibrary.GameConsoles.NDS || mvm.GameConfiguration.Console == GameBaseClassLibrary.GameConsoles.SNES)
{
(mvm.Thing as OtherConfigs).tvIMG.Visibility = Visibility.Visible;
(mvm.Thing as OtherConfigs).imgpath(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "iconTex.png"), System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "bootTvTex.png"));
(mvm.Thing as OtherConfigs).imgpath(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"iconTex.{ic.Split('.')[3]}"), System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootTvTex.{tvs.Split('.')[3]}"));
}
if(mvm.test == GameConsoles.GCN)
{
checkForAdditionalFiles(GameConsoles.GCN);
}
else
{
checkForAdditionalFiles(mvm.GameConfiguration.Console);
}
this.Close();
}
private void checkForAdditionalFiles(GameConsoles console)
{
if (!Directory.Exists(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo")))
{
Directory.CreateDirectory(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo"));
}
bool ini = false;
bool btsnd = false;
string inip = "";
string btsndp = "";
string exten = "";
string linkbase = "https://raw.githubusercontent.com/Flumpster/UWUVCI-Images/master/";
if (console == GameConsoles.N64)
{
if (RemoteFileExists(linkbase+repoid+"/game.ini"))
{
ini = true;
inip = linkbase + repoid + "/game.ini";
}
}
string[] ext = { "wav", "mp3", "btsnd" };
foreach(var e in ext)
{
if (RemoteFileExists(linkbase + repoid + "/BootSound." + e))
{
btsnd = true;
btsndp = linkbase + repoid + "/BootSound." + e;
exten = e;
break;
}
}
if(ini || btsnd)
{
string extra = "There are more additional files found. Do you want to download those?";
if (ini && !btsnd) { extra = "There is an additional INI file available for Dowload. Do you want to dowload it?"; }
if (!ini && btsnd) { extra = "There is an additional BootSound file available for Dowload. Do you want to dowload it?"; }
if (ini && btsnd) { extra = "There is an adittional INI and BootSound file available for Dowload. Do you want to download those?"; }
MainViewModel mvm = FindResource("mvm") as MainViewModel;
Custom_Message cm = new Custom_Message("Found additional Files",extra);
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.ShowDialog();
if (mvm.addi)
{
var client = new WebClient();
if (ini)
{
client.DownloadFile(inip, System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "game.ini"));
(mvm.Thing as N64Config).ini.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "game.ini");
mvm.GameConfiguration.N64Stuff.INIPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "game.ini");
}
if (btsnd)
{
client.DownloadFile(btsndp, System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}"));
mvm.BootSound = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
switch (console)
{
case GameConsoles.NDS:
(mvm.Thing as OtherConfigs).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
break;
case GameConsoles.GBA:
(mvm.Thing as GBA).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
break;
case GameConsoles.N64:
(mvm.Thing as N64Config).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
break;
case GameConsoles.WII:
if(mvm.test == GameConsoles.GCN)
{
(mvm.Thing as GCConfig).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
}
else
{
(mvm.Thing as WiiConfig).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
}
break;
}
}
mvm.addi = false;
}
}
}
public void checkForAdditionalFiles(GameConsoles console, string repoid)
{
if (!Directory.Exists(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo")))
{
Directory.CreateDirectory(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo"));
}
bool ini = false;
bool btsnd = false;
string inip = "";
string btsndp = "";
string exten = "";
string linkbase = "https://raw.githubusercontent.com/Flumpster/UWUVCI-Images/master/";
if (console == GameConsoles.N64)
{
if (RemoteFileExists(linkbase + repoid + "/game.ini"))
{
ini = true;
inip = linkbase + repoid + "/game.ini";
}
}
string[] ext = { "wav", "mp3", "btsnd" };
foreach (var e in ext)
{
if (RemoteFileExists(linkbase + repoid + "/BootSound." + e))
{
btsnd = true;
btsndp = linkbase + repoid + "/BootSound." + e;
exten = e;
break;
}
}
if (ini || btsnd)
{
string extra = "There are more additional files found. Do you want to download those?";
if (ini && !btsnd) { extra = "There is an additional INI file available for Dowload. Do you want to dowload it?"; }
if (!ini && btsnd) { extra = "There is an additional BootSound file available for Dowload. Do you want to dowload it?"; }
if (ini && btsnd) { extra = "There is an adittional INI and BootSound file available for Dowload. Do you want to download those?"; }
MainViewModel mvm = FindResource("mvm") as MainViewModel;
Custom_Message cm = new Custom_Message("Found additional Files", extra);
try
{
cm.Owner = mvm.mw;
}
catch (Exception)
{
}
cm.ShowDialog();
if (mvm.addi)
{
var client = new WebClient();
if (ini)
{
client.DownloadFile(inip, System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "game.ini"));
(mvm.Thing as N64Config).ini.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "game.ini");
mvm.GameConfiguration.N64Stuff.INIPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", "game.ini");
}
if (btsnd)
{
client.DownloadFile(btsndp, System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}"));
mvm.BootSound = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
switch (console)
{
case GameConsoles.NDS:
(mvm.Thing as OtherConfigs).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
break;
case GameConsoles.GBA:
(mvm.Thing as GBA).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
break;
case GameConsoles.N64:
(mvm.Thing as N64Config).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
break;
case GameConsoles.WII:
if (mvm.test == GameConsoles.GCN)
{
(mvm.Thing as GCConfig).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
}
else
{
(mvm.Thing as WiiConfig).sound.Text = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "repo", $"bootSound.{exten}");
}
break;
}
}
mvm.addi = false;
}
}
}
private bool RemoteFileExists(string url)
{
try
{
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
request.Method = "HEAD";
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
response.Close();
return (response.StatusCode == HttpStatusCode.OK);
}
catch
{
return false;
}
}
}
}

View file

@ -84,8 +84,8 @@ namespace UWUVCI_AIO_WPF
mvm.RomPath = null;
mvm.Injected = false;
mvm.CBasePath = null;
mvm.bcf = null;
mvm.BootSound = null;
mvm.setThing(null);
switch ((sender as ListView).SelectedIndex)
{

View file

@ -6,45 +6,25 @@
xmlns:local="clr-namespace:UWUVCI_AIO_WPF"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="MAIN" Height="550" Width="1194.525" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" MouseDown="MoveWindow" Background="LightGray" ResizeMode="NoResize" Icon="/a.ico">
Title="MAIN" Height="550" Width="1194.525" WindowStyle="None" WindowStartupLocation="CenterScreen" Foreground="White" MouseDown="MoveWindow" Background="LightGray" ResizeMode="NoResize" Icon="/a.ico" BorderBrush="#FF2196F3" BorderThickness="2,2,2,2" ShowInTaskbar="False">
<Window.Resources>
<Storyboard x:Key="MenuOpen">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="GridMenu">
<EasingDoubleKeyFrame KeyTime="0" Value="60"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="210"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="MenuClose">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="GridMenu">
<EasingDoubleKeyFrame KeyTime="0" Value="200"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="60"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="MenuOpen"/>
<Storyboard x:Key="MenuClose"/>
</Window.Resources>
<Window.Triggers>
<EventTrigger RoutedEvent="ButtonBase.Click" SourceName="ButtonOpenMenu">
<BeginStoryboard Storyboard="{StaticResource MenuOpen}"/>
</EventTrigger>
<EventTrigger RoutedEvent="ButtonBase.Click" SourceName="ButtonCloseMenu">
<BeginStoryboard Storyboard="{StaticResource MenuClose}"/>
</EventTrigger>
</Window.Triggers>
<Grid DataContext="{StaticResource mvm}">
<Grid Margin="60,70,0,0">
<Grid Margin="0,70,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="193*"/>
<RowDefinition Height="47*"/>
</Grid.RowDefinitions>
<Frame x:Name="load_frame" NavigationUIVisibility="Hidden" Grid.RowSpan="2"/>
<TextBlock x:Name="tb" Margin="572,174,563,70" TextWrapping="Wrap" FontSize="20" Height="142" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Foreground="Black" />
<WebBrowser HorizontalAlignment="Left" Height="476" VerticalAlignment="Top" Width="1191" Name="wb"/>
</Grid>
<Grid Height="72" VerticalAlignment="Top" Margin="0,-2,0,0">
<Grid Height="70" VerticalAlignment="Top">
<Grid.Background>
<VisualBrush TileMode="Tile" Viewport="0,0,0.0965,1">
@ -55,90 +35,11 @@
</Grid.Background>
<TextBlock Name="tbTitleBar" HorizontalAlignment="Left" Margin="61,19,0,0" TextWrapping="Wrap" Text="UWUVCI AIO - TitleKeys" VerticalAlignment="Top" FontSize="25" Width="1075" TextAlignment="Center"/>
</Grid>
<Grid x:Name="GridMenu" Width="60" HorizontalAlignment="Left">
<Grid.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#5B6EAD" Offset="1"/>
<GradientStop Color="#7289DA" Offset="0"/>
<GradientStop Color="#6175B7" Offset="0.5"/>
</LinearGradientBrush>
</Grid.Background>
<StackPanel>
<Grid Height="70">
<Button x:Name="ButtonCloseMenu" Width="60" Height="60" Background="{x:Null}" BorderBrush="{x:Null}" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,5,0,0" Visibility="Collapsed" Click="ButtonCloseMenu_Click">
<materialDesign:PackIcon Foreground="White" Kind="ArrowLeft" Height="25" Width="25" />
</Button>
<Button x:Name="ButtonOpenMenu" Width="60" Height="60" Background="{x:Null}" BorderBrush="{x:Null}" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,5,0,0" Click="ButtonOpenMenu_Click">
<materialDesign:PackIcon Foreground="White" Kind="HamburgerMenu" Height="25" Width="25"/>
</Button>
</Grid>
<ListView Foreground="White" ScrollViewer.HorizontalScrollBarVisibility="Disabled" PreviewMouseLeftButtonUp="ListView_Click">
<!--NDS-->
<ListViewItem Height="60" x:Name="NDS" Cursor="Hand">
<StackPanel Orientation="Horizontal">
<Image Source="/UI/Images/ds64x64alt4.png"></Image>
<TextBlock Text="NDS Title Keys" VerticalAlignment="Center" Margin="20 10"/>
</StackPanel>
</ListViewItem>
<!--GBA-->
<ListViewItem Height="60" x:Name="GBA" Cursor="Hand">
<StackPanel Orientation="Horizontal">
<Image Source="/UI/Images/gba64alt3.png"></Image>
<TextBlock Text="GBA Title Keys" VerticalAlignment="Center" Margin="20 10"/>
</StackPanel>
</ListViewItem>
<!--N64-->
<ListViewItem Height="60" x:Name="N64" Cursor="Hand">
<StackPanel Orientation="Horizontal">
<Image Source="/UI/Images/n64colorlessalt5.png"></Image>
<TextBlock Text="N64 Title Keys" VerticalAlignment="Center" Margin="20 10"/>
</StackPanel>
</ListViewItem>
<!--SNES-->
<ListViewItem Height="60" x:Name="SNES" Cursor="Hand">
<StackPanel Orientation="Horizontal">
<Image Source="/UI/Images/snes64alt2.png"></Image>
<TextBlock Text="SNES Title Keys" VerticalAlignment="Center" Margin="20 10"/>
</StackPanel>
</ListViewItem>
<!--NES-->
<ListViewItem Height="60" x:Name="NES" Cursor="Hand">
<StackPanel Orientation="Horizontal">
<Image Source="/UI/Images/nes64alt5.png"></Image>
<TextBlock Text="NES Title Keys" VerticalAlignment="Center" Margin="20 10"/>
</StackPanel>
</ListViewItem>
<!--TG16-->
<ListViewItem Height="60" x:Name="TG16" Cursor="Hand">
<StackPanel Orientation="Horizontal">
<Image Source="/UI/Images/tg16alt.png"></Image>
<TextBlock Text="TG16 Title Keys" VerticalAlignment="Center" Margin="20 10"/>
</StackPanel>
</ListViewItem>
<!--MSX-->
<ListViewItem Height="60" x:Name="MSX" Cursor="Hand">
<StackPanel Orientation="Horizontal">
<Image Source="/UI/Images/msx.png"></Image>
<TextBlock Text="MSX Title Keys" VerticalAlignment="Center" Margin="20 10"/>
</StackPanel>
</ListViewItem>
<!--WIIGCN-->
<ListViewItem Height="60" x:Name="WIIGCN" Cursor="Hand">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Foreground="White" Kind="Images" Height="45" Width="45"/>
<TextBlock Text="WII/GCN Title Keys" VerticalAlignment="Center" Margin="20 10"/>
</StackPanel>
</ListViewItem>
</ListView>
</StackPanel>
<TextBlock Name="tbTitleBar" HorizontalAlignment="Left" Margin="61,19,0,0" TextWrapping="Wrap" Text="UWUVCI AIO - Help" VerticalAlignment="Top" FontSize="25" Width="1075" TextAlignment="Center"/>
</Grid>
<Button Content="Back" HorizontalAlignment="Left" Margin="1096,20,0,0" VerticalAlignment="Top" Width="83" Height="29" Click="Window_Close"/>
<Button Content="Back" HorizontalAlignment="Left" Margin="1096,19,0,0" VerticalAlignment="Top" Width="83" Height="29" Click="Window_Close"/>
</Grid>

View file

@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
@ -22,22 +23,19 @@ namespace UWUVCI_AIO_WPF.UI.Windows
/// </summary>
public partial class TitleKeys : Window
{
public TitleKeys()
public TitleKeys(string url)
{
InitializeComponent();
tb.Text = "To enter a TitleKey, first select the console on your left\nand then double click on a Title you want to enter the Key for.";
}
private void ButtonCloseMenu_Click(object sender, RoutedEventArgs e)
{
ButtonOpenMenu.Visibility = Visibility.Visible;
ButtonCloseMenu.Visibility = Visibility.Collapsed;
}
wb.Source = new Uri(url, UriKind.Absolute);
/*dynamic activeX = this.wb.GetType().InvokeMember("ActiveXInstance",
BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
null, this.wb, new object[] { });
activeX.Silent = true;*/
clsWebbrowser_Errors.SuppressscriptErrors(wb, true);
private void ButtonOpenMenu_Click(object sender, RoutedEventArgs e)
{
ButtonOpenMenu.Visibility = Visibility.Collapsed;
ButtonCloseMenu.Visibility = Visibility.Visible;
}
private void MoveWindow(object sender, MouseButtonEventArgs e)
{
try
@ -50,59 +48,8 @@ namespace UWUVCI_AIO_WPF.UI.Windows
}
}
private void DestroyFrame()
{
//(load_frame.Content as IDisposable).Dispose();
load_frame.Content = null;
load_frame.NavigationService.RemoveBackEntry();
}
private void ListView_Click(object sender, MouseButtonEventArgs e)
{
tb.Visibility = Visibility.Hidden;
switch ((sender as ListView).SelectedIndex)
{
case 0:
DestroyFrame();
tbTitleBar.Text = "UWUVCI AIO - NDS TKeys";
load_frame.Content = new TKFrame(GameConsoles.NDS);
break;
case 1:
DestroyFrame();
tbTitleBar.Text = "UWUVCI AIO - GBA TKeys";
load_frame.Content = new TKFrame(GameConsoles.GBA);
break;
case 2:
DestroyFrame();
tbTitleBar.Text = "UWUVCI AIO - N64 TKeys";
load_frame.Content = new TKFrame(GameConsoles.N64);
break;
case 4:
DestroyFrame();
tbTitleBar.Text = "UWUVCI AIO - NES TKeys";
load_frame.Content = new TKFrame(GameConsoles.NES);
break;
case 3:
DestroyFrame();
tbTitleBar.Text = "UWUVCI AIO - SNES TKeys";
load_frame.Content = new TKFrame(GameConsoles.SNES);
break;
case 5:
DestroyFrame();
tbTitleBar.Text = "UWUVCI AIO - TurboGrafX-16 TKeys";
load_frame.Content = new TKFrame(GameConsoles.TG16);
break;
case 6:
DestroyFrame();
tbTitleBar.Text = "UWUVCI AIO - MSX TKeys";
load_frame.Content = new TKFrame(GameConsoles.MSX);
break;
case 7:
DestroyFrame();
tbTitleBar.Text = "UWUVCI AIO - WII/GCN TKeys";
load_frame.Content = new TKFrame(GameConsoles.WII);
break;
}
}
private void Window_Close(object sender, RoutedEventArgs e)
{
this.Close();
@ -113,4 +60,37 @@ namespace UWUVCI_AIO_WPF.UI.Windows
this.WindowState = WindowState.Minimized;
}
}
public static class clsWebbrowser_Errors
{
//*set wpf webbrowser Control to silent
//*code source: https://social.msdn.microsoft.com/Forums/vstudio/en-US/4f686de1-8884-4a8d-8ec5-ae4eff8ce6db
public static void SuppressscriptErrors(this WebBrowser webBrowser, bool hide)
{
FieldInfo fiComWebBrowser = typeof(WebBrowser).GetField("_axIWebBrowser2", BindingFlags.Instance | BindingFlags.NonPublic);
if (fiComWebBrowser == null)
return;
object objComWebBrowser = fiComWebBrowser.GetValue(webBrowser);
if (objComWebBrowser == null)
return;
objComWebBrowser.GetType().InvokeMember("Silent", BindingFlags.SetProperty, null, objComWebBrowser, new object[] { hide });
}
}
}

View file

@ -447,6 +447,9 @@
<ItemGroup>
<Resource Include="UI\Images\camera3.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="UI\Images\help.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets" Condition="Exists('..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">