BootImage Creator, Only creates TV Images, does not support TGA yet
204
UWUVCI AIO WPF/Classes/BootImage.cs
Normal file
|
@ -0,0 +1,204 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
|
||||
namespace UWUVCI_AIO_WPF.Classes
|
||||
{
|
||||
public class BootImage : IDisposable
|
||||
{
|
||||
private bool disposed = false;
|
||||
|
||||
private Bitmap _frame;
|
||||
private Bitmap _titleScreen;
|
||||
|
||||
public Bitmap Frame
|
||||
{
|
||||
set
|
||||
{
|
||||
if (_frame != null)
|
||||
_frame.Dispose();
|
||||
_frame = value;
|
||||
}
|
||||
get { return _frame; }
|
||||
}
|
||||
public Bitmap TitleScreen
|
||||
{
|
||||
set
|
||||
{
|
||||
if (_titleScreen != null)
|
||||
_titleScreen.Dispose();
|
||||
_titleScreen = value;
|
||||
}
|
||||
get { return _titleScreen; }
|
||||
}
|
||||
public string NameLine1;
|
||||
public string NameLine2;
|
||||
public int Released;
|
||||
public int Players;
|
||||
public bool Longname;
|
||||
|
||||
public BootImage()
|
||||
{
|
||||
_frame = null;
|
||||
_titleScreen = null;
|
||||
NameLine1 = null;
|
||||
NameLine2 = null;
|
||||
Released = 0;
|
||||
Players = 0;
|
||||
Longname = false;
|
||||
}
|
||||
|
||||
~BootImage()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!this.disposed)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
if (Frame != null)
|
||||
{
|
||||
Frame.Dispose();
|
||||
Frame = null;
|
||||
}
|
||||
if (TitleScreen != null)
|
||||
{
|
||||
TitleScreen.Dispose();
|
||||
TitleScreen = null;
|
||||
}
|
||||
}
|
||||
disposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
public Bitmap Create(string console)
|
||||
{
|
||||
Bitmap img = new Bitmap(1280, 720);
|
||||
Graphics g = Graphics.FromImage(img);
|
||||
g.PixelOffsetMode = PixelOffsetMode.Half;
|
||||
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
g.CompositingMode = CompositingMode.SourceOver;
|
||||
g.CompositingQuality = CompositingQuality.HighQuality;
|
||||
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||
g.Clear(Color.White);
|
||||
System.Drawing.Text.PrivateFontCollection privateFonts = new System.Drawing.Text.PrivateFontCollection();
|
||||
privateFonts.AddFontFile(@"bin\Tools\font.otf");
|
||||
Font font = new Font(privateFonts.Families[0], 10.0F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
|
||||
SolidBrush brush = new SolidBrush(Color.FromArgb(32, 32, 32));
|
||||
Pen outline = new Pen(Color.FromArgb(222, 222, 222), 4.0F);
|
||||
Pen shadow = new Pen(Color.FromArgb(190, 190, 190), 6.0F);
|
||||
StringFormat format = new StringFormat();
|
||||
Rectangle rectangleGBA = new Rectangle(132, 260, 399, 266);
|
||||
Rectangle rectangleGBC = new Rectangle(183, 260, 296, 266);
|
||||
Rectangle rectangleH4V3 = new Rectangle(131, 249, 400, 300);
|
||||
|
||||
|
||||
if (console == "GBA")
|
||||
{
|
||||
if (TitleScreen != null)
|
||||
g.DrawImage(TitleScreen, rectangleGBA);
|
||||
else
|
||||
g.FillRectangle(new SolidBrush(Color.Black), rectangleGBA);
|
||||
}
|
||||
else if (console == "GBC")
|
||||
{
|
||||
if (TitleScreen != null)
|
||||
g.DrawImage(TitleScreen, rectangleGBC);
|
||||
else
|
||||
g.FillRectangle(new SolidBrush(Color.Black), rectangleGBC);
|
||||
}
|
||||
else if (console == "NDS")
|
||||
{
|
||||
if (TitleScreen != null)
|
||||
{
|
||||
|
||||
g.DrawImage(TitleScreen, rectangleH4V3);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
g.FillRectangle(new SolidBrush(Color.Black), rectangleH4V3);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (TitleScreen != null)
|
||||
g.DrawImage(TitleScreen, rectangleH4V3);
|
||||
else
|
||||
g.FillRectangle(new SolidBrush(Color.Black), rectangleH4V3);
|
||||
}
|
||||
|
||||
if (Frame != null)
|
||||
g.DrawImage(Frame, new Rectangle(0, 0, 1280, 720));
|
||||
|
||||
if (NameLine1 != null && NameLine2 != null)
|
||||
{
|
||||
Pen outlineBold = new Pen(Color.FromArgb(222, 222, 222), 5.0F);
|
||||
Pen shadowBold = new Pen(Color.FromArgb(190, 190, 190), 7.0F);
|
||||
Rectangle rectangleNL1 = Longname ? new Rectangle(578, 313, 640, 50) : new Rectangle(578, 340, 640, 50);
|
||||
Rectangle rectangleNL2 = new Rectangle(578, 368, 640, 50);
|
||||
GraphicsPath nl1 = new GraphicsPath();
|
||||
GraphicsPath nl2 = new GraphicsPath();
|
||||
|
||||
if (Longname)
|
||||
{
|
||||
nl1.AddString(NameLine1, font.FontFamily,
|
||||
(int)(FontStyle.Bold),
|
||||
g.DpiY * 37.0F / 72.0F, rectangleNL1, format);
|
||||
g.DrawPath(shadowBold, nl1);
|
||||
g.DrawPath(outlineBold, nl1);
|
||||
g.FillPath(brush, nl1);
|
||||
nl2.AddString(NameLine2, font.FontFamily,
|
||||
(int)(FontStyle.Bold),
|
||||
g.DpiY * 37.0F / 72.0F, rectangleNL2, format);
|
||||
g.DrawPath(shadowBold, nl2);
|
||||
g.DrawPath(outlineBold, nl2);
|
||||
g.FillPath(brush, nl2);
|
||||
}
|
||||
else
|
||||
{
|
||||
nl1.AddString(NameLine1, font.FontFamily,
|
||||
(int)(FontStyle.Bold),
|
||||
g.DpiY * 37.0F / 72.0F, rectangleNL1, format);
|
||||
g.DrawPath(shadowBold, nl1);
|
||||
g.DrawPath(outlineBold, nl1);
|
||||
g.FillPath(brush, nl1);
|
||||
}
|
||||
}
|
||||
|
||||
if (Released > 1951)
|
||||
{
|
||||
GraphicsPath r = new GraphicsPath();
|
||||
r.AddString("Released: " + Released.ToString(), font.FontFamily,
|
||||
(int)(FontStyle.Regular),
|
||||
g.DpiY * 25.0F / 72.0F, new Rectangle(586, 450, 300, 40), format);
|
||||
g.DrawPath(shadow, r);
|
||||
g.DrawPath(outline, r);
|
||||
g.FillPath(brush, r);
|
||||
}
|
||||
|
||||
if (Players > 0)
|
||||
{
|
||||
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),
|
||||
g.DpiY * 25.0F / 72.0F, new Rectangle(586, 496, 400, 40), format);
|
||||
g.DrawPath(shadow, p);
|
||||
g.DrawPath(outline, p);
|
||||
g.FillPath(brush, p);
|
||||
}
|
||||
|
||||
return img;
|
||||
}
|
||||
}
|
||||
}
|
142
UWUVCI AIO WPF/Classes/MenuIconImage.cs
Normal file
|
@ -0,0 +1,142 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
|
||||
namespace UWUVCI_AIO_WPF.Classes
|
||||
{
|
||||
public class MenuIconImage : IDisposable
|
||||
{
|
||||
private bool disposed = false;
|
||||
|
||||
private Bitmap _frame;
|
||||
private Bitmap _titleScreen;
|
||||
|
||||
public Bitmap Frame
|
||||
{
|
||||
set
|
||||
{
|
||||
if (_frame != null)
|
||||
_frame.Dispose();
|
||||
_frame = value;
|
||||
}
|
||||
get { return _frame; }
|
||||
}
|
||||
public Bitmap TitleScreen
|
||||
{
|
||||
set
|
||||
{
|
||||
if (_titleScreen != null)
|
||||
_titleScreen.Dispose();
|
||||
_titleScreen = value;
|
||||
}
|
||||
get { return _titleScreen; }
|
||||
}
|
||||
|
||||
public MenuIconImage()
|
||||
{
|
||||
_frame = null;
|
||||
_titleScreen = null;
|
||||
}
|
||||
|
||||
~MenuIconImage()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!this.disposed)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
if (Frame != null)
|
||||
{
|
||||
Frame.Dispose();
|
||||
Frame = null;
|
||||
}
|
||||
if (TitleScreen != null)
|
||||
{
|
||||
TitleScreen.Dispose();
|
||||
TitleScreen = null;
|
||||
}
|
||||
}
|
||||
disposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
public Bitmap Create(string console)
|
||||
{
|
||||
Bitmap img = new Bitmap(128, 128);
|
||||
Graphics g = Graphics.FromImage(img);
|
||||
g.PixelOffsetMode = PixelOffsetMode.Half;
|
||||
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||
g.CompositingMode = CompositingMode.SourceOver;
|
||||
g.CompositingQuality = CompositingQuality.HighQuality;
|
||||
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||
g.Clear(Color.FromArgb(30, 30, 30));
|
||||
|
||||
Rectangle rectangleGBA = new Rectangle(3, 17, 122, 81);
|
||||
Rectangle rectangleH4V3 = new Rectangle(3, 9, 122, 92);
|
||||
|
||||
if (console == "GBA")
|
||||
{
|
||||
if (TitleScreen != null)
|
||||
g.DrawImage(TitleScreen, rectangleGBA);
|
||||
else
|
||||
g.FillRectangle(new SolidBrush(Color.Black), rectangleGBA);
|
||||
}
|
||||
else if (console == "NDS")
|
||||
{
|
||||
if (TitleScreen != null)
|
||||
{
|
||||
if (TitleScreen.Width > TitleScreen.Height)
|
||||
g.DrawImage(TitleScreen, rectangleH4V3);
|
||||
else if (TitleScreen.Width < TitleScreen.Height)
|
||||
{
|
||||
|
||||
g.DrawImage(TitleScreen, rectangleH4V3);
|
||||
}
|
||||
else
|
||||
{
|
||||
g.DrawImage(TitleScreen, rectangleH4V3);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
g.FillRectangle(new SolidBrush(Color.Black), rectangleH4V3);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (TitleScreen != null)
|
||||
g.DrawImage(TitleScreen, rectangleH4V3);
|
||||
else
|
||||
g.FillRectangle(new SolidBrush(Color.Black), rectangleH4V3);
|
||||
}
|
||||
|
||||
if (Frame == null)
|
||||
{
|
||||
GraphicsPath vc = new GraphicsPath();
|
||||
Font font = new Font("Arial", 10.0F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
StringFormat format = new StringFormat();
|
||||
format.Alignment = StringAlignment.Center;
|
||||
format.LineAlignment = StringAlignment.Center;
|
||||
|
||||
vc.AddString("Virtual Console.", font.FontFamily,
|
||||
(int)(FontStyle.Bold | FontStyle.Italic),
|
||||
g.DpiY * 9.2F / 72.0F, new Rectangle(0, 101, 128, 27), format);
|
||||
g.DrawPath(new Pen(Color.Black, 2.0F), vc);
|
||||
g.FillPath(new SolidBrush(Color.FromArgb(147, 149, 152)), vc);
|
||||
}
|
||||
else
|
||||
g.DrawImage(Frame, new Rectangle(0, 0, 128, 128));
|
||||
|
||||
return img;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -52,7 +52,9 @@ namespace UWUVCI_AIO_WPF.Classes
|
|||
"SOX.zip",
|
||||
"jpg2tga.exe",
|
||||
"bmp2tga.exe",
|
||||
"ConvertToNKit.exe"
|
||||
"ConvertToNKit.exe",
|
||||
"wglp.exe",
|
||||
"font.otf"
|
||||
};
|
||||
|
||||
public static bool DoesToolsFolderExist()
|
||||
|
|
|
@ -246,6 +246,15 @@ namespace UWUVCI_AIO_WPF
|
|||
get { return lMSX; }
|
||||
set { lMSX = value; OnPropertyChanged(); }
|
||||
}
|
||||
|
||||
public void RemoveCreatedIMG()
|
||||
{
|
||||
if (Directory.Exists(@"bin\createdIMG"))
|
||||
{
|
||||
Directory.Delete(@"bin\createdIMG", true);
|
||||
}
|
||||
}
|
||||
|
||||
private List<GameBases> lWii = new List<GameBases>();
|
||||
|
||||
public void IsIsoNkit()
|
||||
|
@ -271,6 +280,26 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
}
|
||||
|
||||
public bool CheckTime(DateTime creationTime)
|
||||
{
|
||||
DateTime curr = DateTime.Now;
|
||||
if(creationTime.Hour == curr.Hour || creationTime.Hour == curr.Hour - 1)
|
||||
{
|
||||
if(creationTime.Minute == curr.Minute || creationTime.Minute == curr.Minute - 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public List<GameBases> LWII
|
||||
{
|
||||
get { return lWii; }
|
||||
|
|
150
UWUVCI AIO WPF/Properties/Resources.Designer.cs
generated
|
@ -60,6 +60,136 @@ namespace UWUVCI_AIO_WPF.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Gameboy1 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Gameboy1", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Gameboy2 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Gameboy2", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap GBA {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GBA", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap GBC {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GBC", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap GCN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GCN", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap MSX {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("MSX", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap N64 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("N64", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap NDS {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("NDS", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap NES {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("NES", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap newgameboy {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("newgameboy", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap SFAM {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SFAM", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap SNES_PAL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SNES_PAL", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap SNES_USA {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SNES_USA", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
|
@ -69,5 +199,25 @@ namespace UWUVCI_AIO_WPF.Properties {
|
|||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap TG16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("TG16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap TGCD {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("TGCD", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,7 +118,52 @@
|
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Gameboy1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Gameboy1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Gameboy2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Gameboy2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="GBA" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\GBA.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="GBC" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\GBC.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<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="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>
|
||||
<data name="N64" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\N64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="NDS" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\NDS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="NES" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\NES.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="newgameboy" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\newgameboy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SFAM" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SFAM.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SNES_PAL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SNES-PAL.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SNES_USA" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SNES-USA.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="sound" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\sound.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="TG16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\TG16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="TGCD" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\TGCD.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
UWUVCI AIO WPF/Resources/GBA.png
Normal file
After Width: | Height: | Size: 208 KiB |
BIN
UWUVCI AIO WPF/Resources/GBC.png
Normal file
After Width: | Height: | Size: 420 KiB |
BIN
UWUVCI AIO WPF/Resources/GCN.png
Normal file
After Width: | Height: | Size: 394 KiB |
BIN
UWUVCI AIO WPF/Resources/Gameboy1.png
Normal file
After Width: | Height: | Size: 307 KiB |
BIN
UWUVCI AIO WPF/Resources/Gameboy2.png
Normal file
After Width: | Height: | Size: 308 KiB |
BIN
UWUVCI AIO WPF/Resources/MSX.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
UWUVCI AIO WPF/Resources/N64.png
Normal file
After Width: | Height: | Size: 242 KiB |
BIN
UWUVCI AIO WPF/Resources/NDS.png
Normal file
After Width: | Height: | Size: 250 KiB |
BIN
UWUVCI AIO WPF/Resources/NES.png
Normal file
After Width: | Height: | Size: 337 KiB |
BIN
UWUVCI AIO WPF/Resources/SFAM.png
Normal file
After Width: | Height: | Size: 388 KiB |
BIN
UWUVCI AIO WPF/Resources/SNES-PAL.png
Normal file
After Width: | Height: | Size: 517 KiB |
BIN
UWUVCI AIO WPF/Resources/SNES-USA.png
Normal file
After Width: | Height: | Size: 547 KiB |
BIN
UWUVCI AIO WPF/Resources/TG16.png
Normal file
After Width: | Height: | Size: 634 KiB |
BIN
UWUVCI AIO WPF/Resources/TGCD.png
Normal file
After Width: | Height: | Size: 663 KiB |
BIN
UWUVCI AIO WPF/Resources/newgameboy.png
Normal file
After Width: | Height: | Size: 307 KiB |
|
@ -12,8 +12,8 @@
|
|||
<TextBlock Text="Choose a Base from the dropdown menu" Margin="10,5,10,381" VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center" FontSize="15" Width="383"></TextBlock>
|
||||
<ComboBox x:Name="cbCombo" Margin="7,32,13,0" VerticalAlignment="Top" Background="#FFCFCFCF" BorderBrush="#FF008BFF" ItemsSource="{Binding LGameBasesString}" SelectionChanged="ComboBox_SelectionChanged" SelectedItem="{Binding SelectedBaseAsString}"/>
|
||||
<Frame Name="fLoadFrame" HorizontalAlignment="Left" Height="290" Margin="10,116,0,0" VerticalAlignment="Top" Width="383"/>
|
||||
<Button Content="Copy ID" HorizontalAlignment="Left" Margin="298,69,0,0" VerticalAlignment="Top" Width="94" Height="31" Name="id" Click="id_Click" />
|
||||
<Label Content="stuffffffffff" HorizontalAlignment="Left" Margin="179,72,0,0" VerticalAlignment="Top" Width="114" Name="idtxt" Foreground="Black"/>
|
||||
<Button Content="Copy ID" HorizontalAlignment="Left" Margin="298,69,0,0" VerticalAlignment="Top" Width="94" Height="31" Name="id" Click="id_Click" Visibility="Hidden"/>
|
||||
<Label Content="" HorizontalAlignment="Left" Margin="179,72,0,0" VerticalAlignment="Top" Width="114" Name="idtxt" Foreground="Black" Visibility="Hidden"/>
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<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,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="Select File" HorizontalAlignment="Left" Margin="506,238,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
|
||||
<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="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using GameBaseClassLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
@ -185,6 +186,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
}
|
||||
private void Set_TvTex(object sender, RoutedEventArgs e)
|
||||
{
|
||||
/*
|
||||
if (!Settings.Default.dont)
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
|
@ -205,7 +207,26 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
tv.Text = "";
|
||||
tvIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "bootTvTex.png");
|
||||
ImageCreator ic = new ImageCreator(GameConsoles.N64, "bootTvTex");
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<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,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="Select File" HorizontalAlignment="Left" Margin="506,238,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
|
||||
<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="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
|
||||
|
|
|
@ -93,7 +93,12 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
mvm.CanInject = true;
|
||||
|
||||
}
|
||||
mvm.getBootIMGGBA(mvm.RomPath);
|
||||
FileInfo inf = new FileInfo(path);
|
||||
if (inf.Extension.ToLower() != ".gb" && inf.Extension.ToLower() != ".gbc")
|
||||
{
|
||||
mvm.getBootIMGGBA(mvm.RomPath);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -140,12 +145,61 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void Set_TvTex(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.TGATv.ImgPath = path;
|
||||
mvm.GameConfiguration.TGATv.extension = new FileInfo(path).Extension;
|
||||
tv.Text = path;
|
||||
tvIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (path == "")
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = null;
|
||||
tv.Text = "";
|
||||
tvIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "bootTvTex.png");
|
||||
|
||||
ImageCreator ic;
|
||||
if (!string.IsNullOrEmpty(mvm.RomPath))
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
if (new FileInfo(mvm.RomPath).Extension.ToLower() == ".gb")
|
||||
{
|
||||
ic = new ImageCreator(false, GameBaseClassLibrary.GameConsoles.GBA, "bootTvTex");
|
||||
}
|
||||
else if (new FileInfo(mvm.RomPath).Extension.ToLower() == ".gbc")
|
||||
{
|
||||
ic = new ImageCreator(true, GameBaseClassLibrary.GameConsoles.GBA, "bootTvTex");
|
||||
}
|
||||
else
|
||||
{
|
||||
ic = new ImageCreator(GameBaseClassLibrary.GameConsoles.GBA, "bootTvTex");
|
||||
}
|
||||
}
|
||||
string path = mvm.GetFilePath(false, false);
|
||||
if (!CheckIfNull(path))
|
||||
else
|
||||
{
|
||||
ic = new ImageCreator(GameBaseClassLibrary.GameConsoles.GBA, "bootTvTex");
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
|
@ -154,14 +208,10 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
}
|
||||
else
|
||||
{
|
||||
if (path == "")
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = null;
|
||||
tv.Text = "";
|
||||
tvIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
mvm.GameConfiguration.TGATv.ImgPath = null;
|
||||
tv.Text = "";
|
||||
tvIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void Set_DrcTex(object sender, RoutedEventArgs e)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<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,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="Select File" HorizontalAlignment="Left" Margin="506,238,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
|
||||
<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="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
|
||||
|
|
|
@ -206,7 +206,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void Set_TvTex(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!Settings.Default.dont)
|
||||
/*if (!Settings.Default.dont)
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
}
|
||||
|
@ -226,8 +226,25 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
tv.Text = "";
|
||||
tvIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "bootTvTex.png");
|
||||
ImageCreator ic = new ImageCreator(GameConsoles.GCN, "bootTvTex");
|
||||
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_DrcTex(object sender, RoutedEventArgs e)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<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,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="Select File" HorizontalAlignment="Left" Margin="506,238,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
|
||||
<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="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
|
||||
|
|
|
@ -136,12 +136,48 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void Set_TvTex(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.TGATv.ImgPath = path;
|
||||
mvm.GameConfiguration.TGATv.extension = new FileInfo(path).Extension;
|
||||
tv.Text = path;
|
||||
tvIMG.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (path == "")
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = null;
|
||||
tv.Text = "";
|
||||
tvIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "bootTvTex.png");
|
||||
ImageCreator ic;
|
||||
|
||||
|
||||
ic = new ImageCreator(cd, GameBaseClassLibrary.GameConsoles.TG16, "bootTvTex");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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.TGATv.ImgPath = path;
|
||||
mvm.GameConfiguration.TGATv.extension = new FileInfo(path).Extension;
|
||||
|
@ -150,14 +186,10 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
}
|
||||
else
|
||||
{
|
||||
if (path == "")
|
||||
{
|
||||
mvm.GameConfiguration.TGATv.ImgPath = null;
|
||||
tv.Text = "";
|
||||
tvIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
mvm.GameConfiguration.TGATv.ImgPath = null;
|
||||
tv.Text = "";
|
||||
tvIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void Set_DrcTex(object sender, RoutedEventArgs e)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<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,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="Select File" HorizontalAlignment="Left" Margin="506,238,0,0" VerticalAlignment="Top" Width="127" Click="Set_TvTex"/>
|
||||
<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="Select File" HorizontalAlignment="Left" Margin="506,72,0,0" VerticalAlignment="Top" Width="127" Click="Set_Rom_Path" Name="Injection"/>
|
||||
|
|
|
@ -138,7 +138,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
|
||||
private void Set_TvTex(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!Settings.Default.dont)
|
||||
/*if (!Settings.Default.dont)
|
||||
{
|
||||
mvm.ImageWarning();
|
||||
}
|
||||
|
@ -158,8 +158,25 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
tv.Text = "";
|
||||
tvIMG.Visibility = Visibility.Hidden;
|
||||
}
|
||||
}*/
|
||||
string path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "bin", "createdIMG", "bootTvTex.png");
|
||||
ImageCreator ic = new ImageCreator(mvm.GameConfiguration.Console, "bootTvTex");
|
||||
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_DrcTex(object sender, RoutedEventArgs e)
|
||||
|
|
|
@ -25,12 +25,8 @@
|
|||
<Label Content="Use GamePad as:" HorizontalAlignment="Left" Margin="6,113,0,0" VerticalAlignment="Top" FontSize="14"/>
|
||||
<CheckBox Content="Swap L/R and ZL/ZR" HorizontalAlignment="Left" Margin="506,142,0,0" VerticalAlignment="Top" Width="137" x:Name="LR" IsEnabled="False" IsChecked="False"/>
|
||||
<StackPanel Margin="10,20,34,436" Orientation="Horizontal">
|
||||
<Label Content="Video Patch:" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="14" Width="90"/>
|
||||
<RadioButton Name="vmcsmoll" Content="None" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="VMC" IsChecked="True" Click="RadioButton_Click_2" Width="77"/>
|
||||
<RadioButton Name="ntsc" Content="NTSC To PAL" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="VMC" Click="RadioButton_Click" Width="111" ToolTip="May not work with every Game"/>
|
||||
<RadioButton Name="pal" Content="PAL To NTSC" HorizontalAlignment="Left" Margin="0,5,0,0" VerticalAlignment="Top" GroupName="VMC" Click="RadioButton_Click_1" Width="110" ToolTip="May not work with every Game"/>
|
||||
<CheckBox Content="JP Patch" Margin="0,5,0,31" Name="jppatch" Width="84" ToolTip="Allows playing JP Wii Games on non JP Consoles" Click="jppatch_Click"/>
|
||||
<CheckBox Content="Disable Trim" Margin="0,5,0,31" x:Name="trimn" Click="trimn_Click" IsEnabled="False"/>
|
||||
<ComboBox VerticalAlignment="Stretch" Width="120" Margin="0,0,0,25" Name="selectionDB" SelectionChanged="selectionDB_SelectionChanged"/>
|
||||
<Label Content=" " HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="14" />
|
||||
</StackPanel>
|
||||
<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" />
|
||||
|
@ -41,5 +37,21 @@
|
|||
<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">
|
||||
<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"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Height="30" Margin="150,19,213,461" Orientation="Horizontal" Name="VideoMode" Visibility="Hidden">
|
||||
<RadioButton x:Name="vmcsmoll" Content="None" HorizontalAlignment="Left" VerticalAlignment="Top" GroupName="VMC" IsChecked="True" Click="RadioButton_Click_2" Width="77" Margin="0,6,0,0"/>
|
||||
<RadioButton x:Name="ntsc" Content="NTSC To PAL" HorizontalAlignment="Left" VerticalAlignment="Top" GroupName="VMC" Click="RadioButton_Click" Width="111" ToolTip="May not work with every Game" Margin="0,6,0,0"/>
|
||||
<RadioButton x:Name="pal" Content="PAL To NTSC" HorizontalAlignment="Left" VerticalAlignment="Top" GroupName="VMC" Click="RadioButton_Click_1" Width="110" ToolTip="May not work with every Game" Margin="0,6,0,0"/>
|
||||
</StackPanel>
|
||||
<StackPanel Height="30" Margin="150,20,186,460" Orientation="Horizontal" x:Name="RegionFrii" Visibility="Hidden">
|
||||
<RadioButton x:Name="RF_n" Content="None" HorizontalAlignment="Left" VerticalAlignment="Top" GroupName="RF" IsChecked="True" Width="77" Margin="0,6,0,0" ToolTip="Keep Original Game Region"/>
|
||||
<RadioButton x:Name="RF_tp" Content="To PAL" HorizontalAlignment="Left" VerticalAlignment="Top" GroupName="RF" Width="82" ToolTip="Change Game Region to PAL" Margin="0,6,0,0"/>
|
||||
<RadioButton x:Name="RF_tn" Content="To NTSC" HorizontalAlignment="Left" VerticalAlignment="Top" GroupName="RF" Width="85" ToolTip="Change Game Region to NTSC" Margin="0,6,0,0"/>
|
||||
<RadioButton x:Name="RF_tj" Content="To JPN" HorizontalAlignment="Left" VerticalAlignment="Top" GroupName="RF" Width="82" ToolTip="Change Game Region to JPN" Margin="0,6,0,0"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
|
|
@ -43,6 +43,12 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
gamepad.ItemsSource = gpEmu;
|
||||
gamepad.SelectedIndex = 0;
|
||||
mvm.test = GameBaseClassLibrary.GameConsoles.WII;
|
||||
List<string> selection = new List<string>();
|
||||
selection.Add("Video Patches");
|
||||
selection.Add("Region Patches");
|
||||
selection.Add("Extras");
|
||||
selectionDB.ItemsSource = selection;
|
||||
selectionDB.SelectedIndex = 2;
|
||||
}
|
||||
public WiiConfig(GameConfig c)
|
||||
{
|
||||
|
@ -62,6 +68,12 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
gamepad.ItemsSource = gpEmu;
|
||||
gamepad.SelectedIndex = 0;
|
||||
mvm.test = GameBaseClassLibrary.GameConsoles.WII;
|
||||
List<string> selection = new List<string>();
|
||||
selection.Add("Video Patches");
|
||||
selection.Add("Region Patches");
|
||||
selection.Add("Extras");
|
||||
selectionDB.ItemsSource = selection;
|
||||
selectionDB.SelectedIndex = 2;
|
||||
}
|
||||
public void Dispose()
|
||||
{
|
||||
|
@ -704,5 +716,27 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
|
|||
mvm.jppatch = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void selectionDB_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
switch (selectionDB.SelectedIndex)
|
||||
{
|
||||
case 0:
|
||||
VideoMode.Visibility = Visibility.Visible;
|
||||
RegionFrii.Visibility = Visibility.Hidden;
|
||||
Extra.Visibility = Visibility.Hidden;
|
||||
break;
|
||||
case 1:
|
||||
VideoMode.Visibility = Visibility.Hidden;
|
||||
RegionFrii.Visibility = Visibility.Visible;
|
||||
Extra.Visibility = Visibility.Hidden;
|
||||
break;
|
||||
case 2:
|
||||
VideoMode.Visibility = Visibility.Hidden;
|
||||
RegionFrii.Visibility = Visibility.Hidden;
|
||||
Extra.Visibility = Visibility.Visible;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,7 +121,18 @@ namespace UWUVCI_AIO_WPF.UI.Frames
|
|||
|
||||
private void Button_Click_11(object sender, RoutedEventArgs e)
|
||||
{
|
||||
new SDSetup().Show();
|
||||
ImageCreator ic = new ImageCreator(GameBaseClassLibrary.GameConsoles.SNES, "bootTvTex");
|
||||
try
|
||||
{
|
||||
ic.Owner = (FindResource("mvm") as MainViewModel).mw;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
ic.ShowDialog();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
|
||||
<TextBox x:Name="tbKey" materialDesign:HintAssist.Hint="ENTER KEY" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="10,40,15,90" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="18"/>
|
||||
</StackPanel>
|
||||
<Button Content="Read from otp.bin" HorizontalAlignment="Left" Margin="32,103,0,0" VerticalAlignment="Top" Width="152" Click="Button_Click_2" Name="otp"/>
|
||||
<Label Content="or" HorizontalAlignment="Left" Height="100" Margin="7,92,0,-45" VerticalAlignment="Top" Name="or" FontSize="15"/>
|
||||
<Button Content="Read from otp.bin" HorizontalAlignment="Left" Margin="10,103,0,0" VerticalAlignment="Top" Width="152" Click="Button_Click_2" Name="otp"/>
|
||||
<Label HorizontalAlignment="Left" Height="100" Margin="7,92,0,-45" VerticalAlignment="Top" Name="or" FontSize="15"/>
|
||||
|
||||
|
||||
|
||||
|
|
60
UWUVCI AIO WPF/UI/Windows/ImageCreator.xaml
Normal file
|
@ -0,0 +1,60 @@
|
|||
<Window x:Class="UWUVCI_AIO_WPF.UI.Windows.ImageCreator"
|
||||
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="381" Width="786" 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">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="275"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel>
|
||||
<Label></Label>
|
||||
<Label></Label>
|
||||
<Label></Label>
|
||||
<StackPanel Orientation="Horizontal" Grid.Column="0" VerticalAlignment="Top">
|
||||
<Label></Label>
|
||||
<Label Content=" bootTvTex" x:Name="imageName" Width="78"/>
|
||||
<Label/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Grid.Column="0" Height="270" VerticalAlignment="Top">
|
||||
<Label Width="16"></Label>
|
||||
<Image HorizontalAlignment="Left" Height="270" VerticalAlignment="Top" Width="480" Name="Image"/>
|
||||
<Label/>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
<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,52,0,0" VerticalAlignment="Top"/>
|
||||
<RadioButton Content="Enabled" Grid.Column="1" HorizontalAlignment="Left" Margin="100,56,0,0" VerticalAlignment="Top" Foreground="Black" GroupName="ov" Name="enOv" Click="enOv_Click" IsChecked="True"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<Border BorderThickness="1.5,1.5,1.5,1.5" BorderBrush="#FF2196F3" HorizontalAlignment="Left" Height="272" VerticalAlignment="Top" Width="484" Margin="14,48,0,0">
|
||||
|
||||
</Border>
|
||||
<TextBox materialDesign:HintAssist.Hint="GAME NAME" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="19,79,17,262" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="12" Grid.Column="1" Name="GameName1" TextChanged="Players_TextChanged"/>
|
||||
<TextBox materialDesign:HintAssist.Hint="PLAYERS" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Margin="19,269,17,71" Background="{x:Null}" Foreground="Black" SelectionBrush="#FF00C3D7" CaretBrush="#FF21C3F3" FontSize="12" Grid.Column="1" PreviewTextInput="TextBox_PreviewTextInput" DataObject.Pasting="TextBoxPasting" Name="Players" TextChanged="Players_TextChanged"/>
|
||||
<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>
|
||||
</Grid>
|
||||
</Window>
|
375
UWUVCI AIO WPF/UI/Windows/ImageCreator.xaml.cs
Normal file
|
@ -0,0 +1,375 @@
|
|||
using GameBaseClassLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
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.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 ImageCreator : Window, IDisposable
|
||||
{
|
||||
BootImage bi = new BootImage();
|
||||
Bitmap b;
|
||||
string console = "other";
|
||||
|
||||
|
||||
public ImageCreator(string name)
|
||||
{
|
||||
InitializeComponent();
|
||||
imageName.Content = name;
|
||||
}
|
||||
public ImageCreator(GameConsoles console, string name) : this(name)
|
||||
{
|
||||
InitializeComponent();
|
||||
SetTemplate(console);
|
||||
}
|
||||
public ImageCreator(bool other, GameConsoles consoles, string name) : this(name)
|
||||
{
|
||||
InitializeComponent();
|
||||
Bitmap bit;
|
||||
if(consoles == GameConsoles.TG16)
|
||||
{
|
||||
if (other)
|
||||
{
|
||||
bit = new Bitmap(Properties.Resources.TGCD);
|
||||
}
|
||||
else
|
||||
{
|
||||
bit = new Bitmap(Properties.Resources.TG16);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.console = "GBC";
|
||||
if (other)
|
||||
{
|
||||
bit = new Bitmap(Properties.Resources.GBC);
|
||||
}
|
||||
else
|
||||
{
|
||||
bit = new Bitmap(Properties.Resources.newgameboy);
|
||||
|
||||
}
|
||||
}
|
||||
bi.Frame = bit;
|
||||
}
|
||||
|
||||
private void SetTemplate(GameConsoles console)
|
||||
{
|
||||
Bitmap bit;
|
||||
switch (console){
|
||||
case GameConsoles.NDS:
|
||||
bit = new Bitmap(Properties.Resources.NDS);
|
||||
|
||||
this.console = "NDS";
|
||||
break;
|
||||
case GameConsoles.N64:
|
||||
bit = new Bitmap(Properties.Resources.N64);
|
||||
|
||||
break;
|
||||
case GameConsoles.NES:
|
||||
bit = new Bitmap(Properties.Resources.NES);
|
||||
|
||||
break;
|
||||
case GameConsoles.GBA:
|
||||
bit = new Bitmap(Properties.Resources.GBA);
|
||||
this.console = "GBA";
|
||||
break;
|
||||
case GameConsoles.GCN:
|
||||
bit = new Bitmap(Properties.Resources.GCN);
|
||||
break;
|
||||
case GameConsoles.MSX:
|
||||
bit = new Bitmap(Properties.Resources.MSX);
|
||||
break;
|
||||
case GameConsoles.SNES:
|
||||
bit = new Bitmap(Properties.Resources.SNES_PAL);
|
||||
snesonly.Visibility = Visibility.Visible;
|
||||
List<string> styles = new List<string>();
|
||||
styles.Add("SNES - PAL");
|
||||
styles.Add("SNES - NTSC");
|
||||
styles.Add("Super Famicom");
|
||||
combo.ItemsSource = styles;
|
||||
combo.SelectedIndex = 0;
|
||||
break;
|
||||
default:
|
||||
bit = null;
|
||||
break;
|
||||
}
|
||||
bi.Frame = bit;
|
||||
}
|
||||
|
||||
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) && !file.Contains("tga"))
|
||||
{
|
||||
bi.TitleScreen = new Bitmap(file);
|
||||
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"));
|
||||
}
|
||||
b.Save(System.IO.Path.Combine(@"bin\createdIMG", imageName.Content + ".png"));
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void TextBox_PreviewKeyDown(object sender, 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;
|
||||
}
|
||||
}
|
||||
|
||||
void EnableOrDisbale(bool en)
|
||||
{
|
||||
GameName1.IsEnabled = en;
|
||||
GameName2.IsEnabled = en;
|
||||
ReleaseYearLabel.IsEnabled = en;
|
||||
RLDi.IsEnabled = en;
|
||||
RLEn.IsEnabled = en;
|
||||
ReleaseYear.IsEnabled = en;
|
||||
if(en && RLDi.IsChecked == true)
|
||||
{
|
||||
ReleaseYear.IsEnabled = false;
|
||||
}
|
||||
PLDi.IsEnabled = en;
|
||||
PLEn.IsEnabled = en;
|
||||
Players.IsEnabled = en;
|
||||
if (en && PLDi.IsChecked == true)
|
||||
{
|
||||
Players.IsEnabled = false;
|
||||
}
|
||||
PlayerLabel.IsEnabled = en;
|
||||
if(snesonly.IsVisible == true)
|
||||
{
|
||||
snesonly.IsEnabled = en;
|
||||
}
|
||||
}
|
||||
|
||||
private void enOv_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if(enOv.IsChecked == true)
|
||||
{
|
||||
EnableOrDisbale(true);
|
||||
b = bi.Create(console);
|
||||
Image.Source = BitmapToImageSource(b);
|
||||
}
|
||||
else
|
||||
{
|
||||
EnableOrDisbale(false);
|
||||
if(bi.TitleScreen != null)
|
||||
{
|
||||
b = ResizeImage(bi.TitleScreen, 1280, 720); 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, 1280, 720);
|
||||
}
|
||||
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()
|
||||
{
|
||||
|
||||
|
||||
|
||||
bi.NameLine1 = GameName1.Text;
|
||||
bi.NameLine2 = GameName2.Text;
|
||||
if (!string.IsNullOrWhiteSpace(GameName2.Text))
|
||||
{
|
||||
bi.Longname = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
bi.Longname = false;
|
||||
}
|
||||
|
||||
if(PLEn.IsChecked == true && !String.IsNullOrWhiteSpace(Players.Text))
|
||||
{
|
||||
bi.Players = Convert.ToInt32(Players.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
bi.Players = 0;
|
||||
}
|
||||
if (RLEn.IsChecked == true && !String.IsNullOrWhiteSpace(ReleaseYear.Text))
|
||||
{
|
||||
bi.Released = Convert.ToInt32(ReleaseYear.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
bi.Released = 0;
|
||||
}
|
||||
|
||||
b = bi.Create(console);
|
||||
Image.Source = BitmapToImageSource(b);
|
||||
}
|
||||
|
||||
private void Players_KeyDown(object sender, 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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -204,6 +204,7 @@ namespace UWUVCI_AIO_WPF
|
|||
mvm.prodcode = "";
|
||||
mvm.foldername = "";
|
||||
mvm.jppatch = false;
|
||||
mvm.RemoveCreatedIMG();
|
||||
mvm.isDoneMW();
|
||||
|
||||
switch ((sender as ListView).SelectedIndex)
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.IO.Compression.FileSystem" />
|
||||
<Reference Include="System.Management" />
|
||||
|
@ -108,7 +109,9 @@
|
|||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="Classes\BootImage.cs" />
|
||||
<Compile Include="Classes\KeyFile.cs" />
|
||||
<Compile Include="Classes\MenuIconImage.cs" />
|
||||
<Compile Include="Classes\TKeys.cs" />
|
||||
<Compile Include="Classes\ToolCheck.cs" />
|
||||
<Compile Include="UI\Done.xaml.cs">
|
||||
|
@ -147,6 +150,9 @@
|
|||
<Compile Include="UI\Windows\EnterKey.xaml.cs">
|
||||
<DependentUpon>EnterKey.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Windows\ImageCreator.xaml.cs">
|
||||
<DependentUpon>ImageCreator.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\Windows\IMG_Message - Kopieren - Kopieren - Kopieren.xaml.cs">
|
||||
<DependentUpon>IMG_Message - Kopieren - Kopieren - Kopieren.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
@ -245,6 +251,10 @@
|
|||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UI\Windows\ImageCreator.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UI\Windows\IMG_Message - Kopieren - Kopieren - Kopieren.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
@ -473,6 +483,51 @@
|
|||
<ItemGroup>
|
||||
<None Include="Resources\sound.mp3" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\GBC.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\GCN.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\MSX.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\N64.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\NDS.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\NES.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\SNES-PAL.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\TG16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\TGCD.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\GBA.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Gameboy1.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Gameboy2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\newgameboy.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\SNES-USA.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\SFAM.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">
|
||||
|
|