mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-12 23:37:07 +00:00
Cyber Save Update
This commit is contained in:
parent
915397270a
commit
043408ade8
2 changed files with 56 additions and 21 deletions
55
Misc/Util.cs
55
Misc/Util.cs
|
@ -9,6 +9,7 @@ namespace PKHeX
|
|||
{
|
||||
public partial class Util
|
||||
{
|
||||
// Image Layering/Blending Utility
|
||||
public static Image layerImage(Image baseLayer, Image overLayer, int x, int y, double trans)
|
||||
{
|
||||
Bitmap overlayImage = (Bitmap)overLayer;
|
||||
|
@ -31,16 +32,6 @@ namespace PKHeX
|
|||
}
|
||||
return newImage;
|
||||
}
|
||||
public static string GetTempFolder() // From 3DSSE's decompiled source.
|
||||
{
|
||||
string tempPath = Path.GetTempPath();
|
||||
string str2 = "SE3DS";
|
||||
str2 = "3DSSE";
|
||||
tempPath = Path.Combine(tempPath, str2);
|
||||
// Directory.CreateDirectory(tempPath);
|
||||
return (tempPath + "/");
|
||||
}
|
||||
|
||||
public static Color AlphaBlend(Color ForeGround, Color BackGround)
|
||||
{
|
||||
if (ForeGround.A == 0)
|
||||
|
@ -66,5 +57,49 @@ namespace PKHeX
|
|||
B = 255;
|
||||
return Color.FromArgb(Math.Abs(A), Math.Abs(R), Math.Abs(G), Math.Abs(B));
|
||||
}
|
||||
|
||||
// 3DSSE Utility
|
||||
internal static string GetTempFolder() // From 3DSSE's decompiled source.
|
||||
{
|
||||
string tempPath = Path.GetTempPath();
|
||||
string str2 = "SE3DS";
|
||||
str2 = "3DSSE";
|
||||
tempPath = Path.Combine(tempPath, str2);
|
||||
// Directory.CreateDirectory(tempPath);
|
||||
return (tempPath);
|
||||
}
|
||||
internal static string GetCacheFolder() // edited
|
||||
{
|
||||
return Path.Combine(GetBackupLocation(), "cache");
|
||||
}
|
||||
internal static string GetRegistryValue(string key)
|
||||
{
|
||||
Microsoft.Win32.RegistryKey currentUser = Microsoft.Win32.Registry.CurrentUser;
|
||||
Microsoft.Win32.RegistryKey key3 = currentUser.OpenSubKey(GetRegistryBase());
|
||||
if (key3 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
string str = key3.GetValue(key) as string;
|
||||
key3.Close();
|
||||
currentUser.Close();
|
||||
return str;
|
||||
}
|
||||
internal static string GetRegistryBase()
|
||||
{
|
||||
return @"SOFTWARE\CYBER Gadget\3DSSaveEditor";
|
||||
}
|
||||
public static string GetBackupLocation()
|
||||
{
|
||||
string registryValue = GetRegistryValue("Location");
|
||||
if (!string.IsNullOrEmpty(registryValue))
|
||||
{
|
||||
Directory.CreateDirectory(registryValue);
|
||||
return registryValue;
|
||||
}
|
||||
string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + Path.DirectorySeparatorChar + "3DSSaveBank";
|
||||
Directory.CreateDirectory(path);
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
22
PKX/f1-Main.Designer.cs
generated
22
PKX/f1-Main.Designer.cs
generated
|
@ -300,7 +300,7 @@
|
|||
this.fusedpkx = new System.Windows.Forms.PictureBox();
|
||||
this.L_ReadOnlyOther = new System.Windows.Forms.Label();
|
||||
this.Tab_Tools = new System.Windows.Forms.TabPage();
|
||||
this.B_OutAHK = new System.Windows.Forms.Button();
|
||||
this.B_3DSSETemp = new System.Windows.Forms.Button();
|
||||
this.B_BoxIO = new System.Windows.Forms.Button();
|
||||
this.B_JPEG = new System.Windows.Forms.Button();
|
||||
this.RTB_T = new System.Windows.Forms.RichTextBox();
|
||||
|
@ -3538,7 +3538,7 @@
|
|||
//
|
||||
// Tab_Tools
|
||||
//
|
||||
this.Tab_Tools.Controls.Add(this.B_OutAHK);
|
||||
this.Tab_Tools.Controls.Add(this.B_3DSSETemp);
|
||||
this.Tab_Tools.Controls.Add(this.B_BoxIO);
|
||||
this.Tab_Tools.Controls.Add(this.B_JPEG);
|
||||
this.Tab_Tools.Controls.Add(this.RTB_T);
|
||||
|
@ -3550,15 +3550,15 @@
|
|||
this.Tab_Tools.Text = "Tools";
|
||||
this.Tab_Tools.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// B_OutAHK
|
||||
// B_3DSSETemp
|
||||
//
|
||||
this.B_OutAHK.Location = new System.Drawing.Point(32, 20);
|
||||
this.B_OutAHK.Name = "B_OutAHK";
|
||||
this.B_OutAHK.Size = new System.Drawing.Size(75, 45);
|
||||
this.B_OutAHK.TabIndex = 7;
|
||||
this.B_OutAHK.Text = "Open Temp 3DSSE ";
|
||||
this.B_OutAHK.UseVisualStyleBackColor = true;
|
||||
this.B_OutAHK.Click += new System.EventHandler(this.B_OpenTemp_Click);
|
||||
this.B_3DSSETemp.Location = new System.Drawing.Point(32, 20);
|
||||
this.B_3DSSETemp.Name = "B_3DSSETemp";
|
||||
this.B_3DSSETemp.Size = new System.Drawing.Size(75, 45);
|
||||
this.B_3DSSETemp.TabIndex = 7;
|
||||
this.B_3DSSETemp.Text = "Open Temp 3DSSE ";
|
||||
this.B_3DSSETemp.UseVisualStyleBackColor = true;
|
||||
this.B_3DSSETemp.Click += new System.EventHandler(this.B_OpenTemp_Click);
|
||||
//
|
||||
// B_BoxIO
|
||||
//
|
||||
|
@ -4256,7 +4256,7 @@
|
|||
private System.Windows.Forms.Panel PAN_Party;
|
||||
private System.Windows.Forms.Panel PAN_BattleBox;
|
||||
private System.Windows.Forms.Button B_OpenSuperTraining;
|
||||
private System.Windows.Forms.Button B_OutAHK;
|
||||
private System.Windows.Forms.Button B_3DSSETemp;
|
||||
private System.Windows.Forms.Panel PAN_Box;
|
||||
public System.Windows.Forms.ComboBox C_BoxSelect;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue