mirror of
https://github.com/stuff-by-3-random-dudes/UWUVCI-AIO-WPF
synced 2024-11-10 05:34:13 +00:00
IconImage creator, wii homebrew injection
This commit is contained in:
parent
593c28a0f0
commit
90fac03e30
29 changed files with 1055 additions and 165 deletions
|
@ -188,7 +188,7 @@ namespace UWUVCI_AIO_WPF.Classes
|
|||
|
||||
if (Players > 0)
|
||||
{
|
||||
string pStr = Players == 4 ? "1-4" : Players == 3 ? "1-3" : Players == 2 ? "1-2" : "1";
|
||||
string pStr = Players >= 4 ? "1-4" : Players == 3 ? "1-3" : Players == 2 ? "1-2" : "1";
|
||||
GraphicsPath p = new GraphicsPath();
|
||||
p.AddString("Players: " + pStr, font.FontFamily,
|
||||
(int)(FontStyle.Regular),
|
||||
|
|
|
@ -406,7 +406,15 @@ namespace UWUVCI_AIO_WPF
|
|||
MSX(RomPath);
|
||||
break;
|
||||
case GameConsoles.WII:
|
||||
WII(RomPath, mvm);
|
||||
if (RomPath.ToLower().EndsWith(".dol"))
|
||||
{
|
||||
WiiHomebrew(RomPath, mvm);
|
||||
}
|
||||
else
|
||||
{
|
||||
WII(RomPath, mvm);
|
||||
}
|
||||
|
||||
break;
|
||||
case GameConsoles.GCN:
|
||||
GC(RomPath, mvm, force);
|
||||
|
@ -414,6 +422,109 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
}
|
||||
|
||||
private static void WiiHomebrew(string romPath, MainViewModel mvm)
|
||||
{
|
||||
string savedir = Directory.GetCurrentDirectory();
|
||||
mvvm.msg = "Extracting Homebrew Base...";
|
||||
if (Directory.Exists(Path.Combine(tempPath, "TempBase"))) Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
|
||||
Directory.CreateDirectory(Path.Combine(tempPath, "TempBase"));
|
||||
using (Process zip = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
|
||||
zip.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
||||
}
|
||||
zip.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe");
|
||||
zip.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "BASE.zip")}\" -o\"{Path.Combine(tempPath)}\"";
|
||||
zip.Start();
|
||||
zip.WaitForExit();
|
||||
}
|
||||
|
||||
DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true);
|
||||
mvvm.Progress = 20;
|
||||
mvvm.msg = "Injecting DOL...";
|
||||
|
||||
File.Copy(romPath, Path.Combine(tempPath, "TempBase", "sys", "main.dol"));
|
||||
mvm.Progress = 30;
|
||||
mvvm.msg = "Creating Injectable file...";
|
||||
using (Process wit = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
|
||||
wit.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
||||
}
|
||||
wit.StartInfo.FileName = Path.Combine(toolsPath, "wit.exe");
|
||||
wit.StartInfo.Arguments = $"copy \"{Path.Combine(tempPath, "TempBase")}\" --DEST \"{Path.Combine(tempPath, "game.iso")}\" -ovv --links --iso";
|
||||
wit.Start();
|
||||
wit.WaitForExit();
|
||||
}
|
||||
|
||||
Thread.Sleep(6000);
|
||||
if (!File.Exists(Path.Combine(tempPath, "game.iso")))
|
||||
{
|
||||
Console.Clear();
|
||||
|
||||
throw new Exception("WIIAn error occured while Creating the ISO");
|
||||
}
|
||||
Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
|
||||
romPath = Path.Combine(tempPath, "game.iso");
|
||||
mvvm.Progress = 50;
|
||||
|
||||
mvm.msg = "Replacing TIK and TMD...";
|
||||
using (Process extract = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
extract.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
||||
}
|
||||
extract.StartInfo.FileName = Path.Combine(toolsPath, "wit.exe");
|
||||
extract.StartInfo.Arguments = $"extract \"{Path.Combine(tempPath, "game.iso")}\" --psel data --files +tmd.bin --files +ticket.bin --DEST \"{Path.Combine(tempPath, "TIKTMD")}\" -vv1";
|
||||
extract.Start();
|
||||
extract.WaitForExit();
|
||||
foreach (string sFile in Directory.GetFiles(Path.Combine(baseRomPath, "code"), "rvlt.*"))
|
||||
{
|
||||
File.Delete(sFile);
|
||||
}
|
||||
File.Copy(Path.Combine(tempPath, "TIKTMD", "tmd.bin"), Path.Combine(baseRomPath, "code", "rvlt.tmd"));
|
||||
File.Copy(Path.Combine(tempPath, "TIKTMD", "ticket.bin"), Path.Combine(baseRomPath, "code", "rvlt.tik"));
|
||||
Directory.Delete(Path.Combine(tempPath, "TIKTMD"), true);
|
||||
}
|
||||
mvm.Progress = 60;
|
||||
mvm.msg = "Injecting ROM...";
|
||||
foreach (string sFile in Directory.GetFiles(Path.Combine(baseRomPath, "content"), "*.nfs"))
|
||||
{
|
||||
File.Delete(sFile);
|
||||
}
|
||||
File.Move(Path.Combine(tempPath, "game.iso"), Path.Combine(baseRomPath, "content", "game.iso"));
|
||||
File.Copy(Path.Combine(toolsPath, "nfs2iso2nfs.exe"), Path.Combine(baseRomPath, "content", "nfs2iso2nfs.exe"));
|
||||
Directory.SetCurrentDirectory(Path.Combine(baseRomPath, "content"));
|
||||
using (Process iso2nfs = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
|
||||
iso2nfs.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
||||
}
|
||||
iso2nfs.StartInfo.FileName = "nfs2iso2nfs.exe";
|
||||
string pass = "-passthrough ";
|
||||
if(mvm.passtrough != true)
|
||||
{
|
||||
pass = "";
|
||||
}
|
||||
iso2nfs.StartInfo.Arguments = $"-enc -homebrew {pass}-iso game.iso";
|
||||
iso2nfs.Start();
|
||||
iso2nfs.WaitForExit();
|
||||
File.Delete("nfs2iso2nfs.exe");
|
||||
File.Delete("game.iso");
|
||||
}
|
||||
Directory.SetCurrentDirectory(savedir);
|
||||
mvm.Progress = 80;
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static void WII(string romPath, MainViewModel mvm)
|
||||
{
|
||||
string savedir = Directory.GetCurrentDirectory();
|
||||
|
@ -1319,7 +1430,7 @@ namespace UWUVCI_AIO_WPF
|
|||
|
||||
DirectoryCopy(baseRomPath,outputPath, true);
|
||||
|
||||
Custom_Message cm = new Custom_Message("Injection Complete", $"Config 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", $"Config will stay filled, choose a Console again to clear it.\nTo Open the Location of the Inject press Open Folder.\nIf you want the inject to be put on your SD now, press SD Setup.", Settings.Default.OutPath);
|
||||
try
|
||||
{
|
||||
cm.Owner = mvvm.mw;
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace UWUVCI_AIO_WPF.Classes
|
|||
class ToolCheck
|
||||
{
|
||||
static string FolderName = "bin\\Tools";
|
||||
public static string backupulr = @"https://github.com/Hotbrawl20/UWUVCI-Tools/raw/master/";
|
||||
public static string[] ToolNames =
|
||||
{
|
||||
"CDecrypt.exe",
|
||||
|
|
|
@ -28,6 +28,7 @@ using MaterialDesignThemes.Wpf;
|
|||
using NAudio.Wave;
|
||||
using System.Timers;
|
||||
using NAudio.Utils;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
|
||||
namespace UWUVCI_AIO_WPF
|
||||
{
|
||||
|
@ -876,9 +877,9 @@ namespace UWUVCI_AIO_WPF
|
|||
Progress = 0;
|
||||
string extra = "";
|
||||
if (GameConfiguration.Console == GameConsoles.WII) extra = "\nSome games cannot reboot into the WiiU Menu. Shut down via the GamePad.\nIf Stuck in a BlackScreen, you need to unplug your WiiU.";
|
||||
if (GC) extra = "\nMake sure to have Nintendon't + config on your SD.\nYou can add them by pressing the \"Nintendon't Config\" button or using the \"Start Nintendont Config Tool\" button under Settings.";
|
||||
if (GC) extra = "\nMake sure to have Nintendon't + config on your SD.\nYou can add them by pressing the \"SD Setup\" button or using the \"Start Nintendont Config Tool\" button under Settings.";
|
||||
gc2rom = "";
|
||||
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);
|
||||
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.\nIf you want the inject to be put on your SD now, press SD Setup.", Settings.Default.OutPath);
|
||||
try
|
||||
{
|
||||
cm.Owner = mw;
|
||||
|
@ -1349,7 +1350,7 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
else
|
||||
{
|
||||
dialog.Filter = "Wii ROM (*.iso; *.wbfs; *.nkit.iso; *.nkit.gcz) | *.iso; *.wbfs; *.nkit.iso; *.nkit.gcz";
|
||||
dialog.Filter = "Wii ROM (*.iso; *.wbfs; *.nkit.iso; *.nkit.gcz) | *.iso; *.wbfs; *.nkit.iso; *.nkit.gcz |Wii Homebrew (*.dol) | *.dol";
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -1491,9 +1492,16 @@ namespace UWUVCI_AIO_WPF
|
|||
try
|
||||
{
|
||||
|
||||
if(Directory.GetCurrentDirectory().Contains("bin") && Directory.GetCurrentDirectory().Contains("Tools"))
|
||||
{
|
||||
olddir = Directory.GetCurrentDirectory().Replace("bin\\Tools", "");
|
||||
}
|
||||
else
|
||||
{
|
||||
string basePath = $@"bin\Tools\";
|
||||
Directory.SetCurrentDirectory(basePath);
|
||||
}
|
||||
|
||||
string basePath = $@"bin\Tools\";
|
||||
Directory.SetCurrentDirectory(basePath);
|
||||
using (var client = new WebClient())
|
||||
{
|
||||
client.DownloadFile(getDownloadLink(name, true), name);
|
||||
|
@ -1545,7 +1553,15 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
if (tool)
|
||||
{
|
||||
return $"{ToolCheck.backupulr}{toolname}";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $@"https://github.com/Hotbrawl20/UWUVCI-VCB/raw/master/"+toolname;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public void InjcttoolCheck()
|
||||
|
@ -1616,7 +1632,7 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
private void toolCheck()
|
||||
{
|
||||
if (ToolCheck.DoesToolsFolderExist())
|
||||
if (ToolCheck.DoesToolsFolderExist() )
|
||||
{
|
||||
List<MissingTool> missingTools = new List<MissingTool>();
|
||||
missingTools = ToolCheck.CheckForMissingTools();
|
||||
|
@ -1658,9 +1674,16 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
else
|
||||
{
|
||||
if (Directory.GetCurrentDirectory().Contains("bin/tools"))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Directory.CreateDirectory("bin/Tools");
|
||||
toolCheck();
|
||||
}
|
||||
|
||||
toolCheck();
|
||||
|
||||
|
||||
}
|
||||
|
@ -2968,26 +2991,88 @@ namespace UWUVCI_AIO_WPF
|
|||
{
|
||||
WebRequest request;
|
||||
//get download link from uwuvciapi
|
||||
|
||||
try
|
||||
{
|
||||
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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
string url = "";
|
||||
switch (console.ToLower())
|
||||
{
|
||||
case "nds":
|
||||
url = @"https://flumpster.github.io/instructions/nds/nds.html";
|
||||
break;
|
||||
case "n64":
|
||||
|
||||
url = @"https://flumpster.github.io/instructions/n64/n64.html";
|
||||
break;
|
||||
case "nes":
|
||||
url = @"https://flumpster.github.io/instructions/nes/nes.html";
|
||||
break;
|
||||
case "snes":
|
||||
url = @"https://flumpster.github.io/instructions/snes/snes.html";
|
||||
break;
|
||||
case "gba":
|
||||
url = @"https://flumpster.github.io/instructions/gba/gba.html";
|
||||
break;
|
||||
case "tg16":
|
||||
url = @"https://flumpster.github.io/instructions/tgfx/tgfx.html";
|
||||
break;
|
||||
case "tgcd":
|
||||
url = @"https://flumpster.github.io/instructions/tgfx/tgfx.html";
|
||||
break;
|
||||
case "msx":
|
||||
url = @"https://flumpster.github.io/instructions/msx/msx.html";
|
||||
break;
|
||||
case "wii":
|
||||
url = @"https://flumpster.github.io/instructions/wii/wii.html";
|
||||
break;
|
||||
case "gcn":
|
||||
url = @"https://flumpster.github.io/instructions/gcn/gcn.html";
|
||||
break;
|
||||
default:
|
||||
|
||||
url = null;
|
||||
break;
|
||||
}
|
||||
request = WebRequest.Create(url + 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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
WaveOutEvent waveOutEvent = new WaveOutEvent();
|
||||
AudioFileReader audioFileReader;
|
||||
public System.Timers.Timer t;
|
||||
public bool passtrough = true;
|
||||
|
||||
public void PlaySound()
|
||||
{
|
||||
|
||||
|
|
10
UWUVCI AIO WPF/Properties/Resources.Designer.cs
generated
10
UWUVCI AIO WPF/Properties/Resources.Designer.cs
generated
|
@ -110,6 +110,16 @@ namespace UWUVCI_AIO_WPF.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Icon {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Icon", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
|
|
@ -133,6 +133,9 @@
|
|||
<data name="GCN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\GCN.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="MSX" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\MSX.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
|
BIN
UWUVCI AIO WPF/Resources/Icon.png
Normal file
BIN
UWUVCI AIO WPF/Resources/Icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
|
@ -19,8 +19,8 @@
|
|||
<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,327,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,238,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,283,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,193,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,283,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,193,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
|
||||
<TextBox Name="ini" materialDesign:HintAssist.Hint="INI PATH (LEAVE EMPTY FOR BLANK INI)" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,118,157,345" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding GameConfiguration.N64Stuff.INIPath}"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,133,0,0" VerticalAlignment="Top" Width="127" Click="Set_IniPath"/>
|
||||
|
|
|
@ -232,7 +232,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void Set_DrcTex(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!Settings.Default.dont)
|
||||
/*if (!Settings.Default.dont)
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
}
|
||||
|
@ -252,13 +252,30 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
drc.Text = "";
|
||||
drcIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "bootDrcTex.png");
|
||||
ImageCreator ic = new ImageCreator(GameConsoles.N64, "bootDrcTex");
|
||||
try
|
||||
{
|
||||
ic.Owner = mvm.mw;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
ic.ShowDialog();
|
||||
if (File.Exists(path) && mvm.CheckTime(new FileInfo(path).CreationTime))
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = path;
|
||||
mvm.GameConfiguration.TGATv.extension = new FileInfo(path).Extension;
|
||||
tv.Text = path;
|
||||
tvIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
private void Set_IconTex(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!Settings.Default.dont)
|
||||
/*if (!Settings.Default.dont)
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
}
|
||||
|
@ -278,6 +295,24 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
ic.Text = "";
|
||||
icoIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "iconTex.png");
|
||||
IconCreator ic = new IconCreator();
|
||||
try
|
||||
{
|
||||
ic.Owner = mvm.mw;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
ic.ShowDialog();
|
||||
if (File.Exists(path) && mvm.CheckTime(new FileInfo(path).CreationTime))
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = path;
|
||||
mvm.GameConfiguration.TGAIco.extension = new FileInfo(path).Extension;
|
||||
this.ic.Text = path;
|
||||
icoIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
<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,327,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,238,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,283,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,193,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,283,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,193,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
|
||||
<StackPanel Margin="10,20,244,436" Orientation="Horizontal" ToolTip="Patches Pokemon GBA games to work with GBA VC">
|
||||
|
||||
|
|
|
@ -206,43 +206,77 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
tv.Text = path;
|
||||
tvIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = null;
|
||||
tv.Text = "";
|
||||
tvIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void Set_DrcTex(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!Settings.Default.dont)
|
||||
/* if (!Settings.Default.dont)
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
}
|
||||
string path = mvm.GetFilePath(false, false);
|
||||
if (!CheckIfNull(path))
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = path;
|
||||
mvm.GameConfiguration.TGADrc.extension = new FileInfo(path).Extension;
|
||||
drc.Text = path;
|
||||
drcIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (path == "")
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = null;
|
||||
drc.Text = "";
|
||||
drcIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "bootDrcTex.png");
|
||||
|
||||
ImageCreator ic;
|
||||
if (!string.IsNullOrEmpty(mvm.RomPath))
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
}
|
||||
string path = mvm.GetFilePath(false, false);
|
||||
if (!CheckIfNull(path))
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = path;
|
||||
mvm.GameConfiguration.TGADrc.extension = new FileInfo(path).Extension;
|
||||
drc.Text = path;
|
||||
drcIMG.Visibility = Visibility.Visible;
|
||||
if (new FileInfo(mvm.RomPath).Extension.ToLower() == ".gb")
|
||||
{
|
||||
ic = new ImageCreator(false, GameBaseClassLibrary.GameConsoles.GBA, "bootDrcTex");
|
||||
}
|
||||
else if (new FileInfo(mvm.RomPath).Extension.ToLower() == ".gbc")
|
||||
{
|
||||
ic = new ImageCreator(true, GameBaseClassLibrary.GameConsoles.GBA, "bootDrcTex");
|
||||
}
|
||||
else
|
||||
{
|
||||
ic = new ImageCreator(GameBaseClassLibrary.GameConsoles.GBA, "bootDrcTex");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (path == "")
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = null;
|
||||
drc.Text = "";
|
||||
drcIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
ic = new ImageCreator(GameBaseClassLibrary.GameConsoles.GBA, "bootDrcTex");
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
ic.Owner = mvm.mw;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
ic.ShowDialog();
|
||||
if (File.Exists(path) && mvm.CheckTime(new FileInfo(path).CreationTime))
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = path;
|
||||
mvm.GameConfiguration.TGATv.extension = new FileInfo(path).Extension;
|
||||
tv.Text = path;
|
||||
tvIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
private void Set_IconTex(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!Settings.Default.dont)
|
||||
/*if (!Settings.Default.dont)
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
}
|
||||
|
@ -262,6 +296,24 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
ic.Text = "";
|
||||
icoIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "iconTex.png");
|
||||
IconCreator ic = new IconCreator();
|
||||
try
|
||||
{
|
||||
ic.Owner = mvm.mw;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
ic.ShowDialog();
|
||||
if (File.Exists(path) && mvm.CheckTime(new FileInfo(path).CreationTime))
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = path;
|
||||
mvm.GameConfiguration.TGAIco.extension = new FileInfo(path).Extension;
|
||||
this.ic.Text = path;
|
||||
icoIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
<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,327,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,238,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,283,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,193,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,283,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,193,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
|
||||
|
||||
<TextBox Name="gc2" materialDesign:HintAssist.Hint="GAMECUBE DISC 2 (LEAVE BLANK IF NONE)" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,120,157,345" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18" IsReadOnly="True" Focusable="False" Text="{Binding gc2rom}" Height="45"/>
|
||||
|
|
|
@ -249,33 +249,50 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void Set_DrcTex(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!Settings.Default.dont)
|
||||
/* if (!Settings.Default.dont)
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
}
|
||||
string path = mvm.GetFilePath(false, false);
|
||||
if (!CheckIfNull(path))
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = path;
|
||||
mvm.GameConfiguration.TGADrc.extension = new FileInfo(path).Extension;
|
||||
drc.Text = path;
|
||||
drcIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (path == "")
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = null;
|
||||
drc.Text = "";
|
||||
drcIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "bootDrcTex.png");
|
||||
ImageCreator ic = new ImageCreator(GameConsoles.GCN, "bootDrcTex");
|
||||
try
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
ic.Owner = mvm.mw;
|
||||
}
|
||||
string path = mvm.GetFilePath(false, false);
|
||||
if (!CheckIfNull(path))
|
||||
catch (Exception)
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = path;
|
||||
mvm.GameConfiguration.TGADrc.extension = new FileInfo(path).Extension;
|
||||
drc.Text = path;
|
||||
drcIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (path == "")
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = null;
|
||||
drc.Text = "";
|
||||
drcIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
ic.ShowDialog();
|
||||
if (File.Exists(path) && mvm.CheckTime(new FileInfo(path).CreationTime))
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = path;
|
||||
mvm.GameConfiguration.TGATv.extension = new FileInfo(path).Extension;
|
||||
tv.Text = path;
|
||||
tvIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
private void Set_IconTex(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!Settings.Default.dont)
|
||||
/*if (!Settings.Default.dont)
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
}
|
||||
|
@ -295,6 +312,24 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
ic.Text = "";
|
||||
icoIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "iconTex.png");
|
||||
IconCreator ic = new IconCreator();
|
||||
try
|
||||
{
|
||||
ic.Owner = mvm.mw;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
ic.ShowDialog();
|
||||
if (File.Exists(path) && mvm.CheckTime(new FileInfo(path).CreationTime))
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = path;
|
||||
mvm.GameConfiguration.TGAIco.extension = new FileInfo(path).Extension;
|
||||
this.ic.Text = path;
|
||||
icoIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
<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,327,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,238,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,283,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,193,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,283,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,193,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
|
||||
<StackPanel Margin="10,20,244,436" Orientation="Horizontal" ToolTip="If checked alows you to inject TurboGrafx-CD ROMs">
|
||||
|
||||
|
|
|
@ -184,16 +184,11 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
tv.Text = path;
|
||||
tvIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = null;
|
||||
tv.Text = "";
|
||||
tvIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void Set_DrcTex(object sender, RoutedEventArgs e)
|
||||
{
|
||||
{/*
|
||||
if (!Settings.Default.dont)
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
|
@ -214,33 +209,83 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
drc.Text = "";
|
||||
drcIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "bootDrcTex.png");
|
||||
ImageCreator ic;
|
||||
|
||||
|
||||
ic = new ImageCreator(cd, GameBaseClassLibrary.GameConsoles.TG16, "bootDrcTex");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
ic.Owner = mvm.mw;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
ic.ShowDialog();
|
||||
if (File.Exists(path) && mvm.CheckTime(new FileInfo(path).CreationTime))
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = path;
|
||||
mvm.GameConfiguration.TGATv.extension = new FileInfo(path).Extension;
|
||||
tv.Text = path;
|
||||
tvIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = null;
|
||||
tv.Text = "";
|
||||
tvIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
|
||||
private void Set_IconTex(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!Settings.Default.dont)
|
||||
/* if (!Settings.Default.dont)
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
}
|
||||
string path = mvm.GetFilePath(false, false);
|
||||
if (!CheckIfNull(path))
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = path;
|
||||
mvm.GameConfiguration.TGAIco.extension = new FileInfo(path).Extension;
|
||||
ic.Text = path;
|
||||
icoIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (path == "")
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = null;
|
||||
ic.Text = "";
|
||||
icoIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "iconTex.png");
|
||||
IconCreator ic = new IconCreator();
|
||||
try
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
ic.Owner = mvm.mw;
|
||||
}
|
||||
string path = mvm.GetFilePath(false, false);
|
||||
if (!CheckIfNull(path))
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
ic.ShowDialog();
|
||||
if (File.Exists(path) && mvm.CheckTime(new FileInfo(path).CreationTime))
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = path;
|
||||
mvm.GameConfiguration.TGAIco.extension = new FileInfo(path).Extension;
|
||||
ic.Text = path;
|
||||
this.ic.Text = path;
|
||||
icoIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (path == "")
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = null;
|
||||
ic.Text = "";
|
||||
icoIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Set_LogoTex(object sender, RoutedEventArgs e)
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
<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,327,0,0" VerticalAlignment="Top" Width="127" Click="Set_LogoTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,238,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,283,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,193,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,283,0,0" VerticalAlignment="Top" Width="127" Click="Set_DrcTex"/>
|
||||
<Button Content="Create File" HorizontalAlignment="Left" Margin="506,193,0,0" VerticalAlignment="Top" Width="127" Click="Set_IconTex"/>
|
||||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
|
||||
<TextBox 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" TextChanged="sound_TextChanged"/>
|
||||
<Image HorizontalAlignment="Left" Height="35" Margin="452,191,0,0" VerticalAlignment="Top" Width="38" OpacityMask="LightGray" Name="icoIMG" Source="/UWUVCI AIO WPF;component/UI/Images/newcamera2.png" Cursor="Hand" MouseLeftButtonDown="icoIMG_MouseLeftButtonDown" Visibility="Hidden" />
|
||||
|
|
|
@ -181,53 +181,88 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void Set_DrcTex(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!Settings.Default.dont)
|
||||
/* if (!Settings.Default.dont)
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
}
|
||||
string path = mvm.GetFilePath(false, false);
|
||||
if (!CheckIfNull(path))
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = path;
|
||||
mvm.GameConfiguration.TGADrc.extension = new FileInfo(path).Extension;
|
||||
drc.Text = path;
|
||||
drcIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (path == "")
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = null;
|
||||
drc.Text = "";
|
||||
drcIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "bootDrcTex.png");
|
||||
ImageCreator ic = new ImageCreator(mvm.GameConfiguration.Console, "bootDrcTex");
|
||||
try
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
ic.Owner = mvm.mw;
|
||||
}
|
||||
string path = mvm.GetFilePath(false, false);
|
||||
if (!CheckIfNull(path))
|
||||
catch (Exception)
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = path;
|
||||
mvm.GameConfiguration.TGADrc.extension = new FileInfo(path).Extension;
|
||||
drc.Text = path;
|
||||
drcIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (path == "")
|
||||
{
|
||||
mvm.GameConfiguration.TGADrc.ImgPath = null;
|
||||
drc.Text = "";
|
||||
drcIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
ic.ShowDialog();
|
||||
if (File.Exists(path) && mvm.CheckTime(new FileInfo(path).CreationTime))
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = path;
|
||||
mvm.GameConfiguration.TGATv.extension = new FileInfo(path).Extension;
|
||||
tv.Text = path;
|
||||
tvIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
private void Set_IconTex(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!Settings.Default.dont)
|
||||
/* if (!Settings.Default.dont)
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
}
|
||||
string path = mvm.GetFilePath(false, false);
|
||||
if (!CheckIfNull(path))
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = path;
|
||||
mvm.GameConfiguration.TGAIco.extension = new FileInfo(path).Extension;
|
||||
ic.Text = path;
|
||||
icoIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (path == "")
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = null;
|
||||
ic.Text = "";
|
||||
icoIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "iconTex.png");
|
||||
IconCreator ic = new IconCreator();
|
||||
try
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
ic.Owner = mvm.mw;
|
||||
}
|
||||
string path = mvm.GetFilePath(false, false);
|
||||
if (!CheckIfNull(path))
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
ic.ShowDialog();
|
||||
if (File.Exists(path) && mvm.CheckTime(new FileInfo(path).CreationTime))
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = path;
|
||||
mvm.GameConfiguration.TGAIco.extension = new FileInfo(path).Extension;
|
||||
ic.Text = path;
|
||||
this.ic.Text = path;
|
||||
icoIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (path == "")
|
||||
{
|
||||
mvm.GameConfiguration.TGAIco.ImgPath = null;
|
||||
ic.Text = "";
|
||||
icoIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Set_LogoTex(object sender, RoutedEventArgs e)
|
||||
|
|
|
@ -37,9 +37,10 @@
|
|||
<Button Content="Select File" HorizontalAlignment="Left" Margin="506,376,0,0" VerticalAlignment="Top" Width="127" Click="Button_Click"/>
|
||||
<Label Content="Use | for 2 lines" HorizontalAlignment="Left" Margin="506,428,0,0" VerticalAlignment="Top" Width="127" HorizontalContentAlignment="Center" ToolTip="e.g. Wii|Sports"/>
|
||||
<Button Content="?" HorizontalAlignment="Left" Margin="600,19,0,0" Height="32" VerticalAlignment="Top" Width="33" Background="#FF2196F3" BorderBrush="#FF2196F3" Foreground="White" Click="Button_Click_1" FontSize="22" Padding="0" />
|
||||
<StackPanel Height="30" Margin="150,20,314,460" Orientation="Horizontal" Name="Extra" Visibility="Hidden">
|
||||
<StackPanel Height="30" Margin="150,20,97,460" Orientation="Horizontal" Name="Extra" Visibility="Hidden">
|
||||
<CheckBox Content="JP Patch" x:Name="jppatch" ToolTip="Allows playing JP Wii Games on non JP Consoles" Click="jppatch_Click" RenderTransformOrigin="-1.389,-3.87" Margin="0,6,16,6" Height="18" Width="72"/>
|
||||
<CheckBox Content="Disable Trim" Margin="0,7,0,5" x:Name="trimn" Click="trimn_Click" IsEnabled="False" Width="87"/>
|
||||
<CheckBox Content="Disable Trim" Margin="0,7,0,5" x:Name="trimn" Click="trimn_Click" IsEnabled="False" Width="107"/>
|
||||
<CheckBox Content="Disable WiiMote Passthrough" Margin="0,7,0,5" x:Name="motepass" IsEnabled="False" Width="182" Visibility="Hidden" Checked="motepass_Checked" Unchecked="motepass_Unchecked"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Height="30" Margin="150,19,213,461" Orientation="Horizontal" Name="VideoMode" Visibility="Hidden">
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
mvm.setThing(this);
|
||||
Injection.ToolTip = "Changing the extension of a ROM may result in a faulty inject.\nWe will not give any support in such cases";
|
||||
List<string> gpEmu = new List<string>();
|
||||
gpEmu.Add("None");
|
||||
gpEmu.Add("Do not use; WiiMotes only");
|
||||
gpEmu.Add("Classic Controller");
|
||||
gpEmu.Add("Horizontal WiiMote");
|
||||
gpEmu.Add("Vertical WiiMote");
|
||||
|
@ -59,7 +59,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
mvm.setThing(this);
|
||||
Injection.ToolTip = "Changing the extension of a ROM may result in a faulty inject.\nWe will not give any support in such cases";
|
||||
List<string> gpEmu = new List<string>();
|
||||
gpEmu.Add("None");
|
||||
gpEmu.Add("Do not use; WiiMotes only");
|
||||
gpEmu.Add("Classic Controller");
|
||||
gpEmu.Add("Horizontal WiiMote");
|
||||
gpEmu.Add("Vertical WiiMote");
|
||||
|
@ -88,7 +88,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
{
|
||||
int TitleIDInt = 0;
|
||||
bool isok = false;
|
||||
if (path.ToLower().Contains(".gcz"))
|
||||
if (path.ToLower().Contains(".gcz") || path.ToLower().Contains(".dol"))
|
||||
{
|
||||
isok = true;
|
||||
}
|
||||
|
@ -118,6 +118,8 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
if (isok)
|
||||
{
|
||||
motepass.Visibility = Visibility.Hidden;
|
||||
motepass.IsChecked = false;
|
||||
mvm.NKITFLAG = false;
|
||||
trimn.IsEnabled = false;
|
||||
trimn.IsChecked = false;
|
||||
|
@ -125,8 +127,10 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
pal.IsEnabled = true;
|
||||
ntsc.IsEnabled = true;
|
||||
mvm.donttrim = false;
|
||||
jppatch.IsEnabled = true;
|
||||
motepass.IsEnabled = false;
|
||||
List<string> gpEmu = new List<string>();
|
||||
gpEmu.Add("None");
|
||||
gpEmu.Add("Do not use; WiiMotes only");
|
||||
gpEmu.Add("Classic Controller");
|
||||
gpEmu.Add("Horizontal WiiMote");
|
||||
gpEmu.Add("Vertical WiiMote");
|
||||
|
@ -141,7 +145,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
mvm.CanInject = true;
|
||||
|
||||
}
|
||||
if (!path.ToLower().Contains(".gcz"))
|
||||
if (!path.ToLower().Contains(".gcz") && !path.ToLower().Contains(".dol"))
|
||||
{
|
||||
string rom = mvm.getInternalWIIGCNName(mvm.RomPath, false);
|
||||
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³´`éⓇ©™]");
|
||||
|
@ -162,8 +166,27 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
mvm.IsIsoNkit();
|
||||
}
|
||||
}
|
||||
else if (path.ToLower().Contains(".dol"))
|
||||
{
|
||||
mvm.NKITFLAG = false;
|
||||
trimn.IsEnabled = false;
|
||||
trimn.IsChecked = false;
|
||||
vmcsmoll.IsEnabled = false;
|
||||
pal.IsEnabled = false;
|
||||
ntsc.IsEnabled = false;
|
||||
RF_n.IsEnabled = false;
|
||||
RF_tj.IsEnabled = false;
|
||||
RF_tn.IsEnabled = false;
|
||||
RF_tp.IsEnabled = false;
|
||||
jppatch.IsEnabled = false;
|
||||
motepass.Visibility = Visibility.Visible;
|
||||
motepass.IsChecked = false;
|
||||
motepass.IsEnabled = true;
|
||||
mvm.donttrim = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
trimn.IsEnabled = true;
|
||||
}
|
||||
|
||||
|
@ -675,25 +698,28 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
ntsc.IsEnabled = false;
|
||||
mvm.donttrim = true;
|
||||
mvm.jppatch = false;
|
||||
int last = gamepad.SelectedIndex;
|
||||
List<string> gpEmu = new List<string>();
|
||||
gpEmu.Add("None");
|
||||
gpEmu.Add("Do not use; WiiMotes only");
|
||||
gpEmu.Add("Classic Controller");
|
||||
gpEmu.Add("Horizontal WiiMote");
|
||||
gpEmu.Add("Vertical WiiMote");
|
||||
gpEmu.Add("[NEEDS TRIMMING] Force Classic Controller");
|
||||
gpEmu.Add("Force No Classic Controller");
|
||||
gamepad.ItemsSource = gpEmu;
|
||||
gamepad.SelectedIndex = last;
|
||||
jppatch.IsEnabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
vmcsmoll.IsEnabled = true;
|
||||
int last = gamepad.SelectedIndex;
|
||||
vmcsmoll.IsEnabled = true;
|
||||
pal.IsEnabled = true;
|
||||
ntsc.IsEnabled = true;
|
||||
mvm.donttrim = false;
|
||||
jppatch.IsEnabled = true;
|
||||
List<string> gpEmu = new List<string>();
|
||||
gpEmu.Add("None");
|
||||
gpEmu.Add("Do not use; WiiMotes only");
|
||||
gpEmu.Add("Classic Controller");
|
||||
gpEmu.Add("Horizontal WiiMote");
|
||||
gpEmu.Add("Vertical WiiMote");
|
||||
|
@ -701,6 +727,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
gpEmu.Add("Force No Classic Controller");
|
||||
gamepad.ItemsSource = gpEmu;
|
||||
gamepad.ItemsSource = gpEmu;
|
||||
gamepad.SelectedIndex = last;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -738,5 +765,15 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void motepass_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
mvm.passtrough = false;
|
||||
}
|
||||
|
||||
private void motepass_Unchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
mvm.passtrough = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<Button Content="Reset TitleKeys" HorizontalAlignment="Left" Margin="325,254,0,0" VerticalAlignment="Top" Width="153" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_8"/>
|
||||
<Button Content="Start Nintendont Config Tool" HorizontalAlignment="Left" Margin="325,342,0,0" VerticalAlignment="Top" Width="267" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_9"/>
|
||||
<Button Content="Reset Don't show this again Option" HorizontalAlignment="Left" Margin="410,387,0,0" VerticalAlignment="Top" Width="266" RenderTransformOrigin="-0.099,0.116" Click="Button_Click_10"/>
|
||||
<Button Content="Button" HorizontalAlignment="Left" Margin="325,451,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_11"/>
|
||||
<Button Content="Button" HorizontalAlignment="Left" Margin="325,451,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_11" Visibility="Hidden"/>
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
|
|
|
@ -121,7 +121,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames
|
|||
|
||||
private void Button_Click_11(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ImageCreator ic = new ImageCreator(GameBaseClassLibrary.GameConsoles.SNES, "bootTvTex");
|
||||
IconCreator ic = new IconCreator();
|
||||
try
|
||||
{
|
||||
ic.Owner = (FindResource("mvm") as MainViewModel).mw;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<Button Content="Open Folder" Margin="0,8,0,9" Name="Folder" Click="Folder_Click" RenderTransformOrigin="1,1" Grid.Row="2" Grid.Column="1" Height="Auto" HorizontalAlignment="Right" Visibility="Hidden"/>
|
||||
<Button Content="Continue" Margin="0,8,5,9" x:Name="Reset" Click="Reset_Click" RenderTransformOrigin="1,1" Grid.Row="2" Grid.Column="1" Height="Auto" HorizontalAlignment="Right" Visibility="Hidden" />
|
||||
<CheckBox Content="Don't show this again" HorizontalAlignment="Left" Margin="5,13,0,0" Grid.Row="2" VerticalAlignment="Top" Width="139" Foreground="Black" Name="dont" Height="18"/>
|
||||
<Button Content="Nintendon't Config" Margin="8,8,0,0" x:Name="nc" Click="nc_Click" RenderTransformOrigin="1,1" Grid.Row="2" Height="32" Width="154" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||
<Button Content="SD Setup" Margin="8,8,0,0" x:Name="nc" Click="nc_Click" RenderTransformOrigin="1,1" Grid.Row="2" Height="32" Width="154" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
|
|
@ -56,6 +56,7 @@ 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") || title.Contains("Found additional Files"))
|
||||
{
|
||||
Reset.Visibility = Visibility.Visible;
|
||||
|
@ -104,6 +105,10 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
{
|
||||
nc.Visibility = Visibility.Hidden;
|
||||
}
|
||||
if (message.Contains("Config will stay filled, choose a Console again to clear it"))
|
||||
{
|
||||
nc.Visibility = Visibility.Visible;
|
||||
}
|
||||
dont.Visibility = Visibility.Hidden;
|
||||
Title.Text = title;
|
||||
Message.Content = message;
|
||||
|
@ -221,13 +226,16 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
|
||||
private void nc_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (File.Exists(@"bin\Tools\sdsetup.exe"))
|
||||
this.Close();
|
||||
if (Message.Content.ToString().ToLower().Contains("nintendont"))
|
||||
{
|
||||
Process.Start(@"bin\Tools\sdsetup.exe");
|
||||
SDSetup sd = new SDSetup(true, path);
|
||||
sd.ShowDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
Process.Start(@"bin\Tools\NintendontConfig.exe");
|
||||
SDSetup sd = new SDSetup(false, path);
|
||||
sd.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
}
|
||||
Directory.CreateDirectory(@"bin\tempsd");
|
||||
var client = new WebClient();
|
||||
client.DownloadFile("https://dl.dropboxusercontent.com/cd/0/get/A4ZX24rC4DlmPAYDrj7mz9WIlmmnIu9YKh1IabTXG-l0Ftq4Ib-fyG8QYspNdv6lCOcu920AbyIdo8l2dNtoW2xydD3ycH2_B06pxATB-ROj27wDdJ0nls9gtSYmjSxMmq4/file?_download_id=8358710324855012068395852250129613778887389747613992530573453088&_notify_domain=www.dropbox.com&dl=1", @"bin\tempsd\nintendont.zip");
|
||||
client.DownloadFile("https://dl.dropbox.com/s/wvgdn8j4d1725aj/Nintendont%26Forwarder.zip?dl=1", @"bin\tempsd\nintendont.zip");
|
||||
using(FileStream s = new FileStream(@"bin\tempsd\nintendont.zip", FileMode.Open, FileAccess.ReadWrite))
|
||||
{
|
||||
ZipArchive z = new ZipArchive(s);
|
||||
|
@ -224,11 +224,11 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
MainViewModel mvm = FindResource("mvm") as MainViewModel;
|
||||
if(path.Contains("[LOADIINE]") && !path.Contains("[WUP]"))
|
||||
{
|
||||
DirectoryCopy(path, driveletter + "\\wiiu\\games\\" + mvm.foldername, true);
|
||||
DirectoryCopy(System.IO.Path.Combine(path, mvm.foldername), driveletter + "\\wiiu\\games\\" + mvm.foldername, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
DirectoryCopy(path, driveletter + "\\install\\" + mvm.foldername, true);
|
||||
DirectoryCopy(System.IO.Path.Combine(path,mvm.foldername), driveletter + "\\install\\" + mvm.foldername, true);
|
||||
}
|
||||
|
||||
mvm.foldername = "";
|
||||
|
|
46
UWUVCI AIO WPF/UI/Windows/ImageCreator - Kopieren.xaml
Normal file
46
UWUVCI AIO WPF/UI/Windows/ImageCreator - Kopieren.xaml
Normal file
|
@ -0,0 +1,46 @@
|
|||
<Window x:Class="UWUVCI_AIO_WPF.UI.Windows.IconCreator"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:UWUVCI_AIO_WPF"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d"
|
||||
Title="ImageCreator" Height="200" Width="435" Foreground="White" Background="LightGray" ResizeMode="NoResize" Icon="/UWUVCI AIO WPF;component/b.ico" Name="wind" SizeToContent="WidthAndHeight" BorderBrush="#FF2196F3" BorderThickness="1.5,1.5,1.5,1.5" ShowInTaskbar="False" WindowStyle="None" Loaded="wind_Loaded" WindowStartupLocation="CenterOwner" MaxHeight="200">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="160"/>
|
||||
<ColumnDefinition Width="275"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Margin="0,0,353,0"></Label>
|
||||
<Label Height="9" Margin="0,0,353,0"></Label>
|
||||
<Label Margin="0,0,353,0"></Label>
|
||||
|
||||
|
||||
|
||||
|
||||
<Image HorizontalAlignment="Left" Height="128" VerticalAlignment="Top" Width="128" Name="Image" Margin="18,49,0,0"/>
|
||||
|
||||
|
||||
|
||||
<Button Content="Select File" Grid.Column="1" HorizontalAlignment="Left" Margin="160,10,0,0" VerticalAlignment="Top" Width="99" Name="FileSelect" Click="FileSelect_Click" />
|
||||
<Label Content="Overlay:" Grid.Column="1" HorizontalAlignment="Left" Margin="15,78,0,0" VerticalAlignment="Top"/>
|
||||
<RadioButton Content="Enabled" Grid.Column="1" HorizontalAlignment="Left" Margin="100,82,0,0" VerticalAlignment="Top" Foreground="Black" GroupName="ov" Name="enOv" Click="enOv_Click" IsChecked="True"/>
|
||||
<RadioButton Content="Disabled" Grid.Column="1" HorizontalAlignment="Left" Margin="189,82,0,0" VerticalAlignment="Top" Foreground="Black" GroupName="ov" Click="enOv_Click"/>
|
||||
<Button Content="Cancel" Grid.Column="1" HorizontalAlignment="Left" Margin="160,145,0,0" VerticalAlignment="Top" Width="99" Click="Button_Click"/>
|
||||
<Button Content="Finish" Grid.Column="1" HorizontalAlignment="Left" Margin="15,145,0,0" VerticalAlignment="Top" Width="99" Name="Finish" Click="Finish_Click"/>
|
||||
<Border BorderThickness="1.5,1.5,1.5,1.5" BorderBrush="#FF2196F3" HorizontalAlignment="Left" Height="129" VerticalAlignment="Top" Width="129" Margin="18,48,0,0">
|
||||
|
||||
</Border>
|
||||
<StackPanel HorizontalAlignment="Left" Height="32" Margin="14,327,0,0" VerticalAlignment="Top" Width="481" Orientation="Horizontal" Name="snesonly" Visibility="Hidden">
|
||||
<Label Content="Style:" Width="50" Margin="0,4,0,-4"></Label>
|
||||
|
||||
<RadioButton Content="SNES - PAL" GroupName="snes" Name="pal" IsChecked="True" Click="pal_Click" Foreground="Black" Width="100" Margin="0,6,0,-6"/>
|
||||
<RadioButton Content="SNES - NTSC" GroupName="snes" Click="pal_Click" Foreground="Black" Margin="0,6,0,-6" Width="107" />
|
||||
<RadioButton Content="Super Famicom" GroupName="snes" Click="RadioButton_Click" Foreground="Black" Margin="0,6,0,-6"/>
|
||||
<ComboBox Margin="0,2" Width="169" Name="combo" SelectionChanged="combo_SelectionChanged" Foreground="Black" Visibility="Hidden" ></ComboBox>
|
||||
</StackPanel>
|
||||
<Label Content=" bootTvTex" x:Name="imageName" Margin="14,25,14,148"/>
|
||||
</Grid>
|
||||
</Window>
|
303
UWUVCI AIO WPF/UI/Windows/ImageCreator - Kopieren.xaml.cs
Normal file
303
UWUVCI AIO WPF/UI/Windows/ImageCreator - Kopieren.xaml.cs
Normal file
|
@ -0,0 +1,303 @@
|
|||
using GameBaseClassLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using UWUVCI_AIO_WPF.Classes;
|
||||
|
||||
namespace UWUVCI_AIO_WPF.UI.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für ImageCreator.xaml
|
||||
/// </summary>
|
||||
|
||||
public partial class IconCreator : Window, IDisposable
|
||||
{
|
||||
private static readonly string tempPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "temp");
|
||||
private static readonly string toolsPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "Tools");
|
||||
MenuIconImage bi = new MenuIconImage();
|
||||
Bitmap b;
|
||||
string console = "other";
|
||||
bool drc = false;
|
||||
|
||||
public IconCreator()
|
||||
{
|
||||
InitializeComponent();
|
||||
imageName.Content = "iconTex";
|
||||
SetTemplate();
|
||||
}
|
||||
|
||||
|
||||
private void SetTemplate()
|
||||
{
|
||||
bi.Frame = new Bitmap(Properties.Resources.Icon);
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void FileSelect_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string file = "";
|
||||
MainViewModel mvm = FindResource("mvm") as MainViewModel;
|
||||
file = mvm.GetFilePath(false, false);
|
||||
if(!string.IsNullOrEmpty(file))
|
||||
{
|
||||
|
||||
string copy = "";
|
||||
if (new FileInfo(file).Extension.Contains("tga"))
|
||||
{
|
||||
using (Process conv = new Process())
|
||||
{
|
||||
|
||||
conv.StartInfo.UseShellExecute = false;
|
||||
conv.StartInfo.CreateNoWindow = true;
|
||||
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"));
|
||||
conv.StartInfo.FileName = System.IO.Path.Combine(toolsPath, "tga2png.exe");
|
||||
conv.StartInfo.Arguments = $"-i \"{file}\" -o \"{System.IO.Path.Combine(tempPath, "image")}\"";
|
||||
|
||||
conv.Start();
|
||||
conv.WaitForExit();
|
||||
|
||||
foreach (string sFile in Directory.GetFiles(System.IO.Path.Combine(tempPath, "image"), "*.png"))
|
||||
{
|
||||
copy = sFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
copy = file;
|
||||
}
|
||||
bi.TitleScreen = new Bitmap(copy);
|
||||
b = bi.Create(console);
|
||||
Image.Source = BitmapToImageSource(b);
|
||||
}
|
||||
}
|
||||
|
||||
private void Finish_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!Directory.Exists(@"bin\createdIMG"))
|
||||
{
|
||||
Directory.CreateDirectory(@"bin\createdIMG");
|
||||
}
|
||||
if(File.Exists(System.IO.Path.Combine(@"bin\createdIMG", imageName.Content + ".png")))
|
||||
{
|
||||
File.Delete(System.IO.Path.Combine(@"bin\createdIMG", imageName.Content + ".png"));
|
||||
}
|
||||
if (drc)
|
||||
{
|
||||
b = ResizeImage(b, 854, 480);
|
||||
|
||||
}
|
||||
|
||||
b.Save(System.IO.Path.Combine(@"bin\createdIMG", imageName.Content + ".png"));
|
||||
|
||||
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void TextBox_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
||||
{
|
||||
e.Handled = !IsTextAllowed(e.Text);
|
||||
}
|
||||
|
||||
private static readonly Regex _regex = new Regex("[^0-9]+"); //regex that matches disallowed text
|
||||
private static bool IsTextAllowed(string text)
|
||||
{
|
||||
return !_regex.IsMatch(text);
|
||||
}
|
||||
private void TextBoxPasting(object sender, DataObjectPastingEventArgs e)
|
||||
{
|
||||
if (e.DataObject.GetDataPresent(typeof(String)))
|
||||
{
|
||||
String text = (String)e.DataObject.GetData(typeof(String));
|
||||
if (!IsTextAllowed(text))
|
||||
{
|
||||
e.CancelCommand();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
e.CancelCommand();
|
||||
}
|
||||
}
|
||||
|
||||
private void wind_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
b = bi.Create(console);
|
||||
Image.Source = BitmapToImageSource(b);
|
||||
}
|
||||
BitmapImage BitmapToImageSource(Bitmap bitmap)
|
||||
{
|
||||
using (MemoryStream memory = new MemoryStream())
|
||||
{
|
||||
bitmap.Save(memory, System.Drawing.Imaging.ImageFormat.Bmp);
|
||||
memory.Position = 0;
|
||||
BitmapImage bitmapimage = new BitmapImage();
|
||||
bitmapimage.BeginInit();
|
||||
bitmapimage.StreamSource = memory;
|
||||
bitmapimage.CacheOption = BitmapCacheOption.OnLoad;
|
||||
bitmapimage.EndInit();
|
||||
|
||||
return bitmapimage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void enOv_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if(enOv.IsChecked == true)
|
||||
{
|
||||
|
||||
b = bi.Create(console);
|
||||
Image.Source = BitmapToImageSource(b);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if(bi.TitleScreen != null)
|
||||
{
|
||||
b = ResizeImage(bi.TitleScreen, 128, 128); Image.Source = BitmapToImageSource(b);
|
||||
}
|
||||
else
|
||||
{
|
||||
b = new Bitmap(1280, 720);
|
||||
using (Graphics gfx = Graphics.FromImage(b))
|
||||
using (SolidBrush brush = new SolidBrush(System.Drawing.Color.FromArgb(0, 0, 0)))
|
||||
{
|
||||
gfx.FillRectangle(brush, 0, 0, 128, 128);
|
||||
}
|
||||
Image.Source = BitmapToImageSource(b);
|
||||
}
|
||||
}
|
||||
}
|
||||
public static Bitmap ResizeImage(System.Drawing.Image image, int width, int height)
|
||||
{
|
||||
var destRect = new System.Drawing.Rectangle(0, 0, width, height);
|
||||
var destImage = new Bitmap(width, height);
|
||||
|
||||
destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution);
|
||||
|
||||
using (var graphics = Graphics.FromImage(destImage))
|
||||
{
|
||||
graphics.CompositingMode = CompositingMode.SourceCopy;
|
||||
graphics.CompositingQuality = CompositingQuality.HighQuality;
|
||||
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||
graphics.SmoothingMode = SmoothingMode.HighQuality;
|
||||
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
|
||||
using (var wrapMode = new ImageAttributes())
|
||||
{
|
||||
wrapMode.SetWrapMode(WrapMode.TileFlipXY);
|
||||
graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode);
|
||||
}
|
||||
}
|
||||
|
||||
return destImage;
|
||||
}
|
||||
|
||||
void DrawImage()
|
||||
{
|
||||
b = bi.Create(console);
|
||||
Image.Source = BitmapToImageSource(b);
|
||||
}
|
||||
|
||||
private void Players_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void Players_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
DrawImage();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void combo_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (combo.SelectedIndex == 0)
|
||||
{
|
||||
bi.Frame = Properties.Resources.SNES_PAL;
|
||||
|
||||
}
|
||||
else if(combo.SelectedIndex == 1)
|
||||
{
|
||||
bi.Frame = Properties.Resources.SNES_USA;
|
||||
}
|
||||
else
|
||||
{
|
||||
bi.Frame = Properties.Resources.SFAM;
|
||||
}
|
||||
b = bi.Create(console);
|
||||
Image.Source = BitmapToImageSource(b);
|
||||
}
|
||||
|
||||
private void pal_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if(pal.IsChecked == true)
|
||||
{
|
||||
bi.Frame = Properties.Resources.SNES_PAL;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
bi.Frame = Properties.Resources.SNES_USA;
|
||||
}
|
||||
b = bi.Create(console);
|
||||
Image.Source = BitmapToImageSource(b);
|
||||
}
|
||||
|
||||
private void RadioButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
bi.Frame = Properties.Resources.SFAM;
|
||||
b = bi.Create(console);
|
||||
Image.Source = BitmapToImageSource(b);
|
||||
}
|
||||
|
||||
private void PLDi_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
DrawImage();
|
||||
}
|
||||
|
||||
private void RLEn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
DrawImage();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -35,11 +35,11 @@
|
|||
<RadioButton Content="Disabled" Grid.Column="1" HorizontalAlignment="Left" Margin="191,56,0,0" VerticalAlignment="Top" Foreground="Black" GroupName="ov" Click="enOv_Click"/>
|
||||
<TextBox materialDesign:HintAssist.Hint="GAME NAME LINE 2" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="19,120,17,221" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="12" Grid.Column="1" Name="GameName2" TextChanged="Players_TextChanged"/>
|
||||
<Label Content="Players:" Grid.Column="1" HorizontalAlignment="Left" Margin="14,243,0,0" VerticalAlignment="Top" Name="PlayerLabel"/>
|
||||
<RadioButton Content="Enabled" Grid.Column="1" HorizontalAlignment="Left" Margin="100,247,0,0" VerticalAlignment="Top" Foreground="Black" GroupName="pl" Name="PLEn" IsChecked="True"/>
|
||||
<RadioButton Content="Disabled" Grid.Column="1" HorizontalAlignment="Left" Margin="191,247,0,0" VerticalAlignment="Top" Foreground="Black" GroupName="pl" Name="PLDi"/>
|
||||
<RadioButton Content="Enabled" Grid.Column="1" HorizontalAlignment="Left" Margin="100,247,0,0" VerticalAlignment="Top" Foreground="Black" GroupName="pl" Name="PLEn" IsChecked="True" Click="PLDi_Click"/>
|
||||
<RadioButton Content="Disabled" Grid.Column="1" HorizontalAlignment="Left" Margin="191,247,0,0" VerticalAlignment="Top" Foreground="Black" GroupName="pl" Name="PLDi" Click="PLDi_Click"/>
|
||||
<Label Content="Release Year:" Grid.Column="1" HorizontalAlignment="Left" Margin="14,165,0,0" VerticalAlignment="Top" Name="ReleaseYearLabel"/>
|
||||
<RadioButton Content="Enabled" Grid.Column="1" HorizontalAlignment="Left" Margin="100,169,0,0" VerticalAlignment="Top" Foreground="Black" GroupName="rl" Name="RLEn" IsChecked="True"/>
|
||||
<RadioButton Content="Disabled" Grid.Column="1" HorizontalAlignment="Left" Margin="191,169,0,0" VerticalAlignment="Top" Foreground="Black" GroupName="rl" Name="RLDi"/>
|
||||
<RadioButton Content="Enabled" Grid.Column="1" HorizontalAlignment="Left" Margin="100,169,0,0" VerticalAlignment="Top" Foreground="Black" GroupName="rl" Name="RLEn" IsChecked="True" Click="RLEn_Click"/>
|
||||
<RadioButton Content="Disabled" Grid.Column="1" HorizontalAlignment="Left" Margin="191,169,0,0" VerticalAlignment="Top" Foreground="Black" GroupName="rl" Name="RLDi" Click="RLEn_Click"/>
|
||||
<TextBox materialDesign:HintAssist.Hint="RELEASE YEAR" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="19,191,17,149" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="12" Grid.Column="1" PreviewTextInput="TextBox_PreviewTextInput" DataObject.Pasting="TextBoxPasting" Name="ReleaseYear" TextChanged="Players_TextChanged"/>
|
||||
<Button Content="Cancel" Grid.Column="1" HorizontalAlignment="Left" Margin="160,327,0,0" VerticalAlignment="Top" Width="99" Click="Button_Click"/>
|
||||
<Button Content="Finish" Grid.Column="1" HorizontalAlignment="Left" Margin="19,327,0,0" VerticalAlignment="Top" Width="99" Name="Finish" Click="Finish_Click"/>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using GameBaseClassLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Drawing.Imaging;
|
||||
|
@ -14,6 +15,7 @@ using System.Windows;
|
|||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
@ -25,17 +27,24 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
/// <summary>
|
||||
/// Interaktionslogik für ImageCreator.xaml
|
||||
/// </summary>
|
||||
|
||||
public partial class ImageCreator : Window, IDisposable
|
||||
{
|
||||
private static readonly string tempPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "temp");
|
||||
private static readonly string toolsPath = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "Tools");
|
||||
BootImage bi = new BootImage();
|
||||
Bitmap b;
|
||||
string console = "other";
|
||||
|
||||
bool drc = false;
|
||||
|
||||
public ImageCreator(string name)
|
||||
{
|
||||
InitializeComponent();
|
||||
imageName.Content = name;
|
||||
if (name.ToLower().Contains("drc"))
|
||||
{
|
||||
drc = true;
|
||||
}
|
||||
}
|
||||
public ImageCreator(GameConsoles console, string name) : this(name)
|
||||
{
|
||||
|
@ -127,9 +136,39 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
string file = "";
|
||||
MainViewModel mvm = FindResource("mvm") as MainViewModel;
|
||||
file = mvm.GetFilePath(false, false);
|
||||
if(!string.IsNullOrEmpty(file) && !file.Contains("tga"))
|
||||
if(!string.IsNullOrEmpty(file))
|
||||
{
|
||||
bi.TitleScreen = new Bitmap(file);
|
||||
|
||||
string copy = "";
|
||||
if (new FileInfo(file).Extension.Contains("tga"))
|
||||
{
|
||||
using (Process conv = new Process())
|
||||
{
|
||||
|
||||
conv.StartInfo.UseShellExecute = false;
|
||||
conv.StartInfo.CreateNoWindow = true;
|
||||
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"));
|
||||
conv.StartInfo.FileName = System.IO.Path.Combine(toolsPath, "tga2png.exe");
|
||||
conv.StartInfo.Arguments = $"-i \"{file}\" -o \"{System.IO.Path.Combine(tempPath, "image")}\"";
|
||||
|
||||
conv.Start();
|
||||
conv.WaitForExit();
|
||||
|
||||
foreach (string sFile in Directory.GetFiles(System.IO.Path.Combine(tempPath, "image"), "*.png"))
|
||||
{
|
||||
copy = sFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
copy = file;
|
||||
}
|
||||
bi.TitleScreen = new Bitmap(copy);
|
||||
b = bi.Create(console);
|
||||
Image.Source = BitmapToImageSource(b);
|
||||
}
|
||||
|
@ -145,11 +184,19 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
{
|
||||
File.Delete(System.IO.Path.Combine(@"bin\createdIMG", imageName.Content + ".png"));
|
||||
}
|
||||
b.Save(System.IO.Path.Combine(@"bin\createdIMG", imageName.Content + ".png"));
|
||||
if (drc)
|
||||
{
|
||||
b = ResizeImage(b, 854, 480);
|
||||
|
||||
}
|
||||
|
||||
b.Save(System.IO.Path.Combine(@"bin\createdIMG", imageName.Content + ".png"));
|
||||
|
||||
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||
private void TextBox_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -316,7 +363,7 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
Image.Source = BitmapToImageSource(b);
|
||||
}
|
||||
|
||||
private void Players_KeyDown(object sender, KeyEventArgs e)
|
||||
private void Players_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -371,5 +418,31 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
b = bi.Create(console);
|
||||
Image.Source = BitmapToImageSource(b);
|
||||
}
|
||||
|
||||
private void PLDi_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (PLEn.IsChecked != true)
|
||||
{
|
||||
Players.IsEnabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Players.IsEnabled = true;
|
||||
}
|
||||
DrawImage();
|
||||
}
|
||||
|
||||
private void RLEn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (RLEn.IsChecked != true)
|
||||
{
|
||||
ReleaseYear.IsEnabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ReleaseYear.IsEnabled = true;
|
||||
}
|
||||
DrawImage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -150,6 +150,9 @@
|
|||
<Compile Include="UI\Windows\EnterKey.xaml.cs">
|
||||
<DependentUpon>EnterKey.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Windows\ImageCreator - Kopieren.xaml.cs">
|
||||
<DependentUpon>ImageCreator - Kopieren.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Windows\ImageCreator.xaml.cs">
|
||||
<DependentUpon>ImageCreator.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
@ -251,6 +254,10 @@
|
|||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UI\Windows\ImageCreator - Kopieren.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="UI\Windows\ImageCreator.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
@ -528,6 +535,9 @@
|
|||
<ItemGroup>
|
||||
<None Include="Resources\SFAM.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Icon.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">
|
||||
|
|
Loading…
Reference in a new issue