mirror of
https://github.com/kwsch/NLSE.git
synced 2026-03-21 17:55:06 -05:00
Initial Commit
This commit is contained in:
parent
ac8742709b
commit
f84d88a616
6
App.config
Normal file
6
App.config
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
|
||||
</configuration>
|
||||
BIN
Favicon.ico
Normal file
BIN
Favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
120
Main.Designer.cs
generated
Normal file
120
Main.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
namespace NLSE
|
||||
{
|
||||
partial class Main
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
|
||||
this.B_Friend = new System.Windows.Forms.Button();
|
||||
this.CB_Friend = new System.Windows.Forms.ComboBox();
|
||||
this.B_Exhibition = new System.Windows.Forms.Button();
|
||||
this.B_Garden = new System.Windows.Forms.Button();
|
||||
this.L_IO = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// B_Friend
|
||||
//
|
||||
this.B_Friend.Location = new System.Drawing.Point(12, 66);
|
||||
this.B_Friend.Name = "B_Friend";
|
||||
this.B_Friend.Size = new System.Drawing.Size(90, 30);
|
||||
this.B_Friend.TabIndex = 1;
|
||||
this.B_Friend.Text = "Friend";
|
||||
this.B_Friend.UseVisualStyleBackColor = true;
|
||||
this.B_Friend.Click += new System.EventHandler(this.clickFriend);
|
||||
//
|
||||
// CB_Friend
|
||||
//
|
||||
this.CB_Friend.FormattingEnabled = true;
|
||||
this.CB_Friend.Location = new System.Drawing.Point(108, 75);
|
||||
this.CB_Friend.Name = "CB_Friend";
|
||||
this.CB_Friend.Size = new System.Drawing.Size(90, 21);
|
||||
this.CB_Friend.TabIndex = 2;
|
||||
//
|
||||
// B_Exhibition
|
||||
//
|
||||
this.B_Exhibition.Location = new System.Drawing.Point(12, 30);
|
||||
this.B_Exhibition.Name = "B_Exhibition";
|
||||
this.B_Exhibition.Size = new System.Drawing.Size(90, 30);
|
||||
this.B_Exhibition.TabIndex = 3;
|
||||
this.B_Exhibition.Text = "Exhibition";
|
||||
this.B_Exhibition.UseVisualStyleBackColor = true;
|
||||
this.B_Exhibition.Click += new System.EventHandler(this.clickExhibition);
|
||||
//
|
||||
// B_Garden
|
||||
//
|
||||
this.B_Garden.Location = new System.Drawing.Point(108, 30);
|
||||
this.B_Garden.Name = "B_Garden";
|
||||
this.B_Garden.Size = new System.Drawing.Size(90, 30);
|
||||
this.B_Garden.TabIndex = 4;
|
||||
this.B_Garden.Text = "Garden";
|
||||
this.B_Garden.UseVisualStyleBackColor = true;
|
||||
this.B_Garden.Click += new System.EventHandler(this.clickGarden);
|
||||
//
|
||||
// L_IO
|
||||
//
|
||||
this.L_IO.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.L_IO.Location = new System.Drawing.Point(-233, 6);
|
||||
this.L_IO.Name = "L_IO";
|
||||
this.L_IO.Size = new System.Drawing.Size(431, 18);
|
||||
this.L_IO.TabIndex = 5;
|
||||
this.L_IO.Text = "Drop a file/folder to begin.";
|
||||
this.L_IO.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.L_IO.TextChanged += new System.EventHandler(this.updatePath);
|
||||
this.L_IO.Click += new System.EventHandler(this.L_IO_Click);
|
||||
//
|
||||
// Main
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(209, 105);
|
||||
this.Controls.Add(this.L_IO);
|
||||
this.Controls.Add(this.B_Garden);
|
||||
this.Controls.Add(this.B_Exhibition);
|
||||
this.Controls.Add(this.CB_Friend);
|
||||
this.Controls.Add(this.B_Friend);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "Main";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "AC:NL Save Editor";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button B_Friend;
|
||||
private System.Windows.Forms.ComboBox CB_Friend;
|
||||
private System.Windows.Forms.Button B_Exhibition;
|
||||
private System.Windows.Forms.Button B_Garden;
|
||||
private System.Windows.Forms.Label L_IO;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
182
Main.cs
Normal file
182
Main.cs
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NLSE
|
||||
{
|
||||
public partial class Main : Form
|
||||
{
|
||||
internal static string root;
|
||||
|
||||
public Main()
|
||||
{
|
||||
// Set up.
|
||||
InitializeComponent();
|
||||
CB_Friend.Enabled = B_Exhibition.Enabled = B_Friend.Enabled = B_Garden.Enabled = false;
|
||||
|
||||
// Allow D&D
|
||||
AllowDrop = true;
|
||||
DragEnter += tabMain_DragEnter;
|
||||
DragDrop += tabMain_DragDrop;
|
||||
|
||||
// Find the save files.
|
||||
scanLoop();
|
||||
}
|
||||
// Drag & Drop Events
|
||||
private void tabMain_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
private void tabMain_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
string path = files[0]; // open first D&D
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
root = path;
|
||||
L_IO.Text = root;
|
||||
}
|
||||
else // Try fix checksums?
|
||||
{
|
||||
foreach (string file in files)
|
||||
{
|
||||
try
|
||||
{
|
||||
byte[] data = File.ReadAllBytes(file);
|
||||
byte[] data2 = (byte[])data.Clone();
|
||||
Verification.fixChecksums(ref data);
|
||||
if (!data.SequenceEqual(data2))
|
||||
{
|
||||
if (Util.Prompt(MessageBoxButtons.YesNo, "Update checksums?" + Environment.NewLine + file) == DialogResult.Yes)
|
||||
{
|
||||
File.WriteAllBytes(file, data);
|
||||
Util.Alert("File checksums were updated:" + Environment.NewLine + file);
|
||||
}
|
||||
Util.Alert("File checksums were not updated (chose not to):" + Environment.NewLine + file);
|
||||
}
|
||||
else
|
||||
{
|
||||
Util.Alert("File checksums were not updated (already valid):" + Environment.NewLine + file);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { Util.Error("File error:" + Environment.NewLine + file, ex.ToString()); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Find Files on Load Loop
|
||||
private bool findLoop = true;
|
||||
private void scanLoop(int ms = 400)
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
while (findLoop && (root = Util.GetSDFLocation()) == null)
|
||||
Thread.Sleep(ms);
|
||||
|
||||
// Trigger update
|
||||
if (InvokeRequired)
|
||||
Invoke((MethodInvoker)delegate { L_IO.Text = root; });
|
||||
else L_IO.Text = root;
|
||||
}).Start();
|
||||
}
|
||||
|
||||
private void L_IO_Click(object sender, EventArgs e)
|
||||
{
|
||||
FolderBrowserDialog ofd = new FolderBrowserDialog();
|
||||
if (ofd.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
findLoop = false;
|
||||
root = ofd.SelectedPath;
|
||||
L_IO.Text = root;
|
||||
}
|
||||
private void updatePath(object sender, EventArgs e)
|
||||
{
|
||||
// Scan for files to enable.
|
||||
string[] files = Directory.GetFiles(root);
|
||||
|
||||
B_Exhibition.Enabled = File.Exists(Path.Combine(root, "exhibition.dat"));
|
||||
B_Garden.Enabled = File.Exists(Path.Combine(root, "garden.dat"));
|
||||
|
||||
CB_Friend.Items.Clear();
|
||||
foreach (string file in files.Where(file => file.Contains("friend")))
|
||||
CB_Friend.Items.Add(Path.GetFileName(file));
|
||||
CB_Friend.Enabled = B_Friend.Enabled = CB_Friend.Items.Count > 0;
|
||||
if (CB_Friend.Items.Count > 0)
|
||||
CB_Friend.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
// Editing Windows
|
||||
private void clickExhibition(object sender, EventArgs e)
|
||||
{
|
||||
string dataPath = Path.Combine(root, "exhibition.dat");
|
||||
if (!File.Exists(dataPath)) return;
|
||||
|
||||
// Load Data
|
||||
try
|
||||
{
|
||||
byte[] data = File.ReadAllBytes(dataPath);
|
||||
|
||||
// Open Form
|
||||
new Exhibition(data).ShowDialog();
|
||||
|
||||
// Form closed, write data.
|
||||
Verification.fixChecksums(ref data);
|
||||
File.WriteAllBytes(dataPath, data);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Error
|
||||
MessageBox.Show("Error:" + Environment.NewLine + ex);
|
||||
}
|
||||
}
|
||||
private void clickGarden(object sender, EventArgs e)
|
||||
{
|
||||
string dataPath = Path.Combine(root, "garden.dat");
|
||||
if (!File.Exists(dataPath)) return;
|
||||
|
||||
// Load Data
|
||||
try
|
||||
{
|
||||
byte[] data = File.ReadAllBytes(dataPath);
|
||||
|
||||
// Open Form
|
||||
new Garden(data).ShowDialog();
|
||||
|
||||
// Form closed, write data.
|
||||
Verification.fixChecksums(ref data);
|
||||
File.WriteAllBytes(dataPath, data);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Error
|
||||
MessageBox.Show("Error:" + Environment.NewLine + ex);
|
||||
}
|
||||
}
|
||||
private void clickFriend(object sender, EventArgs e)
|
||||
{
|
||||
string dataPath = Path.Combine(root, CB_Friend.Text);
|
||||
if (!File.Exists(dataPath)) return;
|
||||
|
||||
// Load Data
|
||||
try
|
||||
{
|
||||
byte[] data = File.ReadAllBytes(dataPath);
|
||||
|
||||
// Open Form
|
||||
new Friend(data).ShowDialog();
|
||||
|
||||
// Form closed, write data.
|
||||
Verification.fixChecksums(ref data);
|
||||
File.WriteAllBytes(dataPath, data);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Error
|
||||
MessageBox.Show("Error:" + Environment.NewLine + ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
145
Main.resx
Normal file
145
Main.resx
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
<?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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAAAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAA
|
||||
AAD///8B////Af///wEAxQAHAMUAMQDFAF8AxQB/AMUAkQDFAJUAxQCPAMUAL////wH///8B////Af//
|
||||
/wH///8BAMUACwDFAD0AxQB/AMUAwwDFAPMAxQD/AMUA/wDFAP8AxQD/AMUAlwDFABP///8BAMUAAwDF
|
||||
AA////8B////AQDFAGsAxQD/AMUA/wDFAP8AxQD/AMUA/wDGAP8AxQD/AMUA0////wH///8B////Af//
|
||||
/wEAxQBjAMUAOf///wEAxQANAMUA5wDFAP8AwwD/AMYA/wDHAP8AvwD/AMUA/wDFALv///8B////Af//
|
||||
/wH///8BAMUAVQDFAN0AxQAF////AQDFAHcAxgD/AMEA/wGwAP8AwQD/AbAA/wC6AP8AxgDpAMUAE///
|
||||
/wH///8B////AQDFAJ8AxQD/AMUARf///wEAxQAXAMUA8wDGAP8AwwD/AaoA/wKTAP8AuwD/AMcA/wDF
|
||||
ANMAxQBLAMYAMwDFAJUAxQD/AMUA/wDFAJP///8B////AQDFAMMAxQD/AMYA/wDJAP8BpgD/AaMA/wDH
|
||||
AP8AxgD/AMYA/wC/AP8AxQD/AMUA/wDFAP8AxQC1////Af///wEAxQCLAMYA/wDEAP8BtgD/AasA/wKK
|
||||
AP8BmAD/AMQA/wDDAP8BrQD/AMcA/wDFAP8AxQD/AMUAq////wH///8BAMUAWQDFAP8AxAD/AL8A/wC9
|
||||
AP8AvwD/AaIA/wKUAP8BpAD/Aa4A/wDIAP8AxQD/AMUA/wDFAFn///8B////AQDFAC0AxQD/AMUA/wDG
|
||||
AP8AyAD/AMEA/wGxAP8CigD/AokA/wDCAP8AxgD/AMUA/wDFALn///8B////Af///wEAxQADAMUAyQDF
|
||||
AP8AxAD/AbMA/wGmAP8BrwD/AL0A/wGjAP8BngD/AMcA/wDFAL8AxQAN////Af///wH///8B////AQDF
|
||||
AEcAxQD/AMEA/wDAAP8AxwD/AMgA/wDHAP8AyAD/AbQA/wC9AO8AxgAZ////Af///wH///8B////Af//
|
||||
/wH///8BAMUAaQDFAPEAxgD/AMUA/wDFAP8AxQDpAMUAkwDHADEAxQDfAMUA1QDFABn///8B////Af//
|
||||
/wH///8B////Af///wEAxQAZAMUASwDFAFEAxQA5AMUADf///wH///8BAMUArQDFAP8AxQDdAMUAF///
|
||||
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////AQDFAGMAxQD/AMUAzQDF
|
||||
ABf///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wEAxQAVAMUAZQDF
|
||||
AAn///8BAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA
|
||||
//8AAP//AAD//w==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
47
Misc/Data.cs
Normal file
47
Misc/Data.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace NLSE
|
||||
{
|
||||
public class DataRef
|
||||
{
|
||||
public int Offset, Length;
|
||||
public DataRef(int offset, int length)
|
||||
{
|
||||
Offset = offset;
|
||||
Length = length;
|
||||
}
|
||||
|
||||
public byte[] getData(byte[] Save)
|
||||
{
|
||||
return Save.Skip(Offset).Take(Length).ToArray();
|
||||
}
|
||||
public void setData(ref byte[] Save, byte[] Inject)
|
||||
{
|
||||
if (Length != Inject.Length)
|
||||
throw new Exception(String.Format(
|
||||
"Data lengths do not match.{0}" +
|
||||
"Expected:{1}{0}" +
|
||||
"Received:{2}",
|
||||
Environment.NewLine, Length, Inject.Length));
|
||||
Array.Copy(Save, Offset, Inject, 0, Length);
|
||||
}
|
||||
|
||||
public string getString(byte[] Save)
|
||||
{
|
||||
return Encoding.Unicode.GetString(Save.Skip(Offset).Take(Length).ToArray()).Trim('\0');
|
||||
}
|
||||
public void setString(ref byte[] Save, string s)
|
||||
{
|
||||
if (Length > s.Length*2)
|
||||
throw new Exception(String.Format(
|
||||
"String byte lengths do not match.{0}" +
|
||||
"Expected:{1}{0}" +
|
||||
"Received:{2}",
|
||||
Environment.NewLine, Length, s.Length));
|
||||
byte[] newARR = Encoding.Unicode.GetBytes(s.PadRight(Length/2));
|
||||
Array.Copy(newARR, 0, Save, 0, Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Misc/Util.cs
Normal file
64
Misc/Util.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NLSE
|
||||
{
|
||||
class Util
|
||||
{
|
||||
internal static string GetSDFLocation()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Start by checking if the 3DS file path exists or not.
|
||||
string path_SDF = null;
|
||||
string[] DriveList = Environment.GetLogicalDrives();
|
||||
for (int i = 1; i < DriveList.Length; i++) // Skip first drive (some users still have floppy drives and would chew up time!)
|
||||
{
|
||||
string potentialPath_SDF = NormalizePath(Path.Combine(DriveList[i], "filer" + Path.DirectorySeparatorChar + "UserSaveData"));
|
||||
if (!Directory.Exists(potentialPath_SDF)) continue;
|
||||
|
||||
path_SDF = potentialPath_SDF; break;
|
||||
}
|
||||
if (path_SDF == null)
|
||||
return null;
|
||||
// 3DS data found in SD card reader. Let's get the title folder location!
|
||||
string[] folders = Directory.GetDirectories(path_SDF, "*", SearchOption.TopDirectoryOnly);
|
||||
Array.Sort(folders); // Don't need Modified Date, sort by path names just in case.
|
||||
|
||||
// Loop through all the folders in the Nintendo 3DS folder to see if any of them contain 'title'.
|
||||
for (int i = folders.Length - 1; i >= 0; i--)
|
||||
{
|
||||
if (File.Exists(Path.Combine(folders[i], "00000862" + Path.DirectorySeparatorChar + "garden.dat"))) return Path.Combine(folders[i], "00000862"); // JP
|
||||
if (File.Exists(Path.Combine(folders[i], "00000863" + Path.DirectorySeparatorChar + "garden.dat"))) return Path.Combine(folders[i], "00000863"); // NA
|
||||
if (File.Exists(Path.Combine(folders[i], "00000864" + Path.DirectorySeparatorChar + "garden.dat"))) return Path.Combine(folders[i], "00000864"); // EU
|
||||
}
|
||||
return null; // Fallthrough
|
||||
}
|
||||
catch { return null; }
|
||||
}
|
||||
internal static string NormalizePath(string path)
|
||||
{
|
||||
return Path.GetFullPath(new Uri(path).LocalPath)
|
||||
.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
|
||||
}
|
||||
internal static DialogResult Error(params string[] lines)
|
||||
{
|
||||
System.Media.SystemSounds.Exclamation.Play();
|
||||
string msg = String.Join(Environment.NewLine + Environment.NewLine, lines);
|
||||
return MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
internal static DialogResult Alert(params string[] lines)
|
||||
{
|
||||
System.Media.SystemSounds.Asterisk.Play();
|
||||
string msg = String.Join(Environment.NewLine + Environment.NewLine, lines);
|
||||
return MessageBox.Show(msg, "Alert", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
internal static DialogResult Prompt(MessageBoxButtons btn, params string[] lines)
|
||||
{
|
||||
System.Media.SystemSounds.Question.Play();
|
||||
string msg = String.Join(Environment.NewLine + Environment.NewLine, lines);
|
||||
return MessageBox.Show(msg, "Prompt", btn, MessageBoxIcon.Asterisk);
|
||||
}
|
||||
}
|
||||
}
|
||||
59
Misc/Verification.cs
Normal file
59
Misc/Verification.cs
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace NLSE
|
||||
{
|
||||
class Verification
|
||||
{
|
||||
internal static void fixChecksums(ref byte[] d)
|
||||
{
|
||||
switch (d.Length)
|
||||
{
|
||||
case 0x2BE940: // Happy Home
|
||||
applyCHK(ref d, 0x1A0, 0x1C);
|
||||
applyCHK(ref d, 0x1C0, 0x2BE75C);
|
||||
applyCHK(ref d, 0x2BE920, 0xC);
|
||||
break;
|
||||
case 0x7FA00: // garden
|
||||
applyCHK(ref d, 0x80, 0x1C);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
applyCHK(ref d, 0xA0 + (0x9F10*i), 0x6B64);
|
||||
applyCHK(ref d, 0xA0 + (0x9F10*i) + 0x6B68, 0x33A4);
|
||||
}
|
||||
applyCHK(ref d, 0x27CE0, 0x218B0);
|
||||
applyCHK(ref d, 0x495A0, 0x44B8);
|
||||
applyCHK(ref d, 0x4DA5C, 0x1E420);
|
||||
applyCHK(ref d, 0x6BE80, 0x20);
|
||||
applyCHK(ref d, 0x6BEA4, 0x13AF8);
|
||||
break;
|
||||
case 0x17B80C: // exhibition
|
||||
applyCHK(ref d, 0x0, 0x17B808);
|
||||
break;
|
||||
case 0x29504: // friend#
|
||||
applyCHK(ref d, 0x0, 0x29500);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new Exception("Invalid file size!" + Environment.NewLine + d.Length);
|
||||
}
|
||||
}
|
||||
private static void applyCHK(ref byte[] data, int start, int length)
|
||||
{
|
||||
byte[] region = data.Skip(start + 4).Take(length).ToArray();
|
||||
Array.Copy(BitConverter.GetBytes(CRC32C_acnl(region)), 0, data, start, 4);
|
||||
}
|
||||
|
||||
private static uint[] table = { 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB, 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24, 0x105EC76F, 0xE235446C, 0xF165B798, 0x30E349B, 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384, 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B, 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35, 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA, 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A, 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595, 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957, 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198, 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38, 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7, 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789, 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46, 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6, 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829, 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93, 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C, 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC, 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033, 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D, 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982, 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622, 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED, 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F, 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0, 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540, 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F, 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1, 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E, 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E, 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351 };
|
||||
private static uint CRC32C_acnl(byte[] data)
|
||||
{
|
||||
int size = data.Length;
|
||||
uint crc = 0xFFFFFFFF;
|
||||
int p = 0;
|
||||
while (size-- != 0)
|
||||
crc = table[(crc ^ data[p++]) & 0xff] ^ (crc >> 8);
|
||||
|
||||
return ~crc;
|
||||
}
|
||||
}
|
||||
}
|
||||
120
NLSE.csproj
Normal file
120
NLSE.csproj
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{E3484BF1-9180-41C5-8EBC-E6CDB7C1F8BF}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NLSE</RootNamespace>
|
||||
<AssemblyName>NLSE</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Misc\Data.cs" />
|
||||
<Compile Include="Subforms\Exhibition.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Subforms\Exhibition.Designer.cs">
|
||||
<DependentUpon>Exhibition.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Main.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Main.Designer.cs">
|
||||
<DependentUpon>Main.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Subforms\Friend.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Subforms\Friend.Designer.cs">
|
||||
<DependentUpon>Friend.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Subforms\Garden.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Subforms\Garden.Designer.cs">
|
||||
<DependentUpon>Garden.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Misc\Util.cs" />
|
||||
<Compile Include="Misc\Verification.cs" />
|
||||
<EmbeddedResource Include="Main.resx">
|
||||
<DependentUpon>Main.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Subforms\Exhibition.resx">
|
||||
<DependentUpon>Exhibition.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Subforms\Friend.resx">
|
||||
<DependentUpon>Friend.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Subforms\Garden.resx">
|
||||
<DependentUpon>Garden.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
20
NLSE.sln
Normal file
20
NLSE.sln
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLSE", "NLSE.csproj", "{E3484BF1-9180-41C5-8EBC-E6CDB7C1F8BF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E3484BF1-9180-41C5-8EBC-E6CDB7C1F8BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E3484BF1-9180-41C5-8EBC-E6CDB7C1F8BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E3484BF1-9180-41C5-8EBC-E6CDB7C1F8BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E3484BF1-9180-41C5-8EBC-E6CDB7C1F8BF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
NLSE.v11.suo
Normal file
BIN
NLSE.v11.suo
Normal file
Binary file not shown.
19
Program.cs
Normal file
19
Program.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NLSE
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Main());
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Properties/AssemblyInfo.cs
Normal file
36
Properties/AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NLSE")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("NLSE")]
|
||||
[assembly: AssemblyCopyright("Kaphotics © 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("d86a4324-dce2-4324-aa44-e538e5cd99d1")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
63
Properties/Resources.Designer.cs
generated
Normal file
63
Properties/Resources.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace NLSE.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NLSE.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
Properties/Resources.resx
Normal file
117
Properties/Resources.resx
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
<?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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
26
Properties/Settings.Designer.cs
generated
Normal file
26
Properties/Settings.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace NLSE.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
Properties/Settings.settings
Normal file
7
Properties/Settings.settings
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
80
Subforms/Exhibition.Designer.cs
generated
Normal file
80
Subforms/Exhibition.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
namespace NLSE
|
||||
{
|
||||
partial class Exhibition
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Exhibition));
|
||||
this.B_Cancel = new System.Windows.Forms.Button();
|
||||
this.B_Save = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// B_Cancel
|
||||
//
|
||||
this.B_Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.B_Cancel.Location = new System.Drawing.Point(136, 227);
|
||||
this.B_Cancel.Name = "B_Cancel";
|
||||
this.B_Cancel.Size = new System.Drawing.Size(65, 23);
|
||||
this.B_Cancel.TabIndex = 5;
|
||||
this.B_Cancel.Text = "Cancel";
|
||||
this.B_Cancel.UseVisualStyleBackColor = true;
|
||||
this.B_Cancel.Click += new System.EventHandler(this.B_Cancel_Click);
|
||||
//
|
||||
// B_Save
|
||||
//
|
||||
this.B_Save.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.B_Save.Location = new System.Drawing.Point(207, 227);
|
||||
this.B_Save.Name = "B_Save";
|
||||
this.B_Save.Size = new System.Drawing.Size(65, 23);
|
||||
this.B_Save.TabIndex = 4;
|
||||
this.B_Save.Text = "Save";
|
||||
this.B_Save.UseVisualStyleBackColor = true;
|
||||
this.B_Save.Click += new System.EventHandler(this.B_Save_Click);
|
||||
//
|
||||
// Exhibition
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 262);
|
||||
this.Controls.Add(this.B_Cancel);
|
||||
this.Controls.Add(this.B_Save);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "Exhibition";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Exhibition Editor";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button B_Cancel;
|
||||
private System.Windows.Forms.Button B_Save;
|
||||
}
|
||||
}
|
||||
47
Subforms/Exhibition.cs
Normal file
47
Subforms/Exhibition.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NLSE
|
||||
{
|
||||
public partial class Exhibition : Form
|
||||
{
|
||||
public Exhibition(byte[] data)
|
||||
{
|
||||
InitializeComponent();
|
||||
Save = new ExhibitionData(data);
|
||||
|
||||
// Load
|
||||
loadData();
|
||||
}
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
saveData();
|
||||
Close();
|
||||
}
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
// Exhibition Save Editing
|
||||
private ExhibitionData Save;
|
||||
class ExhibitionData
|
||||
{
|
||||
public byte[] Data;
|
||||
public ExhibitionData(byte[] data)
|
||||
{
|
||||
Data = data;
|
||||
}
|
||||
}
|
||||
private void loadData()
|
||||
{
|
||||
|
||||
}
|
||||
private void saveData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
145
Subforms/Exhibition.resx
Normal file
145
Subforms/Exhibition.resx
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
<?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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAAAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAA
|
||||
AAD///8B////Af///wEAxQAHAMUAMQDFAF8AxQB/AMUAkQDFAJUAxQCPAMUAL////wH///8B////Af//
|
||||
/wH///8BAMUACwDFAD0AxQB/AMUAwwDFAPMAxQD/AMUA/wDFAP8AxQD/AMUAlwDFABP///8BAMUAAwDF
|
||||
AA////8B////AQDFAGsAxQD/AMUA/wDFAP8AxQD/AMUA/wDGAP8AxQD/AMUA0////wH///8B////Af//
|
||||
/wEAxQBjAMUAOf///wEAxQANAMUA5wDFAP8AwwD/AMYA/wDHAP8AvwD/AMUA/wDFALv///8B////Af//
|
||||
/wH///8BAMUAVQDFAN0AxQAF////AQDFAHcAxgD/AMEA/wGwAP8AwQD/AbAA/wC6AP8AxgDpAMUAE///
|
||||
/wH///8B////AQDFAJ8AxQD/AMUARf///wEAxQAXAMUA8wDGAP8AwwD/AaoA/wKTAP8AuwD/AMcA/wDF
|
||||
ANMAxQBLAMYAMwDFAJUAxQD/AMUA/wDFAJP///8B////AQDFAMMAxQD/AMYA/wDJAP8BpgD/AaMA/wDH
|
||||
AP8AxgD/AMYA/wC/AP8AxQD/AMUA/wDFAP8AxQC1////Af///wEAxQCLAMYA/wDEAP8BtgD/AasA/wKK
|
||||
AP8BmAD/AMQA/wDDAP8BrQD/AMcA/wDFAP8AxQD/AMUAq////wH///8BAMUAWQDFAP8AxAD/AL8A/wC9
|
||||
AP8AvwD/AaIA/wKUAP8BpAD/Aa4A/wDIAP8AxQD/AMUA/wDFAFn///8B////AQDFAC0AxQD/AMUA/wDG
|
||||
AP8AyAD/AMEA/wGxAP8CigD/AokA/wDCAP8AxgD/AMUA/wDFALn///8B////Af///wEAxQADAMUAyQDF
|
||||
AP8AxAD/AbMA/wGmAP8BrwD/AL0A/wGjAP8BngD/AMcA/wDFAL8AxQAN////Af///wH///8B////AQDF
|
||||
AEcAxQD/AMEA/wDAAP8AxwD/AMgA/wDHAP8AyAD/AbQA/wC9AO8AxgAZ////Af///wH///8B////Af//
|
||||
/wH///8BAMUAaQDFAPEAxgD/AMUA/wDFAP8AxQDpAMUAkwDHADEAxQDfAMUA1QDFABn///8B////Af//
|
||||
/wH///8B////Af///wEAxQAZAMUASwDFAFEAxQA5AMUADf///wH///8BAMUArQDFAP8AxQDdAMUAF///
|
||||
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////AQDFAGMAxQD/AMUAzQDF
|
||||
ABf///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wEAxQAVAMUAZQDF
|
||||
AAn///8BAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA
|
||||
//8AAP//AAD//w==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
80
Subforms/Friend.Designer.cs
generated
Normal file
80
Subforms/Friend.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
namespace NLSE
|
||||
{
|
||||
partial class Friend
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Friend));
|
||||
this.B_Cancel = new System.Windows.Forms.Button();
|
||||
this.B_Save = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// B_Cancel
|
||||
//
|
||||
this.B_Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.B_Cancel.Location = new System.Drawing.Point(136, 227);
|
||||
this.B_Cancel.Name = "B_Cancel";
|
||||
this.B_Cancel.Size = new System.Drawing.Size(65, 23);
|
||||
this.B_Cancel.TabIndex = 5;
|
||||
this.B_Cancel.Text = "Cancel";
|
||||
this.B_Cancel.UseVisualStyleBackColor = true;
|
||||
this.B_Cancel.Click += new System.EventHandler(this.B_Cancel_Click);
|
||||
//
|
||||
// B_Save
|
||||
//
|
||||
this.B_Save.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.B_Save.Location = new System.Drawing.Point(207, 227);
|
||||
this.B_Save.Name = "B_Save";
|
||||
this.B_Save.Size = new System.Drawing.Size(65, 23);
|
||||
this.B_Save.TabIndex = 4;
|
||||
this.B_Save.Text = "Save";
|
||||
this.B_Save.UseVisualStyleBackColor = true;
|
||||
this.B_Save.Click += new System.EventHandler(this.B_Save_Click);
|
||||
//
|
||||
// Friend
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 262);
|
||||
this.Controls.Add(this.B_Cancel);
|
||||
this.Controls.Add(this.B_Save);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "Friend";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Friend Editor";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button B_Cancel;
|
||||
private System.Windows.Forms.Button B_Save;
|
||||
}
|
||||
}
|
||||
47
Subforms/Friend.cs
Normal file
47
Subforms/Friend.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NLSE
|
||||
{
|
||||
public partial class Friend : Form
|
||||
{
|
||||
public Friend(byte[] data)
|
||||
{
|
||||
InitializeComponent();
|
||||
Save = new FriendData(data);
|
||||
|
||||
// Load
|
||||
loadData();
|
||||
}
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
saveData();
|
||||
Close();
|
||||
}
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
// Friend Save Editing
|
||||
private FriendData Save;
|
||||
class FriendData
|
||||
{
|
||||
public byte[] Data;
|
||||
public FriendData(byte[] data)
|
||||
{
|
||||
Data = data;
|
||||
}
|
||||
}
|
||||
private void loadData()
|
||||
{
|
||||
|
||||
}
|
||||
private void saveData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
145
Subforms/Friend.resx
Normal file
145
Subforms/Friend.resx
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
<?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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAAAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAA
|
||||
AAD///8B////Af///wEAxQAHAMUAMQDFAF8AxQB/AMUAkQDFAJUAxQCPAMUAL////wH///8B////Af//
|
||||
/wH///8BAMUACwDFAD0AxQB/AMUAwwDFAPMAxQD/AMUA/wDFAP8AxQD/AMUAlwDFABP///8BAMUAAwDF
|
||||
AA////8B////AQDFAGsAxQD/AMUA/wDFAP8AxQD/AMUA/wDGAP8AxQD/AMUA0////wH///8B////Af//
|
||||
/wEAxQBjAMUAOf///wEAxQANAMUA5wDFAP8AwwD/AMYA/wDHAP8AvwD/AMUA/wDFALv///8B////Af//
|
||||
/wH///8BAMUAVQDFAN0AxQAF////AQDFAHcAxgD/AMEA/wGwAP8AwQD/AbAA/wC6AP8AxgDpAMUAE///
|
||||
/wH///8B////AQDFAJ8AxQD/AMUARf///wEAxQAXAMUA8wDGAP8AwwD/AaoA/wKTAP8AuwD/AMcA/wDF
|
||||
ANMAxQBLAMYAMwDFAJUAxQD/AMUA/wDFAJP///8B////AQDFAMMAxQD/AMYA/wDJAP8BpgD/AaMA/wDH
|
||||
AP8AxgD/AMYA/wC/AP8AxQD/AMUA/wDFAP8AxQC1////Af///wEAxQCLAMYA/wDEAP8BtgD/AasA/wKK
|
||||
AP8BmAD/AMQA/wDDAP8BrQD/AMcA/wDFAP8AxQD/AMUAq////wH///8BAMUAWQDFAP8AxAD/AL8A/wC9
|
||||
AP8AvwD/AaIA/wKUAP8BpAD/Aa4A/wDIAP8AxQD/AMUA/wDFAFn///8B////AQDFAC0AxQD/AMUA/wDG
|
||||
AP8AyAD/AMEA/wGxAP8CigD/AokA/wDCAP8AxgD/AMUA/wDFALn///8B////Af///wEAxQADAMUAyQDF
|
||||
AP8AxAD/AbMA/wGmAP8BrwD/AL0A/wGjAP8BngD/AMcA/wDFAL8AxQAN////Af///wH///8B////AQDF
|
||||
AEcAxQD/AMEA/wDAAP8AxwD/AMgA/wDHAP8AyAD/AbQA/wC9AO8AxgAZ////Af///wH///8B////Af//
|
||||
/wH///8BAMUAaQDFAPEAxgD/AMUA/wDFAP8AxQDpAMUAkwDHADEAxQDfAMUA1QDFABn///8B////Af//
|
||||
/wH///8B////Af///wEAxQAZAMUASwDFAFEAxQA5AMUADf///wH///8BAMUArQDFAP8AxQDdAMUAF///
|
||||
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////AQDFAGMAxQD/AMUAzQDF
|
||||
ABf///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wEAxQAVAMUAZQDF
|
||||
AAn///8BAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA
|
||||
//8AAP//AAD//w==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
107
Subforms/Garden.Designer.cs
generated
Normal file
107
Subforms/Garden.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
namespace NLSE
|
||||
{
|
||||
partial class Garden
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Garden));
|
||||
this.PB_JPEG = new System.Windows.Forms.PictureBox();
|
||||
this.L_Info = new System.Windows.Forms.Label();
|
||||
this.B_Save = new System.Windows.Forms.Button();
|
||||
this.B_Cancel = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PB_JPEG)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PB_JPEG
|
||||
//
|
||||
this.PB_JPEG.Location = new System.Drawing.Point(12, 12);
|
||||
this.PB_JPEG.Name = "PB_JPEG";
|
||||
this.PB_JPEG.Size = new System.Drawing.Size(64, 104);
|
||||
this.PB_JPEG.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.PB_JPEG.TabIndex = 0;
|
||||
this.PB_JPEG.TabStop = false;
|
||||
//
|
||||
// L_Info
|
||||
//
|
||||
this.L_Info.AutoSize = true;
|
||||
this.L_Info.Location = new System.Drawing.Point(82, 12);
|
||||
this.L_Info.Name = "L_Info";
|
||||
this.L_Info.Size = new System.Drawing.Size(25, 13);
|
||||
this.L_Info.TabIndex = 1;
|
||||
this.L_Info.Text = "Info";
|
||||
//
|
||||
// B_Save
|
||||
//
|
||||
this.B_Save.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.B_Save.Location = new System.Drawing.Point(207, 227);
|
||||
this.B_Save.Name = "B_Save";
|
||||
this.B_Save.Size = new System.Drawing.Size(65, 23);
|
||||
this.B_Save.TabIndex = 2;
|
||||
this.B_Save.Text = "Save";
|
||||
this.B_Save.UseVisualStyleBackColor = true;
|
||||
this.B_Save.Click += new System.EventHandler(this.B_Save_Click);
|
||||
//
|
||||
// B_Cancel
|
||||
//
|
||||
this.B_Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.B_Cancel.Location = new System.Drawing.Point(136, 227);
|
||||
this.B_Cancel.Name = "B_Cancel";
|
||||
this.B_Cancel.Size = new System.Drawing.Size(65, 23);
|
||||
this.B_Cancel.TabIndex = 3;
|
||||
this.B_Cancel.Text = "Cancel";
|
||||
this.B_Cancel.UseVisualStyleBackColor = true;
|
||||
this.B_Cancel.Click += new System.EventHandler(this.B_Cancel_Click);
|
||||
//
|
||||
// Garden
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 262);
|
||||
this.Controls.Add(this.B_Cancel);
|
||||
this.Controls.Add(this.B_Save);
|
||||
this.Controls.Add(this.L_Info);
|
||||
this.Controls.Add(this.PB_JPEG);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "Garden";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Garden Editor";
|
||||
((System.ComponentModel.ISupportInitialize)(this.PB_JPEG)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox PB_JPEG;
|
||||
private System.Windows.Forms.Label L_Info;
|
||||
private System.Windows.Forms.Button B_Save;
|
||||
private System.Windows.Forms.Button B_Cancel;
|
||||
}
|
||||
}
|
||||
76
Subforms/Garden.cs
Normal file
76
Subforms/Garden.cs
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NLSE
|
||||
{
|
||||
public partial class Garden : Form
|
||||
{
|
||||
public Garden(byte[] data)
|
||||
{
|
||||
InitializeComponent();
|
||||
Save = new GardenData(data);
|
||||
|
||||
// Load
|
||||
loadData();
|
||||
}
|
||||
private void B_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
saveData();
|
||||
Close();
|
||||
}
|
||||
private void B_Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
// Garden Save Editing
|
||||
private GardenData Save;
|
||||
class GardenData
|
||||
{
|
||||
// public int TOWNMAGIC = 0x84; // Offset of the Town Data
|
||||
// public int Villagers = 0x180 + 0x84;
|
||||
|
||||
// Player Name is 0x16 bytes long.
|
||||
// Town Name is 0x12 bytes long.
|
||||
public DataRef JPEG = new DataRef(0x57C4, 0x1400);
|
||||
public DataRef PlayerName = new DataRef(0xF8, 0x14);
|
||||
public DataRef TownName = new DataRef(0x10E, 0x12);
|
||||
|
||||
public byte[] Data;
|
||||
public GardenData(byte[] data)
|
||||
{
|
||||
Data = data;
|
||||
}
|
||||
}
|
||||
private void loadData()
|
||||
{
|
||||
PB_JPEG.Image = Image.FromStream(new MemoryStream(Save.JPEG.getData(Save.Data)));
|
||||
string Name = Save.PlayerName.getString(Save.Data);
|
||||
string Town = Save.TownName.getString(Save.Data);
|
||||
L_Info.Text = Name + Environment.NewLine + Town;
|
||||
}
|
||||
private void saveData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Unused
|
||||
private int getTownOffset()
|
||||
{
|
||||
return 0x84;
|
||||
}
|
||||
|
||||
private void lt_bank()
|
||||
{
|
||||
int offset = getTownOffset();
|
||||
const int BANK_OFFSET = 0x6B8C;
|
||||
|
||||
offset += BANK_OFFSET;
|
||||
Array.Copy(BitConverter.GetBytes(0x8CF95678), 0, Save.Data, offset, 4);
|
||||
Array.Copy(BitConverter.GetBytes(0x0D118636), 0, Save.Data, offset, 4);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
145
Subforms/Garden.resx
Normal file
145
Subforms/Garden.resx
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
<?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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAAAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAA
|
||||
AAD///8B////Af///wEAxQAHAMUAMQDFAF8AxQB/AMUAkQDFAJUAxQCPAMUAL////wH///8B////Af//
|
||||
/wH///8BAMUACwDFAD0AxQB/AMUAwwDFAPMAxQD/AMUA/wDFAP8AxQD/AMUAlwDFABP///8BAMUAAwDF
|
||||
AA////8B////AQDFAGsAxQD/AMUA/wDFAP8AxQD/AMUA/wDGAP8AxQD/AMUA0////wH///8B////Af//
|
||||
/wEAxQBjAMUAOf///wEAxQANAMUA5wDFAP8AwwD/AMYA/wDHAP8AvwD/AMUA/wDFALv///8B////Af//
|
||||
/wH///8BAMUAVQDFAN0AxQAF////AQDFAHcAxgD/AMEA/wGwAP8AwQD/AbAA/wC6AP8AxgDpAMUAE///
|
||||
/wH///8B////AQDFAJ8AxQD/AMUARf///wEAxQAXAMUA8wDGAP8AwwD/AaoA/wKTAP8AuwD/AMcA/wDF
|
||||
ANMAxQBLAMYAMwDFAJUAxQD/AMUA/wDFAJP///8B////AQDFAMMAxQD/AMYA/wDJAP8BpgD/AaMA/wDH
|
||||
AP8AxgD/AMYA/wC/AP8AxQD/AMUA/wDFAP8AxQC1////Af///wEAxQCLAMYA/wDEAP8BtgD/AasA/wKK
|
||||
AP8BmAD/AMQA/wDDAP8BrQD/AMcA/wDFAP8AxQD/AMUAq////wH///8BAMUAWQDFAP8AxAD/AL8A/wC9
|
||||
AP8AvwD/AaIA/wKUAP8BpAD/Aa4A/wDIAP8AxQD/AMUA/wDFAFn///8B////AQDFAC0AxQD/AMUA/wDG
|
||||
AP8AyAD/AMEA/wGxAP8CigD/AokA/wDCAP8AxgD/AMUA/wDFALn///8B////Af///wEAxQADAMUAyQDF
|
||||
AP8AxAD/AbMA/wGmAP8BrwD/AL0A/wGjAP8BngD/AMcA/wDFAL8AxQAN////Af///wH///8B////AQDF
|
||||
AEcAxQD/AMEA/wDAAP8AxwD/AMgA/wDHAP8AyAD/AbQA/wC9AO8AxgAZ////Af///wH///8B////Af//
|
||||
/wH///8BAMUAaQDFAPEAxgD/AMUA/wDFAP8AxQDpAMUAkwDHADEAxQDfAMUA1QDFABn///8B////Af//
|
||||
/wH///8B////Af///wEAxQAZAMUASwDFAFEAxQA5AMUADf///wH///8BAMUArQDFAP8AxQDdAMUAF///
|
||||
/wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////AQDFAGMAxQD/AMUAzQDF
|
||||
ABf///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wEAxQAVAMUAZQDF
|
||||
AAn///8BAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA
|
||||
//8AAP//AAD//w==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
6
bin/Debug/ACNL.vshost.exe.config
Normal file
6
bin/Debug/ACNL.vshost.exe.config
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
||||
11
bin/Debug/ACNL.vshost.exe.manifest
Normal file
11
bin/Debug/ACNL.vshost.exe.manifest
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
BIN
bin/Debug/NLSE.exe
Normal file
BIN
bin/Debug/NLSE.exe
Normal file
Binary file not shown.
6
bin/Debug/NLSE.exe.config
Normal file
6
bin/Debug/NLSE.exe.config
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
|
||||
</configuration>
|
||||
BIN
bin/Debug/NLSE.pdb
Normal file
BIN
bin/Debug/NLSE.pdb
Normal file
Binary file not shown.
BIN
bin/Debug/NLSE.vshost.exe
Normal file
BIN
bin/Debug/NLSE.vshost.exe
Normal file
Binary file not shown.
6
bin/Debug/NLSE.vshost.exe.config
Normal file
6
bin/Debug/NLSE.vshost.exe.config
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
|
||||
</configuration>
|
||||
11
bin/Debug/NLSE.vshost.exe.manifest
Normal file
11
bin/Debug/NLSE.vshost.exe.manifest
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
BIN
obj/Debug/NLSE.csproj.FileListAbsolute.txt
Normal file
BIN
obj/Debug/NLSE.csproj.FileListAbsolute.txt
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user