Merge 'main' into UI-UpdateBranch
@@ -2,22 +2,18 @@
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Web.Caching;
|
||||
using PckStudio.Classes.Misc;
|
||||
using SharpMSS;
|
||||
|
||||
namespace PckStudio.Classes
|
||||
{
|
||||
internal static class Binka
|
||||
{
|
||||
private static FileCacher cacher = new FileCacher(Program.AppDataCache);
|
||||
|
||||
public static int FromWav(string inputFilepath, string outputFilepath, int compressionLevel)
|
||||
{
|
||||
cacher.Cache(Properties.Resources.binka_encode, "binka_encode.exe");
|
||||
ApplicationScope.AppDataCacher.Cache(Properties.Resources.binka_encode, "binka_encode.exe");
|
||||
var process = Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = cacher.GetCachedFilepath("binka_encode.exe"),
|
||||
FileName = ApplicationScope.AppDataCacher.GetCachedFilepath("binka_encode.exe"),
|
||||
Arguments = $"\"{inputFilepath}\" \"{outputFilepath}\" -s -b{compressionLevel}",
|
||||
UseShellExecute = true,
|
||||
CreateNoWindow = true,
|
||||
@@ -34,16 +30,16 @@ namespace PckStudio.Classes
|
||||
throw new Exception("Not a Bink Audio file.");
|
||||
}
|
||||
|
||||
cacher.Cache(Properties.Resources.mss32, "mss32.dll");
|
||||
cacher.Cache(Properties.Resources.binkawin, "binkawin.asi");
|
||||
ApplicationScope.AppDataCacher.Cache(Properties.Resources.mss32, "mss32.dll");
|
||||
ApplicationScope.AppDataCacher.Cache(Properties.Resources.binkawin, "binkawin.asi");
|
||||
|
||||
LibHandle mss32LibHandle = new LibHandle(cacher.GetCachedFilepath("mss32.dll"));
|
||||
LibHandle mss32LibHandle = new LibHandle(ApplicationScope.AppDataCacher.GetCachedFilepath("mss32.dll"));
|
||||
|
||||
string destinationFilepath = Path.Combine(
|
||||
Path.GetDirectoryName(outputFilepath),
|
||||
Path.GetFileNameWithoutExtension(inputFilepath) + ".wav");
|
||||
|
||||
AILAPI.SetRedistDirectory(cacher.CacheDirectory.Replace('\\', '/'));
|
||||
AILAPI.SetRedistDirectory(ApplicationScope.AppDataCacher.CacheDirectory.Replace('\\', '/'));
|
||||
|
||||
RIBAPI.LoadApplicationProviders("*.asi");
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
@@ -8,40 +10,36 @@ namespace PckStudio.Classes.Misc
|
||||
{
|
||||
public class FTPClient : IDisposable
|
||||
{
|
||||
private const int bufferSize = 2048;
|
||||
private Uri _host;
|
||||
private ICredentials _credentials;
|
||||
|
||||
private Uri hostUri;
|
||||
private NetworkCredential credentials;
|
||||
|
||||
private FtpWebRequest request = null;
|
||||
private FtpWebResponse response = null;
|
||||
private Stream _stream = null;
|
||||
private FtpWebRequest _request = null;
|
||||
private FtpWebResponse _response = null;
|
||||
private int _timeout = 1_000; // 1 sec
|
||||
|
||||
public FTPClient(string host, string username)
|
||||
: this(new Uri(host), username, string.Empty)
|
||||
{
|
||||
}
|
||||
: this(new Uri(host), username, string.Empty) { }
|
||||
|
||||
public FTPClient(Uri uri, string username)
|
||||
: this(uri, username, string.Empty)
|
||||
{
|
||||
}
|
||||
public FTPClient(Uri host, string username)
|
||||
: this(host, username, string.Empty) { }
|
||||
|
||||
public FTPClient(string host, string username, string password)
|
||||
: this(new Uri(host), username, password)
|
||||
{
|
||||
}
|
||||
: this(new Uri(host), username, password) { }
|
||||
|
||||
public FTPClient(Uri uri, string username, string password)
|
||||
{
|
||||
hostUri = uri;
|
||||
credentials = new NetworkCredential(username, password);
|
||||
: this(uri, new NetworkCredential(username, password)) { }
|
||||
|
||||
if (hostUri.Scheme != Uri.UriSchemeFtp)
|
||||
public FTPClient(string host, ICredentials credentials)
|
||||
: this(new Uri(host), credentials) { }
|
||||
|
||||
public FTPClient(Uri host, ICredentials credentials)
|
||||
{
|
||||
if (host.Scheme != Uri.UriSchemeFtp)
|
||||
{
|
||||
throw new InvalidOperationException("Not a valid FTP Scheme");
|
||||
}
|
||||
|
||||
this._host = host;
|
||||
_credentials = credentials;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -51,7 +49,7 @@ namespace PckStudio.Classes.Misc
|
||||
/// <param name="credentials"></param>
|
||||
/// <param name="method">See <see cref="WebRequestMethods.Ftp"/></param>
|
||||
/// <returns><see cref="FtpWebRequest"/></returns>
|
||||
public static FtpWebRequest CreateFTPWebRequest(Uri uri, ICredentials credentials, string method)
|
||||
public static FtpWebRequest CreateRequest(Uri uri, ICredentials credentials, string method)
|
||||
{
|
||||
FtpWebRequest request = (FtpWebRequest)WebRequest.Create(uri);
|
||||
request.Credentials = credentials;
|
||||
@@ -59,44 +57,31 @@ namespace PckStudio.Classes.Misc
|
||||
return request;
|
||||
}
|
||||
|
||||
// TODO: let it accept a destination Stream ?
|
||||
public void DownloadFile(string remoteFilepath, string localFilepath)
|
||||
{
|
||||
using (var fs = File.OpenWrite(localFilepath))
|
||||
{
|
||||
DownloadFile(remoteFilepath, fs);
|
||||
}
|
||||
}
|
||||
|
||||
public void DownloadFile(string remoteFilepath, Stream destination)
|
||||
{
|
||||
try
|
||||
{
|
||||
request = CreateFTPWebRequest(new Uri(hostUri, remoteFilepath), credentials, WebRequestMethods.Ftp.DownloadFile);
|
||||
//request = (FtpWebRequest)WebRequest.Create(host + "/" + remoteFile);
|
||||
//request.Credentials = credentials;
|
||||
//request.Method = WebRequestMethods.Ftp.DownloadFile;
|
||||
|
||||
request.UseBinary = true;
|
||||
request.UsePassive = true;
|
||||
request.KeepAlive = true;
|
||||
_request = CreateRequest(new Uri(_host, remoteFilepath), _credentials, WebRequestMethods.Ftp.DownloadFile);
|
||||
SetRequestTimeout();
|
||||
|
||||
response = (FtpWebResponse)request.GetResponse();
|
||||
_stream = response.GetResponseStream();
|
||||
byte[] buffer = new byte[Convert.ToInt32(GetFileSize(remoteFilepath))];
|
||||
int num = _stream.Read(buffer, 0, Convert.ToInt32(GetFileSize(remoteFilepath)));
|
||||
_response = (FtpWebResponse)_request.GetResponse();
|
||||
Stream responseStream = _response.GetResponseStream();
|
||||
|
||||
using (FileStream fileStream = new FileStream(localFilepath, FileMode.OpenOrCreate))
|
||||
{
|
||||
try
|
||||
{
|
||||
while (num > 0)
|
||||
{
|
||||
fileStream.Write(buffer, 0, num);
|
||||
num = _stream.Read(buffer, 0, Convert.ToInt32(GetFileSize(remoteFilepath)));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.ToString());
|
||||
}
|
||||
}
|
||||
long destinationOrigin = destination.Position;
|
||||
responseStream.CopyTo(destination);
|
||||
destination.Position = destinationOrigin;
|
||||
|
||||
_stream.Close();
|
||||
response.Close();
|
||||
request = null;
|
||||
responseStream.Close();
|
||||
_response.Close();
|
||||
_request = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -108,85 +93,59 @@ namespace PckStudio.Classes.Misc
|
||||
{
|
||||
try
|
||||
{
|
||||
request = CreateFTPWebRequest(new Uri(hostUri, directory), credentials, WebRequestMethods.Ftp.ListDirectory);
|
||||
//request = (FtpWebRequest)WebRequest.Create(host + "/" + directory);
|
||||
//request.Credentials = credentials;
|
||||
//request.Method = WebRequestMethods.Ftp.ListDirectory;
|
||||
_request = CreateRequest(new Uri(_host, directory), _credentials, WebRequestMethods.Ftp.ListDirectory);
|
||||
|
||||
request.UseBinary = true;
|
||||
request.UsePassive = true;
|
||||
request.KeepAlive = true;
|
||||
SetRequestTimeout();
|
||||
|
||||
response = (FtpWebResponse)request.GetResponse();
|
||||
_stream = response.GetResponseStream();
|
||||
StreamReader streamReader = new StreamReader(_stream);
|
||||
string text = string.Empty;
|
||||
try
|
||||
_response = (FtpWebResponse)_request.GetResponse();
|
||||
|
||||
Stream responseStream = _response.GetResponseStream();
|
||||
StreamReader streamReader = new StreamReader(responseStream);
|
||||
|
||||
IList<string> text = new List<string>();
|
||||
|
||||
while (streamReader.Peek() != -1)
|
||||
{
|
||||
while (streamReader.Peek() != -1)
|
||||
{
|
||||
text += streamReader.ReadLine() + "|";
|
||||
}
|
||||
text.Add(streamReader.ReadLine());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.ToString());
|
||||
}
|
||||
|
||||
streamReader.Close();
|
||||
_stream.Close();
|
||||
response.Close();
|
||||
request = null;
|
||||
responseStream.Close();
|
||||
|
||||
try
|
||||
{
|
||||
return text.Split("|".ToCharArray());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
_response.Close();
|
||||
_request = null;
|
||||
return text.ToArray();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
Console.WriteLine(ex.ToString());
|
||||
}
|
||||
return Array.Empty<string>();
|
||||
}
|
||||
|
||||
public void UploadFile(string localFile, string remoteFile)
|
||||
{
|
||||
using (var fs = File.OpenRead(localFile))
|
||||
{
|
||||
UploadFile(fs, remoteFile);
|
||||
}
|
||||
}
|
||||
|
||||
public void UploadFile(Stream source, string remoteFile)
|
||||
{
|
||||
try
|
||||
{
|
||||
request = CreateFTPWebRequest(new Uri(hostUri, remoteFile), credentials, WebRequestMethods.Ftp.UploadFile);
|
||||
//request = (FtpWebRequest)WebRequest.Create(host + "/" + remoteFile);
|
||||
//request.Credentials = credentials;
|
||||
//request.Method = WebRequestMethods.Ftp.UploadFile;
|
||||
_request = CreateRequest(new Uri(_host, remoteFile), _credentials, WebRequestMethods.Ftp.UploadFile);
|
||||
|
||||
request.UseBinary = true;
|
||||
request.UsePassive = true;
|
||||
request.KeepAlive = true;
|
||||
|
||||
_stream = request.GetRequestStream();
|
||||
FileStream fileStream = new FileStream(localFile, FileMode.Open);
|
||||
byte[] buffer = new byte[fileStream.Length];
|
||||
int num = fileStream.Read(buffer, 0, (int)fileStream.Length);
|
||||
try
|
||||
{
|
||||
while (num != 0)
|
||||
{
|
||||
_stream.Write(buffer, 0, num);
|
||||
num = fileStream.Read(buffer, 0, (int)fileStream.Length);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.ToString());
|
||||
}
|
||||
SetRequestTimeout();
|
||||
|
||||
fileStream.Close();
|
||||
_stream.Close();
|
||||
request = null;
|
||||
Stream requestStream = _request.GetRequestStream();
|
||||
source.CopyTo(requestStream);
|
||||
requestStream.Close();
|
||||
|
||||
_response = (FtpWebResponse)_request.GetResponse();
|
||||
_response.Close();
|
||||
|
||||
_request = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -198,19 +157,14 @@ namespace PckStudio.Classes.Misc
|
||||
{
|
||||
try
|
||||
{
|
||||
request = CreateFTPWebRequest(new Uri(hostUri, filename), credentials, WebRequestMethods.Ftp.DeleteFile);
|
||||
//request = (FtpWebRequest)WebRequest.Create(host + "/" + filename);
|
||||
//request.Credentials = credentials;
|
||||
//request.Method = WebRequestMethods.Ftp.DeleteFile;
|
||||
_request = CreateRequest(new Uri(_host, filename), _credentials, WebRequestMethods.Ftp.DeleteFile);
|
||||
|
||||
request.UseBinary = true;
|
||||
request.UsePassive = true;
|
||||
request.KeepAlive = true;
|
||||
SetRequestTimeout();
|
||||
|
||||
response = (FtpWebResponse)request.GetResponse();
|
||||
response.Close();
|
||||
_response = (FtpWebResponse)_request.GetResponse();
|
||||
_response.Close();
|
||||
|
||||
request = null;
|
||||
_request = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -222,19 +176,14 @@ namespace PckStudio.Classes.Misc
|
||||
{
|
||||
try
|
||||
{
|
||||
request = CreateFTPWebRequest(new Uri(hostUri, name), credentials, WebRequestMethods.Ftp.Rename);
|
||||
//request = (FtpWebRequest)WebRequest.Create(host + "/" + name);
|
||||
//request.Credentials = credentials;
|
||||
//request.Method = WebRequestMethods.Ftp.Rename;
|
||||
_request = CreateRequest(new Uri(_host, name), _credentials, WebRequestMethods.Ftp.Rename);
|
||||
|
||||
request.UseBinary = true;
|
||||
request.UsePassive = true;
|
||||
request.KeepAlive = true;
|
||||
|
||||
request.RenameTo = newName;
|
||||
response = (FtpWebResponse)request.GetResponse();
|
||||
response.Close();
|
||||
request = null;
|
||||
SetRequestTimeout();
|
||||
|
||||
_request.RenameTo = newName;
|
||||
_response = (FtpWebResponse)_request.GetResponse();
|
||||
_response.Close();
|
||||
_request = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -246,27 +195,21 @@ namespace PckStudio.Classes.Misc
|
||||
{
|
||||
try
|
||||
{
|
||||
request = CreateFTPWebRequest(new Uri(hostUri, serverFilepath), credentials, WebRequestMethods.Ftp.AppendFile);
|
||||
//request = (FtpWebRequest)WebRequest.Create(host + "/" + name);
|
||||
//request.Credentials = credentials;
|
||||
//request.Method = WebRequestMethods.Ftp.MakeDirectory;
|
||||
_request = CreateRequest(new Uri(_host, serverFilepath), _credentials, WebRequestMethods.Ftp.AppendFile);
|
||||
|
||||
request.UseBinary = true;
|
||||
request.UsePassive = true;
|
||||
request.KeepAlive = true;
|
||||
SetRequestTimeout();
|
||||
|
||||
request.ContentLength = data.Length;
|
||||
_request.ContentLength = data.Length;
|
||||
|
||||
// This example assumes the FTP site uses anonymous logon.
|
||||
Stream requestStream = request.GetRequestStream();
|
||||
Stream requestStream = _request.GetRequestStream();
|
||||
requestStream.Write(data, 0, data.Length);
|
||||
requestStream.Close();
|
||||
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
|
||||
FtpWebResponse response = (FtpWebResponse)_request.GetResponse();
|
||||
|
||||
Console.WriteLine("Append status: {0}", response.StatusDescription);
|
||||
|
||||
response.Close();
|
||||
request = null;
|
||||
_request = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -278,19 +221,14 @@ namespace PckStudio.Classes.Misc
|
||||
{
|
||||
try
|
||||
{
|
||||
request = CreateFTPWebRequest(new Uri(hostUri, name), credentials, WebRequestMethods.Ftp.MakeDirectory);
|
||||
//request = (FtpWebRequest)WebRequest.Create(host + "/" + name);
|
||||
//request.Credentials = credentials;
|
||||
//request.Method = WebRequestMethods.Ftp.MakeDirectory;
|
||||
_request = CreateRequest(new Uri(_host, name), _credentials, WebRequestMethods.Ftp.MakeDirectory);
|
||||
|
||||
request.UseBinary = true;
|
||||
request.UsePassive = true;
|
||||
request.KeepAlive = true;
|
||||
SetRequestTimeout();
|
||||
|
||||
response = (FtpWebResponse)request.GetResponse();
|
||||
response.Close();
|
||||
_response = (FtpWebResponse)_request.GetResponse();
|
||||
_response.Close();
|
||||
|
||||
request = null;
|
||||
_request = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -300,26 +238,34 @@ namespace PckStudio.Classes.Misc
|
||||
|
||||
public long GetFileSize(string filepath)
|
||||
{
|
||||
FtpWebRequest ftpWebRequest = CreateFTPWebRequest(new Uri(hostUri, filepath), credentials, WebRequestMethods.Ftp.GetFileSize);
|
||||
//FtpWebRequest ftpWebRequest = (FtpWebRequest)WebRequest.Create(host + "/" + fileName);
|
||||
//ftpWebRequest.Credentials = credentials;
|
||||
//ftpWebRequest.Method = WebRequestMethods.Ftp.GetFileSize;
|
||||
_request = CreateRequest(new Uri(_host, filepath), _credentials, WebRequestMethods.Ftp.GetFileSize);
|
||||
|
||||
ftpWebRequest.UseBinary = true;
|
||||
SetRequestTimeout();
|
||||
|
||||
_response = (FtpWebResponse)_request.GetResponse();
|
||||
long contentLength = _response.ContentLength;
|
||||
_response.Close();
|
||||
|
||||
FtpWebResponse response = (FtpWebResponse)ftpWebRequest.GetResponse();
|
||||
long contentLength = response.ContentLength;
|
||||
response.Close();
|
||||
_request = null;
|
||||
return contentLength;
|
||||
}
|
||||
|
||||
public void SetTimeoutLimit(TimeSpan delay)
|
||||
{
|
||||
_timeout = (int)delay.TotalMilliseconds;
|
||||
}
|
||||
|
||||
private void SetRequestTimeout()
|
||||
{
|
||||
if (_request != null)
|
||||
_request.Timeout = _timeout;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_stream.Dispose();
|
||||
response.Dispose();
|
||||
request = null;
|
||||
response = null;
|
||||
_stream = null;
|
||||
_response?.Dispose();
|
||||
_request = null;
|
||||
_response = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
211
PCK-Studio/Classes/Misc/OpenFolderDialog.cs
Normal file
@@ -0,0 +1,211 @@
|
||||
/*
|
||||
* Source by: Simon Mourier(https://stackoverflow.com/users/403671/simon-mourier)
|
||||
*/
|
||||
|
||||
namespace PckStudio.Classes.Misc
|
||||
{
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Windows; // for WPF support
|
||||
using System.Windows.Interop; // for WPF support
|
||||
|
||||
public class OpenFolderDialog
|
||||
{
|
||||
public virtual string ResultPath { get; protected set; }
|
||||
public virtual string ResultName { get; protected set; }
|
||||
public virtual string InputPath { get; set; }
|
||||
public virtual bool ForceFileSystem { get; set; }
|
||||
public virtual string Title { get; set; }
|
||||
public virtual string OkButtonLabel { get; set; }
|
||||
public virtual string FileNameLabel { get; set; }
|
||||
|
||||
protected virtual int SetOptions(int options)
|
||||
{
|
||||
if (ForceFileSystem)
|
||||
{
|
||||
options |= (int)FOS.FOS_FORCEFILESYSTEM;
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
// for WPF support
|
||||
public bool? ShowDialog(Window owner = null, bool throwOnError = false)
|
||||
{
|
||||
owner ??= Application.Current.MainWindow;
|
||||
return ShowDialog(owner != null ? new WindowInteropHelper(owner).Handle : IntPtr.Zero, throwOnError);
|
||||
}
|
||||
|
||||
// for all .NET
|
||||
public virtual bool? ShowDialog(IntPtr owner, bool throwOnError = false)
|
||||
{
|
||||
var dialog = (IFileOpenDialog)new FileOpenDialog();
|
||||
if (!string.IsNullOrEmpty(InputPath))
|
||||
{
|
||||
if (CheckHr(SHCreateItemFromParsingName(InputPath, null, typeof(IShellItem).GUID, out var item), throwOnError) != 0)
|
||||
return null;
|
||||
|
||||
dialog.SetFolder(item);
|
||||
}
|
||||
|
||||
var options = FOS.FOS_PICKFOLDERS;
|
||||
options = (FOS)SetOptions((int)options);
|
||||
dialog.SetOptions(options);
|
||||
|
||||
if (Title != null)
|
||||
{
|
||||
dialog.SetTitle(Title);
|
||||
}
|
||||
|
||||
if (OkButtonLabel != null)
|
||||
{
|
||||
dialog.SetOkButtonLabel(OkButtonLabel);
|
||||
}
|
||||
|
||||
if (FileNameLabel != null)
|
||||
{
|
||||
dialog.SetFileName(FileNameLabel);
|
||||
}
|
||||
|
||||
if (owner == IntPtr.Zero)
|
||||
{
|
||||
owner = Process.GetCurrentProcess().MainWindowHandle;
|
||||
if (owner == IntPtr.Zero)
|
||||
{
|
||||
owner = GetDesktopWindow();
|
||||
}
|
||||
}
|
||||
|
||||
var hr = dialog.Show(owner);
|
||||
if (hr == ERROR_CANCELLED)
|
||||
return null;
|
||||
|
||||
if (CheckHr(hr, throwOnError) != 0)
|
||||
return null;
|
||||
|
||||
if (CheckHr(dialog.GetResult(out var result), throwOnError) != 0)
|
||||
return null;
|
||||
|
||||
if (CheckHr(result.GetDisplayName(SIGDN.SIGDN_DESKTOPABSOLUTEPARSING, out var path), throwOnError) != 0)
|
||||
return null;
|
||||
|
||||
ResultPath = path;
|
||||
|
||||
if (CheckHr(result.GetDisplayName(SIGDN.SIGDN_DESKTOPABSOLUTEEDITING, out path), false) == 0)
|
||||
{
|
||||
ResultName = path;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static int CheckHr(int hr, bool throwOnError)
|
||||
{
|
||||
if (hr != 0)
|
||||
{
|
||||
if (throwOnError)
|
||||
Marshal.ThrowExceptionForHR(hr);
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
||||
[DllImport("shell32")]
|
||||
private static extern int SHCreateItemFromParsingName([MarshalAs(UnmanagedType.LPWStr)] string pszPath, IBindCtx pbc, [MarshalAs(UnmanagedType.LPStruct)] Guid riid, out IShellItem ppv);
|
||||
|
||||
[DllImport("user32")]
|
||||
private static extern IntPtr GetDesktopWindow();
|
||||
|
||||
#pragma warning disable IDE1006 // Naming Styles
|
||||
private const int ERROR_CANCELLED = unchecked((int)0x800704C7);
|
||||
#pragma warning restore IDE1006 // Naming Styles
|
||||
|
||||
[ComImport, Guid("DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7")] // CLSID_FileOpenDialog
|
||||
private class FileOpenDialog
|
||||
{
|
||||
}
|
||||
|
||||
[ComImport, Guid("42f85136-db7e-439c-85f1-e4075d135fc8"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
private interface IFileOpenDialog
|
||||
{
|
||||
[PreserveSig] int Show(IntPtr parent); // IModalWindow
|
||||
[PreserveSig] int SetFileTypes(); // not fully defined
|
||||
[PreserveSig] int SetFileTypeIndex(int iFileType);
|
||||
[PreserveSig] int GetFileTypeIndex(out int piFileType);
|
||||
[PreserveSig] int Advise(); // not fully defined
|
||||
[PreserveSig] int Unadvise();
|
||||
[PreserveSig] int SetOptions(FOS fos);
|
||||
[PreserveSig] int GetOptions(out FOS pfos);
|
||||
[PreserveSig] int SetDefaultFolder(IShellItem psi);
|
||||
[PreserveSig] int SetFolder(IShellItem psi);
|
||||
[PreserveSig] int GetFolder(out IShellItem ppsi);
|
||||
[PreserveSig] int GetCurrentSelection(out IShellItem ppsi);
|
||||
[PreserveSig] int SetFileName([MarshalAs(UnmanagedType.LPWStr)] string pszName);
|
||||
[PreserveSig] int GetFileName([MarshalAs(UnmanagedType.LPWStr)] out string pszName);
|
||||
[PreserveSig] int SetTitle([MarshalAs(UnmanagedType.LPWStr)] string pszTitle);
|
||||
[PreserveSig] int SetOkButtonLabel([MarshalAs(UnmanagedType.LPWStr)] string pszText);
|
||||
[PreserveSig] int SetFileNameLabel([MarshalAs(UnmanagedType.LPWStr)] string pszLabel);
|
||||
[PreserveSig] int GetResult(out IShellItem ppsi);
|
||||
[PreserveSig] int AddPlace(IShellItem psi, int alignment);
|
||||
[PreserveSig] int SetDefaultExtension([MarshalAs(UnmanagedType.LPWStr)] string pszDefaultExtension);
|
||||
[PreserveSig] int Close(int hr);
|
||||
[PreserveSig] int SetClientGuid(); // not fully defined
|
||||
[PreserveSig] int ClearClientData();
|
||||
[PreserveSig] int SetFilter([MarshalAs(UnmanagedType.IUnknown)] object pFilter);
|
||||
[PreserveSig] int GetResults([MarshalAs(UnmanagedType.IUnknown)] out object ppenum);
|
||||
[PreserveSig] int GetSelectedItems([MarshalAs(UnmanagedType.IUnknown)] out object ppsai);
|
||||
}
|
||||
|
||||
[ComImport, Guid("43826D1E-E718-42EE-BC55-A1E261C37BFE"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
private interface IShellItem
|
||||
{
|
||||
[PreserveSig] int BindToHandler(); // not fully defined
|
||||
[PreserveSig] int GetParent(); // not fully defined
|
||||
[PreserveSig] int GetDisplayName(SIGDN sigdnName, [MarshalAs(UnmanagedType.LPWStr)] out string ppszName);
|
||||
[PreserveSig] int GetAttributes(); // not fully defined
|
||||
[PreserveSig] int Compare(); // not fully defined
|
||||
}
|
||||
|
||||
#pragma warning disable CA1712 // Do not prefix enum values with type name
|
||||
private enum SIGDN : uint
|
||||
{
|
||||
SIGDN_DESKTOPABSOLUTEEDITING = 0x8004c000,
|
||||
SIGDN_DESKTOPABSOLUTEPARSING = 0x80028000,
|
||||
SIGDN_FILESYSPATH = 0x80058000,
|
||||
SIGDN_NORMALDISPLAY = 0,
|
||||
SIGDN_PARENTRELATIVE = 0x80080001,
|
||||
SIGDN_PARENTRELATIVEEDITING = 0x80031001,
|
||||
SIGDN_PARENTRELATIVEFORADDRESSBAR = 0x8007c001,
|
||||
SIGDN_PARENTRELATIVEPARSING = 0x80018001,
|
||||
SIGDN_URL = 0x80068000
|
||||
}
|
||||
|
||||
[Flags]
|
||||
private enum FOS
|
||||
{
|
||||
FOS_OVERWRITEPROMPT = 0x2,
|
||||
FOS_STRICTFILETYPES = 0x4,
|
||||
FOS_NOCHANGEDIR = 0x8,
|
||||
FOS_PICKFOLDERS = 0x20,
|
||||
FOS_FORCEFILESYSTEM = 0x40,
|
||||
FOS_ALLNONSTORAGEITEMS = 0x80,
|
||||
FOS_NOVALIDATE = 0x100,
|
||||
FOS_ALLOWMULTISELECT = 0x200,
|
||||
FOS_PATHMUSTEXIST = 0x800,
|
||||
FOS_FILEMUSTEXIST = 0x1000,
|
||||
FOS_CREATEPROMPT = 0x2000,
|
||||
FOS_SHAREAWARE = 0x4000,
|
||||
FOS_NOREADONLYRETURN = 0x8000,
|
||||
FOS_NOTESTFILECREATE = 0x10000,
|
||||
FOS_HIDEMRUPLACES = 0x20000,
|
||||
FOS_HIDEPINNEDPLACES = 0x40000,
|
||||
FOS_NODEREFERENCELINKS = 0x100000,
|
||||
FOS_OKBUTTONNEEDSINTERACTION = 0x200000,
|
||||
FOS_DONTADDTORECENT = 0x2000000,
|
||||
FOS_FORCESHOWHIDDEN = 0x10000000,
|
||||
FOS_DEFAULTNOMINIMODE = 0x20000000,
|
||||
FOS_FORCEPREVIEWPANEON = 0x40000000,
|
||||
FOS_SUPPORTSTREAMABLEITEMS = unchecked((int)0x80000000)
|
||||
}
|
||||
#pragma warning restore CA1712 // Do not prefix enum values with type name
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ namespace PckStudio.ToolboxItems
|
||||
protected override void OnPaint(PaintEventArgs paintEventArgs)
|
||||
{
|
||||
paintEventArgs.Graphics.InterpolationMode = InterpolationMode;
|
||||
paintEventArgs.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
base.OnPaint(paintEventArgs);
|
||||
}
|
||||
}
|
||||
@@ -10,23 +10,22 @@ namespace PckStudio.Extensions
|
||||
/// Normalizes the Color between 0.0 - 1.0
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static Vector3 Normalize(this Color color)
|
||||
internal static Vector4 Normalize(this Color color)
|
||||
{
|
||||
return new Vector3(color.R / 255f, color.G / 255f, color.B / 255f);
|
||||
return new Vector4(color.R / 255f, color.G / 255f, color.B / 255f, color.A / 255f);
|
||||
}
|
||||
|
||||
private static T Clamp<T>(T value, T min, T max) where T : IComparable<T>
|
||||
internal static T Clamp<T>(T value, T min, T max) where T : IComparable<T>
|
||||
{
|
||||
if (value.CompareTo(min) < 0) return min;
|
||||
if (value.CompareTo(max) > 0) return max;
|
||||
return value;
|
||||
}
|
||||
|
||||
public static byte BlendValues(float source, float overlay, BlendMode blendType)
|
||||
internal static byte BlendValues(float source, float overlay, BlendMode blendType)
|
||||
{
|
||||
source = Clamp(source, 0.0f, 1.0f);
|
||||
overlay = Clamp(overlay, 0.0f, 1.0f);
|
||||
|
||||
float resultValue = blendType switch
|
||||
{
|
||||
BlendMode.Add => source + overlay,
|
||||
@@ -41,5 +40,20 @@ namespace PckStudio.Extensions
|
||||
return (byte)Clamp(resultValue * 255, 0, 255);
|
||||
}
|
||||
|
||||
internal static byte Mix(double ratio, byte val1, byte val2)
|
||||
{
|
||||
ratio = Clamp(ratio, 0.0, 1.0);
|
||||
return (byte)(ratio * val1 + (1.0 - ratio) * val2);
|
||||
}
|
||||
|
||||
internal static Color Mix(this Color c1, Color c2, double ratio)
|
||||
{
|
||||
ratio = Clamp(ratio, 0.0, 1.0);
|
||||
return Color.FromArgb(c1.A,
|
||||
Mix(ratio, c1.R, c2.R),
|
||||
Mix(ratio, c1.G, c2.G),
|
||||
Mix(ratio, c1.B, c2.B)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
@@ -13,5 +14,15 @@ namespace PckStudio.Extensions
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
public static bool ContainsAny<T>(this IEnumerable<T> array, params T[] items)
|
||||
{
|
||||
foreach (var item in array)
|
||||
{
|
||||
if (items.Contains(item))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,48 +11,9 @@ using System.Net;
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
public enum ImageLayoutDirection
|
||||
{
|
||||
Horizontal,
|
||||
Vertical
|
||||
}
|
||||
|
||||
internal static class ImageExtensions
|
||||
{
|
||||
private struct ImageSection
|
||||
{
|
||||
public readonly Size Size;
|
||||
public readonly Point Point;
|
||||
public readonly Rectangle Area;
|
||||
|
||||
public ImageSection(Size sectionSize, int index, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
switch(layoutDirection)
|
||||
{
|
||||
case ImageLayoutDirection.Horizontal:
|
||||
{
|
||||
Size = new Size(sectionSize.Height, sectionSize.Height);
|
||||
Point = new Point(index * sectionSize.Height, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case ImageLayoutDirection.Vertical:
|
||||
{
|
||||
Size = new Size(sectionSize.Width, sectionSize.Width);
|
||||
Point = new Point(0, index * sectionSize.Width);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
Size = Size.Empty;
|
||||
Point = new Point(-1, -1);
|
||||
break;
|
||||
}
|
||||
Area = new Rectangle(Point, Size);
|
||||
}
|
||||
}
|
||||
|
||||
public static Image GetArea(this Image source, Rectangle area)
|
||||
internal static Image GetArea(this Image source, Rectangle area)
|
||||
{
|
||||
Image tileImage = new Bitmap(area.Width, area.Height);
|
||||
using (Graphics gfx = Graphics.FromImage(tileImage))
|
||||
@@ -65,26 +26,43 @@ namespace PckStudio.Extensions
|
||||
return tileImage;
|
||||
}
|
||||
|
||||
public static IEnumerable<Image> CreateImageList(this Image source, Size size)
|
||||
/// <summary>
|
||||
/// Creates an image array by reading in horizontal order
|
||||
/// </summary>
|
||||
/// <param name="source"></param>
|
||||
/// <param name="size">Size of individual image inside of <paramref name="source"/></param>
|
||||
internal static IEnumerable<Image> CreateImageList(this Image source, Size size)
|
||||
{
|
||||
return source.CreateImageList(size, ImageLayoutDirection.Horizontal);
|
||||
}
|
||||
|
||||
internal static IEnumerable<Image> CreateImageList(this Image source, int scalar)
|
||||
{
|
||||
return source.CreateImageList(scalar, ImageLayoutDirection.Horizontal);
|
||||
}
|
||||
|
||||
internal static IEnumerable<Image> CreateImageList(this Image source, int scalar, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
return CreateImageList(source, new Size(scalar, scalar), layoutDirection);
|
||||
}
|
||||
|
||||
internal static IEnumerable<Image> CreateImageList(this Image source, Size size, ImageLayoutDirection imageLayout)
|
||||
{
|
||||
int rowCount = source.Width / size.Width;
|
||||
int columnCount = source.Height / size.Height;
|
||||
Debug.WriteLine($"{source.Width} {source.Height} {size} {columnCount} {rowCount}");
|
||||
Debug.WriteLine($"{nameof(source.Size)}={source.Size}, {nameof(size)}={size}, {columnCount} {rowCount}");
|
||||
for (int i = 0; i < columnCount * rowCount; i++)
|
||||
{
|
||||
int row = Math.DivRem(i, rowCount, out int column);
|
||||
Rectangle tileArea = new Rectangle(new Point(column * size.Height, row * size.Width), size);
|
||||
if (imageLayout == ImageLayoutDirection.Vertical)
|
||||
column = Math.DivRem(i, columnCount, out row);
|
||||
Rectangle tileArea = new Rectangle(new Point(column * size.Width, row * size.Height), size);
|
||||
yield return source.GetArea(tileArea);
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
public static IEnumerable<Image> CreateImageList(this Image source, int scalar)
|
||||
{
|
||||
return CreateImageList(source, new Size(scalar, scalar));
|
||||
}
|
||||
|
||||
public static IEnumerable<Image> CreateImageList(this Image source, ImageLayoutDirection layoutDirection)
|
||||
internal static IEnumerable<Image> CreateImageList(this Image source, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
for (int i = 0; i < source.Height / source.Width; i++)
|
||||
{
|
||||
@@ -94,7 +72,7 @@ namespace PckStudio.Extensions
|
||||
yield break;
|
||||
}
|
||||
|
||||
public static Image CombineImages(IList<Image> sources, ImageLayoutDirection layoutDirection)
|
||||
internal static Image CombineImages(this IList<Image> sources, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
Size imageSize = CalculateImageSize(sources, layoutDirection);
|
||||
var image = new Bitmap(imageSize.Width, imageSize.Height);
|
||||
@@ -132,7 +110,7 @@ namespace PckStudio.Extensions
|
||||
return new Size(width, height);
|
||||
}
|
||||
|
||||
public static Image ResizeImage(this Image image, int width, int height, GraphicsConfig graphicsConfig)
|
||||
internal static Image ResizeImage(this Image image, int width, int height, GraphicsConfig graphicsConfig)
|
||||
{
|
||||
var destRect = new Rectangle(0, 0, width, height);
|
||||
var destImage = new Bitmap(width, height);
|
||||
@@ -151,7 +129,7 @@ namespace PckStudio.Extensions
|
||||
return destImage;
|
||||
}
|
||||
|
||||
public static Image Fill(this Image image, Color color)
|
||||
internal static Image Fill(this Image image, Color color)
|
||||
{
|
||||
using (var g = Graphics.FromImage(image))
|
||||
{
|
||||
@@ -163,7 +141,7 @@ namespace PckStudio.Extensions
|
||||
return image;
|
||||
}
|
||||
|
||||
public static Image Blend(this Image image, Color overlayColor, BlendMode mode)
|
||||
internal static Image Blend(this Image image, Color overlayColor, BlendMode mode)
|
||||
{
|
||||
if (image is not Bitmap baseImage)
|
||||
return image;
|
||||
@@ -195,7 +173,7 @@ namespace PckStudio.Extensions
|
||||
return bitmapResult;
|
||||
}
|
||||
|
||||
public static Image Blend(this Image image, Image overlay, BlendMode mode)
|
||||
internal static Image Blend(this Image image, Image overlay, BlendMode mode)
|
||||
{
|
||||
if (image is not Bitmap baseImage || overlay is not Bitmap overlayImage ||
|
||||
image.Width != overlay.Width || image.Height != overlay.Height)
|
||||
@@ -232,6 +210,44 @@ namespace PckStudio.Extensions
|
||||
return bitmapResult;
|
||||
}
|
||||
|
||||
internal static Image Interpolate(this Image image1, Image image2, double delta)
|
||||
{
|
||||
delta = ColorExtensions.Clamp(delta, 0.0, 1.0);
|
||||
if (image1 is not Bitmap baseImage || image2 is not Bitmap overlayImage ||
|
||||
image1.Width != image2.Width || image1.Height != image2.Height)
|
||||
return image1;
|
||||
|
||||
BitmapData baseImageData = baseImage.LockBits(new Rectangle(Point.Empty, baseImage.Size),
|
||||
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
|
||||
byte[] baseImageBuffer = new byte[baseImageData.Stride * baseImageData.Height];
|
||||
|
||||
Marshal.Copy(baseImageData.Scan0, baseImageBuffer, 0, baseImageBuffer.Length);
|
||||
|
||||
BitmapData overlayImageData = overlayImage.LockBits(new Rectangle(Point.Empty, overlayImage.Size),
|
||||
ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
|
||||
byte[] overlayImageBuffer = new byte[overlayImageData.Stride * overlayImageData.Height];
|
||||
|
||||
Marshal.Copy(overlayImageData.Scan0, overlayImageBuffer, 0, overlayImageBuffer.Length);
|
||||
|
||||
for (int k = 0; k < baseImageBuffer.Length && k < overlayImageBuffer.Length; k += 4)
|
||||
{
|
||||
baseImageBuffer[k + 0] = ColorExtensions.Mix(delta, baseImageBuffer[k + 0], overlayImageBuffer[k + 0]);
|
||||
baseImageBuffer[k + 1] = ColorExtensions.Mix(delta, baseImageBuffer[k + 1], overlayImageBuffer[k + 1]);
|
||||
baseImageBuffer[k + 2] = ColorExtensions.Mix(delta, baseImageBuffer[k + 2], overlayImageBuffer[k + 2]);
|
||||
}
|
||||
|
||||
Bitmap bitmapResult = new Bitmap(baseImage.Width, baseImage.Height, PixelFormat.Format32bppArgb);
|
||||
BitmapData resultImageData = bitmapResult.LockBits(new Rectangle(Point.Empty, bitmapResult.Size),
|
||||
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
Marshal.Copy(baseImageBuffer, 0, resultImageData.Scan0, baseImageBuffer.Length);
|
||||
|
||||
bitmapResult.UnlockBits(resultImageData);
|
||||
baseImage.UnlockBits(baseImageData);
|
||||
overlayImage.UnlockBits(overlayImageData);
|
||||
return bitmapResult;
|
||||
}
|
||||
|
||||
public static Image ImageFromUrl(string imageUrl)
|
||||
{
|
||||
WebClient client = new WebClient();
|
||||
|
||||
8
PCK-Studio/Extensions/ImageLayoutDirection.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
internal enum ImageLayoutDirection
|
||||
{
|
||||
Horizontal,
|
||||
Vertical
|
||||
}
|
||||
}
|
||||
37
PCK-Studio/Extensions/ImageSection.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System.Drawing;
|
||||
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
struct ImageSection
|
||||
{
|
||||
public readonly Size Size;
|
||||
public readonly Point Point;
|
||||
public readonly Rectangle Area;
|
||||
|
||||
internal ImageSection(Size sectionSize, int index, ImageLayoutDirection layoutDirection)
|
||||
{
|
||||
switch(layoutDirection)
|
||||
{
|
||||
case ImageLayoutDirection.Horizontal:
|
||||
{
|
||||
Size = new Size(sectionSize.Height, sectionSize.Height);
|
||||
Point = new Point(index * sectionSize.Height, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case ImageLayoutDirection.Vertical:
|
||||
{
|
||||
Size = new Size(sectionSize.Width, sectionSize.Width);
|
||||
Point = new Point(0, index * sectionSize.Width);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
Size = Size.Empty;
|
||||
Point = new Point(-1, -1);
|
||||
break;
|
||||
}
|
||||
Area = new Rectangle(Point, Size);
|
||||
}
|
||||
}
|
||||
}
|
||||
285
PCK-Studio/Features/CemuPanel.Designer.cs
generated
Normal file
@@ -0,0 +1,285 @@
|
||||
namespace PckStudio.Features
|
||||
{
|
||||
partial class CemuPanel
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.TableLayoutPanel layoutPanel;
|
||||
this.radioButtonEur = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonUs = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonJap = new System.Windows.Forms.RadioButton();
|
||||
this.GameDirectoryTextBox = new MetroFramework.Controls.MetroTextBox();
|
||||
this.BrowseDirectoryBtn = new System.Windows.Forms.Button();
|
||||
this.DLCTreeView = new System.Windows.Forms.TreeView();
|
||||
this.DLCContextMenu = new MetroFramework.Controls.MetroContextMenu(this.components);
|
||||
this.openSkinPackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openTexturePackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addCustomPckToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removePckToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
layoutPanel = new System.Windows.Forms.TableLayoutPanel();
|
||||
layoutPanel.SuspendLayout();
|
||||
this.DLCContextMenu.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutPanel
|
||||
//
|
||||
layoutPanel.BackColor = System.Drawing.Color.Black;
|
||||
layoutPanel.ColumnCount = 3;
|
||||
layoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33332F));
|
||||
layoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
|
||||
layoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
|
||||
layoutPanel.Controls.Add(this.radioButtonEur, 0, 1);
|
||||
layoutPanel.Controls.Add(this.radioButtonUs, 1, 1);
|
||||
layoutPanel.Controls.Add(this.radioButtonJap, 2, 1);
|
||||
layoutPanel.Controls.Add(this.GameDirectoryTextBox, 0, 0);
|
||||
layoutPanel.Controls.Add(this.BrowseDirectoryBtn, 2, 0);
|
||||
layoutPanel.Controls.Add(this.DLCTreeView, 0, 2);
|
||||
layoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
layoutPanel.Location = new System.Drawing.Point(0, 0);
|
||||
layoutPanel.Margin = new System.Windows.Forms.Padding(0);
|
||||
layoutPanel.Name = "layoutPanel";
|
||||
layoutPanel.RowCount = 3;
|
||||
layoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
layoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36F));
|
||||
layoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
layoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
layoutPanel.Size = new System.Drawing.Size(430, 550);
|
||||
layoutPanel.TabIndex = 4;
|
||||
//
|
||||
// radioButtonEur
|
||||
//
|
||||
this.radioButtonEur.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.radioButtonEur.AutoSize = true;
|
||||
this.radioButtonEur.BackColor = System.Drawing.Color.Transparent;
|
||||
this.radioButtonEur.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.radioButtonEur.Checked = true;
|
||||
this.radioButtonEur.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.radioButtonEur.FlatAppearance.CheckedBackColor = System.Drawing.Color.DodgerBlue;
|
||||
this.radioButtonEur.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.radioButtonEur.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.radioButtonEur.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.radioButtonEur.Font = new System.Drawing.Font("Segoe UI", 12F);
|
||||
this.radioButtonEur.ForeColor = System.Drawing.Color.White;
|
||||
this.radioButtonEur.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.radioButtonEur.Location = new System.Drawing.Point(3, 36);
|
||||
this.radioButtonEur.Name = "radioButtonEur";
|
||||
this.radioButtonEur.Size = new System.Drawing.Size(137, 30);
|
||||
this.radioButtonEur.TabIndex = 1;
|
||||
this.radioButtonEur.TabStop = true;
|
||||
this.radioButtonEur.Text = "EUR";
|
||||
this.radioButtonEur.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonEur.UseVisualStyleBackColor = false;
|
||||
this.radioButtonEur.Click += new System.EventHandler(this.radioButton_Click);
|
||||
//
|
||||
// radioButtonUs
|
||||
//
|
||||
this.radioButtonUs.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.radioButtonUs.AutoSize = true;
|
||||
this.radioButtonUs.BackColor = System.Drawing.Color.Transparent;
|
||||
this.radioButtonUs.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.radioButtonUs.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.radioButtonUs.FlatAppearance.CheckedBackColor = System.Drawing.Color.DodgerBlue;
|
||||
this.radioButtonUs.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.radioButtonUs.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.radioButtonUs.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.radioButtonUs.Font = new System.Drawing.Font("Segoe UI", 12F);
|
||||
this.radioButtonUs.ForeColor = System.Drawing.Color.White;
|
||||
this.radioButtonUs.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.radioButtonUs.Location = new System.Drawing.Point(146, 36);
|
||||
this.radioButtonUs.Name = "radioButtonUs";
|
||||
this.radioButtonUs.Size = new System.Drawing.Size(137, 30);
|
||||
this.radioButtonUs.TabIndex = 0;
|
||||
this.radioButtonUs.Text = "US";
|
||||
this.radioButtonUs.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonUs.UseVisualStyleBackColor = false;
|
||||
this.radioButtonUs.Click += new System.EventHandler(this.radioButton_Click);
|
||||
//
|
||||
// radioButtonJap
|
||||
//
|
||||
this.radioButtonJap.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.radioButtonJap.AutoSize = true;
|
||||
this.radioButtonJap.BackColor = System.Drawing.Color.Transparent;
|
||||
this.radioButtonJap.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.radioButtonJap.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.radioButtonJap.FlatAppearance.CheckedBackColor = System.Drawing.Color.DodgerBlue;
|
||||
this.radioButtonJap.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.radioButtonJap.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.radioButtonJap.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.radioButtonJap.Font = new System.Drawing.Font("Segoe UI", 12F);
|
||||
this.radioButtonJap.ForeColor = System.Drawing.Color.White;
|
||||
this.radioButtonJap.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.radioButtonJap.Location = new System.Drawing.Point(289, 36);
|
||||
this.radioButtonJap.Name = "radioButtonJap";
|
||||
this.radioButtonJap.Size = new System.Drawing.Size(138, 30);
|
||||
this.radioButtonJap.TabIndex = 2;
|
||||
this.radioButtonJap.Text = "JAP";
|
||||
this.radioButtonJap.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonJap.UseVisualStyleBackColor = false;
|
||||
this.radioButtonJap.Click += new System.EventHandler(this.radioButton_Click);
|
||||
//
|
||||
// GameDirectoryTextBox
|
||||
//
|
||||
this.GameDirectoryTextBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
layoutPanel.SetColumnSpan(this.GameDirectoryTextBox, 2);
|
||||
//
|
||||
//
|
||||
//
|
||||
this.GameDirectoryTextBox.CustomButton.Image = null;
|
||||
this.GameDirectoryTextBox.CustomButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.GameDirectoryTextBox.CustomButton.Location = new System.Drawing.Point(254, 1);
|
||||
this.GameDirectoryTextBox.CustomButton.Name = "";
|
||||
this.GameDirectoryTextBox.CustomButton.Size = new System.Drawing.Size(25, 25);
|
||||
this.GameDirectoryTextBox.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.GameDirectoryTextBox.CustomButton.TabIndex = 1;
|
||||
this.GameDirectoryTextBox.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.GameDirectoryTextBox.CustomButton.UseSelectable = true;
|
||||
this.GameDirectoryTextBox.CustomButton.Visible = false;
|
||||
this.GameDirectoryTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.GameDirectoryTextBox.Enabled = false;
|
||||
this.GameDirectoryTextBox.Lines = new string[0];
|
||||
this.GameDirectoryTextBox.Location = new System.Drawing.Point(3, 3);
|
||||
this.GameDirectoryTextBox.MaxLength = 32767;
|
||||
this.GameDirectoryTextBox.Name = "GameDirectoryTextBox";
|
||||
this.GameDirectoryTextBox.PasswordChar = '\0';
|
||||
this.GameDirectoryTextBox.PromptText = "Cemu Game Directory";
|
||||
this.GameDirectoryTextBox.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.GameDirectoryTextBox.SelectedText = "";
|
||||
this.GameDirectoryTextBox.SelectionLength = 0;
|
||||
this.GameDirectoryTextBox.SelectionStart = 0;
|
||||
this.GameDirectoryTextBox.ShortcutsEnabled = true;
|
||||
this.GameDirectoryTextBox.Size = new System.Drawing.Size(280, 27);
|
||||
this.GameDirectoryTextBox.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.GameDirectoryTextBox.TabIndex = 11;
|
||||
this.GameDirectoryTextBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.GameDirectoryTextBox.UseSelectable = true;
|
||||
this.GameDirectoryTextBox.WaterMark = "Cemu Game Directory";
|
||||
this.GameDirectoryTextBox.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.GameDirectoryTextBox.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.GameDirectoryTextBox.TextChanged += new System.EventHandler(this.GameDirectoryTextBox_TextChanged);
|
||||
//
|
||||
// BrowseDirectoryBtn
|
||||
//
|
||||
this.BrowseDirectoryBtn.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.BrowseDirectoryBtn.BackColor = System.Drawing.Color.DarkCyan;
|
||||
this.BrowseDirectoryBtn.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.BrowseDirectoryBtn.FlatAppearance.BorderSize = 0;
|
||||
this.BrowseDirectoryBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BrowseDirectoryBtn.Font = new System.Drawing.Font("Segoe UI", 9.75F);
|
||||
this.BrowseDirectoryBtn.ForeColor = System.Drawing.Color.White;
|
||||
this.BrowseDirectoryBtn.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.BrowseDirectoryBtn.Location = new System.Drawing.Point(289, 3);
|
||||
this.BrowseDirectoryBtn.Name = "BrowseDirectoryBtn";
|
||||
this.BrowseDirectoryBtn.Size = new System.Drawing.Size(138, 27);
|
||||
this.BrowseDirectoryBtn.TabIndex = 12;
|
||||
this.BrowseDirectoryBtn.Text = "Browse";
|
||||
this.BrowseDirectoryBtn.UseVisualStyleBackColor = false;
|
||||
this.BrowseDirectoryBtn.Click += new System.EventHandler(this.BrowseDirectoryBtn_Click);
|
||||
//
|
||||
// DLCTreeView
|
||||
//
|
||||
this.DLCTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
layoutPanel.SetColumnSpan(this.DLCTreeView, 3);
|
||||
this.DLCTreeView.ContextMenuStrip = this.DLCContextMenu;
|
||||
this.DLCTreeView.Location = new System.Drawing.Point(3, 72);
|
||||
this.DLCTreeView.Name = "DLCTreeView";
|
||||
this.DLCTreeView.Size = new System.Drawing.Size(424, 475);
|
||||
this.DLCTreeView.TabIndex = 13;
|
||||
this.DLCTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.DLCTreeView_AfterSelect);
|
||||
this.DLCTreeView.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.DLCTreeView_NodeMouseDoubleClick);
|
||||
//
|
||||
// DLCContextMenu
|
||||
//
|
||||
this.DLCContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.openSkinPackToolStripMenuItem,
|
||||
this.openTexturePackToolStripMenuItem,
|
||||
this.addCustomPckToolStripMenuItem,
|
||||
this.removePckToolStripMenuItem});
|
||||
this.DLCContextMenu.Name = "DLCContextMenu";
|
||||
this.DLCContextMenu.Size = new System.Drawing.Size(173, 92);
|
||||
//
|
||||
// openSkinPackToolStripMenuItem
|
||||
//
|
||||
this.openSkinPackToolStripMenuItem.Name = "openSkinPackToolStripMenuItem";
|
||||
this.openSkinPackToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
|
||||
this.openSkinPackToolStripMenuItem.Text = "Open Pack";
|
||||
this.openSkinPackToolStripMenuItem.Click += new System.EventHandler(this.openSkinPackToolStripMenuItem_Click);
|
||||
//
|
||||
// openTexturePackToolStripMenuItem
|
||||
//
|
||||
this.openTexturePackToolStripMenuItem.Name = "openTexturePackToolStripMenuItem";
|
||||
this.openTexturePackToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
|
||||
this.openTexturePackToolStripMenuItem.Text = "Open Texture Pack";
|
||||
this.openTexturePackToolStripMenuItem.Click += new System.EventHandler(this.openTexturePackToolStripMenuItem_Click);
|
||||
//
|
||||
// addCustomPckToolStripMenuItem
|
||||
//
|
||||
this.addCustomPckToolStripMenuItem.Name = "addCustomPckToolStripMenuItem";
|
||||
this.addCustomPckToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
|
||||
this.addCustomPckToolStripMenuItem.Text = "Add pck";
|
||||
this.addCustomPckToolStripMenuItem.Click += new System.EventHandler(this.addCustomPckToolStripMenuItem_Click);
|
||||
//
|
||||
// removePckToolStripMenuItem
|
||||
//
|
||||
this.removePckToolStripMenuItem.Name = "removePckToolStripMenuItem";
|
||||
this.removePckToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
|
||||
this.removePckToolStripMenuItem.Text = "Remove pck";
|
||||
this.removePckToolStripMenuItem.Click += new System.EventHandler(this.removePckToolStripMenuItem_Click);
|
||||
//
|
||||
// CemuPanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSize = true;
|
||||
this.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
|
||||
this.Controls.Add(layoutPanel);
|
||||
this.Name = "CemuPanel";
|
||||
this.Size = new System.Drawing.Size(430, 550);
|
||||
layoutPanel.ResumeLayout(false);
|
||||
layoutPanel.PerformLayout();
|
||||
this.DLCContextMenu.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button BrowseDirectoryBtn;
|
||||
private MetroFramework.Controls.MetroTextBox GameDirectoryTextBox;
|
||||
private System.Windows.Forms.RadioButton radioButtonEur;
|
||||
private System.Windows.Forms.RadioButton radioButtonUs;
|
||||
private System.Windows.Forms.RadioButton radioButtonJap;
|
||||
private System.Windows.Forms.TreeView DLCTreeView;
|
||||
private MetroFramework.Controls.MetroContextMenu DLCContextMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem openSkinPackToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem openTexturePackToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem addCustomPckToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem removePckToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
282
PCK-Studio/Features/CemuPanel.cs
Normal file
@@ -0,0 +1,282 @@
|
||||
using System;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using PckStudio.Extensions;
|
||||
using PckStudio.Classes.Misc;
|
||||
|
||||
namespace PckStudio.Features
|
||||
{
|
||||
/// <summary>
|
||||
/// Wishlist:
|
||||
/// - add the ability to save the currently open pck file to the desired folder destination.
|
||||
/// (even if the pck file has not yet be saved to disk)
|
||||
/// </summary>
|
||||
public partial class CemuPanel : UserControl
|
||||
{
|
||||
public CemuPanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
if (!TryApplyPermanentCemuConfig() &&
|
||||
MessageBox.Show("Failed to get Cemu perma settings\nDo you want to open your local settings.xml file?",
|
||||
"Cemu mlc path not found",
|
||||
MessageBoxButtons.YesNo,
|
||||
MessageBoxIcon.Warning) == DialogResult.Yes
|
||||
)
|
||||
{
|
||||
|
||||
OpenFileDialog fileDialog = new OpenFileDialog()
|
||||
{
|
||||
Filter = "Cemu Settings|settings.xml",
|
||||
};
|
||||
|
||||
if (fileDialog.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
TryApplyCemuConfig(fileDialog.FileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool TryApplyCemuConfig(string settingsPath)
|
||||
{
|
||||
string cemuPath = Path.Combine(Path.GetDirectoryName(settingsPath), "Cemu.exe");
|
||||
if (File.Exists(cemuPath))
|
||||
{
|
||||
var xml = new XmlDocument();
|
||||
xml.Load(settingsPath);
|
||||
GameDirectoryTextBox.Text = xml.SelectSingleNode("content").SelectSingleNode("mlc_path").InnerText;
|
||||
BrowseDirectoryBtn.Enabled = false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool TryApplyPermanentCemuConfig()
|
||||
{
|
||||
string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Cemu");
|
||||
string filepath = Path.Combine(path, "perm_setting.xml");
|
||||
if (Directory.Exists(path) && File.Exists(filepath))
|
||||
{
|
||||
try
|
||||
{
|
||||
var xml = new XmlDocument();
|
||||
xml.Load(filepath);
|
||||
var configNode = xml.SelectSingleNode("config");
|
||||
var mlcpathNode = configNode.SelectSingleNode("MlcPath");
|
||||
GameDirectoryTextBox.Text = mlcpathNode.InnerText;
|
||||
BrowseDirectoryBtn.Enabled = false;
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private string GetSelectedRegionTitleId()
|
||||
{
|
||||
if (radioButtonEur.Checked)
|
||||
{
|
||||
return "101d7500";
|
||||
}
|
||||
if (radioButtonUs.Checked)
|
||||
{
|
||||
return "101d9d00";
|
||||
}
|
||||
if (radioButtonJap.Checked)
|
||||
{
|
||||
return "101dbe00";
|
||||
}
|
||||
throw new Exception("how did you get here ?");
|
||||
}
|
||||
|
||||
private string GetGameContentPath()
|
||||
{
|
||||
string region = GetSelectedRegionTitleId();
|
||||
return $"{GameDirectoryTextBox.Text}/usr/title/0005000e/{region}/content";
|
||||
}
|
||||
|
||||
private string GetContentSubDirectory(params string[] subpaths)
|
||||
{
|
||||
return Path.Combine(GetGameContentPath(), Path.Combine(subpaths));
|
||||
}
|
||||
|
||||
private void BrowseDirectoryBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFolderDialog openFolderDialog = new OpenFolderDialog
|
||||
{
|
||||
Title = "Select Cemu mlc01 Directory"
|
||||
};
|
||||
if (openFolderDialog.ShowDialog(Handle) == true && Directory.Exists(openFolderDialog.ResultPath))
|
||||
{
|
||||
GameDirectoryTextBox.Text = openFolderDialog.ResultPath;
|
||||
}
|
||||
}
|
||||
|
||||
private class DLCDirectoryInfo
|
||||
{
|
||||
private readonly bool _hasTexturePack;
|
||||
private readonly string _basePckPath;
|
||||
private readonly string _texturePackPath;
|
||||
|
||||
public bool HasTexturePack => _hasTexturePack;
|
||||
public string PackPath => _basePckPath;
|
||||
public string TexturePackPath => _texturePackPath;
|
||||
|
||||
public DLCDirectoryInfo(DirectoryInfo directory)
|
||||
{
|
||||
_basePckPath = directory.GetFiles().FirstOrDefault(f => f.Name.EndsWith(".pck")).FullName;
|
||||
_ = _basePckPath ?? throw new NullReferenceException($"Could not find any '.pck' inside {directory.Name}");
|
||||
if (TryGetDataDirectory(directory, out var dataDir))
|
||||
{
|
||||
var tpFileInfo = dataDir.GetFiles().FirstOrDefault(f => !f.Name.Equals("audio.pck") && f.Name.EndsWith(".pck"));
|
||||
_hasTexturePack = tpFileInfo is not null;
|
||||
_texturePackPath = _hasTexturePack ? tpFileInfo.FullName : string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public DLCDirectoryInfo(string path)
|
||||
: this(new DirectoryInfo(path))
|
||||
{
|
||||
}
|
||||
|
||||
private bool TryGetDataDirectory(DirectoryInfo directory, out DirectoryInfo dataDirectory)
|
||||
{
|
||||
var dirs = directory.GetDirectories("Data", SearchOption.TopDirectoryOnly);
|
||||
dataDirectory = dirs.Length != 0 ? dirs[0] : null;
|
||||
return dirs.Length != 0;
|
||||
}
|
||||
}
|
||||
|
||||
private void ListDLCs()
|
||||
{
|
||||
DLCTreeView.Nodes.Clear();
|
||||
if (!IsValidInstallDirectory())
|
||||
{
|
||||
MessageBox.Show("Please select a valid Game Directory!", "Invalid Directory Specified",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsValidGameDirectory())
|
||||
{
|
||||
MessageBox.Show($"Could not find '{GetGameContentPath()}'!", "Not Found",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
string dirPath = GetContentSubDirectory("WiiU", "DLC");
|
||||
DirectoryInfo dlcDirectory = new DirectoryInfo(dirPath);
|
||||
|
||||
if (!dlcDirectory.Exists)
|
||||
{
|
||||
MessageBox.Show($"'{dirPath}' does not exist!", "Not Found",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var directoryInfo in dlcDirectory.GetDirectories())
|
||||
{
|
||||
if (directoryInfo.GetFileSystemInfos().Length != 0)
|
||||
{
|
||||
var node = DLCTreeView.Nodes.Add(directoryInfo.Name);
|
||||
node.Tag = new DLCDirectoryInfo(directoryInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsValidInstallDirectory()
|
||||
{
|
||||
return !string.IsNullOrWhiteSpace(GameDirectoryTextBox.Text) && Directory.Exists(GameDirectoryTextBox.Text);
|
||||
}
|
||||
|
||||
private void radioButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ListDLCs();
|
||||
}
|
||||
|
||||
private bool IsValidGameDirectory()
|
||||
{
|
||||
return IsValidInstallDirectory() && Directory.Exists(GetGameContentPath());
|
||||
}
|
||||
|
||||
private void openSkinPackToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DLCTreeView.SelectedNode.Tag is DLCDirectoryInfo dlcDir)
|
||||
{
|
||||
Program.MainInstance.LoadPckFromFile(dlcDir.PackPath);
|
||||
}
|
||||
}
|
||||
|
||||
private void openTexturePackToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DLCTreeView.SelectedNode.Tag is DLCDirectoryInfo dlcDir && dlcDir.HasTexturePack)
|
||||
{
|
||||
Program.MainInstance.LoadPckFromFile(dlcDir.TexturePackPath);
|
||||
}
|
||||
}
|
||||
|
||||
private void DLCTreeView_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
openTexturePackToolStripMenuItem.Visible = e.Node.Tag is DLCDirectoryInfo dlcDir && dlcDir.HasTexturePack;
|
||||
}
|
||||
|
||||
private void addCustomPckToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
RenamePrompt prompt = new RenamePrompt(string.Empty);
|
||||
prompt.OKButton.Text = "OK";
|
||||
prompt.TextLabel.Text = "Folder:";
|
||||
|
||||
if (prompt.ShowDialog(this) != DialogResult.OK)
|
||||
return;
|
||||
|
||||
if (prompt.NewText.ContainsAny(Path.GetInvalidPathChars()))
|
||||
{
|
||||
MessageBox.Show("Invalid Folder name entered!", "Invalid Folder Name", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
string directoryPath = GetContentSubDirectory("WiiU", "DLC", prompt.NewText);
|
||||
|
||||
if (Directory.Exists(directoryPath))
|
||||
{
|
||||
MessageBox.Show("A Folder with the same name already exists!", "Folder Name taken", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
Directory.CreateDirectory(directoryPath);
|
||||
|
||||
using OpenFileDialog fileDialog = new OpenFileDialog
|
||||
{
|
||||
Filter = "PCK (Minecraft Console Package)|*.pck"
|
||||
};
|
||||
if (fileDialog.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
File.Copy(fileDialog.FileName, Path.Combine(directoryPath, fileDialog.SafeFileName));
|
||||
}
|
||||
}
|
||||
|
||||
private void removePckToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
string pckName = DLCTreeView.SelectedNode.Text;
|
||||
var result = MessageBox.Show($"Are you sure you want to permanently delete '{pckName}'?", "Hold up!", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
string directoryPath = GetContentSubDirectory("WiiU", "DLC", pckName);
|
||||
Directory.Delete(directoryPath, recursive: true);
|
||||
DLCTreeView.SelectedNode.Remove();
|
||||
}
|
||||
}
|
||||
|
||||
private void DLCTreeView_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
|
||||
{
|
||||
openSkinPackToolStripMenuItem_Click(sender, e);
|
||||
}
|
||||
|
||||
private void GameDirectoryTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
ListDLCs();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,10 +117,10 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="metroLabel1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="layoutPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="metroLabel2.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
<metadata name="DLCContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
127
PCK-Studio/Features/PckManager.Designer.cs
generated
Normal file
@@ -0,0 +1,127 @@
|
||||
namespace PckStudio.Features
|
||||
{
|
||||
partial class PckManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PckManager));
|
||||
this.supportedPlatformComboBox = new MetroFramework.Controls.MetroComboBox();
|
||||
this.mainPanel = new System.Windows.Forms.TableLayoutPanel();
|
||||
metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.mainPanel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
metroLabel1.AutoSize = true;
|
||||
metroLabel1.Location = new System.Drawing.Point(264, 73);
|
||||
metroLabel1.Name = "metroLabel1";
|
||||
metroLabel1.Size = new System.Drawing.Size(90, 19);
|
||||
metroLabel1.Style = MetroFramework.MetroColorStyle.Black;
|
||||
metroLabel1.TabIndex = 1;
|
||||
metroLabel1.Text = "Console Type:";
|
||||
metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
metroLabel2.AutoSize = true;
|
||||
metroLabel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
metroLabel2.Location = new System.Drawing.Point(3, 0);
|
||||
metroLabel2.Name = "metroLabel2";
|
||||
metroLabel2.Size = new System.Drawing.Size(183, 35);
|
||||
metroLabel2.Style = MetroFramework.MetroColorStyle.Black;
|
||||
metroLabel2.TabIndex = 13;
|
||||
metroLabel2.Text = "Platform type:";
|
||||
metroLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
metroLabel2.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// supportedPlatformComboBox
|
||||
//
|
||||
this.supportedPlatformComboBox.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.supportedPlatformComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.supportedPlatformComboBox.FormattingEnabled = true;
|
||||
this.supportedPlatformComboBox.ItemHeight = 23;
|
||||
this.supportedPlatformComboBox.Location = new System.Drawing.Point(192, 3);
|
||||
this.supportedPlatformComboBox.Name = "supportedPlatformComboBox";
|
||||
this.supportedPlatformComboBox.PromptText = "Select Platform";
|
||||
this.supportedPlatformComboBox.Size = new System.Drawing.Size(184, 29);
|
||||
this.supportedPlatformComboBox.Style = MetroFramework.MetroColorStyle.Black;
|
||||
this.supportedPlatformComboBox.TabIndex = 0;
|
||||
this.supportedPlatformComboBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.supportedPlatformComboBox.UseSelectable = true;
|
||||
this.supportedPlatformComboBox.SelectedIndexChanged += new System.EventHandler(this.supportedPlatformComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// mainPanel
|
||||
//
|
||||
this.mainPanel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.mainPanel.ColumnCount = 2;
|
||||
this.mainPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.mainPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.mainPanel.Controls.Add(this.supportedPlatformComboBox, 1, 0);
|
||||
this.mainPanel.Controls.Add(metroLabel2, 0, 0);
|
||||
this.mainPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.mainPanel.Location = new System.Drawing.Point(20, 60);
|
||||
this.mainPanel.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.mainPanel.Name = "mainPanel";
|
||||
this.mainPanel.RowCount = 2;
|
||||
this.mainPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
|
||||
this.mainPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.mainPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.mainPanel.Size = new System.Drawing.Size(379, 560);
|
||||
this.mainPanel.TabIndex = 3;
|
||||
//
|
||||
// PckManager
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(419, 640);
|
||||
this.Controls.Add(this.mainPanel);
|
||||
this.Controls.Add(metroLabel1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(419, 640);
|
||||
this.Name = "PckManager";
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Text = "Pck Manager";
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.mainPanel.ResumeLayout(false);
|
||||
this.mainPanel.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroComboBox supportedPlatformComboBox;
|
||||
private System.Windows.Forms.TableLayoutPanel mainPanel;
|
||||
}
|
||||
}
|
||||
81
PCK-Studio/Features/PckManager.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
/* Copyright (c) 2022-present miku-666
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software
|
||||
* in a product, an acknowledgment in the product documentation would be
|
||||
* appreciated but is not required.
|
||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
**/
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PckStudio.Features
|
||||
{
|
||||
public partial class PckManager : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
private Control currentlyShowingControl;
|
||||
private const string CemU = "Cemu";
|
||||
|
||||
// TODO: Implement these Panels
|
||||
private const string WiiU = "Wii U";
|
||||
private const string PS3 = "Play Station 3";
|
||||
private const string PSVita = "PS Vita";
|
||||
private const string RPCS3 = "RPCS3";
|
||||
|
||||
public PckManager()
|
||||
{
|
||||
InitializeComponent();
|
||||
supportedPlatformComboBox.Items.AddRange(new string[]
|
||||
{
|
||||
// WiiU,
|
||||
// PS3,
|
||||
// PSVita,
|
||||
CemU,
|
||||
// RPCS3,
|
||||
});
|
||||
}
|
||||
|
||||
protected override void OnGotFocus(EventArgs e)
|
||||
{
|
||||
currentlyShowingControl?.Focus();
|
||||
}
|
||||
|
||||
private void supportedPlatformComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
mainPanel.Controls.Remove(currentlyShowingControl);
|
||||
if (supportedPlatformComboBox.SelectedIndex > -1)
|
||||
{
|
||||
string text = supportedPlatformComboBox.Items[supportedPlatformComboBox.SelectedIndex].ToString();
|
||||
try
|
||||
{
|
||||
currentlyShowingControl = text switch
|
||||
{
|
||||
CemU => new CemuPanel(),
|
||||
//WiiU => new WiiUPanel(),
|
||||
//PS3 => throw new NotImplementedException($"{text}-Panel is currently not implemented."),
|
||||
//PSVita => throw new NotImplementedException($"{text}-Panel is currently not implemented."),
|
||||
//RPCS3 => throw new NotImplementedException($"{text}-Panel is currently not implemented."),
|
||||
_ => throw new Exception($"No Panel found for: {text}"),
|
||||
};
|
||||
currentlyShowingControl.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
mainPanel.SetColumnSpan(currentlyShowingControl, 2);
|
||||
mainPanel.Controls.Add(currentlyShowingControl, 0, 1);
|
||||
}
|
||||
catch (NotImplementedException ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Not Implemented");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2633
PCK-Studio/Features/PckManager.resx
Normal file
428
PCK-Studio/Features/WiiUPanel.Designer.cs
generated
Normal file
@@ -0,0 +1,428 @@
|
||||
namespace PckStudio.Features
|
||||
{
|
||||
partial class WiiUPanel
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.myTablePanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.buttonServerToggle = new System.Windows.Forms.Button();
|
||||
this.IPv4TextBox = new MetroFramework.Controls.MetroTextBox();
|
||||
this.listViewPCKS = new System.Windows.Forms.ListView();
|
||||
this.contextMenuStripCaffiine = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.replaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.replacePCKToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.radioButtonUSB = new System.Windows.Forms.RadioButton();
|
||||
this.TextBoxPackImage = new MetroFramework.Controls.MetroTextBox();
|
||||
this.radioButtonSystem = new System.Windows.Forms.RadioButton();
|
||||
this.buttonSelect = new System.Windows.Forms.Button();
|
||||
this.PackImageSelection = new System.Windows.Forms.Button();
|
||||
this.regionLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.radioButtonEur = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonUs = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonJap = new System.Windows.Forms.RadioButton();
|
||||
this.myTablePanel1.SuspendLayout();
|
||||
this.contextMenuStripCaffiine.SuspendLayout();
|
||||
this.regionLayoutPanel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// myTablePanel1
|
||||
//
|
||||
this.myTablePanel1.BackColor = System.Drawing.Color.Black;
|
||||
this.myTablePanel1.ColumnCount = 3;
|
||||
this.myTablePanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||
this.myTablePanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
|
||||
this.myTablePanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
|
||||
this.myTablePanel1.Controls.Add(this.buttonServerToggle, 2, 0);
|
||||
this.myTablePanel1.Controls.Add(this.IPv4TextBox, 0, 0);
|
||||
this.myTablePanel1.Controls.Add(this.listViewPCKS, 0, 4);
|
||||
this.myTablePanel1.Controls.Add(this.radioButtonUSB);
|
||||
this.myTablePanel1.Controls.Add(this.TextBoxPackImage, 0, 1);
|
||||
this.myTablePanel1.Controls.Add(this.radioButtonSystem, 1, 2);
|
||||
this.myTablePanel1.Controls.Add(this.buttonSelect, 0, 2);
|
||||
this.myTablePanel1.Controls.Add(this.PackImageSelection, 2, 1);
|
||||
this.myTablePanel1.Controls.Add(this.regionLayoutPanel, 0, 3);
|
||||
this.myTablePanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.myTablePanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.myTablePanel1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.myTablePanel1.Name = "myTablePanel1";
|
||||
this.myTablePanel1.RowCount = 8;
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 46F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.myTablePanel1.Size = new System.Drawing.Size(430, 550);
|
||||
this.myTablePanel1.TabIndex = 3;
|
||||
//
|
||||
// buttonServerToggle
|
||||
//
|
||||
this.buttonServerToggle.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.buttonServerToggle.BackColor = System.Drawing.Color.SpringGreen;
|
||||
this.buttonServerToggle.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.buttonServerToggle.Enabled = false;
|
||||
this.buttonServerToggle.FlatAppearance.BorderSize = 0;
|
||||
this.buttonServerToggle.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.buttonServerToggle.Font = new System.Drawing.Font("Segoe UI", 9.75F);
|
||||
this.buttonServerToggle.ForeColor = System.Drawing.Color.White;
|
||||
this.buttonServerToggle.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.buttonServerToggle.Location = new System.Drawing.Point(289, 3);
|
||||
this.buttonServerToggle.Name = "buttonServerToggle";
|
||||
this.buttonServerToggle.Size = new System.Drawing.Size(138, 27);
|
||||
this.buttonServerToggle.TabIndex = 9;
|
||||
this.buttonServerToggle.Text = "Start";
|
||||
this.buttonServerToggle.UseVisualStyleBackColor = false;
|
||||
this.buttonServerToggle.Click += new System.EventHandler(this.buttonServerToggle_Click);
|
||||
//
|
||||
// IPv4TextBox
|
||||
//
|
||||
this.IPv4TextBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.myTablePanel1.SetColumnSpan(this.IPv4TextBox, 2);
|
||||
//
|
||||
//
|
||||
//
|
||||
this.IPv4TextBox.CustomButton.Image = null;
|
||||
this.IPv4TextBox.CustomButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.IPv4TextBox.CustomButton.Location = new System.Drawing.Point(312, 1);
|
||||
this.IPv4TextBox.CustomButton.Name = "";
|
||||
this.IPv4TextBox.CustomButton.Size = new System.Drawing.Size(25, 25);
|
||||
this.IPv4TextBox.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.IPv4TextBox.CustomButton.TabIndex = 1;
|
||||
this.IPv4TextBox.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.IPv4TextBox.CustomButton.UseSelectable = true;
|
||||
this.IPv4TextBox.CustomButton.Visible = false;
|
||||
this.IPv4TextBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.IPv4TextBox.IconRight = true;
|
||||
this.IPv4TextBox.Lines = new string[0];
|
||||
this.IPv4TextBox.Location = new System.Drawing.Point(3, 3);
|
||||
this.IPv4TextBox.MaxLength = 32767;
|
||||
this.IPv4TextBox.Name = "IPv4TextBox";
|
||||
this.IPv4TextBox.PasswordChar = '\0';
|
||||
this.IPv4TextBox.PromptText = "Wii U IP";
|
||||
this.IPv4TextBox.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.IPv4TextBox.SelectedText = "";
|
||||
this.IPv4TextBox.SelectionLength = 0;
|
||||
this.IPv4TextBox.SelectionStart = 0;
|
||||
this.IPv4TextBox.ShortcutsEnabled = true;
|
||||
this.IPv4TextBox.Size = new System.Drawing.Size(280, 27);
|
||||
this.IPv4TextBox.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.IPv4TextBox.TabIndex = 10;
|
||||
this.IPv4TextBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.IPv4TextBox.UseSelectable = true;
|
||||
this.IPv4TextBox.WaterMark = "Wii U IP";
|
||||
this.IPv4TextBox.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.IPv4TextBox.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// listViewPCKS
|
||||
//
|
||||
this.listViewPCKS.Activation = System.Windows.Forms.ItemActivation.TwoClick;
|
||||
this.myTablePanel1.SetColumnSpan(this.listViewPCKS, 3);
|
||||
this.listViewPCKS.ContextMenuStrip = this.contextMenuStripCaffiine;
|
||||
this.listViewPCKS.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listViewPCKS.Enabled = false;
|
||||
this.listViewPCKS.HideSelection = false;
|
||||
this.listViewPCKS.Location = new System.Drawing.Point(3, 151);
|
||||
this.listViewPCKS.Name = "listViewPCKS";
|
||||
this.listViewPCKS.Size = new System.Drawing.Size(424, 396);
|
||||
this.listViewPCKS.TabIndex = 3;
|
||||
this.listViewPCKS.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewPCKS.View = System.Windows.Forms.View.Details;
|
||||
this.listViewPCKS.MouseDown += new System.Windows.Forms.MouseEventHandler(this.listViewPCKS_MouseDown);
|
||||
//
|
||||
// contextMenuStripCaffiine
|
||||
//
|
||||
this.contextMenuStripCaffiine.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.replaceToolStripMenuItem,
|
||||
this.replacePCKToolStripMenuItem});
|
||||
this.contextMenuStripCaffiine.Name = "contextMenuStripCaffiine";
|
||||
this.contextMenuStripCaffiine.Size = new System.Drawing.Size(212, 48);
|
||||
//
|
||||
// replaceToolStripMenuItem
|
||||
//
|
||||
this.replaceToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Replace;
|
||||
this.replaceToolStripMenuItem.Name = "replaceToolStripMenuItem";
|
||||
this.replaceToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
|
||||
this.replaceToolStripMenuItem.Text = "Replace";
|
||||
this.replaceToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextAboveImage;
|
||||
this.replaceToolStripMenuItem.Click += new System.EventHandler(this.replaceToolStripMenuItem_Click);
|
||||
//
|
||||
// replacePCKToolStripMenuItem
|
||||
//
|
||||
this.replacePCKToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Replace;
|
||||
this.replacePCKToolStripMenuItem.Name = "replacePCKToolStripMenuItem";
|
||||
this.replacePCKToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
|
||||
this.replacePCKToolStripMenuItem.Text = "Replace with external PCK";
|
||||
this.replacePCKToolStripMenuItem.Click += new System.EventHandler(this.replacePCKToolStripMenuItem_Click);
|
||||
//
|
||||
// radioButtonUSB
|
||||
//
|
||||
this.radioButtonUSB.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.radioButtonUSB.BackColor = System.Drawing.Color.Transparent;
|
||||
this.radioButtonUSB.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonUSB.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.radioButtonUSB.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.radioButtonUSB.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.radioButtonUSB.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.radioButtonUSB.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.radioButtonUSB.Font = new System.Drawing.Font("Segoe UI", 12F);
|
||||
this.radioButtonUSB.ForeColor = System.Drawing.Color.White;
|
||||
this.radioButtonUSB.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.radioButtonUSB.Location = new System.Drawing.Point(289, 69);
|
||||
this.radioButtonUSB.Name = "radioButtonUSB";
|
||||
this.radioButtonUSB.Size = new System.Drawing.Size(138, 30);
|
||||
this.radioButtonUSB.TabIndex = 6;
|
||||
this.radioButtonUSB.Text = "USB";
|
||||
this.radioButtonUSB.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonUSB.UseVisualStyleBackColor = false;
|
||||
this.radioButtonUSB.Click += new System.EventHandler(this.radioButton_Click);
|
||||
//
|
||||
// TextBoxPackImage
|
||||
//
|
||||
this.TextBoxPackImage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.myTablePanel1.SetColumnSpan(this.TextBoxPackImage, 2);
|
||||
//
|
||||
//
|
||||
//
|
||||
this.TextBoxPackImage.CustomButton.Image = null;
|
||||
this.TextBoxPackImage.CustomButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.TextBoxPackImage.CustomButton.Location = new System.Drawing.Point(312, 1);
|
||||
this.TextBoxPackImage.CustomButton.Name = "";
|
||||
this.TextBoxPackImage.CustomButton.Size = new System.Drawing.Size(25, 25);
|
||||
this.TextBoxPackImage.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.TextBoxPackImage.CustomButton.TabIndex = 1;
|
||||
this.TextBoxPackImage.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.TextBoxPackImage.CustomButton.UseSelectable = true;
|
||||
this.TextBoxPackImage.CustomButton.Visible = false;
|
||||
this.TextBoxPackImage.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.TextBoxPackImage.IconRight = true;
|
||||
this.TextBoxPackImage.Lines = new string[0];
|
||||
this.TextBoxPackImage.Location = new System.Drawing.Point(3, 36);
|
||||
this.TextBoxPackImage.MaxLength = 32767;
|
||||
this.TextBoxPackImage.Name = "TextBoxPackImage";
|
||||
this.TextBoxPackImage.PasswordChar = '\0';
|
||||
this.TextBoxPackImage.PromptText = "Pack Image";
|
||||
this.TextBoxPackImage.ReadOnly = true;
|
||||
this.TextBoxPackImage.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.TextBoxPackImage.SelectedText = "";
|
||||
this.TextBoxPackImage.SelectionLength = 0;
|
||||
this.TextBoxPackImage.SelectionStart = 0;
|
||||
this.TextBoxPackImage.ShortcutsEnabled = true;
|
||||
this.TextBoxPackImage.Size = new System.Drawing.Size(280, 27);
|
||||
this.TextBoxPackImage.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.TextBoxPackImage.TabIndex = 11;
|
||||
this.TextBoxPackImage.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.TextBoxPackImage.UseSelectable = true;
|
||||
this.TextBoxPackImage.WaterMark = "Pack Image";
|
||||
this.TextBoxPackImage.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.TextBoxPackImage.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// radioButtonSystem
|
||||
//
|
||||
this.radioButtonSystem.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.radioButtonSystem.BackColor = System.Drawing.Color.Transparent;
|
||||
this.radioButtonSystem.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonSystem.Checked = true;
|
||||
this.radioButtonSystem.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.radioButtonSystem.FlatAppearance.CheckedBackColor = System.Drawing.Color.DodgerBlue;
|
||||
this.radioButtonSystem.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.radioButtonSystem.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.radioButtonSystem.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.radioButtonSystem.Font = new System.Drawing.Font("Segoe UI", 12F);
|
||||
this.radioButtonSystem.ForeColor = System.Drawing.Color.White;
|
||||
this.radioButtonSystem.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.radioButtonSystem.Location = new System.Drawing.Point(146, 69);
|
||||
this.radioButtonSystem.Name = "radioButtonSystem";
|
||||
this.radioButtonSystem.Size = new System.Drawing.Size(137, 30);
|
||||
this.radioButtonSystem.TabIndex = 5;
|
||||
this.radioButtonSystem.TabStop = true;
|
||||
this.radioButtonSystem.Text = "System";
|
||||
this.radioButtonSystem.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonSystem.UseVisualStyleBackColor = false;
|
||||
this.radioButtonSystem.Click += new System.EventHandler(this.radioButton_Click);
|
||||
//
|
||||
// buttonSelect
|
||||
//
|
||||
this.buttonSelect.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.buttonSelect.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.buttonSelect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.buttonSelect.Font = new System.Drawing.Font("Segoe UI", 12F);
|
||||
this.buttonSelect.ForeColor = System.Drawing.Color.White;
|
||||
this.buttonSelect.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.buttonSelect.Location = new System.Drawing.Point(3, 69);
|
||||
this.buttonSelect.Name = "buttonSelect";
|
||||
this.buttonSelect.Size = new System.Drawing.Size(137, 30);
|
||||
this.buttonSelect.TabIndex = 1;
|
||||
this.buttonSelect.UseVisualStyleBackColor = true;
|
||||
this.buttonSelect.Click += new System.EventHandler(this.buttonSelect_Click);
|
||||
//
|
||||
// PackImageSelection
|
||||
//
|
||||
this.PackImageSelection.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.PackImageSelection.BackColor = System.Drawing.Color.DarkCyan;
|
||||
this.PackImageSelection.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.PackImageSelection.Enabled = false;
|
||||
this.PackImageSelection.FlatAppearance.BorderSize = 0;
|
||||
this.PackImageSelection.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.PackImageSelection.Font = new System.Drawing.Font("Segoe UI", 9.75F);
|
||||
this.PackImageSelection.ForeColor = System.Drawing.Color.White;
|
||||
this.PackImageSelection.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.PackImageSelection.Location = new System.Drawing.Point(289, 36);
|
||||
this.PackImageSelection.Name = "PackImageSelection";
|
||||
this.PackImageSelection.Size = new System.Drawing.Size(138, 27);
|
||||
this.PackImageSelection.TabIndex = 12;
|
||||
this.PackImageSelection.Text = "Browse";
|
||||
this.PackImageSelection.UseVisualStyleBackColor = false;
|
||||
this.PackImageSelection.Click += new System.EventHandler(this.PackImageSelection_Click);
|
||||
//
|
||||
// regionLayoutPanel
|
||||
//
|
||||
this.regionLayoutPanel.ColumnCount = 3;
|
||||
this.myTablePanel1.SetColumnSpan(this.regionLayoutPanel, 3);
|
||||
this.regionLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||
this.regionLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||
this.regionLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||
this.regionLayoutPanel.Controls.Add(this.radioButtonEur, 0, 0);
|
||||
this.regionLayoutPanel.Controls.Add(this.radioButtonUs, 1, 0);
|
||||
this.regionLayoutPanel.Controls.Add(this.radioButtonJap, 2, 0);
|
||||
this.regionLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.regionLayoutPanel.Location = new System.Drawing.Point(3, 105);
|
||||
this.regionLayoutPanel.Name = "regionLayoutPanel";
|
||||
this.regionLayoutPanel.RowCount = 1;
|
||||
this.regionLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.regionLayoutPanel.Size = new System.Drawing.Size(424, 40);
|
||||
this.regionLayoutPanel.TabIndex = 13;
|
||||
//
|
||||
// radioButtonEur
|
||||
//
|
||||
this.radioButtonEur.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.radioButtonEur.AutoSize = true;
|
||||
this.radioButtonEur.BackColor = System.Drawing.Color.Transparent;
|
||||
this.radioButtonEur.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonEur.Checked = true;
|
||||
this.radioButtonEur.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.radioButtonEur.FlatAppearance.CheckedBackColor = System.Drawing.Color.DodgerBlue;
|
||||
this.radioButtonEur.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.radioButtonEur.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.radioButtonEur.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.radioButtonEur.Font = new System.Drawing.Font("Segoe UI", 12F);
|
||||
this.radioButtonEur.ForeColor = System.Drawing.Color.White;
|
||||
this.radioButtonEur.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.radioButtonEur.Location = new System.Drawing.Point(3, 3);
|
||||
this.radioButtonEur.Name = "radioButtonEur";
|
||||
this.radioButtonEur.Size = new System.Drawing.Size(135, 34);
|
||||
this.radioButtonEur.TabIndex = 1;
|
||||
this.radioButtonEur.TabStop = true;
|
||||
this.radioButtonEur.Text = "EUR";
|
||||
this.radioButtonEur.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonEur.UseVisualStyleBackColor = false;
|
||||
this.radioButtonEur.Click += new System.EventHandler(this.radioButton_Click);
|
||||
//
|
||||
// radioButtonUs
|
||||
//
|
||||
this.radioButtonUs.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.radioButtonUs.AutoSize = true;
|
||||
this.radioButtonUs.BackColor = System.Drawing.Color.Transparent;
|
||||
this.radioButtonUs.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonUs.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.radioButtonUs.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.radioButtonUs.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.radioButtonUs.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.radioButtonUs.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.radioButtonUs.Font = new System.Drawing.Font("Segoe UI", 12F);
|
||||
this.radioButtonUs.ForeColor = System.Drawing.Color.White;
|
||||
this.radioButtonUs.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.radioButtonUs.Location = new System.Drawing.Point(144, 3);
|
||||
this.radioButtonUs.Name = "radioButtonUs";
|
||||
this.radioButtonUs.Size = new System.Drawing.Size(135, 34);
|
||||
this.radioButtonUs.TabIndex = 0;
|
||||
this.radioButtonUs.Text = "US";
|
||||
this.radioButtonUs.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonUs.UseVisualStyleBackColor = false;
|
||||
this.radioButtonUs.Click += new System.EventHandler(this.radioButton_Click);
|
||||
//
|
||||
// radioButtonJap
|
||||
//
|
||||
this.radioButtonJap.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.radioButtonJap.AutoSize = true;
|
||||
this.radioButtonJap.BackColor = System.Drawing.Color.Transparent;
|
||||
this.radioButtonJap.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonJap.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.radioButtonJap.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.radioButtonJap.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.radioButtonJap.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.radioButtonJap.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.radioButtonJap.Font = new System.Drawing.Font("Segoe UI", 12F);
|
||||
this.radioButtonJap.ForeColor = System.Drawing.Color.White;
|
||||
this.radioButtonJap.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.radioButtonJap.Location = new System.Drawing.Point(285, 3);
|
||||
this.radioButtonJap.Name = "radioButtonJap";
|
||||
this.radioButtonJap.Size = new System.Drawing.Size(136, 34);
|
||||
this.radioButtonJap.TabIndex = 2;
|
||||
this.radioButtonJap.Text = "JAP";
|
||||
this.radioButtonJap.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonJap.UseVisualStyleBackColor = false;
|
||||
this.radioButtonJap.Click += new System.EventHandler(this.radioButton_Click);
|
||||
//
|
||||
// WiiUPanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
|
||||
this.Controls.Add(this.myTablePanel1);
|
||||
this.Name = "WiiUPanel";
|
||||
this.Size = new System.Drawing.Size(430, 550);
|
||||
this.myTablePanel1.ResumeLayout(false);
|
||||
this.contextMenuStripCaffiine.ResumeLayout(false);
|
||||
this.regionLayoutPanel.ResumeLayout(false);
|
||||
this.regionLayoutPanel.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel myTablePanel1;
|
||||
private System.Windows.Forms.Button buttonServerToggle;
|
||||
private System.Windows.Forms.Button buttonSelect;
|
||||
private System.Windows.Forms.RadioButton radioButtonSystem;
|
||||
private System.Windows.Forms.RadioButton radioButtonUSB;
|
||||
private System.Windows.Forms.RadioButton radioButtonEur;
|
||||
private System.Windows.Forms.RadioButton radioButtonUs;
|
||||
private System.Windows.Forms.RadioButton radioButtonJap;
|
||||
private MetroFramework.Controls.MetroTextBox IPv4TextBox;
|
||||
private System.Windows.Forms.ListView listViewPCKS;
|
||||
private MetroFramework.Controls.MetroTextBox TextBoxPackImage;
|
||||
private System.Windows.Forms.Button PackImageSelection;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStripCaffiine;
|
||||
private System.Windows.Forms.ToolStripMenuItem replaceToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem replacePCKToolStripMenuItem;
|
||||
private System.Windows.Forms.TableLayoutPanel regionLayoutPanel;
|
||||
}
|
||||
}
|
||||
290
PCK-Studio/Features/WiiUPanel.cs
Normal file
@@ -0,0 +1,290 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
using OMI.Formats.Archive;
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Workers.Archive;
|
||||
using OMI.Workers.Pck;
|
||||
using PckStudio.Classes.Misc;
|
||||
|
||||
namespace PckStudio.Features
|
||||
{
|
||||
public partial class WiiUPanel : UserControl
|
||||
{
|
||||
string DLCPath = string.Empty;
|
||||
string mod = string.Empty;
|
||||
bool serverOn = false;
|
||||
ConsoleArchive archive = new ConsoleArchive();
|
||||
PckFile currentPCK = null;
|
||||
|
||||
private const string FtpUsername = "PCK_Studio_Client";
|
||||
// TODO: randomize per 'session'(instance)
|
||||
private const string FtpSessionPassword = "a3262443";
|
||||
private ICredentials sessionCredentials = new NetworkCredential(FtpUsername, FtpSessionPassword);
|
||||
|
||||
public WiiUPanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
UpdateDLCPath();
|
||||
buttonServerToggle.Enabled = true;
|
||||
if (listViewPCKS.Columns.Count == 0)
|
||||
{
|
||||
listViewPCKS.Columns.Add(DLCPath, listViewPCKS.Width);
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Prompt user to use Aroma instead!")]
|
||||
private void buttonSelect_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("Please use Aroma's ftp Plugin!");
|
||||
return;
|
||||
}
|
||||
|
||||
private enum ButtonState
|
||||
{
|
||||
Start,
|
||||
Stop,
|
||||
Wait
|
||||
}
|
||||
|
||||
private void SetButtonState(ButtonState state)
|
||||
{
|
||||
switch(state)
|
||||
{
|
||||
case ButtonState.Start:
|
||||
buttonServerToggle.BackColor = Color.FromArgb(68, 178, 13);
|
||||
serverOn = false;
|
||||
buttonServerToggle.Text = "Start";
|
||||
listViewPCKS.Enabled = false;
|
||||
break;
|
||||
case ButtonState.Stop:
|
||||
serverOn = true;
|
||||
buttonServerToggle.BackColor = Color.Red;
|
||||
buttonServerToggle.Text = "Stop";
|
||||
listViewPCKS.Enabled = true;
|
||||
break;
|
||||
case ButtonState.Wait:
|
||||
buttonServerToggle.BackColor = Color.MediumAquamarine;
|
||||
buttonServerToggle.Text = "Wait..";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private string GetConsoleDevice()
|
||||
{
|
||||
if (radioButtonSystem.Checked)
|
||||
{
|
||||
return "storage_mlc";
|
||||
}
|
||||
if (radioButtonUSB.Checked)
|
||||
{
|
||||
return "storage_usb";
|
||||
}
|
||||
throw new Exception("how did you get here ?");
|
||||
}
|
||||
|
||||
private string GetConsoleRegion()
|
||||
{
|
||||
if (radioButtonEur.Checked)
|
||||
{
|
||||
return "101d7500";
|
||||
}
|
||||
if (radioButtonUs.Checked)
|
||||
{
|
||||
return "101d9d00";
|
||||
}
|
||||
if (radioButtonJap.Checked)
|
||||
{
|
||||
return "101dbe00";
|
||||
}
|
||||
throw new Exception("how did you get here ?");
|
||||
}
|
||||
|
||||
private string GetGameContentPath()
|
||||
{
|
||||
string device = GetConsoleDevice();
|
||||
string region = GetConsoleRegion();
|
||||
return $"{device}/usr/title/0005000e/{region}/content";
|
||||
}
|
||||
|
||||
private void UpdateDLCPath()
|
||||
{
|
||||
DLCPath = $"{GetGameContentPath()}/WiiU/DLC/";
|
||||
}
|
||||
|
||||
private void buttonServerToggle_Click(object sender, EventArgs e)
|
||||
{
|
||||
//Turn off server
|
||||
if (serverOn)
|
||||
{
|
||||
listViewPCKS.Items.Clear();
|
||||
try
|
||||
{
|
||||
SetButtonState(ButtonState.Start);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.ToString());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Regex.IsMatch(IPv4TextBox.Text, @"^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$"))
|
||||
{
|
||||
MessageBox.Show("Please enter a valid Wii U IP!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Turn on server
|
||||
try
|
||||
{
|
||||
SetButtonState(ButtonState.Wait);
|
||||
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
|
||||
using (var client = new FTPClient($"ftp://{IPv4TextBox.Text}", sessionCredentials))
|
||||
{
|
||||
client.SetTimeoutLimit(TimeSpan.FromSeconds(10));
|
||||
string[] dirList = client.ListDirectory(DLCPath);
|
||||
listViewPCKS.Items.AddRange(dirList.Select(s => new ListViewItem(s)).ToArray());
|
||||
foreach (ListViewItem pck in listViewPCKS.Items)
|
||||
{
|
||||
string[] res = client.ListDirectory($"{DLCPath}/{pck.Text}");
|
||||
if (res.Length != 1)
|
||||
{
|
||||
pck.Remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SetButtonState(ButtonState.Stop);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
SetButtonState(ButtonState.Start);
|
||||
MessageBox.Show(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private void radioButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
UpdateDLCPath();
|
||||
listViewPCKS.Columns[0].Text = DLCPath;
|
||||
}
|
||||
|
||||
private void listViewPCKS_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
ListViewHitTestInfo hitTestInfo = listViewPCKS.HitTest(e.Location);
|
||||
if (e.Button == MouseButtons.Right && hitTestInfo.Location != ListViewHitTestLocations.None)
|
||||
{
|
||||
contextMenuStripCaffiine.Show(Cursor.Position);
|
||||
}
|
||||
}
|
||||
|
||||
private void replaceToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewPCKS.SelectedItems.Count != 0)
|
||||
{
|
||||
SetButtonState(ButtonState.Wait);
|
||||
ReplacePck(mod);
|
||||
MessageBox.Show("PCK Replaced!");
|
||||
}
|
||||
SetButtonState(ButtonState.Stop);
|
||||
UpdateDLCPath();
|
||||
}
|
||||
|
||||
private void replacePCKToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewPCKS.SelectedItems.Count != 0)
|
||||
{
|
||||
SetButtonState(ButtonState.Wait);
|
||||
OpenFileDialog openPCK = new OpenFileDialog();
|
||||
openPCK.Filter = "PCK File|*.pck";
|
||||
|
||||
if (openPCK.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
ReplacePck(openPCK.FileName);
|
||||
MessageBox.Show("PCK Replaced!");
|
||||
}
|
||||
}
|
||||
SetButtonState(ButtonState.Stop);
|
||||
UpdateDLCPath();
|
||||
}
|
||||
|
||||
private void ReplacePck(string filename)
|
||||
{
|
||||
using (FTPClient client = new FTPClient($"ftp://{IPv4TextBox.Text}", sessionCredentials))
|
||||
client.UploadFile(filename, DLCPath + "/" + listViewPCKS.SelectedItems[0].Text + "/" + listViewPCKS.SelectedItems[0].Tag.ToString());
|
||||
if (!string.IsNullOrWhiteSpace(TextBoxPackImage.Text))
|
||||
{
|
||||
string PackID = GetPackId(filename);
|
||||
GetARCFromConsole();
|
||||
AddOrReplacePackImage(PackID);
|
||||
SendARCToConsole();
|
||||
}
|
||||
}
|
||||
|
||||
private string GetPackId(string filepath)
|
||||
{
|
||||
var reader = new PckFileReader();
|
||||
currentPCK = reader.FromFile(filepath);
|
||||
if (currentPCK is null) return string.Empty;
|
||||
return currentPCK.TryGetFile("0", PckFile.FileData.FileType.InfoFile, out var file)
|
||||
? file.Properties.GetProperty("PACKID").Item2
|
||||
: string.Empty;
|
||||
}
|
||||
|
||||
private void GetARCFromConsole()
|
||||
{
|
||||
using var ms = new MemoryStream();
|
||||
using (FTPClient client = new FTPClient($"ftp://{IPv4TextBox.Text}", sessionCredentials))
|
||||
{
|
||||
client.DownloadFile(GetGameContentPath() + "/Common/Media/MediaWiiU.arc", ms);
|
||||
ms.Position = 0;
|
||||
var reader = new ARCFileReader();
|
||||
archive = reader.FromStream(ms);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddOrReplacePackImage(string packId)
|
||||
{
|
||||
string arcPath = $"Graphics\\PackGraphics\\{packId}.png";
|
||||
byte[] data = File.ReadAllBytes(TextBoxPackImage.Text);
|
||||
if (archive.ContainsKey(arcPath)) archive[arcPath] = data;
|
||||
else archive.Add(arcPath, data);
|
||||
}
|
||||
|
||||
private void SendARCToConsole()
|
||||
{
|
||||
using (FTPClient client = new FTPClient($"ftp://{IPv4TextBox.Text}", sessionCredentials))
|
||||
{
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
var writer = new ARCFileWriter(archive);
|
||||
writer.WriteToStream(ms);
|
||||
ms.Position = 0;
|
||||
client.UploadFile(ms, GetGameContentPath() + "/Common/Media/MediaWiiU.arc");
|
||||
}
|
||||
archive.Clear();
|
||||
currentPCK?.Files.Clear();
|
||||
currentPCK = null;
|
||||
}
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
private void PackImageSelection_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
ofd.Filter = "Pack Image|*.png";
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
TextBoxPackImage.Text = ofd.FileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,15 +10,14 @@ namespace PckStudio.Forms.Additional_Popups.EntityForms
|
||||
{
|
||||
string selectedEntity = "";
|
||||
|
||||
JObject EntityJSONData;
|
||||
private static JObject EntityJSONData = JObject.Parse(Properties.Resources.entityData);
|
||||
public string SelectedEntity => selectedEntity;
|
||||
|
||||
List<TreeNode> treeViewEntityCache = new List<TreeNode>();
|
||||
|
||||
public AddEntry(JObject entityData, System.Drawing.Image[] entityImages)
|
||||
public AddEntry(string dataType, System.Drawing.Image[] entityImages)
|
||||
{
|
||||
InitializeComponent();
|
||||
EntityJSONData = entityData;
|
||||
ImageList entities = new ImageList();
|
||||
entities.ColorDepth = ColorDepth.Depth32Bit;
|
||||
entities.ImageSize = new System.Drawing.Size(32, 32);
|
||||
@@ -29,9 +28,9 @@ namespace PckStudio.Forms.Additional_Popups.EntityForms
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
if (EntityJSONData["entities"] != null)
|
||||
if (EntityJSONData[dataType] != null)
|
||||
{
|
||||
foreach (JObject content in EntityJSONData["entities"].Children())
|
||||
foreach (JObject content in EntityJSONData[dataType].Children())
|
||||
{
|
||||
foreach (JProperty prop in content.Properties())
|
||||
{
|
||||
|
||||
@@ -14,29 +14,28 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
public int FrameCount => frames.Count;
|
||||
|
||||
public int TextureCount => frameTextures.Count;
|
||||
public int TextureCount => textures.Count;
|
||||
|
||||
public Frame this[int frameIndex] => frames[frameIndex];
|
||||
|
||||
// TODO: implement this
|
||||
public bool Interpolate { get; set; } = false;
|
||||
|
||||
private readonly List<Image> frameTextures;
|
||||
private readonly List<Image> textures;
|
||||
|
||||
private readonly List<Frame> frames = new List<Frame>();
|
||||
|
||||
|
||||
public Animation(IEnumerable<Image> image)
|
||||
public Animation(IEnumerable<Image> textures)
|
||||
{
|
||||
frameTextures = new List<Image>(image);
|
||||
this.textures = new List<Image>(textures);
|
||||
AddSingleFrames();
|
||||
}
|
||||
|
||||
public Animation(IEnumerable<Image> frameTextures, string ANIM)
|
||||
{
|
||||
this.textures = new List<Image>(frameTextures);
|
||||
ParseAnim(ANIM);
|
||||
}
|
||||
|
||||
public Animation(IEnumerable<Image> frameTextures, string ANIM) : this(frameTextures)
|
||||
{
|
||||
ParseAnim(ANIM);
|
||||
}
|
||||
|
||||
public struct Frame
|
||||
public class Frame
|
||||
{
|
||||
public readonly Image Texture;
|
||||
public int Ticks;
|
||||
@@ -51,23 +50,22 @@ namespace PckStudio.Forms.Editor
|
||||
}
|
||||
}
|
||||
|
||||
private void ParseAnim(string ANIM)
|
||||
private void ParseAnim(string anim)
|
||||
{
|
||||
_ = ANIM ?? throw new ArgumentNullException(nameof(ANIM));
|
||||
ANIM = (Interpolate = ANIM.StartsWith("#")) ? ANIM.Substring(1) : ANIM;
|
||||
string[] animData = ANIM.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
_ = anim ?? throw new ArgumentNullException(nameof(anim));
|
||||
anim = anim.Trim();
|
||||
anim = (Interpolate = anim.StartsWith("#")) ? anim.Substring(1) : anim;
|
||||
string[] animData = anim.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
int lastFrameTime = MinimumFrameTime;
|
||||
if (animData.Length <= 0)
|
||||
for (int i = 0; i < TextureCount; i++)
|
||||
{
|
||||
AddFrame(i);
|
||||
}
|
||||
{
|
||||
AddSingleFrames();
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (string frameInfo in animData)
|
||||
{
|
||||
string[] frameData = frameInfo.Split('*');
|
||||
//if (frameData.Length < 2)
|
||||
// continue; // shouldn't happen
|
||||
int currentFrameIndex = 0;
|
||||
int.TryParse(frameData[0], out currentFrameIndex);
|
||||
|
||||
@@ -76,22 +74,35 @@ namespace PckStudio.Forms.Editor
|
||||
// This will detect that and place the last frame time in its place.
|
||||
// This is accurate to console edition behavior.
|
||||
// - MattNL
|
||||
int currentFrameTime = string.IsNullOrEmpty(frameData[1]) ? lastFrameTime : int.Parse(frameData[1]);
|
||||
int currentFrameTime = frameData.Length < 2 || string.IsNullOrEmpty(frameData[1]) ? lastFrameTime : int.Parse(frameData[1]);
|
||||
AddFrame(currentFrameIndex, currentFrameTime);
|
||||
lastFrameTime = currentFrameTime;
|
||||
}
|
||||
}
|
||||
|
||||
public Frame AddFrame(int frameTextureIndex) => AddFrame(frameTextureIndex, MinimumFrameTime);
|
||||
public Frame AddFrame(int frameTextureIndex, int frameTime)
|
||||
private void CheckTextureIndex(int index)
|
||||
{
|
||||
if (frameTextureIndex < 0 || frameTextureIndex >= frameTextures.Count)
|
||||
throw new ArgumentOutOfRangeException(nameof(frameTextureIndex));
|
||||
Frame f = new Frame(frameTextures[frameTextureIndex], frameTime);
|
||||
frames.Add(f);
|
||||
return f;
|
||||
if ((index < 0 || index >= textures.Count))
|
||||
throw new ArgumentOutOfRangeException(nameof(index));
|
||||
}
|
||||
|
||||
public Frame AddFrame(int textureIndex) => AddFrame(textureIndex, MinimumFrameTime);
|
||||
public Frame AddFrame(int textureIndex, int frameTime)
|
||||
{
|
||||
CheckTextureIndex(textureIndex);
|
||||
Frame frame = new Frame(textures[textureIndex], frameTime);
|
||||
frames.Add(frame);
|
||||
return frame;
|
||||
}
|
||||
|
||||
private void AddSingleFrames()
|
||||
{
|
||||
for (int i = 0; i < TextureCount; i++)
|
||||
{
|
||||
AddFrame(i);
|
||||
}
|
||||
}
|
||||
|
||||
public bool RemoveFrame(int frameIndex)
|
||||
{
|
||||
frames.RemoveAt(frameIndex);
|
||||
@@ -105,22 +116,26 @@ namespace PckStudio.Forms.Editor
|
||||
return frames;
|
||||
}
|
||||
|
||||
public List<Image> GetFrameTextures()
|
||||
public List<Image> GetTextures()
|
||||
{
|
||||
return frameTextures;
|
||||
return textures;
|
||||
}
|
||||
|
||||
public int GetTextureIndex(Image frameTexture)
|
||||
{
|
||||
_ = frameTexture ?? throw new ArgumentNullException(nameof(frameTexture));
|
||||
return frameTextures.IndexOf(frameTexture);
|
||||
return textures.IndexOf(frameTexture);
|
||||
}
|
||||
|
||||
public void SetFrame(Frame frame, int frameTextureIndex, int frameTime = MinimumFrameTime)
|
||||
=> SetFrame(frames.IndexOf(frame), frameTextureIndex, frameTime);
|
||||
public void SetFrame(int frameIndex, int frameTextureIndex, int frameTime = MinimumFrameTime)
|
||||
public void SetFrame(int frameIndex, Frame frame)
|
||||
{
|
||||
frames[frameIndex] = new Frame(frameTextures[frameTextureIndex], frameTime);
|
||||
frames[frameIndex] = frame;
|
||||
}
|
||||
|
||||
public void SetFrame(int frameIndex, int textureIndex, int frameTime = MinimumFrameTime)
|
||||
{
|
||||
CheckTextureIndex(textureIndex);
|
||||
SetFrame(frameIndex, new Frame(textures[textureIndex], frameTime));
|
||||
}
|
||||
|
||||
public string BuildAnim()
|
||||
@@ -131,16 +146,12 @@ namespace PckStudio.Forms.Editor
|
||||
return stringBuilder.ToString(0, stringBuilder.Length - 1);
|
||||
}
|
||||
|
||||
public Image BuildTexture(bool isClockOrCompass, List<Image> linearImages = default!)
|
||||
{
|
||||
int width = frameTextures[0].Width;
|
||||
int height = frameTextures[0].Height;
|
||||
if (width != height)
|
||||
public Image BuildTexture()
|
||||
{
|
||||
if (textures[0].Width != textures[0].Height)
|
||||
throw new Exception("Invalid size");
|
||||
|
||||
var textures = isClockOrCompass ? linearImages : frameTextures;
|
||||
|
||||
return ImageExtensions.CombineImages(textures, ImageLayoutDirection.Vertical);
|
||||
return textures.CombineImages(ImageLayoutDirection.Vertical);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
97
PCK-Studio/Forms/Editor/AnimationEditor.Designer.cs
generated
@@ -49,15 +49,15 @@
|
||||
this.setBulkSpedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.javaAnimationSupportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.InterpolationCheckbox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.AnimationPlayBtn = new MetroFramework.Controls.MetroButton();
|
||||
this.AnimationStopBtn = new MetroFramework.Controls.MetroButton();
|
||||
this.AnimationStartStopBtn = new MetroFramework.Controls.MetroButton();
|
||||
this.tileLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.animationPictureBox = new PckStudio.Forms.Editor.AnimationPictureBox();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBoxWithInterpolationMode1 = new PckStudio.ToolboxItems.PictureBoxWithInterpolationMode();
|
||||
this.importGifToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.menuStrip.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.animationPictureBox)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxWithInterpolationMode1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// frameTreeView
|
||||
@@ -151,7 +151,8 @@
|
||||
this.bulkAnimationSpeedToolStripMenuItem,
|
||||
this.importJavaAnimationToolStripMenuItem,
|
||||
this.exportJavaAnimationToolStripMenuItem,
|
||||
this.changeTileToolStripMenuItem});
|
||||
this.changeTileToolStripMenuItem,
|
||||
this.importGifToolStripMenuItem});
|
||||
this.editToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.editToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Tools_48px;
|
||||
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||
@@ -231,37 +232,24 @@
|
||||
this.InterpolationCheckbox.AutoSize = true;
|
||||
this.InterpolationCheckbox.Location = new System.Drawing.Point(161, 63);
|
||||
this.InterpolationCheckbox.Name = "InterpolationCheckbox";
|
||||
this.InterpolationCheckbox.Size = new System.Drawing.Size(231, 15);
|
||||
this.InterpolationCheckbox.Size = new System.Drawing.Size(129, 15);
|
||||
this.InterpolationCheckbox.TabIndex = 17;
|
||||
this.InterpolationCheckbox.Text = "Enable Interpolation (not shown below)";
|
||||
this.InterpolationCheckbox.Text = "Enable Interpolation";
|
||||
this.InterpolationCheckbox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.InterpolationCheckbox.UseSelectable = true;
|
||||
this.InterpolationCheckbox.CheckedChanged += new System.EventHandler(this.InterpolationCheckbox_CheckedChanged);
|
||||
//
|
||||
// AnimationPlayBtn
|
||||
// AnimationStartStopBtn
|
||||
//
|
||||
this.AnimationPlayBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.AnimationPlayBtn.Location = new System.Drawing.Point(157, 317);
|
||||
this.AnimationPlayBtn.Name = "AnimationPlayBtn";
|
||||
this.AnimationPlayBtn.Size = new System.Drawing.Size(116, 24);
|
||||
this.AnimationPlayBtn.TabIndex = 18;
|
||||
this.AnimationPlayBtn.Text = "Play Animation";
|
||||
this.AnimationPlayBtn.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.AnimationPlayBtn.UseSelectable = true;
|
||||
this.AnimationPlayBtn.Click += new System.EventHandler(this.StartAnimationBtn_Click);
|
||||
//
|
||||
// AnimationStopBtn
|
||||
//
|
||||
this.AnimationStopBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.AnimationStopBtn.Enabled = false;
|
||||
this.AnimationStopBtn.Location = new System.Drawing.Point(276, 317);
|
||||
this.AnimationStopBtn.Name = "AnimationStopBtn";
|
||||
this.AnimationStopBtn.Size = new System.Drawing.Size(116, 24);
|
||||
this.AnimationStopBtn.TabIndex = 19;
|
||||
this.AnimationStopBtn.Text = "Stop Animation";
|
||||
this.AnimationStopBtn.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.AnimationStopBtn.UseSelectable = true;
|
||||
this.AnimationStopBtn.Click += new System.EventHandler(this.StopAnimationBtn_Click);
|
||||
this.AnimationStartStopBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.AnimationStartStopBtn.Location = new System.Drawing.Point(157, 317);
|
||||
this.AnimationStartStopBtn.Name = "AnimationStartStopBtn";
|
||||
this.AnimationStartStopBtn.Size = new System.Drawing.Size(232, 24);
|
||||
this.AnimationStartStopBtn.TabIndex = 18;
|
||||
this.AnimationStartStopBtn.Text = "Play Animation";
|
||||
this.AnimationStartStopBtn.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.AnimationStartStopBtn.UseSelectable = true;
|
||||
this.AnimationStartStopBtn.Click += new System.EventHandler(this.AnimationStartStopBtn_Click);
|
||||
//
|
||||
// tileLabel
|
||||
//
|
||||
@@ -275,26 +263,34 @@
|
||||
this.tileLabel.Text = "tileLabel";
|
||||
this.tileLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// animationPictureBox
|
||||
//
|
||||
this.animationPictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.animationPictureBox.Location = new System.Drawing.Point(157, 88);
|
||||
this.animationPictureBox.Name = "animationPictureBox";
|
||||
this.animationPictureBox.Size = new System.Drawing.Size(235, 223);
|
||||
this.animationPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.animationPictureBox.TabIndex = 16;
|
||||
this.animationPictureBox.TabStop = false;
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pictureBox1.Location = new System.Drawing.Point(154, 60);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(244, 24);
|
||||
this.pictureBox1.Size = new System.Drawing.Size(255, 24);
|
||||
this.pictureBox1.TabIndex = 21;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// pictureBoxWithInterpolationMode1
|
||||
// importGifToolStripMenuItem
|
||||
//
|
||||
this.pictureBoxWithInterpolationMode1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pictureBoxWithInterpolationMode1.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
|
||||
this.pictureBoxWithInterpolationMode1.Location = new System.Drawing.Point(157, 88);
|
||||
this.pictureBoxWithInterpolationMode1.Name = "pictureBoxWithInterpolationMode1";
|
||||
this.pictureBoxWithInterpolationMode1.Size = new System.Drawing.Size(235, 223);
|
||||
this.pictureBoxWithInterpolationMode1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBoxWithInterpolationMode1.TabIndex = 16;
|
||||
this.pictureBoxWithInterpolationMode1.TabStop = false;
|
||||
this.importGifToolStripMenuItem.Name = "importGifToolStripMenuItem";
|
||||
this.importGifToolStripMenuItem.Size = new System.Drawing.Size(210, 22);
|
||||
this.importGifToolStripMenuItem.Text = "Import Gif";
|
||||
this.importGifToolStripMenuItem.Click += new System.EventHandler(this.importGifToolStripMenuItem_Click);
|
||||
//
|
||||
// AnimationEditor
|
||||
//
|
||||
@@ -304,10 +300,9 @@
|
||||
this.ClientSize = new System.Drawing.Size(412, 362);
|
||||
this.Controls.Add(this.InterpolationCheckbox);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.AnimationStopBtn);
|
||||
this.Controls.Add(this.AnimationPlayBtn);
|
||||
this.Controls.Add(this.AnimationStartStopBtn);
|
||||
this.Controls.Add(this.tileLabel);
|
||||
this.Controls.Add(this.pictureBoxWithInterpolationMode1);
|
||||
this.Controls.Add(this.animationPictureBox);
|
||||
this.Controls.Add(this.frameTreeView);
|
||||
this.Controls.Add(this.menuStrip);
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 8.25F);
|
||||
@@ -321,8 +316,8 @@
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.menuStrip.ResumeLayout(false);
|
||||
this.menuStrip.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.animationPictureBox)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxWithInterpolationMode1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -334,13 +329,12 @@
|
||||
private System.Windows.Forms.MenuStrip menuStrip;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem1;
|
||||
private PckStudio.ToolboxItems.PictureBoxWithInterpolationMode pictureBoxWithInterpolationMode1;
|
||||
private PckStudio.Forms.Editor.AnimationPictureBox animationPictureBox;
|
||||
private MetroFramework.Controls.MetroCheckBox InterpolationCheckbox;
|
||||
private MetroFramework.Controls.MetroButton AnimationPlayBtn;
|
||||
private MetroFramework.Controls.MetroButton AnimationStartStopBtn;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem addFrameToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem removeFrameToolStripMenuItem;
|
||||
private MetroFramework.Controls.MetroButton AnimationStopBtn;
|
||||
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem bulkAnimationSpeedToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem importJavaAnimationToolStripMenuItem;
|
||||
@@ -353,6 +347,7 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem setBulkSpedToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem javaAnimationSupportToolStripMenuItem;
|
||||
private System.Windows.Forms.ImageList TextureIcons;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
}
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.ToolStripMenuItem importGifToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ using PckStudio.Forms.Additional_Popups.Animation;
|
||||
using PckStudio.Forms.Utilities;
|
||||
using PckStudio.Extensions;
|
||||
using OMI.Formats.Pck;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
@@ -18,7 +19,6 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
PckFile.FileData animationFile;
|
||||
Animation currentAnimation;
|
||||
AnimationPlayer player;
|
||||
|
||||
bool isItem = false;
|
||||
string animationSection => AnimationResources.GetAnimationSection(isItem);
|
||||
@@ -40,10 +40,9 @@ namespace PckStudio.Forms.Editor
|
||||
TileName = Path.GetFileNameWithoutExtension(file.Filename);
|
||||
|
||||
InterpolationCheckbox.Visible = !IsEditingSpecial;
|
||||
InterpolationCheckbox.Checked = InterpolationCheckbox.Visible;
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled = InterpolationCheckbox.Visible;
|
||||
importJavaAnimationToolStripMenuItem.Enabled = InterpolationCheckbox.Visible;
|
||||
exportJavaAnimationToolStripMenuItem.Enabled = InterpolationCheckbox.Visible;
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled = !IsEditingSpecial;
|
||||
importJavaAnimationToolStripMenuItem.Enabled = !IsEditingSpecial;
|
||||
exportJavaAnimationToolStripMenuItem.Enabled = !IsEditingSpecial;
|
||||
|
||||
animationFile = file;
|
||||
|
||||
@@ -54,7 +53,6 @@ namespace PckStudio.Forms.Editor
|
||||
currentAnimation = animationFile.Properties.HasProperty("ANIM")
|
||||
? new Animation(frameTextures, animationFile.Properties.GetPropertyValue("ANIM"))
|
||||
: new Animation(frameTextures);
|
||||
player = new AnimationPlayer(pictureBoxWithInterpolationMode1);
|
||||
|
||||
foreach (JObject content in AnimationResources.tileData[animationSection].Children())
|
||||
{
|
||||
@@ -74,7 +72,7 @@ namespace PckStudio.Forms.Editor
|
||||
frameTreeView.Nodes.Clear();
|
||||
// $"Frame: {i}, Frame Time: {Animation.MinimumFrameTime}"
|
||||
TextureIcons.Images.Clear();
|
||||
TextureIcons.Images.AddRange(currentAnimation.GetFrameTextures().ToArray());
|
||||
TextureIcons.Images.AddRange(currentAnimation.GetTextures().ToArray());
|
||||
foreach (var frame in currentAnimation.GetFrames())
|
||||
{
|
||||
var imageIndex = currentAnimation.GetTextureIndex(frame.Texture);
|
||||
@@ -84,37 +82,29 @@ namespace PckStudio.Forms.Editor
|
||||
SelectedImageIndex = imageIndex,
|
||||
});
|
||||
}
|
||||
player.SelectFrame(currentAnimation, 0);
|
||||
animationPictureBox.SelectFrame(currentAnimation, 0);
|
||||
}
|
||||
|
||||
private void frameTreeView_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
if (player.IsPlaying && !AnimationPlayBtn.Enabled)
|
||||
AnimationPlayBtn.Enabled = !(AnimationStopBtn.Enabled = !AnimationStopBtn.Enabled);
|
||||
player.SelectFrame(currentAnimation, frameTreeView.SelectedNode.Index);
|
||||
if (animationPictureBox.IsPlaying)
|
||||
AnimationStartStopBtn.Text = "Play Animation";
|
||||
animationPictureBox.SelectFrame(currentAnimation, frameTreeView.SelectedNode.Index);
|
||||
}
|
||||
|
||||
private int mix(double ratio, int val1, int val2) // Ported from Java Edition code
|
||||
private void AnimationStartStopBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
return (int)(ratio * val1 + (1.0D - ratio) * val2);
|
||||
}
|
||||
|
||||
private void StartAnimationBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
// prevent player from crashing
|
||||
player.Stop();
|
||||
AnimationPlayBtn.Enabled = !(AnimationStopBtn.Enabled = !AnimationStopBtn.Enabled);
|
||||
if (currentAnimation.FrameCount > 1)
|
||||
if (animationPictureBox.IsPlaying)
|
||||
{
|
||||
player.SetContext(pictureBoxWithInterpolationMode1);
|
||||
player.Start(currentAnimation);
|
||||
AnimationStartStopBtn.Text = "Play Animation";
|
||||
animationPictureBox.Stop();
|
||||
return;
|
||||
}
|
||||
if (currentAnimation.FrameCount > 1)
|
||||
{
|
||||
animationPictureBox.Start(currentAnimation);
|
||||
AnimationStartStopBtn.Text = "Stop Animation";
|
||||
}
|
||||
}
|
||||
|
||||
private void StopAnimationBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
AnimationPlayBtn.Enabled = !(AnimationStopBtn.Enabled = !AnimationStopBtn.Enabled);
|
||||
player.Stop();
|
||||
}
|
||||
|
||||
private void frameTreeView_KeyDown(object sender, KeyEventArgs e)
|
||||
@@ -135,17 +125,19 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void saveToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
string anim = currentAnimation.BuildAnim();
|
||||
|
||||
animationFile.Properties.SetProperty("ANIM", IsEditingSpecial ? "" : anim);
|
||||
using (var stream = new MemoryStream())
|
||||
if (!IsEditingSpecial)
|
||||
{
|
||||
var texture = currentAnimation.BuildTexture(IsEditingSpecial);
|
||||
texture.Save(stream, ImageFormat.Png);
|
||||
animationFile.SetData(stream.ToArray());
|
||||
string anim = currentAnimation.BuildAnim();
|
||||
animationFile.Properties.SetProperty("ANIM", anim);
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
var texture = currentAnimation.BuildTexture();
|
||||
texture.Save(stream, ImageFormat.Png);
|
||||
animationFile.SetData(stream.ToArray());
|
||||
}
|
||||
//Reusing this for the tile path
|
||||
TileName = "res/textures/" + (isItem ? "items/" : "blocks/") + TileName + ".png" ;
|
||||
}
|
||||
//Reusing this for the tile path
|
||||
TileName = "res/textures/" + (isItem ? "items/" : "blocks/") + TileName + ".png" ;
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
@@ -232,8 +224,11 @@ namespace PckStudio.Forms.Editor
|
||||
using FrameEditor diag = new FrameEditor(frame.Ticks, currentAnimation.GetTextureIndex(frame.Texture), TextureIcons);
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
/* Found a bug here. When passing the frame variable, it would replace the first instance of that frame and time
|
||||
* rather than the actual frame that was clicked. I've just switched to passing the index to fix this for now. -Matt
|
||||
/* Found a bug here. When passing the frame variable,
|
||||
* it would replace the first instance of that frame and time
|
||||
* rather than the actual frame that was clicked.
|
||||
* I've just switched to passing the index to fix this for now.
|
||||
* - Matt
|
||||
*/
|
||||
|
||||
currentAnimation.SetFrame(frameTreeView.SelectedNode.Index, diag.FrameTextureIndex, diag.FrameTime);
|
||||
@@ -294,8 +289,7 @@ namespace PckStudio.Forms.Editor
|
||||
MessageBox.Show(textureFile + " was not found", "Texture not found");
|
||||
return;
|
||||
}
|
||||
using MemoryStream textureMem = new MemoryStream(File.ReadAllBytes(textureFile));
|
||||
var textures = Image.FromStream(textureMem).CreateImageList(ImageLayoutDirection.Horizontal);
|
||||
var textures = Image.FromFile(textureFile).CreateImageList(ImageLayoutDirection.Horizontal);
|
||||
var new_animation = new Animation(textures);
|
||||
try
|
||||
{
|
||||
@@ -382,7 +376,7 @@ namespace PckStudio.Forms.Editor
|
||||
string jsondata = JsonConvert.SerializeObject(mcmeta, Formatting.Indented);
|
||||
string filename = fileDialog.FileName;
|
||||
File.WriteAllText(filename, jsondata);
|
||||
var finalTexture = currentAnimation.BuildTexture(isClockOrCompass: false);
|
||||
var finalTexture = currentAnimation.BuildTexture();
|
||||
finalTexture.Save(Path.GetFileNameWithoutExtension(filename)); // removes ".mcmeta" from filename!
|
||||
MessageBox.Show("Animation was successfully exported to " + filename, "Export successful!");
|
||||
}
|
||||
@@ -437,10 +431,41 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void AnimationEditor_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (player.IsPlaying)
|
||||
if (animationPictureBox.IsPlaying)
|
||||
{
|
||||
player.Stop();
|
||||
animationPictureBox.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
private void importGifToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog fileDialog = new OpenFileDialog()
|
||||
{
|
||||
Filter = "GIF|*.gif"
|
||||
};
|
||||
if (fileDialog.ShowDialog(this) != DialogResult.OK)
|
||||
return;
|
||||
|
||||
var gif = Image.FromFile(fileDialog.FileName);
|
||||
if (!gif.RawFormat.Equals(ImageFormat.Gif))
|
||||
{
|
||||
MessageBox.Show("Selected file is not a gif", "Invalid file", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
FrameDimension dimension = new FrameDimension(gif.FrameDimensionsList[0]);
|
||||
int frameCount = gif.GetFrameCount(dimension);
|
||||
|
||||
var textures = new List<Image>(frameCount);
|
||||
|
||||
for (int i = 0; i < frameCount; i++)
|
||||
{
|
||||
gif.SelectActiveFrame(dimension, i);
|
||||
textures.Add(new Bitmap(gif));
|
||||
}
|
||||
currentAnimation = new Animation(textures);
|
||||
LoadAnimationTreeView();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
114
PCK-Studio/Forms/Editor/AnimationPictureBox.cs
Normal file
@@ -0,0 +1,114 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms;
|
||||
using System.Threading.Tasks;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
using PckStudio.Extensions;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
internal class AnimationPictureBox : PictureBox
|
||||
{
|
||||
public bool IsPlaying => _isPlaying;
|
||||
|
||||
public void Start(Animation animation)
|
||||
{
|
||||
_animation = animation;
|
||||
cts = new CancellationTokenSource();
|
||||
Task.Run(DoAnimate, cts.Token);
|
||||
}
|
||||
|
||||
public void Stop([CallerMemberName] string callerName = default!)
|
||||
{
|
||||
Debug.WriteLine($"{nameof(AnimationPictureBox.Stop)} called from {callerName}!");
|
||||
cts.Cancel();
|
||||
}
|
||||
|
||||
public void SelectFrame(Animation animation, int index)
|
||||
{
|
||||
if (IsPlaying)
|
||||
Stop();
|
||||
_animation = animation;
|
||||
currentAnimationFrameIndex = index;
|
||||
currentFrame = SetAnimationFrame(index);
|
||||
}
|
||||
|
||||
private const int TickInMillisecond = 50; // 1 InGame tick
|
||||
|
||||
private bool _isPlaying = false;
|
||||
private int currentAnimationFrameIndex = 0;
|
||||
private Animation.Frame currentFrame;
|
||||
private Animation _animation;
|
||||
private CancellationTokenSource cts = new CancellationTokenSource();
|
||||
|
||||
protected override void OnPaint(PaintEventArgs pe)
|
||||
{
|
||||
pe.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor;
|
||||
pe.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
base.OnPaint(pe);
|
||||
}
|
||||
|
||||
private async void DoAnimate()
|
||||
{
|
||||
_ = _animation ?? throw new ArgumentNullException(nameof(_animation));
|
||||
_isPlaying = true;
|
||||
Animation.Frame nextFrame;
|
||||
while (!cts.IsCancellationRequested)
|
||||
{
|
||||
if (currentAnimationFrameIndex >= _animation.FrameCount)
|
||||
{
|
||||
currentAnimationFrameIndex = 0;
|
||||
}
|
||||
|
||||
if (currentAnimationFrameIndex + 1 >= _animation.FrameCount)
|
||||
{
|
||||
nextFrame = _animation.GetFrame(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
nextFrame = _animation.GetFrame(currentAnimationFrameIndex + 1);
|
||||
}
|
||||
|
||||
currentFrame = _animation.GetFrame(currentAnimationFrameIndex++);
|
||||
if (_animation.Interpolate)
|
||||
{
|
||||
await InterpolateFrame(currentFrame, nextFrame);
|
||||
continue;
|
||||
}
|
||||
SetAnimationFrame(currentFrame);
|
||||
await Task.Delay(TickInMillisecond * currentFrame.Ticks);
|
||||
}
|
||||
_isPlaying = false;
|
||||
}
|
||||
|
||||
private async Task InterpolateFrame(Animation.Frame currentFrame, Animation.Frame nextFrame)
|
||||
{
|
||||
for (int tick = 0; tick < currentFrame.Ticks && !cts.IsCancellationRequested; tick++)
|
||||
{
|
||||
double delta = 1.0f - tick / (double)currentFrame.Ticks;
|
||||
if (!IsDisposed)
|
||||
Invoke(() =>
|
||||
{
|
||||
if (!IsDisposed)
|
||||
Image = currentFrame.Texture.Interpolate(nextFrame.Texture, delta);
|
||||
});
|
||||
await Task.Delay(TickInMillisecond);
|
||||
}
|
||||
}
|
||||
|
||||
private Animation.Frame SetAnimationFrame(int frameIndex)
|
||||
{
|
||||
var frame = _animation.GetFrame(frameIndex);
|
||||
SetAnimationFrame(frame);
|
||||
return frame;
|
||||
}
|
||||
|
||||
private void SetAnimationFrame(Animation.Frame frame)
|
||||
{
|
||||
Invoke(() => Image = frame.Texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
// TODO: write as a UI control ??
|
||||
sealed class AnimationPlayer
|
||||
{
|
||||
public const int BaseTickSpeed = 48;
|
||||
public bool IsPlaying { get; private set; } = false;
|
||||
|
||||
private int currentAnimationFrameIndex = 0;
|
||||
private PictureBox display;
|
||||
private Animation _animation;
|
||||
private CancellationTokenSource cts = new CancellationTokenSource();
|
||||
|
||||
public AnimationPlayer(PictureBox display)
|
||||
{
|
||||
SetContext(display);
|
||||
}
|
||||
|
||||
private async void DoAnimate()
|
||||
{
|
||||
_ = display ?? throw new ArgumentNullException(nameof(display));
|
||||
_ = _animation ?? throw new ArgumentNullException(nameof(_animation));
|
||||
IsPlaying = true;
|
||||
while (!cts.IsCancellationRequested)
|
||||
{
|
||||
if (currentAnimationFrameIndex >= _animation.FrameCount)
|
||||
currentAnimationFrameIndex = 0;
|
||||
Animation.Frame frame = SetDisplayFrame(currentAnimationFrameIndex++);
|
||||
await Task.Delay(BaseTickSpeed * frame.Ticks);
|
||||
}
|
||||
IsPlaying = false;
|
||||
}
|
||||
|
||||
public void Start(Animation animation)
|
||||
{
|
||||
_animation = animation;
|
||||
cts = new CancellationTokenSource();
|
||||
Task.Run(DoAnimate, cts.Token);
|
||||
}
|
||||
|
||||
public void Stop([CallerMemberName] string callerName = default!)
|
||||
{
|
||||
Debug.WriteLine($"{nameof(AnimationPlayer.Stop)} called from {callerName}!");
|
||||
cts.Cancel();
|
||||
}
|
||||
|
||||
public Animation.Frame GetCurrentFrame() => _animation[currentAnimationFrameIndex];
|
||||
|
||||
public void SetContext(PictureBox display) => this.display = display;
|
||||
|
||||
public void SelectFrame(Animation animation, int index)
|
||||
{
|
||||
_animation = animation;
|
||||
if (IsPlaying)
|
||||
Stop();
|
||||
SetDisplayFrame(index);
|
||||
currentAnimationFrameIndex = index;
|
||||
}
|
||||
|
||||
private Animation.Frame SetDisplayFrame(int frameIndex)
|
||||
{
|
||||
Monitor.Enter(_animation);
|
||||
Animation.Frame frame = _animation[frameIndex];
|
||||
display.Image = frame.Texture;
|
||||
Monitor.Exit(_animation);
|
||||
return frame;
|
||||
}
|
||||
}
|
||||
}
|
||||
499
PCK-Studio/Forms/Editor/AudioEditor.Designer.cs
generated
@@ -29,243 +29,262 @@ namespace PckStudio.Forms.Editor
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AudioEditor));
|
||||
this.treeView1 = new System.Windows.Forms.TreeView();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.addCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.catImages = new System.Windows.Forms.ImageList(this.components);
|
||||
this.menuStrip = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.creditsEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.deleteUnusedBINKAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.howToAddSongsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.whatIsEachCategoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.howToEditCreditsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.optimizeDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.bINKACompressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.treeView2 = new System.Windows.Forms.TreeView();
|
||||
this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.addEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.verifyFileLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.playOverworldInCreative = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.compressionUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.menuStrip.SuspendLayout();
|
||||
this.contextMenuStrip2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// treeView1
|
||||
//
|
||||
resources.ApplyResources(this.treeView1, "treeView1");
|
||||
this.treeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.treeView1.ContextMenuStrip = this.contextMenuStrip1;
|
||||
this.treeView1.ForeColor = System.Drawing.Color.White;
|
||||
this.treeView1.ImageList = this.catImages;
|
||||
this.treeView1.LabelEdit = true;
|
||||
this.treeView1.Name = "treeView1";
|
||||
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
|
||||
this.treeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown);
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AudioEditor));
|
||||
this.treeView1 = new System.Windows.Forms.TreeView();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.addCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.changeCategoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.catImages = new System.Windows.Forms.ImageList(this.components);
|
||||
this.menuStrip = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.deleteUnusedBINKAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.organizeTracksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.howToAddSongsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.whatIsEachCategoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.howToEditCreditsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.optimizeDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.bINKACompressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.treeView2 = new System.Windows.Forms.TreeView();
|
||||
this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.addEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.verifyFileLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.convertToWAVToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.playOverworldInCreative = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.compressionUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.menuStrip.SuspendLayout();
|
||||
this.contextMenuStrip2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// treeView1
|
||||
//
|
||||
resources.ApplyResources(this.treeView1, "treeView1");
|
||||
this.treeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.treeView1.ContextMenuStrip = this.contextMenuStrip1;
|
||||
this.treeView1.ForeColor = System.Drawing.Color.White;
|
||||
this.treeView1.ImageList = this.catImages;
|
||||
this.treeView1.LabelEdit = true;
|
||||
this.treeView1.Name = "treeView1";
|
||||
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
|
||||
this.treeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown);
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addCategoryStripMenuItem,
|
||||
this.removeCategoryStripMenuItem});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1");
|
||||
//
|
||||
// addCategoryStripMenuItem
|
||||
//
|
||||
resources.ApplyResources(this.addCategoryStripMenuItem, "addCategoryStripMenuItem");
|
||||
this.addCategoryStripMenuItem.Name = "addCategoryStripMenuItem";
|
||||
this.addCategoryStripMenuItem.Click += new System.EventHandler(this.addCategoryStripMenuItem_Click);
|
||||
//
|
||||
// removeCategoryStripMenuItem
|
||||
//
|
||||
this.removeCategoryStripMenuItem.Name = "removeCategoryStripMenuItem";
|
||||
resources.ApplyResources(this.removeCategoryStripMenuItem, "removeCategoryStripMenuItem");
|
||||
this.removeCategoryStripMenuItem.Click += new System.EventHandler(this.removeCategoryStripMenuItem_Click);
|
||||
//
|
||||
// catImages
|
||||
//
|
||||
this.catImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("catImages.ImageStream")));
|
||||
this.catImages.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.catImages.Images.SetKeyName(0, "0_overworld.png");
|
||||
this.catImages.Images.SetKeyName(1, "1_nether.png");
|
||||
this.catImages.Images.SetKeyName(2, "2_end.png");
|
||||
this.catImages.Images.SetKeyName(3, "4_creative.png");
|
||||
this.catImages.Images.SetKeyName(4, "3_menu.png");
|
||||
this.catImages.Images.SetKeyName(5, "5_mg01.png");
|
||||
this.catImages.Images.SetKeyName(6, "6_mg02.png");
|
||||
this.catImages.Images.SetKeyName(7, "7_mg03.png");
|
||||
this.catImages.Images.SetKeyName(8, "8_unused.png");
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
resources.ApplyResources(this.menuStrip, "menuStrip");
|
||||
this.menuStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.removeCategoryStripMenuItem,
|
||||
this.changeCategoryToolStripMenuItem});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1");
|
||||
//
|
||||
// addCategoryStripMenuItem
|
||||
//
|
||||
resources.ApplyResources(this.addCategoryStripMenuItem, "addCategoryStripMenuItem");
|
||||
this.addCategoryStripMenuItem.Name = "addCategoryStripMenuItem";
|
||||
this.addCategoryStripMenuItem.Click += new System.EventHandler(this.addCategoryStripMenuItem_Click);
|
||||
//
|
||||
// removeCategoryStripMenuItem
|
||||
//
|
||||
this.removeCategoryStripMenuItem.Name = "removeCategoryStripMenuItem";
|
||||
resources.ApplyResources(this.removeCategoryStripMenuItem, "removeCategoryStripMenuItem");
|
||||
this.removeCategoryStripMenuItem.Click += new System.EventHandler(this.removeCategoryStripMenuItem_Click);
|
||||
//
|
||||
// changeCategoryToolStripMenuItem
|
||||
//
|
||||
this.changeCategoryToolStripMenuItem.Name = "changeCategoryToolStripMenuItem";
|
||||
resources.ApplyResources(this.changeCategoryToolStripMenuItem, "changeCategoryToolStripMenuItem");
|
||||
this.changeCategoryToolStripMenuItem.Click += new System.EventHandler(this.setCategoryToolStripMenuItem_Click);
|
||||
//
|
||||
// catImages
|
||||
//
|
||||
this.catImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("catImages.ImageStream")));
|
||||
this.catImages.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.catImages.Images.SetKeyName(0, "0_overworld.png");
|
||||
this.catImages.Images.SetKeyName(1, "1_nether.png");
|
||||
this.catImages.Images.SetKeyName(2, "2_end.png");
|
||||
this.catImages.Images.SetKeyName(3, "4_creative.png");
|
||||
this.catImages.Images.SetKeyName(4, "3_menu.png");
|
||||
this.catImages.Images.SetKeyName(5, "5_mg01.png");
|
||||
this.catImages.Images.SetKeyName(6, "6_mg02.png");
|
||||
this.catImages.Images.SetKeyName(7, "7_mg03.png");
|
||||
this.catImages.Images.SetKeyName(8, "8_unused.png");
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
resources.ApplyResources(this.menuStrip, "menuStrip");
|
||||
this.menuStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.toolsToolStripMenuItem,
|
||||
this.helpToolStripMenuItem});
|
||||
this.menuStrip.Name = "menuStrip";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.menuStrip.Name = "menuStrip";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.saveToolStripMenuItem1});
|
||||
this.fileToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
resources.ApplyResources(this.fileToolStripMenuItem, "fileToolStripMenuItem");
|
||||
//
|
||||
// saveToolStripMenuItem1
|
||||
//
|
||||
resources.ApplyResources(this.saveToolStripMenuItem1, "saveToolStripMenuItem1");
|
||||
this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1";
|
||||
this.saveToolStripMenuItem1.Click += new System.EventHandler(this.saveToolStripMenuItem1_Click);
|
||||
//
|
||||
// toolsToolStripMenuItem
|
||||
//
|
||||
this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.creditsEditorToolStripMenuItem,
|
||||
this.fileToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
resources.ApplyResources(this.fileToolStripMenuItem, "fileToolStripMenuItem");
|
||||
//
|
||||
// saveToolStripMenuItem1
|
||||
//
|
||||
resources.ApplyResources(this.saveToolStripMenuItem1, "saveToolStripMenuItem1");
|
||||
this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1";
|
||||
this.saveToolStripMenuItem1.Click += new System.EventHandler(this.saveToolStripMenuItem1_Click);
|
||||
//
|
||||
// toolsToolStripMenuItem
|
||||
//
|
||||
this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.deleteUnusedBINKAsToolStripMenuItem,
|
||||
this.openDataFolderToolStripMenuItem,
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem});
|
||||
this.toolsToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
|
||||
resources.ApplyResources(this.toolsToolStripMenuItem, "toolsToolStripMenuItem");
|
||||
//
|
||||
// creditsEditorToolStripMenuItem
|
||||
//
|
||||
this.creditsEditorToolStripMenuItem.Name = "creditsEditorToolStripMenuItem";
|
||||
resources.ApplyResources(this.creditsEditorToolStripMenuItem, "creditsEditorToolStripMenuItem");
|
||||
this.creditsEditorToolStripMenuItem.Click += new System.EventHandler(this.creditsEditorToolStripMenuItem_Click);
|
||||
//
|
||||
// deleteUnusedBINKAsToolStripMenuItem
|
||||
//
|
||||
this.deleteUnusedBINKAsToolStripMenuItem.Name = "deleteUnusedBINKAsToolStripMenuItem";
|
||||
resources.ApplyResources(this.deleteUnusedBINKAsToolStripMenuItem, "deleteUnusedBINKAsToolStripMenuItem");
|
||||
this.deleteUnusedBINKAsToolStripMenuItem.Click += new System.EventHandler(this.deleteUnusedBINKAsToolStripMenuItem_Click);
|
||||
//
|
||||
// openDataFolderToolStripMenuItem
|
||||
//
|
||||
this.openDataFolderToolStripMenuItem.Name = "openDataFolderToolStripMenuItem";
|
||||
resources.ApplyResources(this.openDataFolderToolStripMenuItem, "openDataFolderToolStripMenuItem");
|
||||
this.openDataFolderToolStripMenuItem.Click += new System.EventHandler(this.openDataFolderToolStripMenuItem_Click);
|
||||
//
|
||||
// bulkReplaceExistingTracksToolStripMenuItem
|
||||
//
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem.Name = "bulkReplaceExistingTracksToolStripMenuItem";
|
||||
resources.ApplyResources(this.bulkReplaceExistingTracksToolStripMenuItem, "bulkReplaceExistingTracksToolStripMenuItem");
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem.Click += new System.EventHandler(this.bulkReplaceExistingFilesToolStripMenuItem_Click);
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem,
|
||||
this.organizeTracksToolStripMenuItem});
|
||||
this.toolsToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
|
||||
resources.ApplyResources(this.toolsToolStripMenuItem, "toolsToolStripMenuItem");
|
||||
//
|
||||
// deleteUnusedBINKAsToolStripMenuItem
|
||||
//
|
||||
this.deleteUnusedBINKAsToolStripMenuItem.Name = "deleteUnusedBINKAsToolStripMenuItem";
|
||||
resources.ApplyResources(this.deleteUnusedBINKAsToolStripMenuItem, "deleteUnusedBINKAsToolStripMenuItem");
|
||||
this.deleteUnusedBINKAsToolStripMenuItem.Click += new System.EventHandler(this.deleteUnusedBINKAsToolStripMenuItem_Click);
|
||||
//
|
||||
// openDataFolderToolStripMenuItem
|
||||
//
|
||||
this.openDataFolderToolStripMenuItem.Name = "openDataFolderToolStripMenuItem";
|
||||
resources.ApplyResources(this.openDataFolderToolStripMenuItem, "openDataFolderToolStripMenuItem");
|
||||
this.openDataFolderToolStripMenuItem.Click += new System.EventHandler(this.openDataFolderToolStripMenuItem_Click);
|
||||
//
|
||||
// bulkReplaceExistingTracksToolStripMenuItem
|
||||
//
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem.Name = "bulkReplaceExistingTracksToolStripMenuItem";
|
||||
resources.ApplyResources(this.bulkReplaceExistingTracksToolStripMenuItem, "bulkReplaceExistingTracksToolStripMenuItem");
|
||||
this.bulkReplaceExistingTracksToolStripMenuItem.Click += new System.EventHandler(this.bulkReplaceExistingFilesToolStripMenuItem_Click);
|
||||
//
|
||||
// organizeTracksToolStripMenuItem
|
||||
//
|
||||
this.organizeTracksToolStripMenuItem.Name = "organizeTracksToolStripMenuItem";
|
||||
resources.ApplyResources(this.organizeTracksToolStripMenuItem, "organizeTracksToolStripMenuItem");
|
||||
this.organizeTracksToolStripMenuItem.Click += new System.EventHandler(this.organizeTracksToolStripMenuItem_Click);
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.howToAddSongsToolStripMenuItem,
|
||||
this.whatIsEachCategoryToolStripMenuItem,
|
||||
this.howToEditCreditsToolStripMenuItem,
|
||||
this.optimizeDataFolderToolStripMenuItem,
|
||||
this.bINKACompressionToolStripMenuItem});
|
||||
this.helpToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
resources.ApplyResources(this.helpToolStripMenuItem, "helpToolStripMenuItem");
|
||||
this.organizeTracksToolStripMenuItem.Name = "organizeTracksToolStripMenuItem";
|
||||
resources.ApplyResources(this.organizeTracksToolStripMenuItem, "organizeTracksToolStripMenuItem");
|
||||
this.organizeTracksToolStripMenuItem.Click += new System.EventHandler(this.organizeTracksToolStripMenuItem_Click);
|
||||
//
|
||||
// howToAddSongsToolStripMenuItem
|
||||
//
|
||||
this.howToAddSongsToolStripMenuItem.Name = "howToAddSongsToolStripMenuItem";
|
||||
resources.ApplyResources(this.howToAddSongsToolStripMenuItem, "howToAddSongsToolStripMenuItem");
|
||||
this.howToAddSongsToolStripMenuItem.Click += new System.EventHandler(this.howToAddSongsToolStripMenuItem_Click);
|
||||
//
|
||||
// whatIsEachCategoryToolStripMenuItem
|
||||
//
|
||||
this.whatIsEachCategoryToolStripMenuItem.Name = "whatIsEachCategoryToolStripMenuItem";
|
||||
resources.ApplyResources(this.whatIsEachCategoryToolStripMenuItem, "whatIsEachCategoryToolStripMenuItem");
|
||||
this.whatIsEachCategoryToolStripMenuItem.Click += new System.EventHandler(this.whatIsEachCategoryToolStripMenuItem_Click);
|
||||
//
|
||||
// howToEditCreditsToolStripMenuItem
|
||||
//
|
||||
this.howToEditCreditsToolStripMenuItem.Name = "howToEditCreditsToolStripMenuItem";
|
||||
resources.ApplyResources(this.howToEditCreditsToolStripMenuItem, "howToEditCreditsToolStripMenuItem");
|
||||
this.howToEditCreditsToolStripMenuItem.Click += new System.EventHandler(this.howToEditCreditsToolStripMenuItem_Click);
|
||||
//
|
||||
// optimizeDataFolderToolStripMenuItem
|
||||
//
|
||||
this.optimizeDataFolderToolStripMenuItem.Name = "optimizeDataFolderToolStripMenuItem";
|
||||
resources.ApplyResources(this.optimizeDataFolderToolStripMenuItem, "optimizeDataFolderToolStripMenuItem");
|
||||
this.optimizeDataFolderToolStripMenuItem.Click += new System.EventHandler(this.optimizeDataFolderToolStripMenuItem_Click);
|
||||
//
|
||||
// bINKACompressionToolStripMenuItem
|
||||
//
|
||||
this.bINKACompressionToolStripMenuItem.Name = "bINKACompressionToolStripMenuItem";
|
||||
resources.ApplyResources(this.bINKACompressionToolStripMenuItem, "bINKACompressionToolStripMenuItem");
|
||||
this.bINKACompressionToolStripMenuItem.Click += new System.EventHandler(this.BINKACompressionToolStripMenuItem_Click);
|
||||
//
|
||||
// treeView2
|
||||
//
|
||||
this.treeView2.AllowDrop = true;
|
||||
resources.ApplyResources(this.treeView2, "treeView2");
|
||||
this.treeView2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.treeView2.ContextMenuStrip = this.contextMenuStrip2;
|
||||
this.treeView2.ForeColor = System.Drawing.Color.White;
|
||||
this.treeView2.Name = "treeView2";
|
||||
// helpToolStripMenuItem
|
||||
this.helpToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
resources.ApplyResources(this.helpToolStripMenuItem, "helpToolStripMenuItem");
|
||||
//
|
||||
// howToAddSongsToolStripMenuItem
|
||||
//
|
||||
this.howToAddSongsToolStripMenuItem.Name = "howToAddSongsToolStripMenuItem";
|
||||
resources.ApplyResources(this.howToAddSongsToolStripMenuItem, "howToAddSongsToolStripMenuItem");
|
||||
this.howToAddSongsToolStripMenuItem.Click += new System.EventHandler(this.howToAddSongsToolStripMenuItem_Click);
|
||||
//
|
||||
// whatAreTheCategoriesToolStripMenuItem
|
||||
//
|
||||
this.whatIsEachCategoryToolStripMenuItem.Name = "whatIsEachCategoryToolStripMenuItem";
|
||||
resources.ApplyResources(this.whatIsEachCategoryToolStripMenuItem, "whatIsEachCategoryToolStripMenuItem");
|
||||
this.whatIsEachCategoryToolStripMenuItem.Click += new System.EventHandler(this.whatIsEachCategoryToolStripMenuItem_Click);
|
||||
//
|
||||
// howToEditCreditsToolStripMenuItem
|
||||
//
|
||||
this.howToEditCreditsToolStripMenuItem.Name = "howToEditCreditsToolStripMenuItem";
|
||||
resources.ApplyResources(this.howToEditCreditsToolStripMenuItem, "howToEditCreditsToolStripMenuItem");
|
||||
this.howToEditCreditsToolStripMenuItem.Click += new System.EventHandler(this.howToEditCreditsToolStripMenuItem_Click);
|
||||
//
|
||||
// optimizeDataFolderToolStripMenuItem
|
||||
//
|
||||
this.optimizeDataFolderToolStripMenuItem.Name = "optimizeDataFolderToolStripMenuItem";
|
||||
resources.ApplyResources(this.optimizeDataFolderToolStripMenuItem, "optimizeDataFolderToolStripMenuItem");
|
||||
this.optimizeDataFolderToolStripMenuItem.Click += new System.EventHandler(this.optimizeDataFolderToolStripMenuItem_Click);
|
||||
//
|
||||
// bINKACompressionToolStripMenuItem
|
||||
//
|
||||
this.bINKACompressionToolStripMenuItem.Name = "bINKACompressionToolStripMenuItem";
|
||||
resources.ApplyResources(this.bINKACompressionToolStripMenuItem, "bINKACompressionToolStripMenuItem");
|
||||
this.bINKACompressionToolStripMenuItem.Click += new System.EventHandler(this.BINKACompressionToolStripMenuItem_Click);
|
||||
//
|
||||
// treeView2
|
||||
//
|
||||
this.treeView2.AllowDrop = true;
|
||||
resources.ApplyResources(this.treeView2, "treeView2");
|
||||
this.treeView2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.treeView2.ContextMenuStrip = this.contextMenuStrip2;
|
||||
this.treeView2.ForeColor = System.Drawing.Color.White;
|
||||
this.treeView2.Name = "treeView2";
|
||||
this.treeView2.DragDrop += new System.Windows.Forms.DragEventHandler(this.Binka_DragDrop);
|
||||
this.treeView2.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeView2_DragEnter);
|
||||
this.treeView2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView2_KeyDown);
|
||||
//
|
||||
// contextMenuStrip2
|
||||
//
|
||||
this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.verifyFileLocationToolStripMenuItem,
|
||||
this.convertToWAVToolStripMenuItem});
|
||||
this.treeView2.DragDrop += new System.Windows.Forms.DragEventHandler(this.Binka_DragDrop);
|
||||
this.treeView2.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeView2_DragEnter);
|
||||
this.treeView2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView2_KeyDown);
|
||||
//
|
||||
// contextMenuStrip2
|
||||
//
|
||||
this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addEntryMenuItem,
|
||||
this.removeEntryMenuItem,
|
||||
this.verifyFileLocationToolStripMenuItem});
|
||||
this.contextMenuStrip2.Name = "contextMenuStrip1";
|
||||
resources.ApplyResources(this.contextMenuStrip2, "contextMenuStrip2");
|
||||
//
|
||||
// addEntryMenuItem
|
||||
//
|
||||
resources.ApplyResources(this.addEntryMenuItem, "addEntryMenuItem");
|
||||
this.addEntryMenuItem.Name = "addEntryMenuItem";
|
||||
this.addEntryMenuItem.Click += new System.EventHandler(this.addEntryMenuItem_Click);
|
||||
//
|
||||
// removeEntryMenuItem
|
||||
//
|
||||
this.removeEntryMenuItem.Name = "removeEntryMenuItem";
|
||||
resources.ApplyResources(this.removeEntryMenuItem, "removeEntryMenuItem");
|
||||
this.removeEntryMenuItem.Click += new System.EventHandler(this.removeEntryMenuItem_Click);
|
||||
//
|
||||
// verifyFileLocationToolStripMenuItem
|
||||
//
|
||||
this.verifyFileLocationToolStripMenuItem.Name = "verifyFileLocationToolStripMenuItem";
|
||||
resources.ApplyResources(this.verifyFileLocationToolStripMenuItem, "verifyFileLocationToolStripMenuItem");
|
||||
this.verifyFileLocationToolStripMenuItem.Click += new System.EventHandler(this.verifyFileLocationToolStripMenuItem_Click);
|
||||
//
|
||||
// playOverworldInCreative
|
||||
//
|
||||
resources.ApplyResources(this.playOverworldInCreative, "playOverworldInCreative");
|
||||
this.playOverworldInCreative.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.playOverworldInCreative.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.playOverworldInCreative.Name = "playOverworldInCreative";
|
||||
this.playOverworldInCreative.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.playOverworldInCreative.UseCustomBackColor = true;
|
||||
this.playOverworldInCreative.UseCustomForeColor = true;
|
||||
this.playOverworldInCreative.UseSelectable = true;
|
||||
this.contextMenuStrip2.Name = "contextMenuStrip1";
|
||||
resources.ApplyResources(this.contextMenuStrip2, "contextMenuStrip2");
|
||||
//
|
||||
// addEntryMenuItem
|
||||
//
|
||||
resources.ApplyResources(this.addEntryMenuItem, "addEntryMenuItem");
|
||||
this.addEntryMenuItem.Name = "addEntryMenuItem";
|
||||
this.addEntryMenuItem.Click += new System.EventHandler(this.addEntryMenuItem_Click);
|
||||
//
|
||||
// removeEntryMenuItem
|
||||
//
|
||||
this.removeEntryMenuItem.Name = "removeEntryMenuItem";
|
||||
resources.ApplyResources(this.removeEntryMenuItem, "removeEntryMenuItem");
|
||||
this.removeEntryMenuItem.Click += new System.EventHandler(this.removeEntryMenuItem_Click);
|
||||
//
|
||||
// verifyFileLocationToolStripMenuItem
|
||||
//
|
||||
this.verifyFileLocationToolStripMenuItem.Name = "verifyFileLocationToolStripMenuItem";
|
||||
resources.ApplyResources(this.verifyFileLocationToolStripMenuItem, "verifyFileLocationToolStripMenuItem");
|
||||
this.verifyFileLocationToolStripMenuItem.Click += new System.EventHandler(this.verifyFileLocationToolStripMenuItem_Click);
|
||||
//
|
||||
// convertToWAVToolStripMenuItem
|
||||
//
|
||||
this.convertToWAVToolStripMenuItem.Name = "convertToWAVToolStripMenuItem";
|
||||
resources.ApplyResources(this.convertToWAVToolStripMenuItem, "convertToWAVToolStripMenuItem");
|
||||
this.convertToWAVToolStripMenuItem.Click += new System.EventHandler(this.convertToWAVToolStripMenuItem_Click);
|
||||
//
|
||||
// playOverworldInCreative
|
||||
//
|
||||
resources.ApplyResources(this.playOverworldInCreative, "playOverworldInCreative");
|
||||
this.playOverworldInCreative.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.playOverworldInCreative.ForeColor = System.Drawing.SystemColors.Window;
|
||||
this.playOverworldInCreative.Name = "playOverworldInCreative";
|
||||
this.playOverworldInCreative.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.playOverworldInCreative.UseCustomBackColor = true;
|
||||
this.playOverworldInCreative.UseCustomForeColor = true;
|
||||
this.playOverworldInCreative.UseSelectable = true;
|
||||
//
|
||||
// compressionUpDown
|
||||
//
|
||||
resources.ApplyResources(this.compressionUpDown, "compressionUpDown");
|
||||
this.compressionUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.compressionUpDown.BackColor = System.Drawing.Color.FromArgb(64, 64, 64);
|
||||
this.compressionUpDown.ForeColor = System.Drawing.SystemColors.Window;
|
||||
resources.ApplyResources(this.compressionUpDown, "compressionUpDown");
|
||||
this.compressionUpDown.Maximum = new decimal(new int[] {
|
||||
9,
|
||||
0,
|
||||
@@ -276,31 +295,34 @@ namespace PckStudio.Forms.Editor
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.compressionUpDown.Name = "compressionUpDown";
|
||||
this.compressionUpDown.Value = new decimal(new int[] {
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
resources.ApplyResources(this.metroLabel1, "metroLabel1");
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// AudioEditor
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.Controls.Add(this.metroLabel1);
|
||||
this.Controls.Add(this.compressionUpDown);
|
||||
this.Controls.Add(this.playOverworldInCreative);
|
||||
this.Controls.Add(this.treeView1);
|
||||
this.Controls.Add(this.treeView2);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// AudioEditor
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.metroLabel1);
|
||||
this.Controls.Add(this.compressionUpDown);
|
||||
this.Controls.Add(this.playOverworldInCreative);
|
||||
this.Controls.Add(this.treeView1);
|
||||
this.Controls.Add(this.treeView2);
|
||||
this.Controls.Add(this.menuStrip);
|
||||
this.Name = "AudioEditor";
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.AudioEditor_FormClosed);
|
||||
this.Shown += new System.EventHandler(this.AudioEditor_Shown);
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.menuStrip.ResumeLayout(false);
|
||||
this.menuStrip.PerformLayout();
|
||||
this.contextMenuStrip2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.Controls.Add(this.menuStrip);
|
||||
this.ForeColor = System.Drawing.Color.White;
|
||||
this.Name = "AudioEditor";
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.AudioEditor_FormClosed);
|
||||
this.Shown += new System.EventHandler(this.AudioEditor_Shown);
|
||||
@@ -330,7 +352,6 @@ namespace PckStudio.Forms.Editor
|
||||
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
|
||||
private System.Windows.Forms.ImageList catImages;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem creditsEditorToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem verifyFileLocationToolStripMenuItem;
|
||||
private MetroFramework.Controls.MetroCheckBox playOverworldInCreative;
|
||||
private System.Windows.Forms.ToolStripMenuItem deleteUnusedBINKAsToolStripMenuItem;
|
||||
|
||||
@@ -16,10 +16,8 @@ using PckStudio.Classes.IO.PCK;
|
||||
using OMI.Formats.Languages;
|
||||
using OMI.Formats.Pck;
|
||||
using PckStudio.Forms.Additional_Popups;
|
||||
using PckStudio.Forms.Additional_Popups.Audio;
|
||||
|
||||
// Audio Editor by MattNL
|
||||
// additional work and optimization by Miku-666
|
||||
// Audio Editor by MattNL and Miku-666
|
||||
|
||||
namespace PckStudio.Forms.Editor
|
||||
{
|
||||
@@ -28,7 +26,6 @@ namespace PckStudio.Forms.Editor
|
||||
public string defaultType = "yes";
|
||||
PckAudioFile audioFile = null;
|
||||
PckFile.FileData audioPCK;
|
||||
LOCFile loc;
|
||||
bool _isLittleEndian = false;
|
||||
MainForm parent = null;
|
||||
|
||||
@@ -56,10 +53,9 @@ namespace PckStudio.Forms.Editor
|
||||
return (PckAudioFile.AudioCategory.EAudioType)Categories.IndexOf(category);
|
||||
}
|
||||
|
||||
public AudioEditor(PckFile.FileData file, LOCFile locFile, bool isLittleEndian)
|
||||
public AudioEditor(PckFile.FileData file, bool isLittleEndian)
|
||||
{
|
||||
InitializeComponent();
|
||||
loc = locFile;
|
||||
_isLittleEndian = isLittleEndian;
|
||||
|
||||
audioPCK = file;
|
||||
@@ -76,9 +72,15 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
treeView1.BeginUpdate();
|
||||
treeView1.Nodes.Clear();
|
||||
|
||||
foreach (var category in audioFile.Categories)
|
||||
{
|
||||
if(category.audioType == PckAudioFile.AudioCategory.EAudioType.Creative)
|
||||
// fix songs with directories using backslash instead of forward slash
|
||||
// Songs with a backslash instead of a forward slash would not play in RPCS3
|
||||
foreach (string songname in category.SongNames.FindAll(s => s.Contains('\\')))
|
||||
category.SongNames[category.SongNames.IndexOf(songname)] = songname.Replace('\\', '/');
|
||||
|
||||
if (category.audioType == PckAudioFile.AudioCategory.EAudioType.Creative)
|
||||
{
|
||||
if (category.Name == "include_overworld" &&
|
||||
audioFile.TryGetCategory(PckAudioFile.AudioCategory.EAudioType.Overworld, out PckAudioFile.AudioCategory overworldCategory))
|
||||
@@ -419,14 +421,6 @@ namespace PckStudio.Forms.Editor
|
||||
"You can edit the credits for the PCK in the Credits editor! No more managing credit IDs!\n\n", "Help");
|
||||
}
|
||||
|
||||
private void creditsEditorToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var credits = audioFile.GetCreditsString();
|
||||
using (CreditsEditor prompt = new CreditsEditor(credits))
|
||||
if (prompt.ShowDialog() == DialogResult.OK)
|
||||
audioFile.SetCredits(prompt.Credits.Split('\n'));
|
||||
}
|
||||
|
||||
private void deleteUnusedBINKAsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult dr = MessageBox.Show("This will delete all unused BINKA songs in the Data directory. This cannot be undone. Are you sure you want to continue?", "Warning", MessageBoxButtons.YesNo);
|
||||
@@ -610,12 +604,14 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
string song = category.SongNames[i];
|
||||
string songpath = Path.Combine(parent.GetDataPath(), song + ".binka");
|
||||
if (File.Exists(songpath))
|
||||
string new_path = Path.Combine(musicdir, Path.GetFileName(song) + ".binka");
|
||||
if (File.Exists(songpath) && !File.Exists(new_path))
|
||||
{
|
||||
File.Move(songpath, Path.Combine(musicdir, song + ".binka"));
|
||||
}
|
||||
File.Move(songpath, new_path);
|
||||
|
||||
category.SongNames[i] = Path.Combine("Music", song.Replace(song, Path.GetFileNameWithoutExtension(songpath)));
|
||||
// Songs with a backslash instead of a forward slash were not playing in RPCS3
|
||||
category.SongNames[i] = "Music/" + song.Replace(song, Path.GetFileNameWithoutExtension(songpath));
|
||||
}
|
||||
}
|
||||
}
|
||||
treeView2.Nodes.Clear();
|
||||
|
||||
@@ -145,6 +145,12 @@
|
||||
<data name="removeCategoryStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Remove Category</value>
|
||||
</data>
|
||||
<data name="changeCategoryToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 22</value>
|
||||
</data>
|
||||
<data name="changeCategoryToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Set Category</value>
|
||||
</data>
|
||||
<data name="contextMenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>169, 48</value>
|
||||
</data>
|
||||
@@ -166,7 +172,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADk
|
||||
MAAAAk1TRnQBSQFMAgEBCQEAAZgBAAGYAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
||||
MAAAAk1TRnQBSQFMAgEBCQEAAbABAAGwAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
||||
AwABMAMAAQEBAAEgBgABMBIAAzgB/wM1Af8DNQH/AzMB/wMwAf8DLwH/Ay0B/wMtAf8DJAH/AzsB/wM4
|
||||
Af8DNQH/Ay0B/wMnAf8DNgH/AzIB/8AAAzgB/wN/Af8DeQH/A3kB/wN5Af8DcQH/A3EB/wN5Af8DeQH/
|
||||
A3EB/wNxAf8DcQH/A3kB/wN5Af8DfwH/AzIB/8AAAzIB/wN2Af8DsAH/A7AB/wOvAf8DrwH/A68B/wOo
|
||||
@@ -404,68 +410,12 @@
|
||||
<data name=">>treeView1.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="addCategoryStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAABSSURBVDhP5c0x
|
||||
DsAgDENRxt7/wmkNSpRGf0CCCZAegxNMM7MlGMp3dIU6dxhKf/QMNxRogeQC8ivw5Vn7C0heJlFA+kL5
|
||||
jWAohxRkde4wnGftBS90axNmphIGAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="addCategoryStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 22</value>
|
||||
</data>
|
||||
<data name="addCategoryStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Add Category</value>
|
||||
</data>
|
||||
<data name="removeCategoryStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 22</value>
|
||||
</data>
|
||||
<data name="removeCategoryStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Remove Category</value>
|
||||
</data>
|
||||
<data name="changeCategoryToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 22</value>
|
||||
</data>
|
||||
<data name="changeCategoryToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Set Category</value>
|
||||
</data>
|
||||
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>19, 8</value>
|
||||
</metadata>
|
||||
<data name="menuStrip.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="menuStrip.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>20, 60</value>
|
||||
</data>
|
||||
<data name="menuStrip.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>410, 24</value>
|
||||
</data>
|
||||
<data name="menuStrip.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="menuStrip.Text" xml:space="preserve">
|
||||
<value>menuStrip1</value>
|
||||
</data>
|
||||
<data name=">>menuStrip.Name" xml:space="preserve">
|
||||
<value>menuStrip</value>
|
||||
</data>
|
||||
<data name=">>menuStrip.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>menuStrip.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>menuStrip.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="fileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>37, 20</value>
|
||||
</data>
|
||||
<data name="fileToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>File</value>
|
||||
</data>
|
||||
<data name="saveToolStripMenuItem1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
@@ -482,17 +432,11 @@
|
||||
<data name="saveToolStripMenuItem1.Text" xml:space="preserve">
|
||||
<value>Save</value>
|
||||
</data>
|
||||
<data name="toolsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>46, 20</value>
|
||||
<data name="fileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>37, 20</value>
|
||||
</data>
|
||||
<data name="toolsToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Tools</value>
|
||||
</data>
|
||||
<data name="creditsEditorToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>220, 22</value>
|
||||
</data>
|
||||
<data name="creditsEditorToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Credits Editor</value>
|
||||
<data name="fileToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>File</value>
|
||||
</data>
|
||||
<data name="deleteUnusedBINKAsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>220, 22</value>
|
||||
@@ -515,8 +459,14 @@
|
||||
<data name="toolsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>46, 20</value>
|
||||
</data>
|
||||
<data name="helpToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Help</value>
|
||||
<data name="organizeTracksToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Organize Tracks</value>
|
||||
</data>
|
||||
<data name="toolsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>46, 20</value>
|
||||
</data>
|
||||
<data name="toolsToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Tools</value>
|
||||
</data>
|
||||
<data name="howToAddSongsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
@@ -552,10 +502,10 @@
|
||||
<value>Help</value>
|
||||
</data>
|
||||
<data name="menuStrip.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
<value>20, 60</value>
|
||||
</data>
|
||||
<data name="menuStrip.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>450, 24</value>
|
||||
<value>410, 24</value>
|
||||
</data>
|
||||
<data name="menuStrip.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
@@ -590,31 +540,31 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="addEntryMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>173, 22</value>
|
||||
</data>
|
||||
<data name="addEntryMenuItem.Text" xml:space="preserve">
|
||||
<value>Add Entry</value>
|
||||
</data>
|
||||
<data name="removeEntryMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>173, 22</value>
|
||||
</data>
|
||||
<data name="removeEntryMenuItem.Text" xml:space="preserve">
|
||||
<value>Remove Entry</value>
|
||||
</data>
|
||||
<data name="verifyFileLocationToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>173, 22</value>
|
||||
</data>
|
||||
<data name="verifyFileLocationToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Verify File Location</value>
|
||||
</data>
|
||||
<data name="convertToWAVToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>173, 22</value>
|
||||
</data>
|
||||
<data name="convertToWAVToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Convert To WAV</value>
|
||||
</data>
|
||||
<data name="contextMenuStrip2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>181, 114</value>
|
||||
<value>174, 92</value>
|
||||
</data>
|
||||
<data name=">>contextMenuStrip2.Name" xml:space="preserve">
|
||||
<value>contextMenuStrip2</value>
|
||||
@@ -3293,12 +3243,6 @@
|
||||
<data name=">>toolsToolStripMenuItem.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>creditsEditorToolStripMenuItem.Name" xml:space="preserve">
|
||||
<value>creditsEditorToolStripMenuItem</value>
|
||||
</data>
|
||||
<data name=">>creditsEditorToolStripMenuItem.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>deleteUnusedBINKAsToolStripMenuItem.Name" xml:space="preserve">
|
||||
<value>deleteUnusedBINKAsToolStripMenuItem</value>
|
||||
</data>
|
||||
|
||||
499
PCK-Studio/Forms/Editor/BehaviourEditor.Designer.cs
generated
@@ -28,269 +28,284 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BehaviourEditor));
|
||||
this.treeView1 = new System.Windows.Forms.TreeView();
|
||||
this.metroContextMenu1 = new MetroFramework.Controls.MetroContextMenu(this.components);
|
||||
this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addNewEntryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addNewPositionOverrideToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.renameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.MobIsTamedCheckbox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.MobHasSaddleCheckbox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.zUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.yUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.zLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.yLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.xUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.xLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroContextMenu1.SuspendLayout();
|
||||
this.menuStrip.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.zUpDown)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.yUpDown)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// treeView1
|
||||
//
|
||||
this.treeView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BehaviourEditor));
|
||||
this.treeView1 = new System.Windows.Forms.TreeView();
|
||||
this.metroContextMenu1 = new MetroFramework.Controls.MetroContextMenu(this.components);
|
||||
this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addNewEntryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addNewPositionOverrideToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.renameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.MobIsTamedCheckbox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.MobHasSaddleCheckbox = new MetroFramework.Controls.MetroCheckBox();
|
||||
this.zUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.yUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.zLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.yLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.xUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.xLabel = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroContextMenu1.SuspendLayout();
|
||||
this.menuStrip.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.zUpDown)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.yUpDown)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// treeView1
|
||||
//
|
||||
this.treeView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.treeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.treeView1.ContextMenuStrip = this.metroContextMenu1;
|
||||
this.treeView1.ForeColor = System.Drawing.Color.White;
|
||||
this.treeView1.Location = new System.Drawing.Point(20, 84);
|
||||
this.treeView1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.treeView1.Name = "treeView1";
|
||||
this.treeView1.Size = new System.Drawing.Size(186, 176);
|
||||
this.treeView1.TabIndex = 13;
|
||||
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
|
||||
this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
|
||||
this.treeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown);
|
||||
this.treeView1.MouseHover += new System.EventHandler(this.treeView1_MouseHover);
|
||||
//
|
||||
// metroContextMenu1
|
||||
//
|
||||
this.metroContextMenu1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.treeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.treeView1.ContextMenuStrip = this.metroContextMenu1;
|
||||
this.treeView1.ForeColor = System.Drawing.Color.White;
|
||||
this.treeView1.Location = new System.Drawing.Point(20, 84);
|
||||
this.treeView1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.treeView1.Name = "treeView1";
|
||||
this.treeView1.Size = new System.Drawing.Size(186, 176);
|
||||
this.treeView1.TabIndex = 13;
|
||||
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
|
||||
this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
|
||||
this.treeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown);
|
||||
this.treeView1.MouseHover += new System.EventHandler(this.treeView1_MouseHover);
|
||||
//
|
||||
// metroContextMenu1
|
||||
//
|
||||
this.metroContextMenu1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addToolStripMenuItem,
|
||||
this.renameToolStripMenuItem,
|
||||
this.removeToolStripMenuItem});
|
||||
this.metroContextMenu1.Name = "metroContextMenu1";
|
||||
this.metroContextMenu1.Size = new System.Drawing.Size(118, 70);
|
||||
//
|
||||
// addToolStripMenuItem
|
||||
//
|
||||
this.addToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.metroContextMenu1.Name = "metroContextMenu1";
|
||||
this.metroContextMenu1.Size = new System.Drawing.Size(118, 70);
|
||||
//
|
||||
// addToolStripMenuItem
|
||||
//
|
||||
this.addToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addNewEntryToolStripMenuItem,
|
||||
this.addNewPositionOverrideToolStripMenuItem});
|
||||
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
|
||||
this.addToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
|
||||
this.addToolStripMenuItem.Text = "Add";
|
||||
//
|
||||
// addNewEntryToolStripMenuItem
|
||||
//
|
||||
this.addNewEntryToolStripMenuItem.Name = "addNewEntryToolStripMenuItem";
|
||||
this.addNewEntryToolStripMenuItem.Size = new System.Drawing.Size(217, 22);
|
||||
this.addNewEntryToolStripMenuItem.Text = "Add New Entry";
|
||||
this.addNewEntryToolStripMenuItem.Click += new System.EventHandler(this.addNewEntryToolStripMenuItem_Click);
|
||||
//
|
||||
// addNewPositionOverrideToolStripMenuItem
|
||||
//
|
||||
this.addNewPositionOverrideToolStripMenuItem.Name = "addNewPositionOverrideToolStripMenuItem";
|
||||
this.addNewPositionOverrideToolStripMenuItem.Size = new System.Drawing.Size(217, 22);
|
||||
this.addNewPositionOverrideToolStripMenuItem.Text = "Add New Position Override";
|
||||
this.addNewPositionOverrideToolStripMenuItem.Click += new System.EventHandler(this.addNewPositionOverrideToolStripMenuItem_Click);
|
||||
//
|
||||
// renameToolStripMenuItem
|
||||
//
|
||||
this.renameToolStripMenuItem.Name = "renameToolStripMenuItem";
|
||||
this.renameToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
|
||||
this.renameToolStripMenuItem.Text = "Change";
|
||||
this.renameToolStripMenuItem.Click += new System.EventHandler(this.changeToolStripMenuItem_Click);
|
||||
//
|
||||
// removeToolStripMenuItem
|
||||
//
|
||||
this.removeToolStripMenuItem.Name = "removeToolStripMenuItem";
|
||||
this.removeToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
|
||||
this.removeToolStripMenuItem.Text = "Remove";
|
||||
this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click);
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
this.menuStrip.AutoSize = false;
|
||||
this.menuStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
|
||||
this.addToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
|
||||
this.addToolStripMenuItem.Text = "Add";
|
||||
//
|
||||
// addNewEntryToolStripMenuItem
|
||||
//
|
||||
this.addNewEntryToolStripMenuItem.Name = "addNewEntryToolStripMenuItem";
|
||||
this.addNewEntryToolStripMenuItem.Size = new System.Drawing.Size(217, 22);
|
||||
this.addNewEntryToolStripMenuItem.Text = "Add New Entry";
|
||||
this.addNewEntryToolStripMenuItem.Click += new System.EventHandler(this.addNewEntryToolStripMenuItem_Click);
|
||||
//
|
||||
// addNewPositionOverrideToolStripMenuItem
|
||||
//
|
||||
this.addNewPositionOverrideToolStripMenuItem.Name = "addNewPositionOverrideToolStripMenuItem";
|
||||
this.addNewPositionOverrideToolStripMenuItem.Size = new System.Drawing.Size(217, 22);
|
||||
this.addNewPositionOverrideToolStripMenuItem.Text = "Add New Position Override";
|
||||
this.addNewPositionOverrideToolStripMenuItem.Click += new System.EventHandler(this.addNewPositionOverrideToolStripMenuItem_Click);
|
||||
//
|
||||
// renameToolStripMenuItem
|
||||
//
|
||||
this.renameToolStripMenuItem.Name = "renameToolStripMenuItem";
|
||||
this.renameToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
|
||||
this.renameToolStripMenuItem.Text = "Change";
|
||||
this.renameToolStripMenuItem.Click += new System.EventHandler(this.changeToolStripMenuItem_Click);
|
||||
//
|
||||
// removeToolStripMenuItem
|
||||
//
|
||||
this.removeToolStripMenuItem.Name = "removeToolStripMenuItem";
|
||||
this.removeToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
|
||||
this.removeToolStripMenuItem.Text = "Remove";
|
||||
this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click);
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
this.menuStrip.AutoSize = false;
|
||||
this.menuStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.helpToolStripMenuItem});
|
||||
this.menuStrip.Location = new System.Drawing.Point(20, 60);
|
||||
this.menuStrip.Name = "menuStrip";
|
||||
this.menuStrip.Size = new System.Drawing.Size(309, 24);
|
||||
this.menuStrip.TabIndex = 14;
|
||||
this.menuStrip.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.menuStrip.Location = new System.Drawing.Point(20, 60);
|
||||
this.menuStrip.Name = "menuStrip";
|
||||
this.menuStrip.Size = new System.Drawing.Size(309, 24);
|
||||
this.menuStrip.TabIndex = 14;
|
||||
this.menuStrip.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.saveToolStripMenuItem1});
|
||||
this.fileToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "File";
|
||||
//
|
||||
// saveToolStripMenuItem1
|
||||
//
|
||||
this.saveToolStripMenuItem1.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem1.Image")));
|
||||
this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1";
|
||||
this.saveToolStripMenuItem1.Size = new System.Drawing.Size(98, 22);
|
||||
this.saveToolStripMenuItem1.Text = "Save";
|
||||
this.saveToolStripMenuItem1.Click += new System.EventHandler(this.saveToolStripMenuItem1_Click);
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.helpToolStripMenuItem.Text = "Help";
|
||||
//
|
||||
// MobIsTamedCheckbox
|
||||
//
|
||||
this.MobIsTamedCheckbox.AutoSize = true;
|
||||
this.MobIsTamedCheckbox.Enabled = false;
|
||||
this.MobIsTamedCheckbox.Location = new System.Drawing.Point(221, 104);
|
||||
this.MobIsTamedCheckbox.Name = "MobIsTamedCheckbox";
|
||||
this.MobIsTamedCheckbox.Size = new System.Drawing.Size(96, 15);
|
||||
this.MobIsTamedCheckbox.TabIndex = 22;
|
||||
this.MobIsTamedCheckbox.Text = "Mob is tamed";
|
||||
this.MobIsTamedCheckbox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.MobIsTamedCheckbox.UseSelectable = true;
|
||||
this.MobIsTamedCheckbox.CheckedChanged += new System.EventHandler(this.MobIsTamedCheckbox_CheckedChanged);
|
||||
//
|
||||
// MobHasSaddleCheckbox
|
||||
//
|
||||
this.MobHasSaddleCheckbox.AutoSize = true;
|
||||
this.MobHasSaddleCheckbox.Enabled = false;
|
||||
this.MobHasSaddleCheckbox.Location = new System.Drawing.Point(221, 136);
|
||||
this.MobHasSaddleCheckbox.Name = "MobHasSaddleCheckbox";
|
||||
this.MobHasSaddleCheckbox.Size = new System.Drawing.Size(106, 15);
|
||||
this.MobHasSaddleCheckbox.TabIndex = 23;
|
||||
this.MobHasSaddleCheckbox.Text = "Mob has saddle";
|
||||
this.MobHasSaddleCheckbox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.MobHasSaddleCheckbox.UseSelectable = true;
|
||||
this.MobHasSaddleCheckbox.CheckedChanged += new System.EventHandler(this.MobHasSaddleCheckbox_CheckedChanged);
|
||||
//
|
||||
// zUpDown
|
||||
//
|
||||
this.zUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
this.zUpDown.DecimalPlaces = 3;
|
||||
this.zUpDown.Enabled = false;
|
||||
this.zUpDown.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
|
||||
this.zUpDown.Location = new System.Drawing.Point(254, 220);
|
||||
this.zUpDown.Maximum = new decimal(new int[] {
|
||||
this.fileToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "File";
|
||||
//
|
||||
// saveToolStripMenuItem1
|
||||
//
|
||||
this.saveToolStripMenuItem1.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem1.Image")));
|
||||
this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1";
|
||||
this.saveToolStripMenuItem1.Size = new System.Drawing.Size(98, 22);
|
||||
this.saveToolStripMenuItem1.Text = "Save";
|
||||
this.saveToolStripMenuItem1.Click += new System.EventHandler(this.saveToolStripMenuItem1_Click);
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.helpToolStripMenuItem.Text = "Help";
|
||||
//
|
||||
// MobIsTamedCheckbox
|
||||
//
|
||||
this.MobIsTamedCheckbox.AutoSize = true;
|
||||
this.MobIsTamedCheckbox.Enabled = false;
|
||||
this.MobIsTamedCheckbox.Location = new System.Drawing.Point(221, 104);
|
||||
this.MobIsTamedCheckbox.Name = "MobIsTamedCheckbox";
|
||||
this.MobIsTamedCheckbox.Size = new System.Drawing.Size(96, 15);
|
||||
this.MobIsTamedCheckbox.TabIndex = 22;
|
||||
this.MobIsTamedCheckbox.Text = "Mob is tamed";
|
||||
this.MobIsTamedCheckbox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.MobIsTamedCheckbox.UseSelectable = true;
|
||||
this.MobIsTamedCheckbox.CheckedChanged += new System.EventHandler(this.MobIsTamedCheckbox_CheckedChanged);
|
||||
//
|
||||
// MobHasSaddleCheckbox
|
||||
//
|
||||
this.MobHasSaddleCheckbox.AutoSize = true;
|
||||
this.MobHasSaddleCheckbox.Enabled = false;
|
||||
this.MobHasSaddleCheckbox.Location = new System.Drawing.Point(221, 136);
|
||||
this.MobHasSaddleCheckbox.Name = "MobHasSaddleCheckbox";
|
||||
this.MobHasSaddleCheckbox.Size = new System.Drawing.Size(106, 15);
|
||||
this.MobHasSaddleCheckbox.TabIndex = 23;
|
||||
this.MobHasSaddleCheckbox.Text = "Mob has saddle";
|
||||
this.MobHasSaddleCheckbox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.MobHasSaddleCheckbox.UseSelectable = true;
|
||||
this.MobHasSaddleCheckbox.CheckedChanged += new System.EventHandler(this.MobHasSaddleCheckbox_CheckedChanged);
|
||||
//
|
||||
// zUpDown
|
||||
//
|
||||
this.zUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
this.zUpDown.DecimalPlaces = 3;
|
||||
this.zUpDown.Enabled = false;
|
||||
this.zUpDown.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
|
||||
this.zUpDown.Location = new System.Drawing.Point(254, 220);
|
||||
this.zUpDown.Maximum = new decimal(new int[] {
|
||||
255,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.zUpDown.Name = "zUpDown";
|
||||
this.zUpDown.Size = new System.Drawing.Size(75, 20);
|
||||
this.zUpDown.TabIndex = 29;
|
||||
this.zUpDown.ValueChanged += new System.EventHandler(this.zUpDown_ValueChanged);
|
||||
//
|
||||
// yUpDown
|
||||
//
|
||||
this.yUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
this.yUpDown.DecimalPlaces = 3;
|
||||
this.yUpDown.Enabled = false;
|
||||
this.yUpDown.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
|
||||
this.yUpDown.Location = new System.Drawing.Point(254, 194);
|
||||
this.yUpDown.Maximum = new decimal(new int[] {
|
||||
this.zUpDown.Minimum = new decimal(new int[] {
|
||||
255,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.zUpDown.Name = "zUpDown";
|
||||
this.zUpDown.Size = new System.Drawing.Size(75, 20);
|
||||
this.zUpDown.TabIndex = 29;
|
||||
this.zUpDown.ValueChanged += new System.EventHandler(this.zUpDown_ValueChanged);
|
||||
//
|
||||
// yUpDown
|
||||
//
|
||||
this.yUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
this.yUpDown.DecimalPlaces = 3;
|
||||
this.yUpDown.Enabled = false;
|
||||
this.yUpDown.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
|
||||
this.yUpDown.Location = new System.Drawing.Point(254, 194);
|
||||
this.yUpDown.Maximum = new decimal(new int[] {
|
||||
255,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.yUpDown.Name = "yUpDown";
|
||||
this.yUpDown.Size = new System.Drawing.Size(75, 20);
|
||||
this.yUpDown.TabIndex = 28;
|
||||
this.yUpDown.ValueChanged += new System.EventHandler(this.yUpDown_ValueChanged);
|
||||
//
|
||||
// zLabel
|
||||
//
|
||||
this.zLabel.AutoSize = true;
|
||||
this.zLabel.Location = new System.Drawing.Point(221, 220);
|
||||
this.zLabel.Name = "zLabel";
|
||||
this.zLabel.Size = new System.Drawing.Size(20, 19);
|
||||
this.zLabel.TabIndex = 25;
|
||||
this.zLabel.Text = "Z:";
|
||||
this.zLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// yLabel
|
||||
//
|
||||
this.yLabel.AutoSize = true;
|
||||
this.yLabel.Location = new System.Drawing.Point(222, 194);
|
||||
this.yLabel.Name = "yLabel";
|
||||
this.yLabel.Size = new System.Drawing.Size(20, 19);
|
||||
this.yLabel.TabIndex = 24;
|
||||
this.yLabel.Text = "Y:";
|
||||
this.yLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// xUpDown
|
||||
//
|
||||
this.xUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
this.xUpDown.DecimalPlaces = 3;
|
||||
this.xUpDown.Enabled = false;
|
||||
this.xUpDown.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
|
||||
this.xUpDown.Location = new System.Drawing.Point(254, 168);
|
||||
this.xUpDown.Maximum = new decimal(new int[] {
|
||||
this.yUpDown.Minimum = new decimal(new int[] {
|
||||
255,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.yUpDown.Name = "yUpDown";
|
||||
this.yUpDown.Size = new System.Drawing.Size(75, 20);
|
||||
this.yUpDown.TabIndex = 28;
|
||||
this.yUpDown.ValueChanged += new System.EventHandler(this.yUpDown_ValueChanged);
|
||||
//
|
||||
// zLabel
|
||||
//
|
||||
this.zLabel.AutoSize = true;
|
||||
this.zLabel.Location = new System.Drawing.Point(221, 220);
|
||||
this.zLabel.Name = "zLabel";
|
||||
this.zLabel.Size = new System.Drawing.Size(20, 19);
|
||||
this.zLabel.TabIndex = 25;
|
||||
this.zLabel.Text = "Z:";
|
||||
this.zLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// yLabel
|
||||
//
|
||||
this.yLabel.AutoSize = true;
|
||||
this.yLabel.Location = new System.Drawing.Point(222, 194);
|
||||
this.yLabel.Name = "yLabel";
|
||||
this.yLabel.Size = new System.Drawing.Size(20, 19);
|
||||
this.yLabel.TabIndex = 24;
|
||||
this.yLabel.Text = "Y:";
|
||||
this.yLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// xUpDown
|
||||
//
|
||||
this.xUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
|
||||
this.xUpDown.DecimalPlaces = 3;
|
||||
this.xUpDown.Enabled = false;
|
||||
this.xUpDown.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
|
||||
this.xUpDown.Location = new System.Drawing.Point(254, 168);
|
||||
this.xUpDown.Maximum = new decimal(new int[] {
|
||||
255,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.xUpDown.Name = "xUpDown";
|
||||
this.xUpDown.Size = new System.Drawing.Size(75, 20);
|
||||
this.xUpDown.TabIndex = 31;
|
||||
this.xUpDown.ValueChanged += new System.EventHandler(this.xUpDown_ValueChanged);
|
||||
//
|
||||
// xLabel
|
||||
//
|
||||
this.xLabel.AutoSize = true;
|
||||
this.xLabel.Location = new System.Drawing.Point(222, 168);
|
||||
this.xLabel.Name = "xLabel";
|
||||
this.xLabel.Size = new System.Drawing.Size(20, 19);
|
||||
this.xLabel.TabIndex = 30;
|
||||
this.xLabel.Text = "X:";
|
||||
this.xLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// BehaviourEditor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(349, 280);
|
||||
this.Controls.Add(this.xUpDown);
|
||||
this.Controls.Add(this.xLabel);
|
||||
this.Controls.Add(this.zUpDown);
|
||||
this.Controls.Add(this.yUpDown);
|
||||
this.Controls.Add(this.zLabel);
|
||||
this.Controls.Add(this.yLabel);
|
||||
this.Controls.Add(this.MobHasSaddleCheckbox);
|
||||
this.Controls.Add(this.MobIsTamedCheckbox);
|
||||
this.Controls.Add(this.menuStrip);
|
||||
this.Controls.Add(this.treeView1);
|
||||
this.Name = "BehaviourEditor";
|
||||
this.Resizable = false;
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Text = "Behaviour Editor";
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroContextMenu1.ResumeLayout(false);
|
||||
this.menuStrip.ResumeLayout(false);
|
||||
this.menuStrip.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.zUpDown)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.yUpDown)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xUpDown)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.xUpDown.Minimum = new decimal(new int[] {
|
||||
255,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.xUpDown.Name = "xUpDown";
|
||||
this.xUpDown.Size = new System.Drawing.Size(75, 20);
|
||||
this.xUpDown.TabIndex = 31;
|
||||
this.xUpDown.ValueChanged += new System.EventHandler(this.xUpDown_ValueChanged);
|
||||
//
|
||||
// xLabel
|
||||
//
|
||||
this.xLabel.AutoSize = true;
|
||||
this.xLabel.Location = new System.Drawing.Point(222, 168);
|
||||
this.xLabel.Name = "xLabel";
|
||||
this.xLabel.Size = new System.Drawing.Size(20, 19);
|
||||
this.xLabel.TabIndex = 30;
|
||||
this.xLabel.Text = "X:";
|
||||
this.xLabel.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// BehaviourEditor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(349, 280);
|
||||
this.Controls.Add(this.xUpDown);
|
||||
this.Controls.Add(this.xLabel);
|
||||
this.Controls.Add(this.zUpDown);
|
||||
this.Controls.Add(this.yUpDown);
|
||||
this.Controls.Add(this.zLabel);
|
||||
this.Controls.Add(this.yLabel);
|
||||
this.Controls.Add(this.MobHasSaddleCheckbox);
|
||||
this.Controls.Add(this.MobIsTamedCheckbox);
|
||||
this.Controls.Add(this.menuStrip);
|
||||
this.Controls.Add(this.treeView1);
|
||||
this.Name = "BehaviourEditor";
|
||||
this.Resizable = false;
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Text = "Behaviour Editor";
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroContextMenu1.ResumeLayout(false);
|
||||
this.menuStrip.ResumeLayout(false);
|
||||
this.menuStrip.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.zUpDown)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.yUpDown)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xUpDown)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ namespace PckStudio.Forms.Editor
|
||||
private readonly PckFile.FileData _file;
|
||||
BehaviourFile behaviourFile;
|
||||
|
||||
private readonly JObject EntityJSONData = JObject.Parse(Properties.Resources.entityData);
|
||||
|
||||
void SetUpTree()
|
||||
{
|
||||
treeView1.BeginUpdate();
|
||||
@@ -28,13 +30,13 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
TreeNode EntryNode = new TreeNode(entry.name);
|
||||
|
||||
foreach (JObject content in Utilities.BehaviourResources.entityData["behaviours"].Children())
|
||||
foreach (JObject content in EntityJSONData["behaviours"].Children())
|
||||
{
|
||||
var prop = content.Properties().FirstOrDefault(prop => prop.Name == entry.name);
|
||||
if (prop is JProperty)
|
||||
{
|
||||
EntryNode.Text = (string)prop.Value;
|
||||
EntryNode.ImageIndex = Utilities.BehaviourResources.entityData["behaviours"].Children().ToList().IndexOf(content);
|
||||
EntryNode.ImageIndex = EntityJSONData["behaviours"].Children().ToList().IndexOf(content);
|
||||
EntryNode.SelectedImageIndex = EntryNode.ImageIndex;
|
||||
break;
|
||||
}
|
||||
@@ -149,7 +151,7 @@ namespace PckStudio.Forms.Editor
|
||||
if (treeView1.SelectedNode == null) return;
|
||||
if (!(treeView1.SelectedNode.Tag is BehaviourFile.RiderPositionOverride entry)) return;
|
||||
|
||||
var diag = new Additional_Popups.EntityForms.AddEntry(Utilities.BehaviourResources.entityData, Utilities.BehaviourResources.entityImages);
|
||||
var diag = new AddEntry("behaviours", Utilities.BehaviourResources.entityImages);
|
||||
diag.acceptBtn.Text = "Save";
|
||||
|
||||
if (diag.ShowDialog() == DialogResult.OK)
|
||||
@@ -164,13 +166,13 @@ namespace PckStudio.Forms.Editor
|
||||
entry.name = diag.SelectedEntity;
|
||||
treeView1.SelectedNode.Tag = entry;
|
||||
|
||||
foreach (JObject content in Utilities.BehaviourResources.entityData["behaviours"].Children())
|
||||
foreach (JObject content in EntityJSONData["behaviours"].Children())
|
||||
{
|
||||
var prop = content.Properties().FirstOrDefault(prop => prop.Name == entry.name);
|
||||
if (prop is JProperty)
|
||||
{
|
||||
treeView1.SelectedNode.Text = (string)prop.Value;
|
||||
treeView1.SelectedNode.ImageIndex = Utilities.BehaviourResources.entityData["behaviours"].Children().ToList().IndexOf(content);
|
||||
treeView1.SelectedNode.ImageIndex = EntityJSONData["behaviours"].Children().ToList().IndexOf(content);
|
||||
treeView1.SelectedNode.SelectedImageIndex = treeView1.SelectedNode.ImageIndex;
|
||||
break;
|
||||
}
|
||||
@@ -203,7 +205,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void addNewEntryToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var diag = new AddEntry(Utilities.BehaviourResources.entityData, Utilities.BehaviourResources.entityImages);
|
||||
var diag = new AddEntry("behaviours", Utilities.BehaviourResources.entityImages);
|
||||
|
||||
if(diag.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
@@ -217,13 +219,13 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
TreeNode NewOverrideNode = new TreeNode(NewOverride.name);
|
||||
NewOverrideNode.Tag = NewOverride;
|
||||
foreach (JObject content in Utilities.BehaviourResources.entityData["behaviours"].Children())
|
||||
foreach (JObject content in EntityJSONData["behaviours"].Children())
|
||||
{
|
||||
var prop = content.Properties().FirstOrDefault(prop => prop.Name == NewOverride.name);
|
||||
if (prop is JProperty)
|
||||
{
|
||||
NewOverrideNode.Text = (string)prop.Value;
|
||||
NewOverrideNode.ImageIndex = Utilities.BehaviourResources.entityData["behaviours"].Children().ToList().IndexOf(content);
|
||||
NewOverrideNode.ImageIndex = EntityJSONData["behaviours"].Children().ToList().IndexOf(content);
|
||||
NewOverrideNode.SelectedImageIndex = NewOverrideNode.ImageIndex;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace PckStudio.Forms.Editor
|
||||
private readonly PckFile.FileData _file;
|
||||
MaterialContainer materialFile;
|
||||
|
||||
private readonly JObject EntityJSONData = JObject.Parse(Properties.Resources.entityData);
|
||||
|
||||
void SetUpTree()
|
||||
{
|
||||
treeView1.BeginUpdate();
|
||||
@@ -27,13 +29,13 @@ namespace PckStudio.Forms.Editor
|
||||
{
|
||||
TreeNode EntryNode = new TreeNode(entry.Name);
|
||||
|
||||
foreach (JObject content in Utilities.MaterialResources.entityData["materials"].Children())
|
||||
foreach (JObject content in EntityJSONData["materials"].Children())
|
||||
{
|
||||
var prop = content.Properties().FirstOrDefault(prop => prop.Name == entry.Name);
|
||||
if (prop is JProperty)
|
||||
{
|
||||
EntryNode.Text = (string)prop.Value;
|
||||
EntryNode.ImageIndex = Utilities.MaterialResources.entityData["materials"].Children().ToList().IndexOf(content);
|
||||
EntryNode.ImageIndex = EntityJSONData["materials"].Children().ToList().IndexOf(content);
|
||||
EntryNode.SelectedImageIndex = EntryNode.ImageIndex;
|
||||
break;
|
||||
}
|
||||
@@ -132,7 +134,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void addToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var diag = new Additional_Popups.EntityForms.AddEntry(Utilities.MaterialResources.entityData, Utilities.MaterialResources.entityImages);
|
||||
var diag = new Additional_Popups.EntityForms.AddEntry("materials", Utilities.MaterialResources.entityImages);
|
||||
|
||||
if (diag.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
@@ -146,13 +148,13 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
TreeNode NewEntryNode = new TreeNode(NewEntry.Name);
|
||||
NewEntryNode.Tag = NewEntry;
|
||||
foreach (JObject content in Utilities.MaterialResources.entityData["materials"].Children())
|
||||
foreach (JObject content in EntityJSONData["materials"].Children())
|
||||
{
|
||||
var prop = content.Properties().FirstOrDefault(prop => prop.Name == NewEntry.Name);
|
||||
if (prop is JProperty)
|
||||
{
|
||||
NewEntryNode.Text = (string)prop.Value;
|
||||
NewEntryNode.ImageIndex = Utilities.MaterialResources.entityData["materials"].Children().ToList().IndexOf(content);
|
||||
NewEntryNode.ImageIndex = EntityJSONData["materials"].Children().ToList().IndexOf(content);
|
||||
NewEntryNode.SelectedImageIndex = NewEntryNode.ImageIndex;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -54,19 +54,18 @@ namespace PckStudio
|
||||
"WAIST",
|
||||
"PANTS0",
|
||||
"PANTS1",
|
||||
"SOCK0",
|
||||
"SOCK1",
|
||||
|
||||
// Armor Parts
|
||||
"HELMET",
|
||||
"CHEST", "BODYARMOR",
|
||||
"SHOULDER0", "ARMARMOR0",
|
||||
"SHOULDER1", "ARMARMOR0",
|
||||
"BODYARMOR",
|
||||
"ARMARMOR0",
|
||||
"ARMARMOR1",
|
||||
"BELT",
|
||||
"LEGGING0",
|
||||
"LEGGING1",
|
||||
"SOCK0",
|
||||
"SOCK1",
|
||||
"BOOT0",
|
||||
"BOOT1",
|
||||
"BOOT1"
|
||||
};
|
||||
|
||||
private static readonly string[] ValidModelOffsetTypes = new string[]
|
||||
@@ -87,8 +86,8 @@ namespace PckStudio
|
||||
"BELT",
|
||||
"LEGGING0",
|
||||
"LEGGING1",
|
||||
"BOOT0",
|
||||
"BOOT1",
|
||||
"SOCK0", "BOOT0",
|
||||
"SOCK1", "BOOT1",
|
||||
|
||||
"TOOL0",
|
||||
"TOOL1",
|
||||
@@ -117,6 +116,7 @@ namespace PckStudio
|
||||
|
||||
public GenerateModel(PckFile.PCKProperties skinProperties, Image texture)
|
||||
{
|
||||
MessageBox.Show(this, "This feature is now considered obsolete and will no longer recieve updates. A better alternative is currently under development. Use at your own risk.", "Obsolete Feature", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
InitializeComponent();
|
||||
boxes = skinProperties;
|
||||
texturePreview.Image = texture;
|
||||
|
||||
@@ -12,7 +12,6 @@ namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
public static class BehaviourResources
|
||||
{
|
||||
public static readonly JObject entityData = JObject.Parse(Resources.entityData);
|
||||
private static Image[] _entityImages;
|
||||
|
||||
public static Image[] entityImages => _entityImages ??= Resources.entities_sheet.CreateImageList(32).ToArray();
|
||||
|
||||
320
PCK-Studio/Forms/Utilities/ConsoleInstaller.Designer.cs
generated
@@ -1,320 +0,0 @@
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
partial class ConsoleInstaller
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
this.selectedConsoleComboBox = new MetroFramework.Controls.MetroComboBox();
|
||||
this.myTablePanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.EurDig = new System.Windows.Forms.RadioButton();
|
||||
this.USDig = new System.Windows.Forms.RadioButton();
|
||||
this.textBoxHost = new MetroFramework.Controls.MetroTextBox();
|
||||
this.EurDisc = new System.Windows.Forms.RadioButton();
|
||||
this.USDisc = new System.Windows.Forms.RadioButton();
|
||||
this.listViewPCKS = new System.Windows.Forms.ListView();
|
||||
this.JPDig = new System.Windows.Forms.RadioButton();
|
||||
this.buttonServerToggle = new System.Windows.Forms.Button();
|
||||
metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.myTablePanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
metroLabel1.AutoSize = true;
|
||||
metroLabel1.Location = new System.Drawing.Point(264, 73);
|
||||
metroLabel1.Name = "metroLabel1";
|
||||
metroLabel1.Size = new System.Drawing.Size(90, 19);
|
||||
metroLabel1.Style = MetroFramework.MetroColorStyle.Black;
|
||||
metroLabel1.TabIndex = 1;
|
||||
metroLabel1.Text = "Console Type:";
|
||||
metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
metroLabel2.AutoSize = true;
|
||||
metroLabel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
metroLabel2.Location = new System.Drawing.Point(129, 0);
|
||||
metroLabel2.Name = "metroLabel2";
|
||||
metroLabel2.Size = new System.Drawing.Size(120, 35);
|
||||
metroLabel2.Style = MetroFramework.MetroColorStyle.Black;
|
||||
metroLabel2.TabIndex = 13;
|
||||
metroLabel2.Text = "Console Type:";
|
||||
metroLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
metroLabel2.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
//
|
||||
// selectedConsoleComboBox
|
||||
//
|
||||
this.selectedConsoleComboBox.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.selectedConsoleComboBox.FormattingEnabled = true;
|
||||
this.selectedConsoleComboBox.ItemHeight = 23;
|
||||
this.selectedConsoleComboBox.Items.AddRange(new object[] {
|
||||
"Wii U",
|
||||
"Play Station 3",
|
||||
"PS Vita"});
|
||||
this.selectedConsoleComboBox.Location = new System.Drawing.Point(255, 3);
|
||||
this.selectedConsoleComboBox.Name = "selectedConsoleComboBox";
|
||||
this.selectedConsoleComboBox.PromptText = "Select console";
|
||||
this.selectedConsoleComboBox.Size = new System.Drawing.Size(121, 29);
|
||||
this.selectedConsoleComboBox.Style = MetroFramework.MetroColorStyle.Black;
|
||||
this.selectedConsoleComboBox.TabIndex = 0;
|
||||
this.selectedConsoleComboBox.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.selectedConsoleComboBox.UseSelectable = true;
|
||||
//
|
||||
// myTablePanel1
|
||||
//
|
||||
this.myTablePanel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.myTablePanel1.ColumnCount = 3;
|
||||
this.myTablePanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33332F));
|
||||
this.myTablePanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
|
||||
this.myTablePanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
|
||||
this.myTablePanel1.Controls.Add(this.EurDig, 1, 2);
|
||||
this.myTablePanel1.Controls.Add(this.USDig, 2, 2);
|
||||
this.myTablePanel1.Controls.Add(this.textBoxHost, 0, 1);
|
||||
this.myTablePanel1.Controls.Add(this.EurDisc, 1, 3);
|
||||
this.myTablePanel1.Controls.Add(this.USDisc, 2, 3);
|
||||
this.myTablePanel1.Controls.Add(this.listViewPCKS, 0, 4);
|
||||
this.myTablePanel1.Controls.Add(this.JPDig, 0, 2);
|
||||
this.myTablePanel1.Controls.Add(this.buttonServerToggle, 2, 1);
|
||||
this.myTablePanel1.Controls.Add(this.selectedConsoleComboBox, 2, 0);
|
||||
this.myTablePanel1.Controls.Add(metroLabel2, 1, 0);
|
||||
this.myTablePanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.myTablePanel1.Location = new System.Drawing.Point(20, 60);
|
||||
this.myTablePanel1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.myTablePanel1.Name = "myTablePanel1";
|
||||
this.myTablePanel1.RowCount = 5;
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.myTablePanel1.Size = new System.Drawing.Size(379, 561);
|
||||
this.myTablePanel1.TabIndex = 3;
|
||||
//
|
||||
// EurDig
|
||||
//
|
||||
this.EurDig.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.EurDig.AutoSize = true;
|
||||
this.EurDig.BackColor = System.Drawing.Color.Transparent;
|
||||
this.EurDig.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.EurDig.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.EurDig.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.EurDig.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.EurDig.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.EurDig.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.EurDig.ForeColor = System.Drawing.Color.White;
|
||||
this.EurDig.Location = new System.Drawing.Point(129, 71);
|
||||
this.EurDig.Name = "EurDig";
|
||||
this.EurDig.Size = new System.Drawing.Size(100, 30);
|
||||
this.EurDig.TabIndex = 11;
|
||||
this.EurDig.Text = "EUR Digital";
|
||||
this.EurDig.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.EurDig.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// USDig
|
||||
//
|
||||
this.USDig.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.USDig.AutoSize = true;
|
||||
this.USDig.BackColor = System.Drawing.Color.Transparent;
|
||||
this.USDig.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.USDig.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.USDig.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.USDig.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.USDig.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.USDig.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.USDig.ForeColor = System.Drawing.Color.White;
|
||||
this.USDig.Location = new System.Drawing.Point(255, 71);
|
||||
this.USDig.Name = "USDig";
|
||||
this.USDig.Size = new System.Drawing.Size(91, 30);
|
||||
this.USDig.TabIndex = 12;
|
||||
this.USDig.Text = "US Digital";
|
||||
this.USDig.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.USDig.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// textBoxHost
|
||||
//
|
||||
this.textBoxHost.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.myTablePanel1.SetColumnSpan(this.textBoxHost, 2);
|
||||
//
|
||||
//
|
||||
//
|
||||
this.textBoxHost.CustomButton.Image = null;
|
||||
this.textBoxHost.CustomButton.Location = new System.Drawing.Point(274, 2);
|
||||
this.textBoxHost.CustomButton.Name = "";
|
||||
this.textBoxHost.CustomButton.Size = new System.Drawing.Size(15, 15);
|
||||
this.textBoxHost.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.textBoxHost.CustomButton.TabIndex = 1;
|
||||
this.textBoxHost.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.textBoxHost.CustomButton.UseSelectable = true;
|
||||
this.textBoxHost.CustomButton.Visible = false;
|
||||
this.textBoxHost.IconRight = true;
|
||||
this.textBoxHost.Lines = new string[0];
|
||||
this.textBoxHost.Location = new System.Drawing.Point(3, 38);
|
||||
this.textBoxHost.MaxLength = 32767;
|
||||
this.textBoxHost.Name = "textBoxHost";
|
||||
this.textBoxHost.PasswordChar = '\0';
|
||||
this.textBoxHost.PromptText = "IP Address";
|
||||
this.textBoxHost.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.textBoxHost.SelectedText = "";
|
||||
this.textBoxHost.SelectionLength = 0;
|
||||
this.textBoxHost.SelectionStart = 0;
|
||||
this.textBoxHost.ShortcutsEnabled = true;
|
||||
this.textBoxHost.Size = new System.Drawing.Size(246, 20);
|
||||
this.textBoxHost.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.textBoxHost.TabIndex = 10;
|
||||
this.textBoxHost.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.textBoxHost.UseSelectable = true;
|
||||
this.textBoxHost.WaterMark = "IP Address";
|
||||
this.textBoxHost.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.textBoxHost.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// EurDisc
|
||||
//
|
||||
this.EurDisc.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.EurDisc.AutoSize = true;
|
||||
this.EurDisc.BackColor = System.Drawing.Color.Transparent;
|
||||
this.EurDisc.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.EurDisc.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.EurDisc.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.EurDisc.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.EurDisc.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.EurDisc.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.EurDisc.ForeColor = System.Drawing.Color.White;
|
||||
this.EurDisc.Location = new System.Drawing.Point(129, 107);
|
||||
this.EurDisc.Name = "EurDisc";
|
||||
this.EurDisc.Size = new System.Drawing.Size(84, 30);
|
||||
this.EurDisc.TabIndex = 0;
|
||||
this.EurDisc.Text = "EUR Disc";
|
||||
this.EurDisc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.EurDisc.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// USDisc
|
||||
//
|
||||
this.USDisc.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.USDisc.AutoSize = true;
|
||||
this.USDisc.BackColor = System.Drawing.Color.Transparent;
|
||||
this.USDisc.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.USDisc.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.USDisc.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.USDisc.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.USDisc.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.USDisc.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.USDisc.ForeColor = System.Drawing.Color.White;
|
||||
this.USDisc.Location = new System.Drawing.Point(255, 107);
|
||||
this.USDisc.Name = "USDisc";
|
||||
this.USDisc.Size = new System.Drawing.Size(75, 30);
|
||||
this.USDisc.TabIndex = 2;
|
||||
this.USDisc.Text = "US Disc";
|
||||
this.USDisc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.USDisc.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// listViewPCKS
|
||||
//
|
||||
this.listViewPCKS.Activation = System.Windows.Forms.ItemActivation.TwoClick;
|
||||
this.myTablePanel1.SetColumnSpan(this.listViewPCKS, 3);
|
||||
this.listViewPCKS.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listViewPCKS.Enabled = false;
|
||||
this.listViewPCKS.HideSelection = false;
|
||||
this.listViewPCKS.Location = new System.Drawing.Point(3, 143);
|
||||
this.listViewPCKS.Name = "listViewPCKS";
|
||||
this.listViewPCKS.Size = new System.Drawing.Size(373, 415);
|
||||
this.listViewPCKS.TabIndex = 3;
|
||||
this.listViewPCKS.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewPCKS.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// JPDig
|
||||
//
|
||||
this.JPDig.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.JPDig.AutoSize = true;
|
||||
this.JPDig.BackColor = System.Drawing.Color.Transparent;
|
||||
this.JPDig.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.JPDig.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.JPDig.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.JPDig.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.JPDig.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.JPDig.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.JPDig.ForeColor = System.Drawing.Color.White;
|
||||
this.JPDig.Location = new System.Drawing.Point(3, 71);
|
||||
this.JPDig.Name = "JPDig";
|
||||
this.JPDig.Size = new System.Drawing.Size(47, 30);
|
||||
this.JPDig.TabIndex = 1;
|
||||
this.JPDig.Text = "JAP";
|
||||
this.JPDig.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.JPDig.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// buttonServerToggle
|
||||
//
|
||||
this.buttonServerToggle.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.buttonServerToggle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(178)))), ((int)(((byte)(13)))));
|
||||
this.buttonServerToggle.FlatAppearance.BorderSize = 0;
|
||||
this.buttonServerToggle.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.buttonServerToggle.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.buttonServerToggle.ForeColor = System.Drawing.Color.White;
|
||||
this.buttonServerToggle.Location = new System.Drawing.Point(255, 38);
|
||||
this.buttonServerToggle.Name = "buttonServerToggle";
|
||||
this.buttonServerToggle.Size = new System.Drawing.Size(121, 27);
|
||||
this.buttonServerToggle.TabIndex = 9;
|
||||
this.buttonServerToggle.Text = "Start";
|
||||
this.buttonServerToggle.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// ConsoleInstaller
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(419, 641);
|
||||
this.Controls.Add(this.myTablePanel1);
|
||||
this.Controls.Add(metroLabel1);
|
||||
this.Name = "ConsoleInstaller";
|
||||
this.Style = MetroFramework.MetroColorStyle.Silver;
|
||||
this.Text = "Console Installer";
|
||||
this.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.myTablePanel1.ResumeLayout(false);
|
||||
this.myTablePanel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroComboBox selectedConsoleComboBox;
|
||||
private System.Windows.Forms.TableLayoutPanel myTablePanel1;
|
||||
private System.Windows.Forms.RadioButton EurDig;
|
||||
private System.Windows.Forms.RadioButton USDig;
|
||||
private System.Windows.Forms.Button buttonServerToggle;
|
||||
private MetroFramework.Controls.MetroTextBox textBoxHost;
|
||||
private System.Windows.Forms.RadioButton EurDisc;
|
||||
private System.Windows.Forms.RadioButton USDisc;
|
||||
private System.Windows.Forms.ListView listViewPCKS;
|
||||
private System.Windows.Forms.RadioButton JPDig;
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
public partial class ConsoleInstaller : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
public ConsoleInstaller()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,6 @@ namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
public static class MaterialResources
|
||||
{
|
||||
public static readonly JObject entityData = JObject.Parse(Resources.entityData);
|
||||
private static Image[] _entityImages;
|
||||
public static Image[] entityImages => _entityImages ??= Resources.entities_sheet.CreateImageList(32).ToArray();
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Extensions;
|
||||
using OMI.Formats.Model;
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Workers.Model;
|
||||
|
||||
namespace PckStudio.Forms.Utilities
|
||||
{
|
||||
public static class ModelsResources
|
||||
{
|
||||
public static readonly JObject entityData = JObject.Parse(Resources.entityData);
|
||||
private static Image[] _entityImages;
|
||||
|
||||
public static Image[] entityImages => _entityImages ??= Resources.entities_sheet.CreateImageList(32).ToArray();
|
||||
|
||||
public static byte[] ModelsFileInitializer()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
var writer = new ModelFileWriter(new ModelContainer());
|
||||
writer.WriteToStream(stream);
|
||||
return stream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using PckStudio.ToolboxItems;
|
||||
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
[Obsolete("For what is this thing used?")]
|
||||
public partial class PCK_Manager : ThemeForm
|
||||
{
|
||||
public PCK_Manager()
|
||||
|
||||
356
PCK-Studio/Forms/Utilities/installPS3.Designer.cs
generated
@@ -1,356 +0,0 @@
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
partial class InstallPS3
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.metroTabPageMain = new MetroFramework.Controls.MetroTabPage();
|
||||
this.myTablePanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.EurDig = new System.Windows.Forms.RadioButton();
|
||||
this.USDig = new System.Windows.Forms.RadioButton();
|
||||
this.buttonServerToggle = new System.Windows.Forms.Button();
|
||||
this.textBoxHost = new MetroFramework.Controls.MetroTextBox();
|
||||
this.EurDisc = new System.Windows.Forms.RadioButton();
|
||||
this.USDisc = new System.Windows.Forms.RadioButton();
|
||||
this.listViewPCKS = new System.Windows.Forms.ListView();
|
||||
this.JPDig = new System.Windows.Forms.RadioButton();
|
||||
this.metroTabControlMain = new MetroFramework.Controls.MetroTabControl();
|
||||
this.contextMenuStripCaffiine = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.replaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.replacePCKToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.metroTabPageMain.SuspendLayout();
|
||||
this.myTablePanel1.SuspendLayout();
|
||||
this.metroTabControlMain.SuspendLayout();
|
||||
this.contextMenuStripCaffiine.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// metroTabPageMain
|
||||
//
|
||||
this.metroTabPageMain.Controls.Add(this.myTablePanel1);
|
||||
this.metroTabPageMain.HorizontalScrollbarBarColor = true;
|
||||
this.metroTabPageMain.HorizontalScrollbarHighlightOnWheel = false;
|
||||
this.metroTabPageMain.HorizontalScrollbarSize = 10;
|
||||
this.metroTabPageMain.Location = new System.Drawing.Point(4, 38);
|
||||
this.metroTabPageMain.Name = "metroTabPageMain";
|
||||
this.metroTabPageMain.Size = new System.Drawing.Size(467, 617);
|
||||
this.metroTabPageMain.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.metroTabPageMain.TabIndex = 0;
|
||||
this.metroTabPageMain.Text = "Installer";
|
||||
this.metroTabPageMain.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTabPageMain.VerticalScrollbarBarColor = true;
|
||||
this.metroTabPageMain.VerticalScrollbarHighlightOnWheel = false;
|
||||
this.metroTabPageMain.VerticalScrollbarSize = 10;
|
||||
//
|
||||
// myTablePanel1
|
||||
//
|
||||
this.myTablePanel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.myTablePanel1.ColumnCount = 3;
|
||||
this.myTablePanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||
this.myTablePanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
|
||||
this.myTablePanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
|
||||
this.myTablePanel1.Controls.Add(this.EurDig, 1, 1);
|
||||
this.myTablePanel1.Controls.Add(this.USDig, 2, 1);
|
||||
this.myTablePanel1.Controls.Add(this.buttonServerToggle, 2, 0);
|
||||
this.myTablePanel1.Controls.Add(this.textBoxHost, 0, 0);
|
||||
this.myTablePanel1.Controls.Add(this.EurDisc, 1, 2);
|
||||
this.myTablePanel1.Controls.Add(this.USDisc, 2, 2);
|
||||
this.myTablePanel1.Controls.Add(this.listViewPCKS, 0, 3);
|
||||
this.myTablePanel1.Controls.Add(this.JPDig, 0, 1);
|
||||
this.myTablePanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.myTablePanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.myTablePanel1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.myTablePanel1.Name = "myTablePanel1";
|
||||
this.myTablePanel1.RowCount = 7;
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.myTablePanel1.Size = new System.Drawing.Size(467, 617);
|
||||
this.myTablePanel1.TabIndex = 2;
|
||||
//
|
||||
// EurDig
|
||||
//
|
||||
this.EurDig.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.EurDig.AutoSize = true;
|
||||
this.EurDig.BackColor = System.Drawing.Color.Transparent;
|
||||
this.EurDig.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.EurDig.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.EurDig.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.EurDig.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.EurDig.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.EurDig.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.EurDig.ForeColor = System.Drawing.Color.White;
|
||||
this.EurDig.Location = new System.Drawing.Point(158, 36);
|
||||
this.EurDig.Name = "EurDig";
|
||||
this.EurDig.Size = new System.Drawing.Size(100, 30);
|
||||
this.EurDig.TabIndex = 11;
|
||||
this.EurDig.Text = "EUR Digital";
|
||||
this.EurDig.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.EurDig.UseVisualStyleBackColor = false;
|
||||
this.EurDig.CheckedChanged += new System.EventHandler(this.EurDig_CheckedChanged);
|
||||
//
|
||||
// USDig
|
||||
//
|
||||
this.USDig.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.USDig.AutoSize = true;
|
||||
this.USDig.BackColor = System.Drawing.Color.Transparent;
|
||||
this.USDig.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.USDig.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.USDig.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.USDig.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.USDig.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.USDig.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.USDig.ForeColor = System.Drawing.Color.White;
|
||||
this.USDig.Location = new System.Drawing.Point(313, 36);
|
||||
this.USDig.Name = "USDig";
|
||||
this.USDig.Size = new System.Drawing.Size(91, 30);
|
||||
this.USDig.TabIndex = 12;
|
||||
this.USDig.Text = "US Digital";
|
||||
this.USDig.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.USDig.UseVisualStyleBackColor = false;
|
||||
this.USDig.CheckedChanged += new System.EventHandler(this.USDig_CheckedChanged);
|
||||
//
|
||||
// buttonServerToggle
|
||||
//
|
||||
this.buttonServerToggle.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.buttonServerToggle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(178)))), ((int)(((byte)(13)))));
|
||||
this.buttonServerToggle.FlatAppearance.BorderSize = 0;
|
||||
this.buttonServerToggle.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.buttonServerToggle.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.buttonServerToggle.ForeColor = System.Drawing.Color.White;
|
||||
this.buttonServerToggle.Location = new System.Drawing.Point(313, 3);
|
||||
this.buttonServerToggle.Name = "buttonServerToggle";
|
||||
this.buttonServerToggle.Size = new System.Drawing.Size(137, 27);
|
||||
this.buttonServerToggle.TabIndex = 9;
|
||||
this.buttonServerToggle.Text = "Start";
|
||||
this.buttonServerToggle.UseVisualStyleBackColor = false;
|
||||
this.buttonServerToggle.Click += new System.EventHandler(this.buttonServerToggle_Click);
|
||||
//
|
||||
// textBoxHost
|
||||
//
|
||||
this.textBoxHost.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.textBoxHost.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.myTablePanel1.SetColumnSpan(this.textBoxHost, 2);
|
||||
//
|
||||
//
|
||||
//
|
||||
this.textBoxHost.CustomButton.Image = null;
|
||||
this.textBoxHost.CustomButton.Location = new System.Drawing.Point(260, 2);
|
||||
this.textBoxHost.CustomButton.Name = "";
|
||||
this.textBoxHost.CustomButton.Size = new System.Drawing.Size(15, 15);
|
||||
this.textBoxHost.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.textBoxHost.CustomButton.TabIndex = 1;
|
||||
this.textBoxHost.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.textBoxHost.CustomButton.UseSelectable = true;
|
||||
this.textBoxHost.CustomButton.Visible = false;
|
||||
this.textBoxHost.IconRight = true;
|
||||
this.textBoxHost.Lines = new string[0];
|
||||
this.textBoxHost.Location = new System.Drawing.Point(3, 6);
|
||||
this.textBoxHost.MaxLength = 32767;
|
||||
this.textBoxHost.Name = "textBoxHost";
|
||||
this.textBoxHost.PasswordChar = '\0';
|
||||
this.textBoxHost.PromptText = "PS3 IP";
|
||||
this.textBoxHost.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.textBoxHost.SelectedText = "";
|
||||
this.textBoxHost.SelectionLength = 0;
|
||||
this.textBoxHost.SelectionStart = 0;
|
||||
this.textBoxHost.ShortcutsEnabled = true;
|
||||
this.textBoxHost.Size = new System.Drawing.Size(278, 20);
|
||||
this.textBoxHost.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.textBoxHost.TabIndex = 10;
|
||||
this.textBoxHost.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.textBoxHost.UseSelectable = true;
|
||||
this.textBoxHost.WaterMark = "PS3 IP";
|
||||
this.textBoxHost.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.textBoxHost.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// EurDisc
|
||||
//
|
||||
this.EurDisc.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.EurDisc.AutoSize = true;
|
||||
this.EurDisc.BackColor = System.Drawing.Color.Transparent;
|
||||
this.EurDisc.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.EurDisc.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.EurDisc.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.EurDisc.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.EurDisc.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.EurDisc.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.EurDisc.ForeColor = System.Drawing.Color.White;
|
||||
this.EurDisc.Location = new System.Drawing.Point(158, 72);
|
||||
this.EurDisc.Name = "EurDisc";
|
||||
this.EurDisc.Size = new System.Drawing.Size(84, 30);
|
||||
this.EurDisc.TabIndex = 0;
|
||||
this.EurDisc.Text = "EUR Disc";
|
||||
this.EurDisc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.EurDisc.UseVisualStyleBackColor = false;
|
||||
this.EurDisc.CheckedChanged += new System.EventHandler(this.EurDisc_CheckedChanged);
|
||||
//
|
||||
// USDisc
|
||||
//
|
||||
this.USDisc.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.USDisc.AutoSize = true;
|
||||
this.USDisc.BackColor = System.Drawing.Color.Transparent;
|
||||
this.USDisc.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.USDisc.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.USDisc.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.USDisc.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.USDisc.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.USDisc.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.USDisc.ForeColor = System.Drawing.Color.White;
|
||||
this.USDisc.Location = new System.Drawing.Point(313, 72);
|
||||
this.USDisc.Name = "USDisc";
|
||||
this.USDisc.Size = new System.Drawing.Size(75, 30);
|
||||
this.USDisc.TabIndex = 2;
|
||||
this.USDisc.Text = "US Disc";
|
||||
this.USDisc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.USDisc.UseVisualStyleBackColor = false;
|
||||
this.USDisc.CheckedChanged += new System.EventHandler(this.USDisc_CheckedChanged);
|
||||
//
|
||||
// listViewPCKS
|
||||
//
|
||||
this.listViewPCKS.Activation = System.Windows.Forms.ItemActivation.TwoClick;
|
||||
this.myTablePanel1.SetColumnSpan(this.listViewPCKS, 3);
|
||||
this.listViewPCKS.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listViewPCKS.Enabled = false;
|
||||
this.listViewPCKS.HideSelection = false;
|
||||
this.listViewPCKS.Location = new System.Drawing.Point(3, 108);
|
||||
this.listViewPCKS.Name = "listViewPCKS";
|
||||
this.listViewPCKS.Size = new System.Drawing.Size(461, 506);
|
||||
this.listViewPCKS.TabIndex = 3;
|
||||
this.listViewPCKS.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewPCKS.View = System.Windows.Forms.View.Details;
|
||||
this.listViewPCKS.SelectedIndexChanged += new System.EventHandler(this.listViewPCKS_SelectedIndexChanged);
|
||||
this.listViewPCKS.Click += new System.EventHandler(this.listViewPCKS_Click);
|
||||
this.listViewPCKS.DoubleClick += new System.EventHandler(this.listViewPCKS_DoubleClick);
|
||||
this.listViewPCKS.MouseDown += new System.Windows.Forms.MouseEventHandler(this.listViewPCKS_MouseDown);
|
||||
//
|
||||
// JPDig
|
||||
//
|
||||
this.JPDig.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.JPDig.AutoSize = true;
|
||||
this.JPDig.BackColor = System.Drawing.Color.Transparent;
|
||||
this.JPDig.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.JPDig.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.JPDig.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.JPDig.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.JPDig.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.JPDig.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.JPDig.ForeColor = System.Drawing.Color.White;
|
||||
this.JPDig.Location = new System.Drawing.Point(3, 36);
|
||||
this.JPDig.Name = "JPDig";
|
||||
this.JPDig.Size = new System.Drawing.Size(47, 30);
|
||||
this.JPDig.TabIndex = 1;
|
||||
this.JPDig.Text = "JAP";
|
||||
this.JPDig.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.JPDig.UseVisualStyleBackColor = false;
|
||||
this.JPDig.CheckedChanged += new System.EventHandler(this.JPDig_CheckedChanged);
|
||||
//
|
||||
// metroTabControlMain
|
||||
//
|
||||
this.metroTabControlMain.Controls.Add(this.metroTabPageMain);
|
||||
this.metroTabControlMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.metroTabControlMain.Location = new System.Drawing.Point(0, 0);
|
||||
this.metroTabControlMain.Name = "metroTabControlMain";
|
||||
this.metroTabControlMain.SelectedIndex = 0;
|
||||
this.metroTabControlMain.Size = new System.Drawing.Size(475, 659);
|
||||
this.metroTabControlMain.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.metroTabControlMain.TabIndex = 0;
|
||||
this.metroTabControlMain.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTabControlMain.UseSelectable = true;
|
||||
//
|
||||
// contextMenuStripCaffiine
|
||||
//
|
||||
this.contextMenuStripCaffiine.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.replaceToolStripMenuItem,
|
||||
this.replacePCKToolStripMenuItem});
|
||||
this.contextMenuStripCaffiine.Name = "contextMenuStripCaffiine";
|
||||
this.contextMenuStripCaffiine.Size = new System.Drawing.Size(212, 48);
|
||||
this.contextMenuStripCaffiine.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStripCaffiine_Opening);
|
||||
//
|
||||
// replaceToolStripMenuItem
|
||||
//
|
||||
this.replaceToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Replace;
|
||||
this.replaceToolStripMenuItem.Name = "replaceToolStripMenuItem";
|
||||
this.replaceToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
|
||||
this.replaceToolStripMenuItem.Text = "Replace";
|
||||
this.replaceToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextAboveImage;
|
||||
this.replaceToolStripMenuItem.Click += new System.EventHandler(this.replaceToolStripMenuItem_Click);
|
||||
//
|
||||
// replacePCKToolStripMenuItem
|
||||
//
|
||||
this.replacePCKToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Replace;
|
||||
this.replacePCKToolStripMenuItem.Name = "replacePCKToolStripMenuItem";
|
||||
this.replacePCKToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
|
||||
this.replacePCKToolStripMenuItem.Text = "Replace with external PCK";
|
||||
this.replacePCKToolStripMenuItem.Click += new System.EventHandler(this.replacePCKToolStripMenuItem_Click);
|
||||
//
|
||||
// InstallPS3
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.ClientSize = new System.Drawing.Size(475, 659);
|
||||
this.Controls.Add(this.metroTabControlMain);
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 8.25F);
|
||||
this.ForeColor = System.Drawing.Color.White;
|
||||
this.Location = new System.Drawing.Point(0, 0);
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "InstallPS3";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Install to Playstation®3";
|
||||
this.Load += new System.EventHandler(this.installPS3_Load);
|
||||
this.metroTabPageMain.ResumeLayout(false);
|
||||
this.myTablePanel1.ResumeLayout(false);
|
||||
this.myTablePanel1.PerformLayout();
|
||||
this.metroTabControlMain.ResumeLayout(false);
|
||||
this.contextMenuStripCaffiine.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroTabPage metroTabPageMain;
|
||||
private System.Windows.Forms.TableLayoutPanel myTablePanel1;
|
||||
private System.Windows.Forms.RadioButton USDisc;
|
||||
private System.Windows.Forms.RadioButton JPDig;
|
||||
private System.Windows.Forms.RadioButton EurDisc;
|
||||
private System.Windows.Forms.ListView listViewPCKS;
|
||||
private MetroFramework.Controls.MetroTabControl metroTabControlMain;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStripCaffiine;
|
||||
private System.Windows.Forms.ToolStripMenuItem replacePCKToolStripMenuItem;
|
||||
private System.Windows.Forms.Button buttonServerToggle;
|
||||
private MetroFramework.Controls.MetroTextBox textBoxHost;
|
||||
private System.Windows.Forms.ToolStripMenuItem replaceToolStripMenuItem;
|
||||
private System.Windows.Forms.RadioButton USDig;
|
||||
private System.Windows.Forms.RadioButton EurDig;
|
||||
}
|
||||
}
|
||||
@@ -1,472 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Windows.Forms;
|
||||
using PckStudio.Classes.Misc;
|
||||
using PckStudio.ToolboxItems;
|
||||
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
public partial class InstallPS3 : ThemeForm
|
||||
{
|
||||
string loca = "";
|
||||
string dlcPath = "";
|
||||
string mod = "";
|
||||
bool serverOn = false;
|
||||
string currentpath = "";
|
||||
|
||||
public InstallPS3(string mod)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.mod = mod;
|
||||
|
||||
if (mod == null)
|
||||
{
|
||||
replaceToolStripMenuItem.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
replaceToolStripMenuItem.Text = "Replace with " + Path.GetFileName(mod);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//items class for use in bedrock skin conversion
|
||||
public class pckDir
|
||||
{
|
||||
public string folder { get; set; }
|
||||
public string file { get; set; }
|
||||
}
|
||||
|
||||
List<pckDir> pcks = new List<pckDir>();
|
||||
|
||||
private void updateDatabase()
|
||||
{
|
||||
pcks.Clear();
|
||||
pcks.Add(new pckDir() { folder = "Battle & Beasts", file = "BattleAndBeasts.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Battle & Beasts 2", file = "BattleAndBeasts2.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Biome Settlers Pack 1", file = "SkinsBiomeSettlers1.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Biome Settlers Pack 2", file = "SkinsBiomeSettlers2.pck" });
|
||||
//pcks.Add(new pckDir() { folder = "Campfire Tales Skin Pack", file = "" });
|
||||
pcks.Add(new pckDir() { folder = "Doctor Who Skins Volume I", file = "SkinPackDrWho.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Doctor Who Skins Volume II", file = "SkinPackDrWho.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Festive Skin Pack", file = "SkinsFestive.pck" });
|
||||
pcks.Add(new pckDir() { folder = "FINAL FANTASY XV Skin Pack", file = "FinalFantasyXV.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Magic The Gathering Skin Pack", file = "magicthegathering.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Mini Game Heroes Skin Pack", file = "Minigame2.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Mini Game Masters Skin Pack", file = "Minigame.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Moana Character Pack", file = "Moana.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Power Rangers Skin Pack", file = "PowerRangers.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Redstone Specialists Skin Pack", file = "SkinsRedstoneSpecialists.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Skin Pack 1", file = "Skins1.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Star Wars Classic Skin Pack", file = "StarWarsClassicPack.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Star Wars Prequel Skin Pack", file = "StarWarsPrequel.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Star Wars Rebels Skin Pack", file = "StarWarsRebelsPack.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Star Wars Sequel Skin Pack", file = "StarWarsSequel.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Story Mode Skin Pack", file = "PackStoryMode.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Stranger Things Skin Pack", file = "StrangerThings.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Strangers Biome Settlers 3 Skin Pack", file = "BiomeSettlers3_Strangers.pck" });
|
||||
pcks.Add(new pckDir() { folder = "The Incredibles Skin Pack", file = "Incredibles.pck" });
|
||||
pcks.Add(new pckDir() { folder = "The Simpsons Skin Pack", file = "SkinPackSimpsons.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Villains Skin Pack", file = "Villains.pck" });
|
||||
}
|
||||
|
||||
public void buttonMode(string mode)
|
||||
{
|
||||
if (mode == "start")
|
||||
{
|
||||
buttonServerToggle.BackColor = Color.FromArgb(68, 178, 13);
|
||||
serverOn = false;
|
||||
buttonServerToggle.Text = "Start";
|
||||
listViewPCKS.Enabled = false;
|
||||
}
|
||||
else if (mode == "stop")
|
||||
{
|
||||
serverOn = true;
|
||||
buttonServerToggle.BackColor = Color.Red;
|
||||
buttonServerToggle.Text = "Stop";
|
||||
listViewPCKS.Enabled = true;
|
||||
}
|
||||
else if (mode == "loading")
|
||||
{
|
||||
buttonServerToggle.BackColor = Color.MediumAquamarine;
|
||||
buttonServerToggle.Text = "Wait..";
|
||||
}
|
||||
}
|
||||
|
||||
private void loadPcks()
|
||||
{
|
||||
|
||||
string region = "";
|
||||
if (JPDig.Checked)
|
||||
{
|
||||
region = "NPJB00549/";
|
||||
}
|
||||
else if (EurDisc.Checked)
|
||||
{
|
||||
region = "BLES01976/";
|
||||
}
|
||||
else if (EurDig.Checked)
|
||||
{
|
||||
region = "NPEB01899/";
|
||||
}
|
||||
else if (USDisc.Checked)
|
||||
{
|
||||
region = "BLUS31426/";
|
||||
}
|
||||
else if (USDig.Checked)
|
||||
{
|
||||
region = "NPUB31419/";
|
||||
}
|
||||
|
||||
string device = "/dev_hdd0/";
|
||||
|
||||
if (region != "" && device != "")
|
||||
{
|
||||
dlcPath = device + "game/" + region;
|
||||
buttonServerToggle.Enabled = true;
|
||||
if (listViewPCKS.Columns.Count == 0)
|
||||
{
|
||||
listViewPCKS.Columns.Add(dlcPath, 395);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonServerToggle_Click(object sender, EventArgs e)
|
||||
{
|
||||
string mode = "";
|
||||
if (serverOn == false)
|
||||
{
|
||||
//Makes sure user typed in their ip
|
||||
if (textBoxHost.Text == "")
|
||||
{
|
||||
MessageBox.Show("Please enter a valid Playstation®3 IP!");
|
||||
return;
|
||||
}
|
||||
|
||||
//Turns Server On
|
||||
try
|
||||
{
|
||||
buttonMode(mode = "loading");
|
||||
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
|
||||
//ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(OnValidateCertificate);
|
||||
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://" + textBoxHost.Text + "/" + dlcPath);
|
||||
currentpath = textBoxHost.Text + "/" + dlcPath;
|
||||
request.Method = WebRequestMethods.Ftp.ListDirectory;
|
||||
request.Credentials = new NetworkCredential("", "");
|
||||
request.EnableSsl = false;
|
||||
request.Timeout = 1200000;
|
||||
|
||||
ServicePoint sp = request.ServicePoint;
|
||||
Console.WriteLine("ServicePoint connections = {0}.", sp.ConnectionLimit);
|
||||
sp.ConnectionLimit = 1;
|
||||
|
||||
using (var response = (FtpWebResponse)request.GetResponse())
|
||||
{
|
||||
using (var stream = response.GetResponseStream())
|
||||
{
|
||||
using (var reader = new StreamReader(stream, true))
|
||||
{
|
||||
string line = reader.ReadLine();
|
||||
while (line != null)
|
||||
{
|
||||
listViewPCKS.Items.Add(line);
|
||||
Console.WriteLine(line);
|
||||
line = reader.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (ListViewItem pck in listViewPCKS.Items)
|
||||
{
|
||||
int i = 0;
|
||||
FtpWebRequest request2 = (FtpWebRequest)WebRequest.Create("ftp://" + textBoxHost.Text + "/" + dlcPath + "/");
|
||||
request2.Method = WebRequestMethods.Ftp.ListDirectory;
|
||||
request2.Credentials = new NetworkCredential("", "");
|
||||
request2.EnableSsl = false;
|
||||
request2.Timeout = 1200000;
|
||||
|
||||
ServicePoint sp2 = request2.ServicePoint;
|
||||
Console.WriteLine("NOBLEDEZ WAS HERE", sp2.ConnectionLimit);
|
||||
sp2.ConnectionLimit = 1;
|
||||
|
||||
using (var response = (FtpWebResponse)request2.GetResponse())
|
||||
{
|
||||
using (var stream = response.GetResponseStream())
|
||||
{
|
||||
using (var reader = new StreamReader(stream, true))
|
||||
{
|
||||
string line = reader.ReadLine();
|
||||
while (line != null)
|
||||
{
|
||||
i += 1;
|
||||
pck.Tag = line;
|
||||
line = reader.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i != 1)
|
||||
{
|
||||
pck.Remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
if(pck.Text != ".")
|
||||
listViewPCKS.Items.Add(pck);
|
||||
}
|
||||
|
||||
buttonMode(mode = "stop");
|
||||
}
|
||||
catch (Exception disc)
|
||||
{
|
||||
buttonMode(mode = "start");
|
||||
MessageBox.Show(disc.ToString());
|
||||
}
|
||||
}
|
||||
else if (serverOn == true)
|
||||
{
|
||||
//Turns Server Off
|
||||
listViewPCKS.Items.Clear();
|
||||
try
|
||||
{
|
||||
buttonMode(mode = "start");
|
||||
}
|
||||
catch (Exception disc)
|
||||
{
|
||||
MessageBox.Show(disc.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void radioButtonEur_Click(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void radioButtonUs_Click(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void radioButtonJap_Click(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void listViewPCKS_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void listViewPCKS_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
ListViewHitTestInfo HI = listViewPCKS.HitTest(e.Location);
|
||||
if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
if (HI.Location == ListViewHitTestLocations.None)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
contextMenuStripCaffiine.Show(Cursor.Position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void replacePCKToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewPCKS.SelectedItems.Count != 0)
|
||||
{
|
||||
buttonMode("loading");
|
||||
OpenFileDialog openPCK = new OpenFileDialog();
|
||||
|
||||
if (openPCK.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
using (FTPClient client = new FTPClient("ftp://" + textBoxHost.Text, "", ""))
|
||||
client.UploadFile(openPCK.FileName, dlcPath + "/" + listViewPCKS.SelectedItems[0].Text + "/" + listViewPCKS.SelectedItems[0].Tag.ToString());
|
||||
MessageBox.Show("PCK Replaced!");
|
||||
}
|
||||
}
|
||||
buttonMode("stop");
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void listViewPCKS_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void buttonInstall_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (MessageBox.Show("Replace with " + Path.GetFileNameWithoutExtension(mod) + "?", "Install Mod", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
{
|
||||
if (!Directory.Exists(dlcPath + pcks[listViewPCKS.SelectedItems[0].Index].folder + "/"))
|
||||
{
|
||||
Directory.CreateDirectory(dlcPath + pcks[listViewPCKS.SelectedItems[0].Index].folder + "/");
|
||||
}
|
||||
File.Copy(mod, dlcPath + pcks[listViewPCKS.SelectedItems[0].Index].folder + "/" + pcks[listViewPCKS.SelectedItems[0].Index].file);
|
||||
}
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void deletePCKModToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Directory.Delete(dlcPath + pcks[listViewPCKS.SelectedItems[0].Index].folder + "/", true);
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void buttonServerToggle_Clic(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void contextMenuStripCaffiine_Opening(object sender, CancelEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void replaceToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewPCKS.SelectedItems.Count != 0)
|
||||
{
|
||||
buttonMode("loading");
|
||||
using (FTPClient client = new FTPClient("ftp://" + textBoxHost.Text, "", ""))
|
||||
client.UploadFile(mod, dlcPath + "/" + listViewPCKS.SelectedItems[0].Text + "/" + listViewPCKS.SelectedItems[0].Tag.ToString());
|
||||
MessageBox.Show("PCK Replaced!");
|
||||
}
|
||||
buttonMode("stop");
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void EurDisc_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void EurDig_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void USDig_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void USDisc_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void JPDig_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void installPS3_Load(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void listViewPCKS_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string folname = listViewPCKS.SelectedItems[0].Text;
|
||||
if (folname.Contains(".") && folname != "..")
|
||||
return;
|
||||
Console.WriteLine("ftp://" + currentpath + listViewPCKS.SelectedItems[0].Text);
|
||||
listViewPCKS.Items.Clear();
|
||||
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://" + currentpath.Replace("//", "/") + folname);
|
||||
if (folname == "..")
|
||||
{
|
||||
string[] tmp = currentpath.Split(new[] { "/" }, StringSplitOptions.None);
|
||||
Console.WriteLine(tmp[(tmp).Length - 2]);
|
||||
string foldr = tmp[(tmp).Length - 2];
|
||||
request = (FtpWebRequest)WebRequest.Create("ftp://" + currentpath.Replace(foldr, "").Replace("//", "/"));
|
||||
}
|
||||
request.Method = WebRequestMethods.Ftp.ListDirectory;
|
||||
request.Credentials = new NetworkCredential("", "");
|
||||
request.EnableSsl = false;
|
||||
request.Timeout = 1200000;
|
||||
|
||||
currentpath = currentpath + "/" + folname + "/";
|
||||
|
||||
ServicePoint sp = request.ServicePoint;
|
||||
Console.WriteLine("ServicePoint connections = {0}.", sp.ConnectionLimit);
|
||||
sp.ConnectionLimit = 1;
|
||||
|
||||
using (var response = (FtpWebResponse)request.GetResponse())
|
||||
{
|
||||
using (var stream = response.GetResponseStream())
|
||||
{
|
||||
using (var reader = new StreamReader(stream, true))
|
||||
{
|
||||
string line = reader.ReadLine();
|
||||
while (line != null)
|
||||
{
|
||||
listViewPCKS.Items.Add(line);
|
||||
Console.WriteLine(line);
|
||||
line = reader.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (ListViewItem pck in listViewPCKS.Items)
|
||||
{
|
||||
int i = 0;
|
||||
FtpWebRequest request2 = (FtpWebRequest)WebRequest.Create("ftp://" + currentpath);
|
||||
request2.Method = WebRequestMethods.Ftp.ListDirectory;
|
||||
request2.Credentials = new NetworkCredential("", "");
|
||||
request2.EnableSsl = false;
|
||||
request2.Timeout = 1200000;
|
||||
|
||||
ServicePoint sp2 = request2.ServicePoint;
|
||||
Console.WriteLine("NOBLEDEZ WAS HERE", sp2.ConnectionLimit);
|
||||
sp2.ConnectionLimit = 1;
|
||||
|
||||
using (var response = (FtpWebResponse)request2.GetResponse())
|
||||
{
|
||||
using (var stream = response.GetResponseStream())
|
||||
{
|
||||
using (var reader = new StreamReader(stream, true))
|
||||
{
|
||||
string line = reader.ReadLine();
|
||||
while (line != null)
|
||||
{
|
||||
i += 1;
|
||||
pck.Tag = line;
|
||||
line = reader.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i != 1)
|
||||
{
|
||||
pck.Remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
listViewPCKS.Items.Add(pck);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
358
PCK-Studio/Forms/Utilities/installVita.Designer.cs
generated
@@ -1,358 +0,0 @@
|
||||
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
partial class InstallVita
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.metroTabPageMain = new MetroFramework.Controls.MetroTabPage();
|
||||
this.myTablePanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.EurDig = new System.Windows.Forms.RadioButton();
|
||||
this.USDig = new System.Windows.Forms.RadioButton();
|
||||
this.buttonServerToggle = new System.Windows.Forms.Button();
|
||||
this.textBoxHost = new MetroFramework.Controls.MetroTextBox();
|
||||
this.EurDisc = new System.Windows.Forms.RadioButton();
|
||||
this.USDisc = new System.Windows.Forms.RadioButton();
|
||||
this.listViewPCKS = new System.Windows.Forms.ListView();
|
||||
this.JPDig = new System.Windows.Forms.RadioButton();
|
||||
this.metroTabControlMain = new MetroFramework.Controls.MetroTabControl();
|
||||
this.contextMenuStripCaffiine = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.replaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.replacePCKToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.metroTabPageMain.SuspendLayout();
|
||||
this.myTablePanel1.SuspendLayout();
|
||||
this.metroTabControlMain.SuspendLayout();
|
||||
this.contextMenuStripCaffiine.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// metroTabPageMain
|
||||
//
|
||||
this.metroTabPageMain.Controls.Add(this.myTablePanel1);
|
||||
this.metroTabPageMain.HorizontalScrollbarBarColor = true;
|
||||
this.metroTabPageMain.HorizontalScrollbarHighlightOnWheel = false;
|
||||
this.metroTabPageMain.HorizontalScrollbarSize = 10;
|
||||
this.metroTabPageMain.Location = new System.Drawing.Point(4, 38);
|
||||
this.metroTabPageMain.Name = "metroTabPageMain";
|
||||
this.metroTabPageMain.Size = new System.Drawing.Size(467, 617);
|
||||
this.metroTabPageMain.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.metroTabPageMain.TabIndex = 0;
|
||||
this.metroTabPageMain.Text = "Installer";
|
||||
this.metroTabPageMain.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTabPageMain.VerticalScrollbarBarColor = true;
|
||||
this.metroTabPageMain.VerticalScrollbarHighlightOnWheel = false;
|
||||
this.metroTabPageMain.VerticalScrollbarSize = 10;
|
||||
//
|
||||
// myTablePanel1
|
||||
//
|
||||
this.myTablePanel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.myTablePanel1.ColumnCount = 3;
|
||||
this.myTablePanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||
this.myTablePanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
|
||||
this.myTablePanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F));
|
||||
this.myTablePanel1.Controls.Add(this.EurDig, 1, 1);
|
||||
this.myTablePanel1.Controls.Add(this.USDig, 2, 1);
|
||||
this.myTablePanel1.Controls.Add(this.buttonServerToggle, 2, 0);
|
||||
this.myTablePanel1.Controls.Add(this.textBoxHost, 0, 0);
|
||||
this.myTablePanel1.Controls.Add(this.EurDisc, 1, 2);
|
||||
this.myTablePanel1.Controls.Add(this.USDisc, 2, 2);
|
||||
this.myTablePanel1.Controls.Add(this.listViewPCKS, 0, 3);
|
||||
this.myTablePanel1.Controls.Add(this.JPDig, 0, 1);
|
||||
this.myTablePanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.myTablePanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.myTablePanel1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.myTablePanel1.Name = "myTablePanel1";
|
||||
this.myTablePanel1.RowCount = 7;
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.myTablePanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.myTablePanel1.Size = new System.Drawing.Size(467, 617);
|
||||
this.myTablePanel1.TabIndex = 2;
|
||||
//
|
||||
// EurDig
|
||||
//
|
||||
this.EurDig.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.EurDig.AutoSize = true;
|
||||
this.EurDig.BackColor = System.Drawing.Color.Transparent;
|
||||
this.EurDig.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.EurDig.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.EurDig.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.EurDig.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.EurDig.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.EurDig.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.EurDig.ForeColor = System.Drawing.Color.White;
|
||||
this.EurDig.Location = new System.Drawing.Point(158, 36);
|
||||
this.EurDig.Name = "EurDig";
|
||||
this.EurDig.Size = new System.Drawing.Size(100, 30);
|
||||
this.EurDig.TabIndex = 11;
|
||||
this.EurDig.Text = "EUR Digital";
|
||||
this.EurDig.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.EurDig.UseVisualStyleBackColor = false;
|
||||
this.EurDig.CheckedChanged += new System.EventHandler(this.EurDig_CheckedChanged);
|
||||
//
|
||||
// USDig
|
||||
//
|
||||
this.USDig.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.USDig.AutoSize = true;
|
||||
this.USDig.BackColor = System.Drawing.Color.Transparent;
|
||||
this.USDig.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.USDig.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.USDig.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.USDig.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.USDig.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.USDig.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.USDig.ForeColor = System.Drawing.Color.White;
|
||||
this.USDig.Location = new System.Drawing.Point(313, 36);
|
||||
this.USDig.Name = "USDig";
|
||||
this.USDig.Size = new System.Drawing.Size(91, 30);
|
||||
this.USDig.TabIndex = 12;
|
||||
this.USDig.Text = "US Digital";
|
||||
this.USDig.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.USDig.UseVisualStyleBackColor = false;
|
||||
this.USDig.CheckedChanged += new System.EventHandler(this.USDig_CheckedChanged);
|
||||
//
|
||||
// buttonServerToggle
|
||||
//
|
||||
this.buttonServerToggle.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.buttonServerToggle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(178)))), ((int)(((byte)(13)))));
|
||||
this.buttonServerToggle.FlatAppearance.BorderSize = 0;
|
||||
this.buttonServerToggle.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.buttonServerToggle.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.buttonServerToggle.ForeColor = System.Drawing.Color.White;
|
||||
this.buttonServerToggle.Location = new System.Drawing.Point(313, 3);
|
||||
this.buttonServerToggle.Name = "buttonServerToggle";
|
||||
this.buttonServerToggle.Size = new System.Drawing.Size(137, 27);
|
||||
this.buttonServerToggle.TabIndex = 9;
|
||||
this.buttonServerToggle.Text = "Start";
|
||||
this.buttonServerToggle.UseVisualStyleBackColor = false;
|
||||
this.buttonServerToggle.Click += new System.EventHandler(this.buttonServerToggle_Click);
|
||||
//
|
||||
// textBoxHost
|
||||
//
|
||||
this.textBoxHost.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.textBoxHost.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.myTablePanel1.SetColumnSpan(this.textBoxHost, 2);
|
||||
//
|
||||
//
|
||||
//
|
||||
this.textBoxHost.CustomButton.Image = null;
|
||||
this.textBoxHost.CustomButton.Location = new System.Drawing.Point(260, 2);
|
||||
this.textBoxHost.CustomButton.Name = "";
|
||||
this.textBoxHost.CustomButton.Size = new System.Drawing.Size(15, 15);
|
||||
this.textBoxHost.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.textBoxHost.CustomButton.TabIndex = 1;
|
||||
this.textBoxHost.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.textBoxHost.CustomButton.UseSelectable = true;
|
||||
this.textBoxHost.CustomButton.Visible = false;
|
||||
this.textBoxHost.IconRight = true;
|
||||
this.textBoxHost.Lines = new string[0];
|
||||
this.textBoxHost.Location = new System.Drawing.Point(3, 6);
|
||||
this.textBoxHost.MaxLength = 32767;
|
||||
this.textBoxHost.Name = "textBoxHost";
|
||||
this.textBoxHost.PasswordChar = '\0';
|
||||
this.textBoxHost.PromptText = "PS Vita IP";
|
||||
this.textBoxHost.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.textBoxHost.SelectedText = "";
|
||||
this.textBoxHost.SelectionLength = 0;
|
||||
this.textBoxHost.SelectionStart = 0;
|
||||
this.textBoxHost.ShortcutsEnabled = true;
|
||||
this.textBoxHost.Size = new System.Drawing.Size(278, 20);
|
||||
this.textBoxHost.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.textBoxHost.TabIndex = 10;
|
||||
this.textBoxHost.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.textBoxHost.UseSelectable = true;
|
||||
this.textBoxHost.WaterMark = "PS Vita IP";
|
||||
this.textBoxHost.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.textBoxHost.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// EurDisc
|
||||
//
|
||||
this.EurDisc.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.EurDisc.AutoSize = true;
|
||||
this.EurDisc.BackColor = System.Drawing.Color.Transparent;
|
||||
this.EurDisc.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.EurDisc.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.EurDisc.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.EurDisc.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.EurDisc.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.EurDisc.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.EurDisc.ForeColor = System.Drawing.Color.White;
|
||||
this.EurDisc.Location = new System.Drawing.Point(158, 72);
|
||||
this.EurDisc.Name = "EurDisc";
|
||||
this.EurDisc.Size = new System.Drawing.Size(84, 30);
|
||||
this.EurDisc.TabIndex = 0;
|
||||
this.EurDisc.Text = "EUR Disc";
|
||||
this.EurDisc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.EurDisc.UseVisualStyleBackColor = false;
|
||||
this.EurDisc.CheckedChanged += new System.EventHandler(this.EurDisc_CheckedChanged);
|
||||
//
|
||||
// USDisc
|
||||
//
|
||||
this.USDisc.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.USDisc.AutoSize = true;
|
||||
this.USDisc.BackColor = System.Drawing.Color.Transparent;
|
||||
this.USDisc.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.USDisc.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.USDisc.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.USDisc.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.USDisc.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.USDisc.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.USDisc.ForeColor = System.Drawing.Color.White;
|
||||
this.USDisc.Location = new System.Drawing.Point(313, 72);
|
||||
this.USDisc.Name = "USDisc";
|
||||
this.USDisc.Size = new System.Drawing.Size(75, 30);
|
||||
this.USDisc.TabIndex = 2;
|
||||
this.USDisc.Text = "US Disc";
|
||||
this.USDisc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.USDisc.UseVisualStyleBackColor = false;
|
||||
this.USDisc.CheckedChanged += new System.EventHandler(this.USDisc_CheckedChanged);
|
||||
//
|
||||
// listViewPCKS
|
||||
//
|
||||
this.listViewPCKS.Activation = System.Windows.Forms.ItemActivation.TwoClick;
|
||||
this.myTablePanel1.SetColumnSpan(this.listViewPCKS, 3);
|
||||
this.listViewPCKS.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listViewPCKS.Enabled = false;
|
||||
this.listViewPCKS.HideSelection = false;
|
||||
this.listViewPCKS.Location = new System.Drawing.Point(3, 108);
|
||||
this.listViewPCKS.Name = "listViewPCKS";
|
||||
this.listViewPCKS.Size = new System.Drawing.Size(461, 506);
|
||||
this.listViewPCKS.TabIndex = 3;
|
||||
this.listViewPCKS.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewPCKS.View = System.Windows.Forms.View.Details;
|
||||
this.listViewPCKS.SelectedIndexChanged += new System.EventHandler(this.listViewPCKS_SelectedIndexChanged);
|
||||
this.listViewPCKS.Click += new System.EventHandler(this.listViewPCKS_Click);
|
||||
this.listViewPCKS.DoubleClick += new System.EventHandler(this.listViewPCKS_DoubleClick);
|
||||
this.listViewPCKS.MouseDown += new System.Windows.Forms.MouseEventHandler(this.listViewPCKS_MouseDown);
|
||||
//
|
||||
// JPDig
|
||||
//
|
||||
this.JPDig.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.JPDig.AutoSize = true;
|
||||
this.JPDig.BackColor = System.Drawing.Color.Transparent;
|
||||
this.JPDig.CheckAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
this.JPDig.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.JPDig.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.JPDig.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.JPDig.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.JPDig.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.JPDig.ForeColor = System.Drawing.Color.White;
|
||||
this.JPDig.Location = new System.Drawing.Point(3, 36);
|
||||
this.JPDig.Name = "JPDig";
|
||||
this.JPDig.Size = new System.Drawing.Size(47, 30);
|
||||
this.JPDig.TabIndex = 1;
|
||||
this.JPDig.Text = "JAP";
|
||||
this.JPDig.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.JPDig.UseVisualStyleBackColor = false;
|
||||
this.JPDig.CheckedChanged += new System.EventHandler(this.JPDig_CheckedChanged);
|
||||
//
|
||||
// metroTabControlMain
|
||||
//
|
||||
this.metroTabControlMain.Controls.Add(this.metroTabPageMain);
|
||||
this.metroTabControlMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.metroTabControlMain.Location = new System.Drawing.Point(0, 0);
|
||||
this.metroTabControlMain.Name = "metroTabControlMain";
|
||||
this.metroTabControlMain.SelectedIndex = 0;
|
||||
this.metroTabControlMain.Size = new System.Drawing.Size(475, 659);
|
||||
this.metroTabControlMain.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.metroTabControlMain.TabIndex = 0;
|
||||
this.metroTabControlMain.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTabControlMain.UseSelectable = true;
|
||||
//
|
||||
// contextMenuStripCaffiine
|
||||
//
|
||||
this.contextMenuStripCaffiine.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.replaceToolStripMenuItem,
|
||||
this.replacePCKToolStripMenuItem});
|
||||
this.contextMenuStripCaffiine.Name = "contextMenuStripCaffiine";
|
||||
this.contextMenuStripCaffiine.Size = new System.Drawing.Size(212, 48);
|
||||
this.contextMenuStripCaffiine.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStripCaffiine_Opening);
|
||||
//
|
||||
// replaceToolStripMenuItem
|
||||
//
|
||||
this.replaceToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Replace;
|
||||
this.replaceToolStripMenuItem.Name = "replaceToolStripMenuItem";
|
||||
this.replaceToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
|
||||
this.replaceToolStripMenuItem.Text = "Replace";
|
||||
this.replaceToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextAboveImage;
|
||||
this.replaceToolStripMenuItem.Click += new System.EventHandler(this.replaceToolStripMenuItem_Click);
|
||||
//
|
||||
// replacePCKToolStripMenuItem
|
||||
//
|
||||
this.replacePCKToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Replace;
|
||||
this.replacePCKToolStripMenuItem.Name = "replacePCKToolStripMenuItem";
|
||||
this.replacePCKToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
|
||||
this.replacePCKToolStripMenuItem.Text = "Replace with external PCK";
|
||||
this.replacePCKToolStripMenuItem.Click += new System.EventHandler(this.replacePCKToolStripMenuItem_Click);
|
||||
//
|
||||
// InstallVita
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.ClientSize = new System.Drawing.Size(475, 659);
|
||||
this.Controls.Add(this.metroTabControlMain);
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 8.25F);
|
||||
this.ForeColor = System.Drawing.Color.White;
|
||||
this.Location = new System.Drawing.Point(0, 0);
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "InstallVita";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Install to Playstation®Vita";
|
||||
this.Load += new System.EventHandler(this.installVita_Load);
|
||||
this.metroTabPageMain.ResumeLayout(false);
|
||||
this.myTablePanel1.ResumeLayout(false);
|
||||
this.myTablePanel1.PerformLayout();
|
||||
this.metroTabControlMain.ResumeLayout(false);
|
||||
this.contextMenuStripCaffiine.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroTabPage metroTabPageMain;
|
||||
private System.Windows.Forms.TableLayoutPanel myTablePanel1;
|
||||
private System.Windows.Forms.RadioButton USDisc;
|
||||
private System.Windows.Forms.RadioButton JPDig;
|
||||
private System.Windows.Forms.RadioButton EurDisc;
|
||||
private System.Windows.Forms.ListView listViewPCKS;
|
||||
private MetroFramework.Controls.MetroTabControl metroTabControlMain;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStripCaffiine;
|
||||
private System.Windows.Forms.ToolStripMenuItem replacePCKToolStripMenuItem;
|
||||
private System.Windows.Forms.Button buttonServerToggle;
|
||||
private MetroFramework.Controls.MetroTextBox textBoxHost;
|
||||
private System.Windows.Forms.ToolStripMenuItem replaceToolStripMenuItem;
|
||||
private System.Windows.Forms.RadioButton USDig;
|
||||
private System.Windows.Forms.RadioButton EurDig;
|
||||
}
|
||||
}
|
||||
@@ -1,472 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Windows.Forms;
|
||||
using PckStudio.Classes.Misc;
|
||||
using PckStudio.ToolboxItems;
|
||||
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
public partial class InstallVita : ThemeForm
|
||||
{
|
||||
public InstallVita(string mod)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.mod = mod;
|
||||
|
||||
if (mod == null)
|
||||
{
|
||||
replaceToolStripMenuItem.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
replaceToolStripMenuItem.Text = "Replace with " + Path.GetFileName(mod);
|
||||
}
|
||||
}
|
||||
|
||||
string loca = "";
|
||||
string dlcPath = "";
|
||||
string mod = "";
|
||||
bool serverOn = false;
|
||||
string currentpath = "";
|
||||
|
||||
|
||||
|
||||
|
||||
//items class for use in bedrock skin conversion
|
||||
public class pckDir
|
||||
{
|
||||
public string folder { get; set; }
|
||||
public string file { get; set; }
|
||||
}
|
||||
|
||||
List<pckDir> pcks = new List<pckDir>();
|
||||
|
||||
private void updateDatabase()
|
||||
{
|
||||
pcks.Clear();
|
||||
pcks.Add(new pckDir() { folder = "Battle & Beasts", file = "BattleAndBeasts.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Battle & Beasts 2", file = "BattleAndBeasts2.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Biome Settlers Pack 1", file = "SkinsBiomeSettlers1.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Biome Settlers Pack 2", file = "SkinsBiomeSettlers2.pck" });
|
||||
//pcks.Add(new pckDir() { folder = "Campfire Tales Skin Pack", file = "" });
|
||||
pcks.Add(new pckDir() { folder = "Doctor Who Skins Volume I", file = "SkinPackDrWho.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Doctor Who Skins Volume II", file = "SkinPackDrWho.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Festive Skin Pack", file = "SkinsFestive.pck" });
|
||||
pcks.Add(new pckDir() { folder = "FINAL FANTASY XV Skin Pack", file = "FinalFantasyXV.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Magic The Gathering Skin Pack", file = "magicthegathering.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Mini Game Heroes Skin Pack", file = "Minigame2.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Mini Game Masters Skin Pack", file = "Minigame.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Moana Character Pack", file = "Moana.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Power Rangers Skin Pack", file = "PowerRangers.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Redstone Specialists Skin Pack", file = "SkinsRedstoneSpecialists.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Skin Pack 1", file = "Skins1.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Star Wars Classic Skin Pack", file = "StarWarsClassicPack.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Star Wars Prequel Skin Pack", file = "StarWarsPrequel.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Star Wars Rebels Skin Pack", file = "StarWarsRebelsPack.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Star Wars Sequel Skin Pack", file = "StarWarsSequel.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Story Mode Skin Pack", file = "PackStoryMode.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Stranger Things Skin Pack", file = "StrangerThings.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Strangers Biome Settlers 3 Skin Pack", file = "BiomeSettlers3_Strangers.pck" });
|
||||
pcks.Add(new pckDir() { folder = "The Incredibles Skin Pack", file = "Incredibles.pck" });
|
||||
pcks.Add(new pckDir() { folder = "The Simpsons Skin Pack", file = "SkinPackSimpsons.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Villains Skin Pack", file = "Villains.pck" });
|
||||
}
|
||||
|
||||
public void buttonMode(string mode)
|
||||
{
|
||||
if (mode == "start")
|
||||
{
|
||||
buttonServerToggle.BackColor = Color.FromArgb(68, 178, 13);
|
||||
serverOn = false;
|
||||
buttonServerToggle.Text = "Start";
|
||||
listViewPCKS.Enabled = false;
|
||||
}
|
||||
else if (mode == "stop")
|
||||
{
|
||||
serverOn = true;
|
||||
buttonServerToggle.BackColor = Color.Red;
|
||||
buttonServerToggle.Text = "Stop";
|
||||
listViewPCKS.Enabled = true;
|
||||
}
|
||||
else if (mode == "loading")
|
||||
{
|
||||
buttonServerToggle.BackColor = Color.MediumAquamarine;
|
||||
buttonServerToggle.Text = "Wait..";
|
||||
}
|
||||
}
|
||||
|
||||
private void loadPcks()
|
||||
{
|
||||
|
||||
string region = "";
|
||||
if (JPDig.Checked)
|
||||
{
|
||||
region = "NPJB00549/";
|
||||
}
|
||||
else if (EurDisc.Checked)
|
||||
{
|
||||
region = "BLES01976/";
|
||||
}
|
||||
else if (EurDig.Checked)
|
||||
{
|
||||
region = "NPEB01899/";
|
||||
}
|
||||
else if (USDisc.Checked)
|
||||
{
|
||||
region = "BLUS31426/";
|
||||
}
|
||||
else if (USDig.Checked)
|
||||
{
|
||||
region = "NPUB31419/";
|
||||
}
|
||||
|
||||
string device = "/dev_hdd0/";
|
||||
|
||||
if (region != "" && device != "")
|
||||
{
|
||||
dlcPath = device + "game/" + region;
|
||||
buttonServerToggle.Enabled = true;
|
||||
if (listViewPCKS.Columns.Count == 0)
|
||||
{
|
||||
listViewPCKS.Columns.Add(dlcPath, 395);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonServerToggle_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (serverOn == false)
|
||||
{
|
||||
//Makes sure user typed in their ip
|
||||
if (textBoxHost.Text == "")
|
||||
{
|
||||
MessageBox.Show("Please enter a valid Playstation®3 IP!");
|
||||
return;
|
||||
}
|
||||
|
||||
//Turns Server On
|
||||
try
|
||||
{
|
||||
buttonMode("loading");
|
||||
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
|
||||
//ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(OnValidateCertificate);
|
||||
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://" + textBoxHost.Text + "/" + dlcPath);
|
||||
currentpath = textBoxHost.Text + "/" + dlcPath;
|
||||
request.Method = WebRequestMethods.Ftp.ListDirectory;
|
||||
request.Credentials = new NetworkCredential("", "");
|
||||
request.EnableSsl = false;
|
||||
request.Timeout = 1200000;
|
||||
|
||||
ServicePoint sp = request.ServicePoint;
|
||||
Console.WriteLine("ServicePoint connections = {0}.", sp.ConnectionLimit);
|
||||
sp.ConnectionLimit = 1;
|
||||
|
||||
using (var response = (FtpWebResponse)request.GetResponse())
|
||||
{
|
||||
using (var stream = response.GetResponseStream())
|
||||
{
|
||||
using (var reader = new StreamReader(stream, true))
|
||||
{
|
||||
string line = reader.ReadLine();
|
||||
while (line != null)
|
||||
{
|
||||
listViewPCKS.Items.Add(line);
|
||||
Console.WriteLine(line);
|
||||
line = reader.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (ListViewItem pck in listViewPCKS.Items)
|
||||
{
|
||||
int i = 0;
|
||||
FtpWebRequest request2 = (FtpWebRequest)WebRequest.Create("ftp://" + textBoxHost.Text + "/" + dlcPath + "/");
|
||||
request2.Method = WebRequestMethods.Ftp.ListDirectory;
|
||||
request2.Credentials = new NetworkCredential("", "");
|
||||
request2.EnableSsl = false;
|
||||
request2.Timeout = 1200000;
|
||||
|
||||
ServicePoint sp2 = request2.ServicePoint;
|
||||
Console.WriteLine("NOBLEDEZ WAS HERE", sp2.ConnectionLimit);
|
||||
sp2.ConnectionLimit = 1;
|
||||
|
||||
using (var response = (FtpWebResponse)request2.GetResponse())
|
||||
{
|
||||
using (var stream = response.GetResponseStream())
|
||||
{
|
||||
using (var reader = new StreamReader(stream, true))
|
||||
{
|
||||
string line = reader.ReadLine();
|
||||
while (line != null)
|
||||
{
|
||||
i += 1;
|
||||
pck.Tag = line;
|
||||
line = reader.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i != 1)
|
||||
{
|
||||
pck.Remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
if (pck.Text != ".")
|
||||
listViewPCKS.Items.Add(pck);
|
||||
}
|
||||
|
||||
buttonMode("stop");
|
||||
}
|
||||
catch (Exception disc)
|
||||
{
|
||||
buttonMode("start");
|
||||
MessageBox.Show(disc.ToString());
|
||||
}
|
||||
}
|
||||
else if (serverOn == true)
|
||||
{
|
||||
//Turns Server Off
|
||||
listViewPCKS.Items.Clear();
|
||||
try
|
||||
{
|
||||
buttonMode("start");
|
||||
}
|
||||
catch (Exception disc)
|
||||
{
|
||||
MessageBox.Show(disc.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void radioButtonEur_Click(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void radioButtonUs_Click(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void radioButtonJap_Click(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void listViewPCKS_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void listViewPCKS_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
ListViewHitTestInfo HI = listViewPCKS.HitTest(e.Location);
|
||||
if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
if (HI.Location == ListViewHitTestLocations.None)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
contextMenuStripCaffiine.Show(Cursor.Position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void replacePCKToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewPCKS.SelectedItems.Count != 0)
|
||||
{
|
||||
buttonMode("loading");
|
||||
OpenFileDialog openPCK = new OpenFileDialog();
|
||||
|
||||
if (openPCK.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
using (FTPClient client = new FTPClient("ftp://" + textBoxHost.Text, "", ""))
|
||||
client.UploadFile(openPCK.FileName, dlcPath + "/" + listViewPCKS.SelectedItems[0].Text + "/" + listViewPCKS.SelectedItems[0].Tag.ToString());
|
||||
MessageBox.Show("PCK Replaced!");
|
||||
}
|
||||
}
|
||||
buttonMode("stop");
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void listViewPCKS_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void buttonInstall_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (MessageBox.Show("Replace with " + Path.GetFileNameWithoutExtension(mod) + "?", "Install Mod", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
{
|
||||
if (!Directory.Exists(dlcPath + pcks[listViewPCKS.SelectedItems[0].Index].folder + "/"))
|
||||
{
|
||||
Directory.CreateDirectory(dlcPath + pcks[listViewPCKS.SelectedItems[0].Index].folder + "/");
|
||||
}
|
||||
File.Copy(mod, dlcPath + pcks[listViewPCKS.SelectedItems[0].Index].folder + "/" + pcks[listViewPCKS.SelectedItems[0].Index].file);
|
||||
}
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void deletePCKModToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Directory.Delete(dlcPath + pcks[listViewPCKS.SelectedItems[0].Index].folder + "/", true);
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void buttonServerToggle_Clic(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void contextMenuStripCaffiine_Opening(object sender, CancelEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void replaceToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewPCKS.SelectedItems.Count != 0)
|
||||
{
|
||||
buttonMode("loading");
|
||||
using (FTPClient client = new FTPClient("ftp://" + textBoxHost.Text, "", ""))
|
||||
client.UploadFile(mod, dlcPath + "/" + listViewPCKS.SelectedItems[0].Text + "/" + listViewPCKS.SelectedItems[0].Tag.ToString());
|
||||
MessageBox.Show("PCK Replaced!");
|
||||
}
|
||||
buttonMode("stop");
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void EurDisc_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void EurDig_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void USDig_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void USDisc_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void JPDig_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void installVita_Load(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void listViewPCKS_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string folname = listViewPCKS.SelectedItems[0].Text;
|
||||
if (folname.Contains(".") && folname != "..")
|
||||
return;
|
||||
Console.WriteLine("ftp://" + currentpath + listViewPCKS.SelectedItems[0].Text);
|
||||
listViewPCKS.Items.Clear();
|
||||
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://" + currentpath.Replace("//", "/") + folname);
|
||||
if (folname == "..")
|
||||
{
|
||||
string[] tmp = currentpath.Split(new[] { "/" }, StringSplitOptions.None);
|
||||
Console.WriteLine(tmp[(tmp).Length - 2]);
|
||||
string foldr = tmp[(tmp).Length - 2];
|
||||
request = (FtpWebRequest)WebRequest.Create("ftp://" + currentpath.Replace(foldr, "").Replace("//", "/"));
|
||||
}
|
||||
request.Method = WebRequestMethods.Ftp.ListDirectory;
|
||||
request.Credentials = new NetworkCredential("", "");
|
||||
request.EnableSsl = false;
|
||||
request.Timeout = 1200000;
|
||||
|
||||
currentpath = currentpath + "/" + folname + "/";
|
||||
|
||||
ServicePoint sp = request.ServicePoint;
|
||||
Console.WriteLine("ServicePoint connections = {0}.", sp.ConnectionLimit);
|
||||
sp.ConnectionLimit = 1;
|
||||
|
||||
using (var response = (FtpWebResponse)request.GetResponse())
|
||||
{
|
||||
using (var stream = response.GetResponseStream())
|
||||
{
|
||||
using (var reader = new StreamReader(stream, true))
|
||||
{
|
||||
string line = reader.ReadLine();
|
||||
while (line != null)
|
||||
{
|
||||
listViewPCKS.Items.Add(line);
|
||||
Console.WriteLine(line);
|
||||
line = reader.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (ListViewItem pck in listViewPCKS.Items)
|
||||
{
|
||||
int i = 0;
|
||||
FtpWebRequest request2 = (FtpWebRequest)WebRequest.Create("ftp://" + currentpath);
|
||||
request2.Method = WebRequestMethods.Ftp.ListDirectory;
|
||||
request2.Credentials = new NetworkCredential("", "");
|
||||
request2.EnableSsl = false;
|
||||
request2.Timeout = 1200000;
|
||||
|
||||
ServicePoint sp2 = request2.ServicePoint;
|
||||
Console.WriteLine("NOBLEDEZ WAS HERE", sp2.ConnectionLimit);
|
||||
sp2.ConnectionLimit = 1;
|
||||
|
||||
using (var response = (FtpWebResponse)request2.GetResponse())
|
||||
{
|
||||
using (var stream = response.GetResponseStream())
|
||||
{
|
||||
using (var reader = new StreamReader(stream, true))
|
||||
{
|
||||
string line = reader.ReadLine();
|
||||
while (line != null)
|
||||
{
|
||||
i += 1;
|
||||
pck.Tag = line;
|
||||
line = reader.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i != 1)
|
||||
{
|
||||
pck.Remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
listViewPCKS.Items.Add(pck);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="contextMenuStripCaffiine.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
348
PCK-Studio/Forms/Utilities/installWiiU.Designer.cs
generated
@@ -1,348 +0,0 @@
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
partial class InstallWiiU
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InstallWiiU));
|
||||
this.metroTabPageMain = new MetroFramework.Controls.MetroTabPage();
|
||||
this.myTablePanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.buttonServerToggle = new System.Windows.Forms.Button();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.radioButtonSystem = new System.Windows.Forms.RadioButton();
|
||||
this.buttonSelect = new System.Windows.Forms.Button();
|
||||
this.radioButtonUSB = new System.Windows.Forms.RadioButton();
|
||||
this.textBoxHost = new MetroFramework.Controls.MetroTextBox();
|
||||
this.radioButtonEur = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonUs = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonJap = new System.Windows.Forms.RadioButton();
|
||||
this.listViewPCKS = new System.Windows.Forms.ListView();
|
||||
this.TextBoxPackImage = new MetroFramework.Controls.MetroTextBox();
|
||||
this.PackImageSelection = new System.Windows.Forms.Button();
|
||||
this.metroTabControlMain = new MetroFramework.Controls.MetroTabControl();
|
||||
this.contextMenuStripCaffiine = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.replaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.replacePCKToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.metroTabPageMain.SuspendLayout();
|
||||
this.myTablePanel1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.metroTabControlMain.SuspendLayout();
|
||||
this.contextMenuStripCaffiine.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// metroTabPageMain
|
||||
//
|
||||
this.metroTabPageMain.Controls.Add(this.myTablePanel1);
|
||||
this.metroTabPageMain.HorizontalScrollbarBarColor = true;
|
||||
this.metroTabPageMain.HorizontalScrollbarHighlightOnWheel = false;
|
||||
this.metroTabPageMain.HorizontalScrollbarSize = 10;
|
||||
resources.ApplyResources(this.metroTabPageMain, "metroTabPageMain");
|
||||
this.metroTabPageMain.Name = "metroTabPageMain";
|
||||
this.metroTabPageMain.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.metroTabPageMain.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTabPageMain.VerticalScrollbarBarColor = true;
|
||||
this.metroTabPageMain.VerticalScrollbarHighlightOnWheel = false;
|
||||
this.metroTabPageMain.VerticalScrollbarSize = 10;
|
||||
//
|
||||
// myTablePanel1
|
||||
//
|
||||
this.myTablePanel1.BackColor = System.Drawing.Color.Transparent;
|
||||
resources.ApplyResources(this.myTablePanel1, "myTablePanel1");
|
||||
this.myTablePanel1.Controls.Add(this.buttonServerToggle, 2, 0);
|
||||
this.myTablePanel1.Controls.Add(this.panel1, 0, 2);
|
||||
this.myTablePanel1.Controls.Add(this.textBoxHost, 0, 0);
|
||||
this.myTablePanel1.Controls.Add(this.radioButtonEur, 0, 3);
|
||||
this.myTablePanel1.Controls.Add(this.radioButtonUs, 1, 3);
|
||||
this.myTablePanel1.Controls.Add(this.radioButtonJap, 2, 3);
|
||||
this.myTablePanel1.Controls.Add(this.listViewPCKS, 0, 4);
|
||||
this.myTablePanel1.Controls.Add(this.TextBoxPackImage, 0, 1);
|
||||
this.myTablePanel1.Controls.Add(this.PackImageSelection, 2, 1);
|
||||
this.myTablePanel1.Name = "myTablePanel1";
|
||||
//
|
||||
// buttonServerToggle
|
||||
//
|
||||
resources.ApplyResources(this.buttonServerToggle, "buttonServerToggle");
|
||||
this.buttonServerToggle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(178)))), ((int)(((byte)(13)))));
|
||||
this.buttonServerToggle.FlatAppearance.BorderSize = 0;
|
||||
this.buttonServerToggle.ForeColor = System.Drawing.Color.White;
|
||||
this.buttonServerToggle.Name = "buttonServerToggle";
|
||||
this.buttonServerToggle.UseVisualStyleBackColor = false;
|
||||
this.buttonServerToggle.Click += new System.EventHandler(this.buttonServerToggle_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.myTablePanel1.SetColumnSpan(this.panel1, 3);
|
||||
this.panel1.Controls.Add(this.radioButtonSystem);
|
||||
this.panel1.Controls.Add(this.buttonSelect);
|
||||
this.panel1.Controls.Add(this.radioButtonUSB);
|
||||
resources.ApplyResources(this.panel1, "panel1");
|
||||
this.panel1.Name = "panel1";
|
||||
//
|
||||
// radioButtonSystem
|
||||
//
|
||||
resources.ApplyResources(this.radioButtonSystem, "radioButtonSystem");
|
||||
this.radioButtonSystem.BackColor = System.Drawing.Color.Transparent;
|
||||
this.radioButtonSystem.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.radioButtonSystem.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.radioButtonSystem.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.radioButtonSystem.ForeColor = System.Drawing.Color.White;
|
||||
this.radioButtonSystem.Name = "radioButtonSystem";
|
||||
this.radioButtonSystem.TabStop = true;
|
||||
this.radioButtonSystem.UseVisualStyleBackColor = false;
|
||||
this.radioButtonSystem.CheckedChanged += new System.EventHandler(this.radioButtonSystem_CheckedChanged);
|
||||
//
|
||||
// buttonSelect
|
||||
//
|
||||
this.buttonSelect.BackgroundImage = global::PckStudio.Properties.Resources.sdDownload;
|
||||
resources.ApplyResources(this.buttonSelect, "buttonSelect");
|
||||
this.buttonSelect.ForeColor = System.Drawing.Color.White;
|
||||
this.buttonSelect.Name = "buttonSelect";
|
||||
this.buttonSelect.UseVisualStyleBackColor = true;
|
||||
this.buttonSelect.Click += new System.EventHandler(this.buttonSelect_Click);
|
||||
//
|
||||
// radioButtonUSB
|
||||
//
|
||||
resources.ApplyResources(this.radioButtonUSB, "radioButtonUSB");
|
||||
this.radioButtonUSB.BackColor = System.Drawing.Color.Transparent;
|
||||
this.radioButtonUSB.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.radioButtonUSB.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.radioButtonUSB.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.radioButtonUSB.ForeColor = System.Drawing.Color.White;
|
||||
this.radioButtonUSB.Name = "radioButtonUSB";
|
||||
this.radioButtonUSB.TabStop = true;
|
||||
this.radioButtonUSB.UseVisualStyleBackColor = false;
|
||||
this.radioButtonUSB.CheckedChanged += new System.EventHandler(this.radioButtonUSB_CheckedChanged);
|
||||
//
|
||||
// textBoxHost
|
||||
//
|
||||
resources.ApplyResources(this.textBoxHost, "textBoxHost");
|
||||
this.textBoxHost.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.myTablePanel1.SetColumnSpan(this.textBoxHost, 2);
|
||||
//
|
||||
//
|
||||
//
|
||||
this.textBoxHost.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image")));
|
||||
this.textBoxHost.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode")));
|
||||
this.textBoxHost.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location")));
|
||||
this.textBoxHost.CustomButton.Name = "";
|
||||
this.textBoxHost.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size")));
|
||||
this.textBoxHost.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.textBoxHost.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex")));
|
||||
this.textBoxHost.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.textBoxHost.CustomButton.UseSelectable = true;
|
||||
this.textBoxHost.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible")));
|
||||
this.textBoxHost.IconRight = true;
|
||||
this.textBoxHost.Lines = new string[0];
|
||||
this.textBoxHost.MaxLength = 32767;
|
||||
this.textBoxHost.Name = "textBoxHost";
|
||||
this.textBoxHost.PasswordChar = '\0';
|
||||
this.textBoxHost.PromptText = "Wii U IP";
|
||||
this.textBoxHost.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.textBoxHost.SelectedText = "";
|
||||
this.textBoxHost.SelectionLength = 0;
|
||||
this.textBoxHost.SelectionStart = 0;
|
||||
this.textBoxHost.ShortcutsEnabled = true;
|
||||
this.textBoxHost.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.textBoxHost.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.textBoxHost.UseSelectable = true;
|
||||
this.textBoxHost.WaterMark = "Wii U IP";
|
||||
this.textBoxHost.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.textBoxHost.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// radioButtonEur
|
||||
//
|
||||
resources.ApplyResources(this.radioButtonEur, "radioButtonEur");
|
||||
this.radioButtonEur.BackColor = System.Drawing.Color.Transparent;
|
||||
this.radioButtonEur.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.radioButtonEur.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.radioButtonEur.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.radioButtonEur.ForeColor = System.Drawing.Color.White;
|
||||
this.radioButtonEur.Name = "radioButtonEur";
|
||||
this.radioButtonEur.TabStop = true;
|
||||
this.radioButtonEur.UseVisualStyleBackColor = false;
|
||||
this.radioButtonEur.Click += new System.EventHandler(this.radioButtonEur_Click);
|
||||
//
|
||||
// radioButtonUs
|
||||
//
|
||||
resources.ApplyResources(this.radioButtonUs, "radioButtonUs");
|
||||
this.radioButtonUs.BackColor = System.Drawing.Color.Transparent;
|
||||
this.radioButtonUs.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.radioButtonUs.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.radioButtonUs.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.radioButtonUs.ForeColor = System.Drawing.Color.White;
|
||||
this.radioButtonUs.Name = "radioButtonUs";
|
||||
this.radioButtonUs.TabStop = true;
|
||||
this.radioButtonUs.UseVisualStyleBackColor = false;
|
||||
this.radioButtonUs.Click += new System.EventHandler(this.radioButtonUs_Click);
|
||||
//
|
||||
// radioButtonJap
|
||||
//
|
||||
resources.ApplyResources(this.radioButtonJap, "radioButtonJap");
|
||||
this.radioButtonJap.BackColor = System.Drawing.Color.Transparent;
|
||||
this.radioButtonJap.FlatAppearance.CheckedBackColor = System.Drawing.Color.Teal;
|
||||
this.radioButtonJap.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Aqua;
|
||||
this.radioButtonJap.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
|
||||
this.radioButtonJap.ForeColor = System.Drawing.Color.White;
|
||||
this.radioButtonJap.Name = "radioButtonJap";
|
||||
this.radioButtonJap.TabStop = true;
|
||||
this.radioButtonJap.UseVisualStyleBackColor = false;
|
||||
this.radioButtonJap.Click += new System.EventHandler(this.radioButtonJap_Click);
|
||||
//
|
||||
// listViewPCKS
|
||||
//
|
||||
this.listViewPCKS.Activation = System.Windows.Forms.ItemActivation.TwoClick;
|
||||
this.myTablePanel1.SetColumnSpan(this.listViewPCKS, 3);
|
||||
resources.ApplyResources(this.listViewPCKS, "listViewPCKS");
|
||||
this.listViewPCKS.HideSelection = false;
|
||||
this.listViewPCKS.Name = "listViewPCKS";
|
||||
this.listViewPCKS.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewPCKS.View = System.Windows.Forms.View.Details;
|
||||
this.listViewPCKS.SelectedIndexChanged += new System.EventHandler(this.listViewPCKS_SelectedIndexChanged);
|
||||
this.listViewPCKS.Click += new System.EventHandler(this.listViewPCKS_Click);
|
||||
this.listViewPCKS.MouseDown += new System.Windows.Forms.MouseEventHandler(this.listViewPCKS_MouseDown);
|
||||
//
|
||||
// TextBoxPackImage
|
||||
//
|
||||
resources.ApplyResources(this.TextBoxPackImage, "TextBoxPackImage");
|
||||
this.TextBoxPackImage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.myTablePanel1.SetColumnSpan(this.TextBoxPackImage, 2);
|
||||
//
|
||||
//
|
||||
//
|
||||
this.TextBoxPackImage.CustomButton.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image1")));
|
||||
this.TextBoxPackImage.CustomButton.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("resource.ImeMode1")));
|
||||
this.TextBoxPackImage.CustomButton.Location = ((System.Drawing.Point)(resources.GetObject("resource.Location1")));
|
||||
this.TextBoxPackImage.CustomButton.Name = "";
|
||||
this.TextBoxPackImage.CustomButton.Size = ((System.Drawing.Size)(resources.GetObject("resource.Size1")));
|
||||
this.TextBoxPackImage.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.TextBoxPackImage.CustomButton.TabIndex = ((int)(resources.GetObject("resource.TabIndex1")));
|
||||
this.TextBoxPackImage.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
|
||||
this.TextBoxPackImage.CustomButton.UseSelectable = true;
|
||||
this.TextBoxPackImage.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible1")));
|
||||
this.TextBoxPackImage.IconRight = true;
|
||||
this.TextBoxPackImage.Lines = new string[0];
|
||||
this.TextBoxPackImage.MaxLength = 32767;
|
||||
this.TextBoxPackImage.Name = "TextBoxPackImage";
|
||||
this.TextBoxPackImage.PasswordChar = '\0';
|
||||
this.TextBoxPackImage.PromptText = "Pack Image";
|
||||
this.TextBoxPackImage.ScrollBars = System.Windows.Forms.ScrollBars.None;
|
||||
this.TextBoxPackImage.SelectedText = "";
|
||||
this.TextBoxPackImage.SelectionLength = 0;
|
||||
this.TextBoxPackImage.SelectionStart = 0;
|
||||
this.TextBoxPackImage.ShortcutsEnabled = true;
|
||||
this.TextBoxPackImage.Style = MetroFramework.MetroColorStyle.Blue;
|
||||
this.TextBoxPackImage.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.TextBoxPackImage.UseSelectable = true;
|
||||
this.TextBoxPackImage.WaterMark = "Pack Image";
|
||||
this.TextBoxPackImage.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
this.TextBoxPackImage.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
|
||||
//
|
||||
// PackImageSelection
|
||||
//
|
||||
resources.ApplyResources(this.PackImageSelection, "PackImageSelection");
|
||||
this.PackImageSelection.BackColor = System.Drawing.Color.Sienna;
|
||||
this.PackImageSelection.FlatAppearance.BorderSize = 0;
|
||||
this.PackImageSelection.ForeColor = System.Drawing.Color.White;
|
||||
this.PackImageSelection.Name = "PackImageSelection";
|
||||
this.PackImageSelection.UseVisualStyleBackColor = false;
|
||||
this.PackImageSelection.Click += new System.EventHandler(this.PackImageSelection_Click);
|
||||
//
|
||||
// metroTabControlMain
|
||||
//
|
||||
this.metroTabControlMain.Controls.Add(this.metroTabPageMain);
|
||||
resources.ApplyResources(this.metroTabControlMain, "metroTabControlMain");
|
||||
this.metroTabControlMain.Name = "metroTabControlMain";
|
||||
this.metroTabControlMain.SelectedIndex = 0;
|
||||
this.metroTabControlMain.Style = MetroFramework.MetroColorStyle.White;
|
||||
this.metroTabControlMain.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroTabControlMain.UseSelectable = true;
|
||||
//
|
||||
// contextMenuStripCaffiine
|
||||
//
|
||||
this.contextMenuStripCaffiine.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.replaceToolStripMenuItem,
|
||||
this.replacePCKToolStripMenuItem});
|
||||
this.contextMenuStripCaffiine.Name = "contextMenuStripCaffiine";
|
||||
resources.ApplyResources(this.contextMenuStripCaffiine, "contextMenuStripCaffiine");
|
||||
this.contextMenuStripCaffiine.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStripCaffiine_Opening);
|
||||
//
|
||||
// replaceToolStripMenuItem
|
||||
//
|
||||
this.replaceToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Replace;
|
||||
this.replaceToolStripMenuItem.Name = "replaceToolStripMenuItem";
|
||||
resources.ApplyResources(this.replaceToolStripMenuItem, "replaceToolStripMenuItem");
|
||||
this.replaceToolStripMenuItem.Click += new System.EventHandler(this.replaceToolStripMenuItem_Click);
|
||||
//
|
||||
// replacePCKToolStripMenuItem
|
||||
//
|
||||
this.replacePCKToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Replace;
|
||||
this.replacePCKToolStripMenuItem.Name = "replacePCKToolStripMenuItem";
|
||||
resources.ApplyResources(this.replacePCKToolStripMenuItem, "replacePCKToolStripMenuItem");
|
||||
this.replacePCKToolStripMenuItem.Click += new System.EventHandler(this.replacePCKToolStripMenuItem_Click);
|
||||
//
|
||||
// InstallWiiU
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.Controls.Add(this.metroTabControlMain);
|
||||
this.ForeColor = System.Drawing.Color.White;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "InstallWiiU";
|
||||
this.metroTabPageMain.ResumeLayout(false);
|
||||
this.myTablePanel1.ResumeLayout(false);
|
||||
this.myTablePanel1.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.metroTabControlMain.ResumeLayout(false);
|
||||
this.contextMenuStripCaffiine.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MetroFramework.Controls.MetroTabPage metroTabPageMain;
|
||||
private System.Windows.Forms.TableLayoutPanel myTablePanel1;
|
||||
private System.Windows.Forms.RadioButton radioButtonJap;
|
||||
private System.Windows.Forms.RadioButton radioButtonEur;
|
||||
private System.Windows.Forms.RadioButton radioButtonUs;
|
||||
private System.Windows.Forms.ListView listViewPCKS;
|
||||
private MetroFramework.Controls.MetroTabControl metroTabControlMain;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStripCaffiine;
|
||||
private System.Windows.Forms.ToolStripMenuItem replacePCKToolStripMenuItem;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.RadioButton radioButtonSystem;
|
||||
private System.Windows.Forms.Button buttonSelect;
|
||||
private System.Windows.Forms.RadioButton radioButtonUSB;
|
||||
private System.Windows.Forms.Button buttonServerToggle;
|
||||
private MetroFramework.Controls.MetroTextBox textBoxHost;
|
||||
private System.Windows.Forms.ToolStripMenuItem replaceToolStripMenuItem;
|
||||
private MetroFramework.Controls.MetroTextBox TextBoxPackImage;
|
||||
private System.Windows.Forms.Button PackImageSelection;
|
||||
}
|
||||
}
|
||||
@@ -1,485 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Net;
|
||||
using System.Windows.Forms;
|
||||
using System.Diagnostics;
|
||||
|
||||
using PckStudio.Classes.Misc;
|
||||
using OMI.Formats.Archive;
|
||||
using OMI.Workers.Archive;
|
||||
using OMI.Workers.Pck;
|
||||
using OMI.Formats.Pck;
|
||||
using PckStudio.ToolboxItems;
|
||||
|
||||
namespace PckStudio.Forms
|
||||
{
|
||||
public partial class InstallWiiU : ThemeForm
|
||||
{
|
||||
string loca = "";
|
||||
string dlcPath = "";
|
||||
string mod = "";
|
||||
bool serverOn = false;
|
||||
ConsoleArchive archive = new ConsoleArchive();
|
||||
|
||||
public InstallWiiU(string mod)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.mod = mod;
|
||||
|
||||
if (mod == null)
|
||||
{
|
||||
replaceToolStripMenuItem.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
replaceToolStripMenuItem.Text = "Replace with " + Path.GetFileName(mod);
|
||||
}
|
||||
}
|
||||
|
||||
//items class for use in bedrock skin conversion
|
||||
public class pckDir
|
||||
{
|
||||
public string folder { get; set; }
|
||||
public string file { get; set; }
|
||||
}
|
||||
|
||||
private void buttonSelect_Click(object sender, EventArgs e)
|
||||
{
|
||||
FolderBrowserDialog sdFind = new FolderBrowserDialog();
|
||||
if (sdFind.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
string sdRoot = Directory.GetDirectoryRoot(sdFind.SelectedPath);
|
||||
|
||||
if (!Directory.Exists(sdRoot + "/wiiu/apps/"))
|
||||
{
|
||||
Directory.CreateDirectory(sdRoot + "/wiiu/apps/");
|
||||
}
|
||||
|
||||
using (WebClient client = new WebClient())
|
||||
{
|
||||
try
|
||||
{
|
||||
File.WriteAllBytes(sdRoot + "/wiiu/apps/apps.zip", PckStudio.Properties.Resources.apps);
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show("Could not extract resources to:\n" + sdRoot + "/wiiu/apps/apps.zip");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
string zipPath = sdRoot + "/wiiu/apps/apps.zip";
|
||||
string extractPath = sdRoot + "/wiiu/apps/temp";
|
||||
ZipFile.ExtractToDirectory(zipPath, extractPath);
|
||||
|
||||
if (!Directory.Exists(sdRoot + "/wiiu/apps/ftpiiu_everywhere"))
|
||||
{
|
||||
Directory.Move(sdRoot + "/wiiu/apps/temp/ftpiiu_everywhere", sdRoot + "/wiiu/apps/ftpiiu_everywhere");
|
||||
}
|
||||
if (!Directory.Exists(sdRoot + "/wiiu/apps/homebrew_launcher"))
|
||||
{
|
||||
Directory.Move(sdRoot + "/wiiu/apps/temp/homebrew_launcher", sdRoot + "/wiiu/apps/homebrew_launcher");
|
||||
}
|
||||
if (!Directory.Exists(sdRoot + "/wiiu/apps/mocha_fshax"))
|
||||
{
|
||||
Directory.Move(sdRoot + "/wiiu/apps/temp/mocha_fshax", sdRoot + "/wiiu/apps/mocha_fshax");
|
||||
}
|
||||
if (!File.Exists(sdRoot + "/wiiu/apps/sign_c2w_patcher.elf"))
|
||||
{
|
||||
File.Move(sdRoot + "/wiiu/apps/temp/sign_c2w_patcher.elf", sdRoot + "/wiiu/apps/sign_c2w_patcher.elf");
|
||||
}
|
||||
|
||||
File.Delete(sdRoot + "/wiiu/apps/apps.zip");
|
||||
Directory.Delete(sdRoot + "/wiiu/apps/temp/", true);
|
||||
}
|
||||
catch (Exception er)
|
||||
{
|
||||
MessageBox.Show(er.ToString());
|
||||
}
|
||||
MessageBox.Show("Done");
|
||||
}
|
||||
}
|
||||
List<pckDir> pcks = new List<pckDir>();
|
||||
PckFile currentPCK = null;
|
||||
|
||||
private void updateDatabase()
|
||||
{
|
||||
pcks.Clear();
|
||||
pcks.Add(new pckDir() { folder = "Battle & Beasts", file = "BattleAndBeasts.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Battle & Beasts 2", file = "BattleAndBeasts2.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Biome Settlers Pack 1", file = "SkinsBiomeSettlers1.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Biome Settlers Pack 2", file = "SkinsBiomeSettlers2.pck" });
|
||||
//pcks.Add(new pckDir() { folder = "Campfire Tales Skin Pack", file = "" });
|
||||
pcks.Add(new pckDir() { folder = "Doctor Who Skins Volume I", file = "SkinPackDrWho.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Doctor Who Skins Volume II", file = "SkinPackDrWho.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Festive Skin Pack", file = "SkinsFestive.pck" });
|
||||
pcks.Add(new pckDir() { folder = "FINAL FANTASY XV Skin Pack", file = "FinalFantasyXV.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Magic The Gathering Skin Pack", file = "magicthegathering.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Mini Game Heroes Skin Pack", file = "Minigame2.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Mini Game Masters Skin Pack", file = "Minigame.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Moana Character Pack", file = "Moana.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Power Rangers Skin Pack", file = "PowerRangers.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Redstone Specialists Skin Pack", file = "SkinsRedstoneSpecialists.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Skin Pack 1", file = "Skins1.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Star Wars Classic Skin Pack", file = "StarWarsClassicPack.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Star Wars Prequel Skin Pack", file = "StarWarsPrequel.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Star Wars Rebels Skin Pack", file = "StarWarsRebelsPack.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Star Wars Sequel Skin Pack", file = "StarWarsSequel.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Story Mode Skin Pack", file = "PackStoryMode.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Stranger Things Skin Pack", file = "StrangerThings.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Strangers Biome Settlers 3 Skin Pack", file = "BiomeSettlers3_Strangers.pck" });
|
||||
pcks.Add(new pckDir() { folder = "The Incredibles Skin Pack", file = "Incredibles.pck" });
|
||||
pcks.Add(new pckDir() { folder = "The Simpsons Skin Pack", file = "SkinPackSimpsons.pck" });
|
||||
pcks.Add(new pckDir() { folder = "Villains Skin Pack", file = "Villains.pck" });
|
||||
}
|
||||
|
||||
public void buttonMode(string mode)
|
||||
{
|
||||
if (mode == "start")
|
||||
{
|
||||
buttonServerToggle.BackColor = Color.FromArgb(68, 178, 13);
|
||||
serverOn = false;
|
||||
buttonServerToggle.Text = "Start";
|
||||
listViewPCKS.Enabled = false;
|
||||
}
|
||||
else if (mode == "stop")
|
||||
{
|
||||
serverOn = true;
|
||||
buttonServerToggle.BackColor = Color.Red;
|
||||
buttonServerToggle.Text = "Stop";
|
||||
listViewPCKS.Enabled = true;
|
||||
}
|
||||
else if (mode == "loading")
|
||||
{
|
||||
buttonServerToggle.BackColor = Color.MediumAquamarine;
|
||||
buttonServerToggle.Text = "Wait..";
|
||||
}
|
||||
}
|
||||
|
||||
private void loadPcks()
|
||||
{
|
||||
string region = "";
|
||||
if (radioButtonEur.Checked)
|
||||
{
|
||||
region = "101d7500";
|
||||
}
|
||||
else if (radioButtonUs.Checked)
|
||||
{
|
||||
region = "101d9d00";
|
||||
}
|
||||
else if (radioButtonJap.Checked)
|
||||
{
|
||||
region = "101dbe00";
|
||||
}
|
||||
|
||||
string device = "";
|
||||
if (radioButtonSystem.Checked)
|
||||
{
|
||||
device = "storage_mlc";
|
||||
}
|
||||
else if (radioButtonUSB.Checked)
|
||||
{
|
||||
device = "storage_usb";
|
||||
}
|
||||
|
||||
if (region != "" && device != "")
|
||||
{
|
||||
dlcPath = device + "/usr/title/0005000e/" + region + "/content/WiiU/DLC/";
|
||||
buttonServerToggle.Enabled = true;
|
||||
if (listViewPCKS.Columns.Count == 0)
|
||||
{
|
||||
listViewPCKS.Columns.Add(dlcPath, 395);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonServerToggle_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (serverOn == false)
|
||||
{
|
||||
//Makes sure user typed in their ip
|
||||
if (textBoxHost.Text == "")
|
||||
{
|
||||
MessageBox.Show("Please enter a valid Wii U IP!");
|
||||
return;
|
||||
}
|
||||
|
||||
//Turns Server On
|
||||
try
|
||||
{
|
||||
buttonMode("loading");
|
||||
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
|
||||
//ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(OnValidateCertificate);
|
||||
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://" + textBoxHost.Text + "/" + dlcPath);
|
||||
request.Method = WebRequestMethods.Ftp.ListDirectory;
|
||||
request.Credentials = new NetworkCredential("", "a3262443");
|
||||
request.EnableSsl = false;
|
||||
request.Timeout = 1200000;
|
||||
|
||||
ServicePoint sp = request.ServicePoint;
|
||||
Debug.WriteLine("ServicePoint connections = {0}.", sp.ConnectionLimit);
|
||||
sp.ConnectionLimit = 1;
|
||||
|
||||
using (var response = (FtpWebResponse)request.GetResponse())
|
||||
{
|
||||
using (var stream = response.GetResponseStream())
|
||||
{
|
||||
using (var reader = new StreamReader(stream, true))
|
||||
{
|
||||
string line = reader.ReadLine();
|
||||
while (line != null)
|
||||
{
|
||||
listViewPCKS.Items.Add(line);
|
||||
line = reader.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (ListViewItem pck in listViewPCKS.Items)
|
||||
{
|
||||
int i = 0;
|
||||
FtpWebRequest request2 = (FtpWebRequest)WebRequest.Create("ftp://" + textBoxHost.Text + "/" + dlcPath + "/" + pck.Text + "/");
|
||||
request2.Method = WebRequestMethods.Ftp.ListDirectory;
|
||||
request2.Credentials = new NetworkCredential("", "a3262443");
|
||||
request2.EnableSsl = false;
|
||||
request2.Timeout = 1200000;
|
||||
|
||||
ServicePoint sp2 = request2.ServicePoint;
|
||||
Console.WriteLine("NOBLEDEZ//PHOENIXARC WAS HERE", sp2.ConnectionLimit);
|
||||
sp2.ConnectionLimit = 1;
|
||||
|
||||
using (var response = (FtpWebResponse)request2.GetResponse())
|
||||
{
|
||||
using (var stream = response.GetResponseStream())
|
||||
{
|
||||
using (var reader = new StreamReader(stream, true))
|
||||
{
|
||||
string line = reader.ReadLine();
|
||||
while (line != null)
|
||||
{
|
||||
i += 1;
|
||||
pck.Tag = line;
|
||||
line = reader.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i != 1)
|
||||
{
|
||||
pck.Remove();
|
||||
}
|
||||
}
|
||||
|
||||
buttonMode("stop");
|
||||
}
|
||||
catch (Exception disc)
|
||||
{
|
||||
buttonMode("start");
|
||||
MessageBox.Show(disc.ToString());
|
||||
}
|
||||
}
|
||||
else if (serverOn == true)
|
||||
{
|
||||
//Turns Server Off
|
||||
listViewPCKS.Items.Clear();
|
||||
try
|
||||
{
|
||||
buttonMode("start");
|
||||
}
|
||||
catch (Exception disc)
|
||||
{
|
||||
MessageBox.Show(disc.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void radioButtonEur_Click(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void radioButtonUs_Click(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void radioButtonJap_Click(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void listViewPCKS_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void listViewPCKS_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
ListViewHitTestInfo hitTestInfo = listViewPCKS.HitTest(e.Location);
|
||||
if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
if (hitTestInfo.Location == ListViewHitTestLocations.None)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
contextMenuStripCaffiine.Show(Cursor.Position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void replacePCKToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewPCKS.SelectedItems.Count != 0)
|
||||
{
|
||||
buttonMode("loading");
|
||||
OpenFileDialog openPCK = new OpenFileDialog();
|
||||
|
||||
openPCK.Filter = "PCK File|*.pck";
|
||||
|
||||
if (openPCK.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
using (FTPClient client = new FTPClient("ftp://" + textBoxHost.Text, "", "a3262443"))
|
||||
client.UploadFile(openPCK.FileName, dlcPath + "/" + listViewPCKS.SelectedItems[0].Text + "/" + listViewPCKS.SelectedItems[0].Tag.ToString());
|
||||
if(TextBoxPackImage.Text != "")
|
||||
{
|
||||
string PackID = GetPackID(openPCK.FileName);
|
||||
GetARCFromConsole();
|
||||
ReplacePackImage(PackID);
|
||||
SendARCToConsole();
|
||||
}
|
||||
MessageBox.Show("PCK Replaced!");
|
||||
}
|
||||
}
|
||||
buttonMode("stop");
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void listViewPCKS_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void buttonInstall_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (MessageBox.Show("Replace with " + Path.GetFileNameWithoutExtension(mod) + "?", "Install Mod", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
{
|
||||
if (!Directory.Exists(dlcPath + pcks[listViewPCKS.SelectedItems[0].Index].folder + "/"))
|
||||
{
|
||||
Directory.CreateDirectory(dlcPath + pcks[listViewPCKS.SelectedItems[0].Index].folder + "/");
|
||||
}
|
||||
File.Copy(mod, dlcPath + pcks[listViewPCKS.SelectedItems[0].Index].folder + "/" + pcks[listViewPCKS.SelectedItems[0].Index].file);
|
||||
}
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void deletePCKModToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Directory.Delete(dlcPath + pcks[listViewPCKS.SelectedItems[0].Index].folder + "/", true);
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void buttonServerToggle_Clic(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void contextMenuStripCaffiine_Opening(object sender, CancelEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void radioButtonSystem_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void radioButtonUSB_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private void replaceToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewPCKS.SelectedItems.Count != 0)
|
||||
{
|
||||
buttonMode("loading");
|
||||
using (FTPClient client = new FTPClient("ftp://" + textBoxHost.Text, "", "a3262443"))
|
||||
client.UploadFile(mod, dlcPath + "/" + listViewPCKS.SelectedItems[0].Text + "/" + listViewPCKS.SelectedItems[0].Tag.ToString());
|
||||
if (TextBoxPackImage.Text != "")
|
||||
{
|
||||
string PackID = GetPackID(mod);
|
||||
GetARCFromConsole();
|
||||
ReplacePackImage(PackID);
|
||||
SendARCToConsole();
|
||||
}
|
||||
MessageBox.Show("PCK Replaced!");
|
||||
}
|
||||
buttonMode("stop");
|
||||
loadPcks();
|
||||
}
|
||||
|
||||
private string GetPackID(string filename)
|
||||
{
|
||||
var reader = new PckFileReader();
|
||||
currentPCK = reader.FromFile(filename);
|
||||
if (currentPCK.TryGetFile("0", PckFile.FileData.FileType.InfoFile, out var file) &&
|
||||
file.Properties.HasProperty("PACKID"))
|
||||
{
|
||||
file.Properties.GetProperty("PACKID");
|
||||
}
|
||||
throw new KeyNotFoundException();
|
||||
}
|
||||
|
||||
private void GetARCFromConsole()
|
||||
{
|
||||
using (FTPClient client = new FTPClient("ftp://" + textBoxHost.Text, "", "a3262443"))
|
||||
client.DownloadFile(dlcPath + "../../Common/Media/MediaWiiU.arc", Program.AppData + "MediaWiiU.arc");
|
||||
var reader = new ARCFileReader();
|
||||
archive = reader.FromStream(new MemoryStream(File.ReadAllBytes(Program.AppData + "MediaWiiU.arc")));
|
||||
}
|
||||
|
||||
private void ReplacePackImage(string PackID)
|
||||
{
|
||||
if (archive.ContainsKey("Graphics\\PackGraphics\\" + PackID + ".png"))
|
||||
archive["Graphics\\PackGraphics\\" + PackID + ".png"] = File.ReadAllBytes(TextBoxPackImage.Text);
|
||||
else
|
||||
archive.Add("Graphics\\PackGraphics\\" + PackID + ".png", File.ReadAllBytes(TextBoxPackImage.Text));
|
||||
}
|
||||
|
||||
private void SendARCToConsole()
|
||||
{
|
||||
using (FTPClient client = new FTPClient("ftp://" + textBoxHost.Text, "", "a3262443"))
|
||||
{
|
||||
MemoryStream ms = new MemoryStream();
|
||||
var writer = new ARCFileWriter(archive);
|
||||
writer.WriteToStream(ms);
|
||||
File.WriteAllBytes(Program.AppData + "MediaWiiU.arc", ms.ToArray());
|
||||
client.UploadFile(Program.AppData + "MediaWiiU.arc", dlcPath + "../../Common/Media/MediaWiiU.arc");
|
||||
archive.Clear();
|
||||
currentPCK.Files.Clear();
|
||||
currentPCK = null;
|
||||
ms.Dispose();
|
||||
}
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
private void PackImageSelection_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
ofd.Filter = "PNG Image|*.png";
|
||||
if(ofd.ShowDialog() == DialogResult.OK)
|
||||
TextBoxPackImage.Text = ofd.FileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
5
PCK-Studio/Forms/Utilities/pckCenter.Designer.cs
generated
@@ -138,6 +138,7 @@
|
||||
// pictureBox1
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox1, "pictureBox1");
|
||||
this.pictureBox1.Image = global::PckStudio.Properties.Resources.pckCenterHeader;
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
@@ -196,13 +197,13 @@
|
||||
//
|
||||
// deleteToolStripMenuItem
|
||||
//
|
||||
this.deleteToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Del;
|
||||
this.deleteToolStripMenuItem.Image = global::PckStudio.Properties.Resources.file_delete;
|
||||
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
|
||||
resources.ApplyResources(this.deleteToolStripMenuItem, "deleteToolStripMenuItem");
|
||||
//
|
||||
// exportToolStripMenuItem
|
||||
//
|
||||
this.exportToolStripMenuItem.Image = global::PckStudio.Properties.Resources.ExportFile;
|
||||
this.exportToolStripMenuItem.Image = global::PckStudio.Properties.Resources.file_export;
|
||||
this.exportToolStripMenuItem.Name = "exportToolStripMenuItem";
|
||||
resources.ApplyResources(this.exportToolStripMenuItem, "exportToolStripMenuItem");
|
||||
//
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
// buttonInstallPs3
|
||||
//
|
||||
this.buttonInstallPs3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
|
||||
this.buttonInstallPs3.BackgroundImage = global::PckStudio.Properties.Resources.ps3;
|
||||
this.buttonInstallPs3.BackgroundImage = global::PckStudio.Properties.Resources.PS3;
|
||||
resources.ApplyResources(this.buttonInstallPs3, "buttonInstallPs3");
|
||||
this.buttonInstallPs3.FlatAppearance.BorderSize = 0;
|
||||
this.buttonInstallPs3.ForeColor = System.Drawing.Color.White;
|
||||
@@ -98,7 +98,7 @@
|
||||
// buttonInstallXbox
|
||||
//
|
||||
this.buttonInstallXbox.BackColor = System.Drawing.Color.Lime;
|
||||
this.buttonInstallXbox.BackgroundImage = global::PckStudio.Properties.Resources.xbox;
|
||||
this.buttonInstallXbox.BackgroundImage = global::PckStudio.Properties.Resources.Xbox;
|
||||
resources.ApplyResources(this.buttonInstallXbox, "buttonInstallXbox");
|
||||
this.buttonInstallXbox.FlatAppearance.BorderSize = 0;
|
||||
this.buttonInstallXbox.ForeColor = System.Drawing.Color.White;
|
||||
@@ -109,7 +109,7 @@
|
||||
// buttonInstallWiiU
|
||||
//
|
||||
this.buttonInstallWiiU.BackColor = System.Drawing.Color.DeepSkyBlue;
|
||||
this.buttonInstallWiiU.BackgroundImage = global::PckStudio.Properties.Resources.wiiu;
|
||||
this.buttonInstallWiiU.BackgroundImage = global::PckStudio.Properties.Resources.WiiU;
|
||||
resources.ApplyResources(this.buttonInstallWiiU, "buttonInstallWiiU");
|
||||
this.buttonInstallWiiU.FlatAppearance.BorderSize = 0;
|
||||
this.buttonInstallWiiU.ForeColor = System.Drawing.Color.White;
|
||||
|
||||
@@ -1136,8 +1136,6 @@ namespace PckStudio.Forms
|
||||
|
||||
private void buttonInstallWiiU_Click(object sender, EventArgs e)
|
||||
{
|
||||
InstallWiiU install = new InstallWiiU(Program.AppData + "/PCK Center/myPcks/" + mod + ".pck");
|
||||
install.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="buttonInstallWiiU.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
|
||||
<value>Stretch</value>
|
||||
<value>Zoom</value>
|
||||
</data>
|
||||
<data name="buttonInstallWiiU.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
|
||||
<value>Flat</value>
|
||||
@@ -420,9 +420,6 @@
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>760, 418</value>
|
||||
</data>
|
||||
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 8.25pt</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
</data>
|
||||
|
||||
15
PCK-Studio/Internals/ApplicationScope.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using PckStudio.Classes.Misc;
|
||||
|
||||
namespace PckStudio
|
||||
{
|
||||
internal static class ApplicationScope
|
||||
{
|
||||
public static FileCacher AppDataCacher = new FileCacher(Program.AppDataCache);
|
||||
|
||||
}
|
||||
}
|
||||
65
PCK-Studio/MainForm.Designer.cs
generated
@@ -75,6 +75,8 @@
|
||||
this.mashUpPackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.extractToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.packSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.fullBoxSupportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -83,6 +85,7 @@
|
||||
this.convertToBedrockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.miscToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addCustomPackImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openPckManagerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.convertMusicFilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.wavBinkaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.binkaWavToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -106,9 +109,7 @@
|
||||
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.administrativeToolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.storeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.wiiUPCKInstallerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.PS3PCKInstallerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.VitaPCKInstallerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openPckCenterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.joinDevelopmentDiscordToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.trelloBoardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.contextMenuMetaTree = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
@@ -425,6 +426,7 @@
|
||||
this.newToolStripMenuItem,
|
||||
this.openToolStripMenuItem,
|
||||
this.extractToolStripMenuItem1,
|
||||
this.packSettingsToolStripMenuItem,
|
||||
this.saveToolStripMenuItem1,
|
||||
this.saveToolStripMenuItem,
|
||||
this.closeToolStripMenuItem});
|
||||
@@ -471,6 +473,21 @@
|
||||
this.extractToolStripMenuItem1.Name = "extractToolStripMenuItem1";
|
||||
this.extractToolStripMenuItem1.Click += new System.EventHandler(this.extractToolStripMenuItem1_Click);
|
||||
//
|
||||
// packSettingsToolStripMenuItem
|
||||
//
|
||||
this.packSettingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fullBoxSupportToolStripMenuItem});
|
||||
this.packSettingsToolStripMenuItem.Image = global::PckStudio.Properties.Resources.ranch;
|
||||
this.packSettingsToolStripMenuItem.Name = "packSettingsToolStripMenuItem";
|
||||
resources.ApplyResources(this.packSettingsToolStripMenuItem, "packSettingsToolStripMenuItem");
|
||||
//
|
||||
// fullBoxSupportToolStripMenuItem
|
||||
//
|
||||
this.fullBoxSupportToolStripMenuItem.CheckOnClick = true;
|
||||
this.fullBoxSupportToolStripMenuItem.Name = "fullBoxSupportToolStripMenuItem";
|
||||
resources.ApplyResources(this.fullBoxSupportToolStripMenuItem, "fullBoxSupportToolStripMenuItem");
|
||||
this.fullBoxSupportToolStripMenuItem.CheckedChanged += new System.EventHandler(this.fullBoxSupportToolStripMenuItem_CheckedChanged);
|
||||
//
|
||||
// saveToolStripMenuItem1
|
||||
//
|
||||
resources.ApplyResources(this.saveToolStripMenuItem1, "saveToolStripMenuItem1");
|
||||
@@ -514,6 +531,7 @@
|
||||
//
|
||||
this.miscToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addCustomPackImageToolStripMenuItem,
|
||||
this.openPckManagerToolStripMenuItem,
|
||||
this.convertMusicFilesToolStripMenuItem});
|
||||
this.miscToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
resources.ApplyResources(this.miscToolStripMenuItem, "miscToolStripMenuItem");
|
||||
@@ -525,6 +543,12 @@
|
||||
this.addCustomPackImageToolStripMenuItem.Name = "addCustomPackImageToolStripMenuItem";
|
||||
this.addCustomPackImageToolStripMenuItem.Click += new System.EventHandler(this.addCustomPackIconToolStripMenuItem_Click);
|
||||
//
|
||||
// openPckManagerToolStripMenuItem
|
||||
//
|
||||
this.openPckManagerToolStripMenuItem.Name = "openPckManagerToolStripMenuItem";
|
||||
resources.ApplyResources(this.openPckManagerToolStripMenuItem, "openPckManagerToolStripMenuItem");
|
||||
this.openPckManagerToolStripMenuItem.Click += new System.EventHandler(this.openPckManagerToolStripMenuItem_Click);
|
||||
//
|
||||
// convertMusicFilesToolStripMenuItem
|
||||
//
|
||||
this.convertMusicFilesToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@@ -681,32 +705,19 @@
|
||||
// storeToolStripMenuItem
|
||||
//
|
||||
this.storeToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.wiiUPCKInstallerToolStripMenuItem,
|
||||
this.PS3PCKInstallerToolStripMenuItem,
|
||||
this.VitaPCKInstallerToolStripMenuItem,
|
||||
this.openPckCenterToolStripMenuItem,
|
||||
this.joinDevelopmentDiscordToolStripMenuItem,
|
||||
this.trelloBoardToolStripMenuItem});
|
||||
this.storeToolStripMenuItem.ForeColor = System.Drawing.Color.White;
|
||||
resources.ApplyResources(this.storeToolStripMenuItem, "storeToolStripMenuItem");
|
||||
this.storeToolStripMenuItem.Name = "storeToolStripMenuItem";
|
||||
//
|
||||
// wiiUPCKInstallerToolStripMenuItem
|
||||
// openPckCenterToolStripMenuItem
|
||||
//
|
||||
resources.ApplyResources(this.wiiUPCKInstallerToolStripMenuItem, "wiiUPCKInstallerToolStripMenuItem");
|
||||
this.wiiUPCKInstallerToolStripMenuItem.Name = "wiiUPCKInstallerToolStripMenuItem";
|
||||
this.wiiUPCKInstallerToolStripMenuItem.Click += new System.EventHandler(this.wiiUPCKInstallerToolStripMenuItem_Click);
|
||||
//
|
||||
// PS3PCKInstallerToolStripMenuItem
|
||||
//
|
||||
resources.ApplyResources(this.PS3PCKInstallerToolStripMenuItem, "PS3PCKInstallerToolStripMenuItem");
|
||||
this.PS3PCKInstallerToolStripMenuItem.Name = "PS3PCKInstallerToolStripMenuItem";
|
||||
this.PS3PCKInstallerToolStripMenuItem.Click += new System.EventHandler(this.PS3PCKInstallerToolStripMenuItem_Click);
|
||||
//
|
||||
// VitaPCKInstallerToolStripMenuItem
|
||||
//
|
||||
resources.ApplyResources(this.VitaPCKInstallerToolStripMenuItem, "VitaPCKInstallerToolStripMenuItem");
|
||||
this.VitaPCKInstallerToolStripMenuItem.Name = "VitaPCKInstallerToolStripMenuItem";
|
||||
this.VitaPCKInstallerToolStripMenuItem.Click += new System.EventHandler(this.VitaPCKInstallerToolStripMenuItem_Click);
|
||||
this.openPckCenterToolStripMenuItem.Image = global::PckStudio.Properties.Resources.pckCenterHeader;
|
||||
this.openPckCenterToolStripMenuItem.Name = "openPckCenterToolStripMenuItem";
|
||||
resources.ApplyResources(this.openPckCenterToolStripMenuItem, "openPckCenterToolStripMenuItem");
|
||||
this.openPckCenterToolStripMenuItem.Click += new System.EventHandler(this.openPckCenterToolStripMenuItem_Click);
|
||||
//
|
||||
// joinDevelopmentDiscordToolStripMenuItem
|
||||
//
|
||||
@@ -1195,15 +1206,14 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem donateToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem convertToBedrockToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem storeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem openPckCenterToolStripMenuItem;
|
||||
private MetroFramework.Controls.MetroTabControl tabControl;
|
||||
private MetroFramework.Controls.MetroTabPage editorTab;
|
||||
private MetroFramework.Controls.MetroCheckBox LittleEndianCheckBox;
|
||||
private MetroFramework.Controls.MetroLabel label11;
|
||||
private System.Windows.Forms.ToolStripMenuItem wiiUPCKInstallerToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem PS3PCKInstallerToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem OpenInstallerToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem administrativeToolsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem VitaPCKInstallerToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem toNobledezJackToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem toPhoenixARCDeveloperToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem joinDevelopmentDiscordToolStripMenuItem;
|
||||
@@ -1276,6 +1286,9 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem convertMusicFilesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem wavBinkaToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem binkaWavToolStripMenuItem;
|
||||
}
|
||||
private System.Windows.Forms.ToolStripMenuItem openPckManagerToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem packSettingsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem fullBoxSupportToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ using PckStudio.Classes.IO.PCK;
|
||||
using PckStudio.Classes.IO._3DST;
|
||||
using PckStudio.Internal;
|
||||
using PckStudio.Extensions;
|
||||
using PckStudio.Features;
|
||||
|
||||
namespace PckStudio
|
||||
{
|
||||
@@ -104,7 +105,7 @@ namespace PckStudio
|
||||
};
|
||||
}
|
||||
|
||||
public void LoadPck(string filepath)
|
||||
public void LoadPckFromFile(string filepath)
|
||||
{
|
||||
checkSaveState();
|
||||
treeViewMain.Nodes.Clear();
|
||||
@@ -152,7 +153,7 @@ namespace PckStudio
|
||||
ofd.Filter = "PCK (Minecraft Console Package)|*.pck";
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
LoadPck(ofd.FileName);
|
||||
LoadPckFromFile(ofd.FileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -200,6 +201,9 @@ namespace PckStudio
|
||||
pckFileLabel.Text = "Current PCK File: " + Path.GetFileName(saveLocation);
|
||||
treeViewMain.Enabled = treeMeta.Enabled = true;
|
||||
closeToolStripMenuItem.Visible = true;
|
||||
fullBoxSupportToolStripMenuItem.Checked = currentPCK.HasVerionString;
|
||||
packSettingsToolStripMenuItem.Visible = true;
|
||||
|
||||
saveToolStripMenuItem.Enabled = true;
|
||||
saveToolStripMenuItem1.Enabled = true;
|
||||
advancedMetaAddingToolStripMenuItem.Enabled = true;
|
||||
@@ -209,7 +213,7 @@ namespace PckStudio
|
||||
isSelectingTab = true;
|
||||
tabControl.SelectTab(1);
|
||||
isSelectingTab = false;
|
||||
UpdateRPC();
|
||||
UpdateRPC();
|
||||
}
|
||||
|
||||
private void CloseEditorTab()
|
||||
@@ -230,7 +234,8 @@ namespace PckStudio
|
||||
saveToolStripMenuItem1.Enabled = false;
|
||||
advancedMetaAddingToolStripMenuItem.Enabled = false;
|
||||
closeToolStripMenuItem.Visible = false;
|
||||
convertToBedrockToolStripMenuItem.Enabled = false;
|
||||
packSettingsToolStripMenuItem.Visible = false;
|
||||
convertToBedrockToolStripMenuItem.Enabled = false;
|
||||
addCustomPackImageToolStripMenuItem.Enabled = false;
|
||||
fileEntryCountLabel.Text = string.Empty;
|
||||
pckFileLabel.Text = string.Empty;
|
||||
@@ -282,12 +287,14 @@ namespace PckStudio
|
||||
{
|
||||
case PckFile.FileData.FileType.SkinDataFile:
|
||||
case PckFile.FileData.FileType.TexturePackInfoFile:
|
||||
if (file.Data.Length == 0)
|
||||
break;
|
||||
using (var stream = new MemoryStream(file.Data))
|
||||
{
|
||||
try
|
||||
{
|
||||
var writer = new PckFileReader(LittleEndianCheckBox.Checked ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
|
||||
PckFile subPCKfile = writer.FromStream(stream);
|
||||
var reader = new PckFileReader(LittleEndianCheckBox.Checked ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
|
||||
PckFile subPCKfile = reader.FromStream(stream);
|
||||
// passes parent path to remove from sub pck filepaths
|
||||
BuildPckTreeView(node.Nodes, subPCKfile, file.Filename + "/");
|
||||
}
|
||||
@@ -395,13 +402,10 @@ namespace PckStudio
|
||||
|
||||
private void HandleAudioFile(PckFile.FileData file)
|
||||
{
|
||||
if (!TryGetLocFile(out LOCFile locFile))
|
||||
throw new Exception("No .loc File found.");
|
||||
using AudioEditor audioEditor = new AudioEditor(file, locFile, LittleEndianCheckBox.Checked);
|
||||
using AudioEditor audioEditor = new AudioEditor(file, LittleEndianCheckBox.Checked);
|
||||
if (audioEditor.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
wasModified = true;
|
||||
TrySetLocFile(locFile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -639,24 +643,6 @@ namespace PckStudio
|
||||
|
||||
private void Save(string filePath)
|
||||
{
|
||||
bool isSkinsPCK = false;
|
||||
if (!currentPCK.TryGetFile("0", PckFile.FileData.FileType.InfoFile, out PckFile.FileData _))
|
||||
{
|
||||
switch(MessageBox.Show(this, "The info file, \"0\", was not detected. Would you like to save as a Skins.pck archive?", "Save as Skins archive?", MessageBoxButtons.YesNoCancel))
|
||||
{
|
||||
case DialogResult.Yes:
|
||||
isSkinsPCK = true;
|
||||
break;
|
||||
case DialogResult.No:
|
||||
isSkinsPCK = false;
|
||||
break;
|
||||
case DialogResult.Cancel:
|
||||
default:
|
||||
return; // Cancel operation
|
||||
}
|
||||
}
|
||||
currentPCK.HasVerionString = isSkinsPCK;
|
||||
|
||||
var writer = new PckFileWriter(currentPCK, LittleEndianCheckBox.Checked ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
|
||||
writer.WriteToFile(filePath);
|
||||
wasModified = false;
|
||||
@@ -860,7 +846,7 @@ namespace PckStudio
|
||||
}
|
||||
else if (currentPCK.Files.FindIndex(file => file.Filename == "audio.pck") != -1)
|
||||
{
|
||||
// the chances of this happening is really really slim but just in case
|
||||
// the chance of this happening is really really slim but just in case
|
||||
MessageBox.Show("There is already a file in this PCK named \"audio.pck\"!", "Can't create audio.pck");
|
||||
return;
|
||||
}
|
||||
@@ -870,13 +856,9 @@ namespace PckStudio
|
||||
return;
|
||||
}
|
||||
|
||||
if (!TryGetLocFile(out LOCFile locFile))
|
||||
throw new Exception("No .loc file found.");
|
||||
var file = CreateNewAudioFile(LittleEndianCheckBox.Checked);
|
||||
AudioEditor diag = new AudioEditor(file, locFile, LittleEndianCheckBox.Checked);
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
TrySetLocFile(locFile);
|
||||
else
|
||||
AudioEditor diag = new AudioEditor(file, LittleEndianCheckBox.Checked);
|
||||
if(diag.ShowDialog(this) != DialogResult.OK)
|
||||
{
|
||||
currentPCK.Files.Remove(file); //delete file if not saved
|
||||
}
|
||||
@@ -922,13 +904,12 @@ namespace PckStudio
|
||||
|
||||
bool IsSubPCKNode(string nodePath, string extention = ".pck")
|
||||
{
|
||||
// written by miku, implemented and modified by me - MNL
|
||||
// written by miku, implemented and modified by MattNL
|
||||
if (nodePath.EndsWith(extention)) return false;
|
||||
|
||||
string[] subpaths = nodePath.Split('/');
|
||||
var conditions = subpaths.Select(s => Path.GetExtension(s).Equals(extention));
|
||||
|
||||
bool isSubFile = conditions.Contains(true);
|
||||
bool isSubFile = subpaths.Any(s => Path.GetExtension(s).Equals(extention));
|
||||
|
||||
if(isSubFile) Console.WriteLine($"{nodePath} is a Sub-PCK File");
|
||||
|
||||
@@ -975,10 +956,7 @@ namespace PckStudio
|
||||
if (parent_file.Filetype is PckFile.FileData.FileType.TexturePackInfoFile || parent_file.Filetype is PckFile.FileData.FileType.SkinDataFile)
|
||||
{
|
||||
Console.WriteLine("Rebuilding " + parent_file.Filename);
|
||||
PckFile newPCKFile = new PckFile(3)
|
||||
{
|
||||
HasVerionString = parent_file.Filetype is PckFile.FileData.FileType.SkinDataFile
|
||||
};
|
||||
PckFile newPCKFile = new PckFile(3, parent_file.Filetype is PckFile.FileData.FileType.SkinDataFile);
|
||||
|
||||
foreach (TreeNode node in GetAllChildNodes(parent.Nodes))
|
||||
{
|
||||
@@ -1251,10 +1229,7 @@ namespace PckStudio
|
||||
PckFile.FileData skinsPCKFile = newPck.CreateNewFile("Skins.pck", PckFile.FileData.FileType.SkinDataFile, () =>
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
var writer = new PckFileWriter(new PckFile(3)
|
||||
{
|
||||
HasVerionString = true
|
||||
},
|
||||
var writer = new PckFileWriter(new PckFile(3, true),
|
||||
LittleEndianCheckBox.Checked
|
||||
? OMI.Endianness.LittleEndian
|
||||
: OMI.Endianness.BigEndian);
|
||||
@@ -1734,12 +1709,6 @@ namespace PckStudio
|
||||
#endif
|
||||
}
|
||||
|
||||
private void wiiUPCKInstallerToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
InstallWiiU install = new InstallWiiU(null);
|
||||
install.ShowDialog();
|
||||
}
|
||||
|
||||
private void howToMakeABasicSkinPackToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Process.Start("https://www.youtube.com/watch?v=A43aHRHkKxk");
|
||||
@@ -1775,12 +1744,6 @@ namespace PckStudio
|
||||
Process.Start("https://www.youtube.com/watch?v=hTlImrRrCKQ");
|
||||
}
|
||||
|
||||
private void PS3PCKInstallerToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
InstallPS3 install = new InstallPS3(null);
|
||||
install.ShowDialog();
|
||||
}
|
||||
|
||||
private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Preferences setting = new Preferences();
|
||||
@@ -1793,13 +1756,6 @@ namespace PckStudio
|
||||
pckm.Show();
|
||||
}
|
||||
|
||||
private void VitaPCKInstallerToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
InstallVita install = new InstallVita(null);
|
||||
install.ShowDialog();
|
||||
}
|
||||
|
||||
private void toPhoenixARCDeveloperToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Process.Start("https://cash.app/$PhoenixARC");
|
||||
@@ -1866,7 +1822,7 @@ namespace PckStudio
|
||||
string[] Filepaths = (string[])e.Data.GetData(DataFormats.FileDrop, false);
|
||||
if (Filepaths.Length > 1)
|
||||
MessageBox.Show("Only one pck file at a time is currently supported");
|
||||
LoadPck(Filepaths[0]);
|
||||
LoadPckFromFile(Filepaths[0]);
|
||||
}
|
||||
|
||||
private void OpenPck_DragLeave(object sender, EventArgs e)
|
||||
@@ -2023,18 +1979,18 @@ namespace PckStudio
|
||||
{
|
||||
for (int i = 2; i < 2 + diag.Levels; i++)
|
||||
{
|
||||
string mippedPath = textureDirectory + "/" + textureName + "MipMapLevel" + i + textureExtension;
|
||||
string mippedPath = $"{textureDirectory}/{textureName}MipMapLevel{i}{textureExtension}";
|
||||
Debug.WriteLine(mippedPath);
|
||||
if (currentPCK.HasFile(mippedPath, PckFile.FileData.FileType.TextureFile))
|
||||
currentPCK.Files.Remove(currentPCK.GetFile(mippedPath, PckFile.FileData.FileType.TextureFile));
|
||||
PckFile.FileData MipMappedFile = new PckFile.FileData(mippedPath, PckFile.FileData.FileType.TextureFile);
|
||||
|
||||
|
||||
Image originalTexture = Image.FromStream(new MemoryStream(file.Data));
|
||||
int NewWidth = originalTexture.Width / (int)Math.Pow(2,i - 1);
|
||||
int NewHeight = originalTexture.Height / (int)Math.Pow(2, i - 1);
|
||||
Rectangle tileArea = new Rectangle(0, 0,
|
||||
NewWidth < 1 ? 1 : NewWidth,
|
||||
NewHeight < 1 ? 1 : NewHeight);
|
||||
int NewWidth = Math.Max(originalTexture.Width / (int)Math.Pow(2,i - 1), 1);
|
||||
int NewHeight = Math.Max(originalTexture.Height / (int)Math.Pow(2, i - 1), 1);
|
||||
|
||||
Rectangle tileArea = new Rectangle(0, 0, NewWidth, NewHeight);
|
||||
Image mippedTexture = new Bitmap(NewWidth, NewHeight);
|
||||
using (Graphics gfx = Graphics.FromImage(mippedTexture))
|
||||
{
|
||||
@@ -2046,6 +2002,7 @@ namespace PckStudio
|
||||
MemoryStream texStream = new MemoryStream();
|
||||
mippedTexture.Save(texStream, ImageFormat.Png);
|
||||
MipMappedFile.SetData(texStream.ToArray());
|
||||
texStream.Dispose();
|
||||
|
||||
currentPCK.Files.Insert(currentPCK.Files.IndexOf(file) + i - 1, MipMappedFile);
|
||||
}
|
||||
@@ -2068,7 +2025,7 @@ namespace PckStudio
|
||||
|
||||
private void tabControl_Selecting(object sender, TabControlCancelEventArgs e)
|
||||
{
|
||||
if (!isSelectingTab) e.Cancel = true;
|
||||
e.Cancel = !isSelectingTab;
|
||||
}
|
||||
|
||||
private void as3DSTextureFileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
@@ -2078,7 +2035,7 @@ namespace PckStudio
|
||||
file.Filetype == PckFile.FileData.FileType.SkinFile)
|
||||
{
|
||||
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||
saveFileDialog.Filter = "3DS Texture | *.3dst";
|
||||
saveFileDialog.Filter = "3DS Texture|*.3dst";
|
||||
saveFileDialog.DefaultExt = ".3dst";
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
@@ -2171,7 +2128,7 @@ namespace PckStudio
|
||||
currentPCK.CreateNewFile("Skins.pck", PckFile.FileData.FileType.SkinDataFile, () =>
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
var writer = new PckFileWriter(new PckFile(3) { HasVerionString = true },
|
||||
var writer = new PckFileWriter(new PckFile(3, true),
|
||||
LittleEndianCheckBox.Checked ? OMI.Endianness.LittleEndian : OMI.Endianness.BigEndian);
|
||||
writer.WriteToStream(stream);
|
||||
return stream.ToArray();
|
||||
@@ -2288,6 +2245,12 @@ namespace PckStudio
|
||||
Process.Start("https://trello.com/b/0XLNOEbe/pck-studio");
|
||||
}
|
||||
|
||||
private void openPckManagerToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
PckManager installer = new PckManager();
|
||||
installer.Show(this);
|
||||
}
|
||||
|
||||
private async void wavBinkaToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using OpenFileDialog fileDialog = new OpenFileDialog
|
||||
@@ -2303,18 +2266,18 @@ namespace PckStudio
|
||||
waitDiag.Show(this);
|
||||
|
||||
int convertedCounter = 0;
|
||||
foreach (string file in fileDialog.FileNames)
|
||||
foreach (string waveFilepath in fileDialog.FileNames)
|
||||
{
|
||||
string[] a = Path.GetFileNameWithoutExtension(file).Split(Path.GetInvalidFileNameChars());
|
||||
string[] a = Path.GetFileNameWithoutExtension(waveFilepath).Split(Path.GetInvalidFileNameChars());
|
||||
|
||||
string songName = string.Join("_", a);
|
||||
songName = System.Text.RegularExpressions.Regex.Replace(songName, @"[^\u0000-\u007F]+", "_"); // Replace UTF characters
|
||||
string cacheSongLoc = Path.Combine(Program.AppDataCache, songName + Path.GetExtension(file));
|
||||
string cacheSongLoc = Path.Combine(ApplicationScope.AppDataCacher.CacheDirectory, songName + Path.GetExtension(waveFilepath));
|
||||
|
||||
if (File.Exists(cacheSongLoc))
|
||||
File.Delete(cacheSongLoc);
|
||||
|
||||
using (var reader = new NAudio.Wave.WaveFileReader(file)) //read from original location
|
||||
using (var reader = new NAudio.Wave.WaveFileReader(waveFilepath)) //read from original location
|
||||
{
|
||||
var newFormat = new NAudio.Wave.WaveFormat(reader.WaveFormat.SampleRate, 16, reader.WaveFormat.Channels);
|
||||
using (var conversionStream = new NAudio.Wave.WaveFormatConversionStream(newFormat, reader))
|
||||
@@ -2328,7 +2291,7 @@ namespace PckStudio
|
||||
int exitCode = 0;
|
||||
await System.Threading.Tasks.Task.Run(() =>
|
||||
{
|
||||
exitCode = Classes.Binka.FromWav(cacheSongLoc, Path.Combine(Path.GetDirectoryName(file), Path.GetFileNameWithoutExtension(file) + ".binka"), 4);
|
||||
exitCode = Classes.Binka.FromWav(cacheSongLoc, Path.Combine(Path.GetDirectoryName(waveFilepath), Path.GetFileNameWithoutExtension(waveFilepath) + ".binka"), 4);
|
||||
});
|
||||
|
||||
if (exitCode != 0)
|
||||
@@ -2370,5 +2333,10 @@ namespace PckStudio
|
||||
waitDiag.Dispose();
|
||||
MessageBox.Show(this, $"Successfully converted {success}/{fileDialog.FileNames.Length} file{(fileDialog.FileNames.Length != 1 ? "s" : "")}", "Done!");
|
||||
}
|
||||
}
|
||||
|
||||
private void fullBoxSupportToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
currentPCK.SetVersion(fullBoxSupportToolStripMenuItem.Checked);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -167,6 +167,12 @@
|
||||
<Reference Include="WindowsFormsIntegration" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Classes\ToolboxItems\PictureBoxWithInterpolationMode.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Extensions\ImageLayoutDirection.cs" />
|
||||
<Compile Include="Extensions\ImageSection.cs" />
|
||||
<Compile Include="Extensions\ListExtensions.cs" />
|
||||
<Compile Include="Extensions\ControlExtensions.cs" />
|
||||
<Compile Include="Internals\ApplicationBuildInfo.cs" />
|
||||
<Compile Include="Classes\API\PCKCenter\model\PCKCenterJSON.cs" />
|
||||
@@ -190,10 +196,12 @@
|
||||
<Compile Include="Classes\IO\Sounds\Sounds.cs" />
|
||||
<Compile Include="Classes\Misc\FTPClient.cs" />
|
||||
<Compile Include="Classes\Misc\FileCacher.cs" />
|
||||
<Compile Include="Classes\Misc\OpenFolderDialog.cs" />
|
||||
<Compile Include="Classes\Models\DefaultModels\Steve64x64Model.cs" />
|
||||
<Compile Include="Classes\ToolboxItems\ThemeForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Internals\ApplicationScope.cs" />
|
||||
<Compile Include="Internals\SkinBOX.cs" />
|
||||
<Compile Include="Classes\Utils\ARC\ARCUtil.cs" />
|
||||
<Compile Include="Extensions\ImageExtensions.cs" />
|
||||
@@ -227,11 +235,17 @@
|
||||
<Compile Include="Classes\Networking\Network.cs" />
|
||||
<Compile Include="Classes\Misc\RichPresenceClient.cs" />
|
||||
<Compile Include="Classes\Networking\Update.cs" />
|
||||
<Compile Include="Forms\Additional-Popups\Audio\creditsEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
<Compile Include="Features\CemuPanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Additional-Popups\Audio\creditsEditor.Designer.cs">
|
||||
<DependentUpon>creditsEditor.cs</DependentUpon>
|
||||
<Compile Include="Features\CemuPanel.Designer.cs">
|
||||
<DependentUpon>CemuPanel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Features\WiiUPanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Features\WiiUPanel.Designer.cs">
|
||||
<DependentUpon>WiiUPanel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Internals\CommitInfo.cs" />
|
||||
<Compile Include="Forms\Additional-Popups\EntityForms\AddEntry.cs">
|
||||
@@ -289,7 +303,9 @@
|
||||
<DependentUpon>TextPrompt.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Editor\Animation.cs" />
|
||||
<Compile Include="Forms\Editor\AnimationPlayer.cs" />
|
||||
<Compile Include="Forms\Editor\AnimationPictureBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Editor\MaterialsEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -368,13 +384,18 @@
|
||||
<Compile Include="Forms\Additional-Popups\InProgressPrompt.Designer.cs">
|
||||
<DependentUpon>InProgressPrompt.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Utilities\ModelsResources.cs" />
|
||||
<Compile Include="Forms\Utilities\MaterialResources.cs" />
|
||||
<Compile Include="Forms\Utilities\BehaviourResources.cs" />
|
||||
<Compile Include="Forms\Utilities\AnimationResources.cs" />
|
||||
<Compile Include="Forms\Editor\BoxEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Features\PckManager.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Features\PckManager.Designer.cs">
|
||||
<DependentUpon>PckManager.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Editor\BoxEditor.Designer.cs">
|
||||
<DependentUpon>BoxEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
@@ -426,25 +447,6 @@
|
||||
<Compile Include="Forms\Editor\AudioEditor.Designer.cs">
|
||||
<DependentUpon>AudioEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Utilities\InstallPS3.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Utilities\InstallPS3.Designer.cs">
|
||||
<DependentUpon>InstallPS3.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Utilities\InstallVita.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Utilities\InstallVita.Designer.cs">
|
||||
<DependentUpon>InstallVita.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Utilities\InstallWiiU.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Utilities\InstallWiiU.Designer.cs">
|
||||
<DependentUpon>InstallWiiU.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Extensions\ListExtensions.cs" />
|
||||
<Compile Include="Forms\Utilities\PCK Manager.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -475,9 +477,6 @@
|
||||
<Compile Include="Forms\Utilities\TextureConverterUtility.Designer.cs">
|
||||
<DependentUpon>TextureConverterUtility.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Classes\ToolboxItems\InterpolationPictureBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PckNodeSorter.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@@ -485,6 +484,12 @@
|
||||
<DependentUpon>creditsEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Classes\IO\3DST\TextureCodec.cs" />
|
||||
<EmbeddedResource Include="Features\CemuPanel.resx">
|
||||
<DependentUpon>CemuPanel.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Features\WiiUPanel.resx">
|
||||
<DependentUpon>WiiUPanel.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Additional-Popups\EntityForms\AddEntry.resx">
|
||||
<DependentUpon>AddEntry.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -574,6 +579,9 @@
|
||||
<EmbeddedResource Include="Forms\Additional-Popups\InProgressPrompt.resx">
|
||||
<DependentUpon>InProgressPrompt.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Features\PckManager.resx">
|
||||
<DependentUpon>PckManager.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Editor\BoxEditor.resx">
|
||||
<DependentUpon>BoxEditor.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -608,18 +616,6 @@
|
||||
<DependentUpon>AudioEditor.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Utilities\InstallPS3.resx">
|
||||
<DependentUpon>InstallPS3.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Utilities\InstallVita.resx">
|
||||
<DependentUpon>InstallVita.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Utilities\InstallWiiU.ja.resx">
|
||||
<DependentUpon>InstallWiiU.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Utilities\InstallWiiU.resx">
|
||||
<DependentUpon>InstallWiiU.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Utilities\PCK Manager.ja.resx">
|
||||
<DependentUpon>PCK Manager.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -640,6 +636,7 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Utilities\pckCenterOpen.resx">
|
||||
<DependentUpon>pckCenterOpen.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Utilities\TextureConverterUtility.resx">
|
||||
<DependentUpon>TextureConverterUtility.cs</DependentUpon>
|
||||
@@ -676,7 +673,6 @@
|
||||
<None Include="Resources\rename_32px.png" />
|
||||
<None Include="Resources\entityData.json" />
|
||||
<None Include="Resources\TexturePackIcon.png" />
|
||||
<None Include="Resources\apps.zip" />
|
||||
<None Include="Resources\binka\binkawin.asi" />
|
||||
<None Include="Resources\fileTemplates\1.91_colours.col" />
|
||||
<None Include="Resources\fileTemplates\tu12colours.col" />
|
||||
@@ -692,28 +688,18 @@
|
||||
<None Include="Resources\fileTemplates\tu54colours.col" />
|
||||
<None Include="Resources\fileTemplates\tu69colours.col" />
|
||||
<None Include="Resources\tileData.json" />
|
||||
<None Include="Resources\Del.png" />
|
||||
<None Include="Resources\ExportFile.png" />
|
||||
<None Include="Resources\power3.png" />
|
||||
<None Include="Resources\power.png" />
|
||||
<None Include="Resources\youtube_PNG15.png" />
|
||||
<None Include="Resources\external\Youtube.png" />
|
||||
<None Include="Resources\pckClosed.png" />
|
||||
<None Include="Resources\pckClosed.bmp" />
|
||||
<None Include="Resources\wii-u-games-tool.png" />
|
||||
<None Include="Resources\turn-off %281%291.png" />
|
||||
<None Include="Resources\discord.png" />
|
||||
<None Include="Resources\external-content.duckduckgo.png" />
|
||||
<None Include="Resources\clock.png" />
|
||||
<None Include="Resources\external\Discord.png" />
|
||||
<None Include="Resources\icons\clock.png" />
|
||||
<None Include="Resources\changeTile.png" />
|
||||
<None Include="Resources\items.png" />
|
||||
<None Include="Resources\MROE.png" />
|
||||
<None Include="Resources\sdDownload.png" />
|
||||
<None Include="Resources\Replace.png" />
|
||||
<None Include="Resources\HamburgerMenuIcon.png" />
|
||||
<None Include="Resources\pack.png" />
|
||||
<None Include="Resources\terrain.png" />
|
||||
<None Include="Resources\xbox.png" />
|
||||
<None Include="Resources\ps3.png" />
|
||||
<None Include="Resources\wiiu.png" />
|
||||
<None Include="Resources\external\Xbox.png" />
|
||||
<None Include="Resources\external\PS3.png" />
|
||||
<None Include="Resources\external\WiiU.png" />
|
||||
<None Include="Resources\Splash.png" />
|
||||
<None Include="Resources\pckOpen.png" />
|
||||
<None Include="Resources\pckDrop.png" />
|
||||
@@ -737,6 +723,14 @@
|
||||
<None Include="Resources\iconImageList\ENTITY MATERIALS ICON.png" />
|
||||
<None Include="Resources\iconImageList\blank.png" />
|
||||
<None Include="Resources\entities.png" />
|
||||
<Content Include="Resources\icons\file_delete.png" />
|
||||
<Content Include="Resources\icons\file_empty.png" />
|
||||
<None Include="Resources\icons\file_export.png" />
|
||||
<None Include="Resources\icons\file_import.png" />
|
||||
<Content Include="Resources\icons\file_new.png" />
|
||||
<Content Include="Resources\icons\music.png" />
|
||||
<None Include="Resources\icons\ranch.png" />
|
||||
<Content Include="Resources\icons\Replace.png" />
|
||||
<None Include="Resources\help_30px.png" />
|
||||
<None Include="Resources\menu_50px.png" />
|
||||
<None Include="Resources\check_all_480px.png" />
|
||||
@@ -745,7 +739,6 @@
|
||||
<None Include="Resources\file_32px.png" />
|
||||
<None Include="Resources\generated_photos_30px.png" />
|
||||
<Content Include="Resources\PCK-Studio_Logo.ico" />
|
||||
<None Include="Resources\bg1.png" />
|
||||
<Content Include="Resources\NoImageFound.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -14,6 +14,8 @@ namespace PckStudio
|
||||
public static readonly string AppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "PCK-Studio");
|
||||
public static readonly string AppDataCache = Path.Combine(AppData, "cache");
|
||||
|
||||
public static MainForm MainInstance { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
@@ -22,11 +24,11 @@ namespace PckStudio
|
||||
{
|
||||
System.Globalization.CultureInfo.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
|
||||
|
||||
MainForm mainForm = new MainForm();
|
||||
DarkNet.Instance.SetWindowThemeForms(mainForm, Theme.Auto);
|
||||
MainInstance = new MainForm();
|
||||
DarkNet.Instance.SetWindowThemeForms(MainInstance, Theme.Auto);
|
||||
if (args.Length > 0 && File.Exists(args[0]) && args[0].EndsWith(".pck"))
|
||||
mainForm.LoadPck(args[0]);
|
||||
Application.Run(mainForm);
|
||||
MainInstance.LoadPckFromFile(args[0]);
|
||||
Application.Run(MainInstance);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
142
PCK-Studio/Properties/Resources.Designer.cs
generated
@@ -80,16 +80,6 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
public static byte[] apps {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("apps", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -110,16 +100,6 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap bg1 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("bg1", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
@@ -265,29 +245,9 @@ namespace PckStudio.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap Del {
|
||||
public static System.Drawing.Bitmap Discord {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Del", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap discord {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("discord", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap edit_26px {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("edit_26px", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Discord", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -347,9 +307,9 @@ namespace PckStudio.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap ExportFile {
|
||||
public static System.Drawing.Bitmap file_delete {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ExportFile", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("file_delete", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -357,9 +317,39 @@ namespace PckStudio.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap external_content_duckduckgo {
|
||||
public static System.Drawing.Bitmap file_empty {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("external-content.duckduckgo", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("file_empty", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap file_export {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("file_export", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap file_import {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("file_import", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap file_new {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("file_new", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -404,6 +394,16 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap HamburgerMenuIcon {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("HamburgerMenuIcon", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -474,16 +474,6 @@ namespace PckStudio.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap MROE {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("MROE", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
@@ -577,9 +567,9 @@ namespace PckStudio.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap power3 {
|
||||
public static System.Drawing.Bitmap PS3 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("power3", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("PS3", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -587,9 +577,9 @@ namespace PckStudio.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap ps3 {
|
||||
public static System.Drawing.Bitmap ranch {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ps3", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("ranch", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -871,9 +861,9 @@ namespace PckStudio.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap turn_off__1_1 {
|
||||
public static System.Drawing.Bitmap WiiU {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("turn-off (1)1", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("WiiU", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -881,9 +871,9 @@ namespace PckStudio.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap wii_u_games_tool {
|
||||
public static System.Drawing.Bitmap Xbox {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("wii-u-games-tool", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Xbox", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -891,29 +881,9 @@ namespace PckStudio.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap wiiu {
|
||||
public static System.Drawing.Bitmap Youtube {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("wiiu", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap xbox {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("xbox", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap youtube_PNG15 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("youtube_PNG15", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("Youtube", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,12 +130,6 @@
|
||||
<data name="NoImageFound" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\NoImageFound.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ExportFile" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ExportFile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="xbox" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\xbox.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="tu51colours" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileTemplates\tu51colours.col;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
@@ -160,15 +154,9 @@
|
||||
<data name="BEHAVIOURS_ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\iconImageList\BEHAVIOURS ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="bg1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\bg1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ZUnknown" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\iconImageList\ZUnknown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="wiiu" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\wiiu.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ARROW" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\iconImageList\ARROW.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -187,24 +175,12 @@
|
||||
<data name="tileData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\tileData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="Replace" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Replace.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="pckClosed" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\pckClosed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="discord" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\discord.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="power3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\power3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="AddTexture" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\AddTexture.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="music" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\music.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="classic_template" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\anim_editor\classic_template.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -220,9 +196,6 @@
|
||||
<data name="IMAGE_ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\iconImageList\IMAGE ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="sdDownload" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\sdDownload.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="BINKA_ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\iconImageList\BINKA ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -232,11 +205,8 @@
|
||||
<data name="GRF_ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\iconImageList\GRF ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="MROE" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\MROE.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="wii-u-games-tool" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\wii-u-games-tool.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="HamburgerMenuIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\HamburgerMenuIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="pckDrop" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\pckDrop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@@ -244,18 +214,9 @@
|
||||
<data name="Splash" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Splash.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="apps" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\apps.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="CAPE_ICON" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\iconImageList\CAPE ICON.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="youtube_PNG15" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\youtube_PNG15.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ps3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ps3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="tu19colours" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileTemplates\tu19colours.col;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
@@ -275,7 +236,7 @@
|
||||
<value>..\Resources\fileTemplates\tu53colours.col;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="clock" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\clock.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<value>..\Resources\icons\clock.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="items_sheet" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\items.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@@ -301,18 +262,12 @@
|
||||
<data name="tu12colours" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileTemplates\tu12colours.col;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="turn-off (1)1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\turn-off (1)1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="tu14colours" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileTemplates\tu14colours.col;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="tu69colours" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\fileTemplates\tu69colours.col;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="external-content.duckduckgo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\external-content.duckduckgo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="slim_template" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\anim_editor\slim_template.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -322,9 +277,6 @@
|
||||
<data name="pckOpen" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\pckOpen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Del" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Del.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="TexturePackIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\TexturePackIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -379,4 +331,43 @@
|
||||
<data name="entityData" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\entityData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="file_delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons\file_delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="file_empty" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons\file_empty.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="file_new" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons\file_new.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Discord" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\external\Discord.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="PS3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\external\PS3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="WiiU" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\external\WiiU.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Xbox" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\external\Xbox.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Youtube" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\external\Youtube.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="music" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons\music.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Replace" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons\Replace.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="file_export" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons\file_export.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="file_import" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons\file_import.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ranch" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icons\ranch.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -38,7 +38,7 @@
|
||||
<!-- Windows 8.1 -->
|
||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||
<!-- Windows 10 -->
|
||||
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||
</application>
|
||||
</compatibility>
|
||||
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
|
||||
|
||||
|
Before Width: | Height: | Size: 276 B |
|
Before Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 177 B |
|
Before Width: | Height: | Size: 198 B |
@@ -1 +0,0 @@
|
||||
{"meta":{"format_version":"4.0","creation_time":1656558992,"model_format":"bedrock","box_uv":true},"name":"SKIN_DEF_ALEX","geometry_name":"alex","visible_box":[2,3.5,1.25],"variable_placeholders":"","variable_placeholder_buttons":[],"timeline_setups":[],"resolution":{"width":64,"height":64},"elements":[{"name":"HEAD","rescale":false,"locked":false,"from":[-4,24,-4],"to":[4,32,4],"autouv":0,"color":0,"origin":[0,0,0],"faces":{"north":{"uv":[8,8,16,16]},"east":{"uv":[0,8,8,16]},"south":{"uv":[24,8,32,16]},"west":{"uv":[16,8,24,16]},"up":{"uv":[16,8,8,0]},"down":{"uv":[24,0,16,8]}},"type":"cube","uuid":"cd5c9d3f-0b10-68e3-8dac-8cb70ab78400"},{"name":"BODY","rescale":false,"locked":false,"from":[-4,12,-2],"to":[4,24,2],"autouv":0,"color":1,"origin":[0,0,0],"uv_offset":[16,16],"faces":{"north":{"uv":[20,20,28,32]},"east":{"uv":[16,20,20,32]},"south":{"uv":[32,20,40,32]},"west":{"uv":[28,20,32,32]},"up":{"uv":[28,20,20,16]},"down":{"uv":[36,16,28,20]}},"type":"cube","uuid":"a3e5052a-483c-4e9c-f696-f89bfee11aec"},{"name":"ARM0","rescale":false,"locked":false,"from":[4,12,-2],"to":[7,24,2],"autouv":0,"color":2,"origin":[0,0,0],"uv_offset":[40,16],"faces":{"north":{"uv":[44,20,47,32]},"east":{"uv":[40,20,44,32]},"south":{"uv":[51,20,54,32]},"west":{"uv":[47,20,51,32]},"up":{"uv":[47,20,44,16]},"down":{"uv":[50,16,47,20]}},"type":"cube","uuid":"c891bc09-882a-c464-e8c3-77562d2e513b"},{"name":"ARM1","rescale":false,"locked":false,"from":[-7,12,-2],"to":[-4,24,2],"autouv":0,"color":3,"origin":[0,0,0],"uv_offset":[32,48],"faces":{"north":{"uv":[36,52,39,64]},"east":{"uv":[32,52,36,64]},"south":{"uv":[43,52,46,64]},"west":{"uv":[39,52,43,64]},"up":{"uv":[39,52,36,48]},"down":{"uv":[42,48,39,52]}},"type":"cube","uuid":"a8a2007f-0382-9157-3deb-88a6aa726483"},{"name":"LEG0","rescale":false,"locked":false,"from":[-0.10000000000000009,0,-2],"to":[3.9,12,2],"autouv":0,"color":4,"origin":[0,0,0],"uv_offset":[0,16],"faces":{"north":{"uv":[4,20,8,32]},"east":{"uv":[0,20,4,32]},"south":{"uv":[12,20,16,32]},"west":{"uv":[8,20,12,32]},"up":{"uv":[8,20,4,16]},"down":{"uv":[12,16,8,20]}},"type":"cube","uuid":"af316d17-e898-c462-bf93-b91623df90e2"},{"name":"LEG1","rescale":false,"locked":false,"from":[-3.9,0,-2],"to":[0.10000000000000009,12,2],"autouv":0,"color":5,"origin":[0,0,0],"uv_offset":[16,48],"faces":{"north":{"uv":[20,52,24,64]},"east":{"uv":[16,52,20,64]},"south":{"uv":[28,52,32,64]},"west":{"uv":[24,52,28,64]},"up":{"uv":[24,52,20,48]},"down":{"uv":[28,48,24,52]}},"type":"cube","uuid":"7ff71552-c015-50fb-3fba-52318f10a0e6"}],"outliner":[{"name":"HEAD","origin":[0,24,0],"bedrock_binding":"","color":0,"uuid":"6b46512c-2450-b55b-3eb4-0662b985288c","export":true,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"children":["cd5c9d3f-0b10-68e3-8dac-8cb70ab78400"]},{"name":"BODY","origin":[0,24,0],"bedrock_binding":"","color":1,"uuid":"6af6840e-e2a6-b195-7868-f59b16b3d939","export":true,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"children":["a3e5052a-483c-4e9c-f696-f89bfee11aec"]},{"name":"ARM0","origin":[5,22,0],"bedrock_binding":"","color":2,"uuid":"7f8c16bc-735b-f482-a35b-ae01aece8d2b","export":true,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"children":["c891bc09-882a-c464-e8c3-77562d2e513b"]},{"name":"ARM1","origin":[-5,22,0],"bedrock_binding":"","color":3,"uuid":"2cfb2bb3-64e3-f2d9-fac5-71bd6a6fcfce","export":true,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"children":["a8a2007f-0382-9157-3deb-88a6aa726483"]},{"name":"LEG0","origin":[1.9,12,0],"bedrock_binding":"","color":4,"uuid":"da67dbfe-addf-7f9e-a487-25fc2e92afd4","export":true,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"children":["af316d17-e898-c462-bf93-b91623df90e2"]},{"name":"LEG1","origin":[-1.9,12,0],"bedrock_binding":"","color":5,"uuid":"a60a2326-e5f3-de66-9021-761603960dcc","export":true,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"children":["7ff71552-c015-50fb-3fba-52318f10a0e6"]}],"textures":[]}
|
||||
@@ -1 +0,0 @@
|
||||
{"meta":{"format_version":"4.0","creation_time":1656559171,"model_format":"bedrock","box_uv":true},"name":"SKIN_DEF_STEVE","geometry_name":"steve","visible_box":[2,3.5,1.25],"variable_placeholders":"","variable_placeholder_buttons":[],"timeline_setups":[],"resolution":{"width":64,"height":64},"elements":[{"name":"HEAD","rescale":false,"locked":false,"from":[-4,24,-4],"to":[4,32,4],"autouv":0,"color":0,"origin":[0,0,0],"faces":{"north":{"uv":[8,8,16,16]},"east":{"uv":[0,8,8,16]},"south":{"uv":[24,8,32,16]},"west":{"uv":[16,8,24,16]},"up":{"uv":[16,8,8,0]},"down":{"uv":[24,0,16,8]}},"type":"cube","uuid":"cd26b387-a853-6ee6-27ee-2479095c46e5"},{"name":"BODY","rescale":false,"locked":false,"from":[-4,12,-2],"to":[4,24,2],"autouv":0,"color":1,"origin":[0,0,0],"uv_offset":[16,16],"faces":{"north":{"uv":[20,20,28,32]},"east":{"uv":[16,20,20,32]},"south":{"uv":[32,20,40,32]},"west":{"uv":[28,20,32,32]},"up":{"uv":[28,20,20,16]},"down":{"uv":[36,16,28,20]}},"type":"cube","uuid":"ec0e8978-c772-344f-2189-5b0ca45bde92"},{"name":"ARM0","rescale":false,"locked":false,"from":[4,12,-2],"to":[8,24,2],"autouv":0,"color":2,"origin":[0,0,0],"uv_offset":[40,16],"faces":{"north":{"uv":[44,20,48,32]},"east":{"uv":[40,20,44,32]},"south":{"uv":[52,20,56,32]},"west":{"uv":[48,20,52,32]},"up":{"uv":[48,20,44,16]},"down":{"uv":[52,16,48,20]}},"type":"cube","uuid":"c474174e-dc86-0900-f110-77218d620c12"},{"name":"ARM1","rescale":false,"locked":false,"from":[-8,12,-2],"to":[-4,24,2],"autouv":0,"color":3,"origin":[0,0,0],"uv_offset":[32,48],"faces":{"north":{"uv":[36,52,40,64]},"east":{"uv":[32,52,36,64]},"south":{"uv":[44,52,48,64]},"west":{"uv":[40,52,44,64]},"up":{"uv":[40,52,36,48]},"down":{"uv":[44,48,40,52]}},"type":"cube","uuid":"71e35f26-2cb8-802e-3948-68c912278124"},{"name":"LEG0","rescale":false,"locked":false,"from":[-0.10000000000000009,0,-2],"to":[3.9,12,2],"autouv":0,"color":4,"origin":[0,0,0],"uv_offset":[0,16],"faces":{"north":{"uv":[4,20,8,32]},"east":{"uv":[0,20,4,32]},"south":{"uv":[12,20,16,32]},"west":{"uv":[8,20,12,32]},"up":{"uv":[8,20,4,16]},"down":{"uv":[12,16,8,20]}},"type":"cube","uuid":"d3142705-b3be-3c42-f77a-7486bc92900f"},{"name":"LEG1","rescale":false,"locked":false,"from":[-3.9,0,-2],"to":[0.10000000000000009,12,2],"autouv":0,"color":5,"origin":[0,0,0],"uv_offset":[16,48],"faces":{"north":{"uv":[20,52,24,64]},"east":{"uv":[16,52,20,64]},"south":{"uv":[28,52,32,64]},"west":{"uv":[24,52,28,64]},"up":{"uv":[24,52,20,48]},"down":{"uv":[28,48,24,52]}},"type":"cube","uuid":"463a6aee-6752-7282-f9e0-c53e55adfdcb"}],"outliner":[{"name":"HEAD","origin":[0,24,0],"bedrock_binding":"","color":0,"uuid":"8c14bb67-d97e-53dd-760e-61a774ff8e9e","export":true,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"children":["cd26b387-a853-6ee6-27ee-2479095c46e5"]},{"name":"BODY","origin":[0,24,0],"bedrock_binding":"","color":1,"uuid":"504264bd-408a-72b9-7101-10a356d37921","export":true,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"children":["ec0e8978-c772-344f-2189-5b0ca45bde92"]},{"name":"ARM0","origin":[5,22,0],"bedrock_binding":"","color":2,"uuid":"44694657-3c67-63aa-977e-2bf4b731fe5e","export":true,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"children":["c474174e-dc86-0900-f110-77218d620c12"]},{"name":"ARM1","origin":[-5,22,0],"bedrock_binding":"","color":3,"uuid":"66ccb1d8-210c-62fb-2305-30267803b226","export":true,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"children":["71e35f26-2cb8-802e-3948-68c912278124"]},{"name":"LEG0","origin":[1.9,12,0],"bedrock_binding":"","color":4,"uuid":"0606aadb-4602-7a2f-0c81-61b330ffba56","export":true,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"children":["d3142705-b3be-3c42-f77a-7486bc92900f"]},{"name":"LEG1","origin":[-1.9,12,0],"bedrock_binding":"","color":5,"uuid":"dec03098-a782-aca8-ea80-f26711416460","export":true,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"children":["463a6aee-6752-7282-f9e0-c53e55adfdcb"]}],"textures":[]}
|
||||
BIN
PCK-Studio/Resources/SaveIcon.png
Normal file
|
After Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 345 B |
|
Before Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
BIN
PCK-Studio/Resources/external/WiiU.png
vendored
Normal file
|
After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
|
Before Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 335 B |
|
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 209 B |
BIN
PCK-Studio/Resources/icons/file_delete.png
Normal file
|
After Width: | Height: | Size: 199 B |
BIN
PCK-Studio/Resources/icons/file_empty.png
Normal file
|
After Width: | Height: | Size: 218 B |
BIN
PCK-Studio/Resources/icons/file_export.png
Normal file
|
After Width: | Height: | Size: 242 B |
BIN
PCK-Studio/Resources/icons/file_import.png
Normal file
|
After Width: | Height: | Size: 255 B |
BIN
PCK-Studio/Resources/icons/file_new.png
Normal file
|
After Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 232 B |
BIN
PCK-Studio/Resources/icons/ranch.png
Normal file
|
After Width: | Height: | Size: 204 B |
|
Before Width: | Height: | Size: 345 B |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 825 B |
|
Before Width: | Height: | Size: 447 B |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 563 B |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |