Mainly UI fixes
This commit is contained in:
@@ -25,6 +25,7 @@ namespace BMGEditor
|
||||
{
|
||||
ApplicationConfiguration.Initialize();
|
||||
Bcsv.PopulateHashtable();
|
||||
CheckUpdates();
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
|
||||
|
||||
166
BMGEditor/UI/BMGEditForm.Designer.cs
generated
166
BMGEditor/UI/BMGEditForm.Designer.cs
generated
@@ -30,87 +30,152 @@
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BMGEditForm));
|
||||
this.toolStrip = new System.Windows.Forms.ToolStrip();
|
||||
this.saveBMGbtn = new System.Windows.Forms.ToolStripButton();
|
||||
this.openEntryBtn = new System.Windows.Forms.ToolStripButton();
|
||||
this.deleteEntryBtn = new System.Windows.Forms.ToolStripButton();
|
||||
this.addEntryBtn = new System.Windows.Forms.ToolStripButton();
|
||||
this.fileMenu = new System.Windows.Forms.ToolStripSplitButton();
|
||||
this.openArcFileBtn = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveFileBtn = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openSettingsBtn = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.quitBtn = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.editBtn = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
this.openEntryBtn = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.newEntryBtn = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openBCSVBtn = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.deleteEntryBtn = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.entriesListBox = new System.Windows.Forms.ListBox();
|
||||
this.openARCDialog = new System.Windows.Forms.OpenFileDialog();
|
||||
this.toolStrip.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// toolStrip
|
||||
//
|
||||
this.toolStrip.BackColor = System.Drawing.Color.White;
|
||||
this.toolStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.saveBMGbtn,
|
||||
this.openEntryBtn,
|
||||
this.deleteEntryBtn,
|
||||
this.addEntryBtn});
|
||||
this.fileMenu,
|
||||
this.editBtn});
|
||||
this.toolStrip.Location = new System.Drawing.Point(0, 0);
|
||||
this.toolStrip.Name = "toolStrip";
|
||||
this.toolStrip.Size = new System.Drawing.Size(800, 27);
|
||||
this.toolStrip.Size = new System.Drawing.Size(700, 25);
|
||||
this.toolStrip.TabIndex = 0;
|
||||
this.toolStrip.Text = "toolStrip";
|
||||
//
|
||||
// saveBMGbtn
|
||||
// fileMenu
|
||||
//
|
||||
this.saveBMGbtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.saveBMGbtn.Image = ((System.Drawing.Image)(resources.GetObject("saveBMGbtn.Image")));
|
||||
this.saveBMGbtn.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.saveBMGbtn.Name = "saveBMGbtn";
|
||||
this.saveBMGbtn.Size = new System.Drawing.Size(44, 24);
|
||||
this.saveBMGbtn.Text = "Save";
|
||||
this.saveBMGbtn.ToolTipText = "Save";
|
||||
this.saveBMGbtn.Click += new System.EventHandler(this.saveBMGbtn_Click);
|
||||
this.fileMenu.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.fileMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.openArcFileBtn,
|
||||
this.saveFileBtn,
|
||||
this.openSettingsBtn,
|
||||
this.quitBtn});
|
||||
this.fileMenu.Image = ((System.Drawing.Image)(resources.GetObject("fileMenu.Image")));
|
||||
this.fileMenu.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.fileMenu.Name = "fileMenu";
|
||||
this.fileMenu.Size = new System.Drawing.Size(41, 22);
|
||||
this.fileMenu.Text = "File";
|
||||
//
|
||||
// openArcFileBtn
|
||||
//
|
||||
this.openArcFileBtn.Name = "openArcFileBtn";
|
||||
this.openArcFileBtn.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
||||
this.openArcFileBtn.Size = new System.Drawing.Size(180, 22);
|
||||
this.openArcFileBtn.Text = "Open";
|
||||
this.openArcFileBtn.Click += new System.EventHandler(this.openArcFileBtn_Click);
|
||||
//
|
||||
// saveFileBtn
|
||||
//
|
||||
this.saveFileBtn.Name = "saveFileBtn";
|
||||
this.saveFileBtn.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
|
||||
this.saveFileBtn.Size = new System.Drawing.Size(180, 22);
|
||||
this.saveFileBtn.Text = "Save";
|
||||
this.saveFileBtn.Click += new System.EventHandler(this.saveBMGbtn_Click);
|
||||
//
|
||||
// openSettingsBtn
|
||||
//
|
||||
this.openSettingsBtn.Name = "openSettingsBtn";
|
||||
this.openSettingsBtn.Size = new System.Drawing.Size(180, 22);
|
||||
this.openSettingsBtn.Text = "Preferences";
|
||||
this.openSettingsBtn.Click += new System.EventHandler(this.openSettingsBtn_Click);
|
||||
//
|
||||
// quitBtn
|
||||
//
|
||||
this.quitBtn.Name = "quitBtn";
|
||||
this.quitBtn.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Q)));
|
||||
this.quitBtn.Size = new System.Drawing.Size(180, 22);
|
||||
this.quitBtn.Text = "Quit";
|
||||
this.quitBtn.Click += new System.EventHandler(this.quitBtn_Click);
|
||||
//
|
||||
// editBtn
|
||||
//
|
||||
this.editBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.editBtn.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.openEntryBtn,
|
||||
this.newEntryBtn,
|
||||
this.openBCSVBtn,
|
||||
this.deleteEntryBtn});
|
||||
this.editBtn.Image = ((System.Drawing.Image)(resources.GetObject("editBtn.Image")));
|
||||
this.editBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.editBtn.Name = "editBtn";
|
||||
this.editBtn.Size = new System.Drawing.Size(40, 22);
|
||||
this.editBtn.Text = "Edit";
|
||||
//
|
||||
// openEntryBtn
|
||||
//
|
||||
this.openEntryBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.openEntryBtn.Image = ((System.Drawing.Image)(resources.GetObject("openEntryBtn.Image")));
|
||||
this.openEntryBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.openEntryBtn.Name = "openEntryBtn";
|
||||
this.openEntryBtn.Size = new System.Drawing.Size(86, 24);
|
||||
this.openEntryBtn.Text = "Open entry";
|
||||
this.openEntryBtn.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
||||
| System.Windows.Forms.Keys.O)));
|
||||
this.openEntryBtn.Size = new System.Drawing.Size(238, 22);
|
||||
this.openEntryBtn.Text = "Open Entry";
|
||||
this.openEntryBtn.Click += new System.EventHandler(this.openEntryBtn_Click);
|
||||
//
|
||||
// newEntryBtn
|
||||
//
|
||||
this.newEntryBtn.Name = "newEntryBtn";
|
||||
this.newEntryBtn.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
|
||||
this.newEntryBtn.Size = new System.Drawing.Size(238, 22);
|
||||
this.newEntryBtn.Text = "New Entry";
|
||||
this.newEntryBtn.Click += new System.EventHandler(this.addEntryBtn_Click);
|
||||
//
|
||||
// openBCSVBtn
|
||||
//
|
||||
this.openBCSVBtn.Enabled = false;
|
||||
this.openBCSVBtn.Name = "openBCSVBtn";
|
||||
this.openBCSVBtn.Size = new System.Drawing.Size(238, 22);
|
||||
this.openBCSVBtn.Text = "Open BCSV [DEBUG ONLY]";
|
||||
this.openBCSVBtn.Click += new System.EventHandler(this.openBCSVBtn_Click);
|
||||
//
|
||||
// deleteEntryBtn
|
||||
//
|
||||
this.deleteEntryBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.deleteEntryBtn.Image = ((System.Drawing.Image)(resources.GetObject("deleteEntryBtn.Image")));
|
||||
this.deleteEntryBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.deleteEntryBtn.Name = "deleteEntryBtn";
|
||||
this.deleteEntryBtn.Size = new System.Drawing.Size(94, 24);
|
||||
this.deleteEntryBtn.Text = "Delete entry";
|
||||
this.deleteEntryBtn.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D)));
|
||||
this.deleteEntryBtn.Size = new System.Drawing.Size(238, 22);
|
||||
this.deleteEntryBtn.Text = "Delete Entry";
|
||||
this.deleteEntryBtn.Click += new System.EventHandler(this.deleteEntryBtn_Click);
|
||||
//
|
||||
// addEntryBtn
|
||||
//
|
||||
this.addEntryBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.addEntryBtn.Image = ((System.Drawing.Image)(resources.GetObject("addEntryBtn.Image")));
|
||||
this.addEntryBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.addEntryBtn.Name = "addEntryBtn";
|
||||
this.addEntryBtn.Size = new System.Drawing.Size(109, 24);
|
||||
this.addEntryBtn.Text = "Add new entry";
|
||||
this.addEntryBtn.Click += new System.EventHandler(this.addEntryBtn_Click);
|
||||
//
|
||||
// entriesListBox
|
||||
//
|
||||
this.entriesListBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.entriesListBox.FormattingEnabled = true;
|
||||
this.entriesListBox.ItemHeight = 20;
|
||||
this.entriesListBox.Location = new System.Drawing.Point(0, 27);
|
||||
this.entriesListBox.ItemHeight = 15;
|
||||
this.entriesListBox.Location = new System.Drawing.Point(0, 25);
|
||||
this.entriesListBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.entriesListBox.Name = "entriesListBox";
|
||||
this.entriesListBox.Size = new System.Drawing.Size(800, 423);
|
||||
this.entriesListBox.Size = new System.Drawing.Size(700, 313);
|
||||
this.entriesListBox.TabIndex = 1;
|
||||
this.entriesListBox.DoubleClick += new System.EventHandler(this.entriesListBox_DoubleClick);
|
||||
//
|
||||
// openARCDialog
|
||||
//
|
||||
this.openARCDialog.FileName = "Message.arc";
|
||||
this.openARCDialog.Filter = "Nintendo ARC Files|*.arc";
|
||||
this.openARCDialog.Title = "Open ARC";
|
||||
//
|
||||
// BMGEditForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.ClientSize = new System.Drawing.Size(700, 338);
|
||||
this.Controls.Add(this.entriesListBox);
|
||||
this.Controls.Add(this.toolStrip);
|
||||
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.Name = "BMGEditForm";
|
||||
this.Text = "BMGEditForm";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BMGEditForm_FormClosing);
|
||||
@@ -124,10 +189,17 @@
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ToolStrip toolStrip;
|
||||
private System.Windows.Forms.ToolStripButton openEntryBtn;
|
||||
private System.Windows.Forms.ToolStripButton deleteEntryBtn;
|
||||
private System.Windows.Forms.ToolStripButton addEntryBtn;
|
||||
private System.Windows.Forms.ListBox entriesListBox;
|
||||
private System.Windows.Forms.ToolStripButton saveBMGbtn;
|
||||
private System.Windows.Forms.ToolStripSplitButton fileMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem openArcFileBtn;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveFileBtn;
|
||||
private System.Windows.Forms.ToolStripMenuItem quitBtn;
|
||||
private System.Windows.Forms.ToolStripDropDownButton editBtn;
|
||||
private System.Windows.Forms.ToolStripMenuItem newEntryBtn;
|
||||
private System.Windows.Forms.ToolStripMenuItem deleteEntryBtn;
|
||||
private System.Windows.Forms.ToolStripMenuItem openEntryBtn;
|
||||
private System.Windows.Forms.ToolStripMenuItem openSettingsBtn;
|
||||
private System.Windows.Forms.ToolStripMenuItem openBCSVBtn;
|
||||
private System.Windows.Forms.OpenFileDialog openARCDialog;
|
||||
}
|
||||
}
|
||||
98
BMGEditor/UI/BMGEditForm.Methods.cs
Normal file
98
BMGEditor/UI/BMGEditForm.Methods.cs
Normal file
@@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BMGEditor
|
||||
{
|
||||
partial class BMGEditForm
|
||||
{
|
||||
private void openEditor()
|
||||
{
|
||||
Form txtEditForm = new TextEntryEditorForm(m_File.Entries[entriesListBox.SelectedIndex]);
|
||||
txtEditForm.Show();
|
||||
}
|
||||
|
||||
private void RefreshEntriesList()
|
||||
{
|
||||
entriesListBox.Items.Clear();
|
||||
foreach (BMG.TextEntry txtEntry in m_File.Entries)
|
||||
{
|
||||
entriesListBox.Items.Add(txtEntry.entryName);
|
||||
}
|
||||
}
|
||||
|
||||
private void Save()
|
||||
{
|
||||
m_File.Entries.Sort((x, y) =>
|
||||
{
|
||||
string entryNameA = x.entryName, entryNameB = y.entryName;
|
||||
return String.CompareOrdinal(entryNameA, entryNameB);
|
||||
});
|
||||
|
||||
m_BCSV.Entries.Clear();
|
||||
|
||||
foreach (BMG.TextEntry txtEntry in m_File.Entries)
|
||||
{
|
||||
Bcsv.Entry entry = new Bcsv.Entry();
|
||||
m_BCSV.Entries.Add(entry);
|
||||
|
||||
int index = 0;
|
||||
foreach (Bcsv.Field field in m_BCSV.Fields.Values)
|
||||
{
|
||||
uint hash = field.NameHash;
|
||||
string valstring;
|
||||
if (index == 0)
|
||||
valstring = txtEntry.entryName;
|
||||
else
|
||||
valstring = String.Concat(txtEntry.entryNo);
|
||||
|
||||
index++;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
switch (field.Type)
|
||||
{
|
||||
case 0:
|
||||
case 3: entry.Add(hash, uint.Parse(valstring)); break;
|
||||
case 4: entry.Add(hash, ushort.Parse(valstring)); break;
|
||||
case 5: entry.Add(hash, byte.Parse(valstring)); break;
|
||||
case 2: entry.Add(hash, float.Parse(valstring)); break;
|
||||
case 6: entry.Add(hash, valstring); break;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
switch (field.Type)
|
||||
{
|
||||
case 0:
|
||||
case 3: entry.Add(hash, (uint)0); break;
|
||||
case 4: entry.Add(hash, (ushort)0); break;
|
||||
case 5: entry.Add(hash, (byte)0); break;
|
||||
case 2: entry.Add(hash, 0f); break;
|
||||
case 6: entry.Add(hash, ""); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_BCSV.Flush();
|
||||
m_File.Entries.Sort((x, y) =>
|
||||
{
|
||||
int entryIndexA = x.entryNo, entryIndexB = y.entryNo;
|
||||
return entryIndexA.CompareTo(entryIndexB);
|
||||
});
|
||||
|
||||
m_File.WriteToFile();
|
||||
}
|
||||
private void CloseArchive()
|
||||
{
|
||||
m_File.Close();
|
||||
m_BCSV.Close();
|
||||
m_ARC.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,61 +1,56 @@
|
||||
using BMGEditor.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BMGEditor
|
||||
{
|
||||
public partial class BMGEditForm : Form
|
||||
{
|
||||
public BMGEditForm(RarcFilesystem arcFs)
|
||||
private RarcFilesystem m_ARC = null;
|
||||
private BMG m_File = null;
|
||||
private Bcsv m_BCSV = null;
|
||||
private bool arcOpen = false;
|
||||
|
||||
public BMGEditForm(RarcFilesystem m_ARC)
|
||||
{
|
||||
InitializeComponent();
|
||||
Text = $"Text editor - {Variables.softwareName} {Variables.softwareVersion}";
|
||||
if (Variables.isBeta) Text += " [BETA]";
|
||||
|
||||
m_FileTbl = new Bcsv(arcFs.OpenFile($"{arcFs.rootName}/messageid.tbl"));
|
||||
m_File = new BMG(arcFs.OpenFile($"{arcFs.rootName}/message.bmg"), m_FileTbl);
|
||||
|
||||
foreach (BMG.TextEntry txtEntry in m_File.Entries)
|
||||
{
|
||||
entriesListBox.Items.Add(txtEntry.entryName);
|
||||
}
|
||||
|
||||
//addEntryBtn.Enabled = false;
|
||||
|
||||
deleteEntryBtn.Enabled = false;
|
||||
}
|
||||
|
||||
public BMGEditForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
Text = $"{Variables.softwareName} {Variables.softwareVersion}";
|
||||
if (Variables.isBeta) Text += " [BETA]";
|
||||
|
||||
openBCSVBtn.Enabled = false;
|
||||
openEntryBtn.Enabled = false;
|
||||
saveFileBtn.Enabled = false;
|
||||
newEntryBtn.Enabled = false;
|
||||
deleteEntryBtn.Enabled = false;
|
||||
}
|
||||
|
||||
private BMG m_File = null;
|
||||
private Bcsv m_FileTbl = null;
|
||||
|
||||
private void BMGEditForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
m_File.Close();
|
||||
m_FileTbl.Close();
|
||||
if (arcOpen)
|
||||
CloseArchive();
|
||||
}
|
||||
|
||||
private void openEntryBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (entriesListBox.SelectedIndex == -1) { }
|
||||
else openEditor();
|
||||
if (entriesListBox.SelectedIndex != -1)
|
||||
openEditor();
|
||||
}
|
||||
|
||||
private void addEntryBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
Form newEntryForm = new NewEntryForm(m_File);
|
||||
newEntryForm.Show();
|
||||
|
||||
entriesListBox.Items.Clear();
|
||||
foreach (BMG.TextEntry txtEntry in m_File.Entries)
|
||||
{
|
||||
entriesListBox.Items.Add(txtEntry.entryName);
|
||||
}
|
||||
newEntryForm.ShowDialog();
|
||||
RefreshEntriesList();
|
||||
|
||||
}
|
||||
|
||||
@@ -64,12 +59,6 @@ namespace BMGEditor
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private void openEditor()
|
||||
{
|
||||
Form txtEditForm = new TextEntryEditorForm(m_File.Entries[entriesListBox.SelectedIndex]);
|
||||
txtEditForm.Show();
|
||||
}
|
||||
|
||||
private void entriesListBox_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
openEditor();
|
||||
@@ -77,67 +66,69 @@ namespace BMGEditor
|
||||
|
||||
private void saveBMGbtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
m_File.Entries.Sort((x, y) =>
|
||||
Save();
|
||||
}
|
||||
|
||||
private void quitBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
private void openSettingsBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
Form settings = new PreferencesAbout();
|
||||
settings.Show();
|
||||
}
|
||||
|
||||
private void openArcFileBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (arcOpen)
|
||||
{
|
||||
string entryNameA = x.entryName, entryNameB = y.entryName;
|
||||
return String.CompareOrdinal(entryNameA, entryNameB);
|
||||
});
|
||||
|
||||
m_FileTbl.Entries.Clear();
|
||||
|
||||
foreach (BMG.TextEntry txtEntry in m_File.Entries)
|
||||
{
|
||||
Bcsv.Entry entry = new Bcsv.Entry();
|
||||
m_FileTbl.Entries.Add(entry);
|
||||
|
||||
int index = 0;
|
||||
foreach (Bcsv.Field field in m_FileTbl.Fields.Values)
|
||||
{
|
||||
uint hash = field.NameHash;
|
||||
string valstring;
|
||||
if (index == 0)
|
||||
valstring = txtEntry.entryName;
|
||||
else
|
||||
valstring = String.Concat(txtEntry.entryNo);
|
||||
|
||||
index++;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
switch (field.Type)
|
||||
{
|
||||
case 0:
|
||||
case 3: entry.Add(hash, uint.Parse(valstring)); break;
|
||||
case 4: entry.Add(hash, ushort.Parse(valstring)); break;
|
||||
case 5: entry.Add(hash, byte.Parse(valstring)); break;
|
||||
case 2: entry.Add(hash, float.Parse(valstring)); break;
|
||||
case 6: entry.Add(hash, valstring); break;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
switch (field.Type)
|
||||
{
|
||||
case 0:
|
||||
case 3: entry.Add(hash, (uint)0); break;
|
||||
case 4: entry.Add(hash, (ushort)0); break;
|
||||
case 5: entry.Add(hash, (byte)0); break;
|
||||
case 2: entry.Add(hash, 0f); break;
|
||||
case 6: entry.Add(hash, ""); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
CloseArchive();
|
||||
entriesListBox.Items.Clear();
|
||||
}
|
||||
|
||||
m_FileTbl.Flush();
|
||||
m_File.Entries.Sort((x, y) =>
|
||||
string fileName;
|
||||
if (openARCDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
int entryIndexA = x.entryNo, entryIndexB = y.entryNo;
|
||||
return entryIndexA.CompareTo(entryIndexB);
|
||||
});
|
||||
fileName = openARCDialog.FileName;
|
||||
m_ARC = new RarcFilesystem(new ExternalFile(fileName, false));
|
||||
if (m_ARC.FileExists($"{m_ARC.rootName}/message.bmg") && m_ARC.FileExists($"{m_ARC.rootName}/messageid.tbl"))
|
||||
{
|
||||
|
||||
m_File.WriteToFile();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(
|
||||
"Selected archive doesn\'t contain all the required files. Please check your file.",
|
||||
"Error while loading file",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error);
|
||||
m_ARC.Close();
|
||||
return;
|
||||
}
|
||||
arcOpen = true;
|
||||
m_BCSV = new Bcsv(m_ARC.OpenFile($"{m_ARC.rootName}/messageid.tbl"));
|
||||
m_File = new BMG(m_ARC.OpenFile($"{m_ARC.rootName}/message.bmg"), m_BCSV);
|
||||
RefreshEntriesList();
|
||||
|
||||
saveFileBtn.Enabled = true;
|
||||
openEntryBtn.Enabled = true;
|
||||
newEntryBtn.Enabled = true;
|
||||
#if DEBUG
|
||||
openBCSVBtn.Enabled = true;
|
||||
#else
|
||||
#endif
|
||||
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
private void openBCSVBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
Form bcsvEdit = new BcsvEditorForm(m_ARC);
|
||||
bcsvEdit.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,10 +61,10 @@
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="saveBMGbtn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="fileMenu.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEKSURBVEhL3ZG9DsFQHMXvczDZvIOtXsHObuhqkViI3Quw
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEKSURBVEhL3ZG9DsFQHMXvczDZvIOtXsHObuhqkViI3Quw
|
||||
6CYmNoMYJJ0NBiFFIoIytOuf0+TeXP3yde+iyS+3OcP53Z4y3/dJJ4HAsiwyTVMp6BQCBIZhKAWdEcHV
|
||||
vSlBmeB82NFy1KLluEWOPRC5MoHdMWhazwi4RJlALgf4EuT6BI+5kCsTrGddUY658E+QvyXYHq9UnRyC
|
||||
U87f4aUApcXhnrI9Jzg/laQKFntXlHM+lSQK5psL5fvbp/JvJLGCQqmSWM5JkiCT84igXGtSrruKLQ0T
|
||||
@@ -72,32 +72,10 @@
|
||||
qgAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="openEntryBtn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="editBtn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEKSURBVEhL3ZG9DsFQHMXvczDZvIOtXsHObuhqkViI3Quw
|
||||
6CYmNoMYJJ0NBiFFIoIytOuf0+TeXP3yde+iyS+3OcP53Z4y3/dJJ4HAsiwyTVMp6BQCBIZhKAWdEcHV
|
||||
vSlBmeB82NFy1KLluEWOPRC5MoHdMWhazwi4RJlALgf4EuT6BI+5kCsTrGddUY658E+QvyXYHq9UnRyC
|
||||
U87f4aUApcXhnrI9Jzg/laQKFntXlHM+lSQK5psL5fvbp/JvJLGCQqmSWM5JkiCT84igXGtSrruKLQ0T
|
||||
luAdmZxHBG37FFuWBC/j5XKOmX8WAH7rcI6ZMffPgjQwN2bXJgDo/COBTpjneQ2dML0PY3cISreGe8HM
|
||||
qgAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="deleteEntryBtn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEKSURBVEhL3ZG9DsFQHMXvczDZvIOtXsHObuhqkViI3Quw
|
||||
6CYmNoMYJJ0NBiFFIoIytOuf0+TeXP3yde+iyS+3OcP53Z4y3/dJJ4HAsiwyTVMp6BQCBIZhKAWdEcHV
|
||||
vSlBmeB82NFy1KLluEWOPRC5MoHdMWhazwi4RJlALgf4EuT6BI+5kCsTrGddUY658E+QvyXYHq9UnRyC
|
||||
U87f4aUApcXhnrI9Jzg/laQKFntXlHM+lSQK5psL5fvbp/JvJLGCQqmSWM5JkiCT84igXGtSrruKLQ0T
|
||||
luAdmZxHBG37FFuWBC/j5XKOmX8WAH7rcI6ZMffPgjQwN2bXJgDo/COBTpjneQ2dML0PY3cISreGe8HM
|
||||
qgAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="addEntryBtn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEKSURBVEhL3ZG9DsFQHMXvczDZvIOtXsHObuhqkViI3Quw
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEKSURBVEhL3ZG9DsFQHMXvczDZvIOtXsHObuhqkViI3Quw
|
||||
6CYmNoMYJJ0NBiFFIoIytOuf0+TeXP3yde+iyS+3OcP53Z4y3/dJJ4HAsiwyTVMp6BQCBIZhKAWdEcHV
|
||||
vSlBmeB82NFy1KLluEWOPRC5MoHdMWhazwi4RJlALgf4EuT6BI+5kCsTrGddUY658E+QvyXYHq9UnRyC
|
||||
U87f4aUApcXhnrI9Jzg/laQKFntXlHM+lSQK5psL5fvbp/JvJLGCQqmSWM5JkiCT84igXGtSrruKLQ0T
|
||||
@@ -105,4 +83,7 @@
|
||||
qgAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="openARCDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>115, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
85
BMGEditor/UI/MainForm.Designer.cs
generated
85
BMGEditor/UI/MainForm.Designer.cs
generated
@@ -33,57 +33,37 @@ namespace BMGEditor
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.openFileBtn = new System.Windows.Forms.Button();
|
||||
this.closeFileBtn = new System.Windows.Forms.Button();
|
||||
this.openTextEditorBtn = new System.Windows.Forms.Button();
|
||||
this.openBcsvEditorBtn = new System.Windows.Forms.Button();
|
||||
this.openARCFileDialog = new System.Windows.Forms.OpenFileDialog();
|
||||
this.aboutBtn = new System.Windows.Forms.Button();
|
||||
this.updateCheckBtn = new System.Windows.Forms.Button();
|
||||
this.openTextEditorEmptyBtn = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// openFileBtn
|
||||
//
|
||||
this.openFileBtn.Location = new System.Drawing.Point(12, 12);
|
||||
this.openFileBtn.Enabled = false;
|
||||
this.openFileBtn.Location = new System.Drawing.Point(98, 59);
|
||||
this.openFileBtn.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.openFileBtn.Name = "openFileBtn";
|
||||
this.openFileBtn.Size = new System.Drawing.Size(94, 29);
|
||||
this.openFileBtn.Size = new System.Drawing.Size(82, 22);
|
||||
this.openFileBtn.TabIndex = 0;
|
||||
this.openFileBtn.Text = "Open file";
|
||||
this.openFileBtn.UseVisualStyleBackColor = true;
|
||||
this.openFileBtn.Click += new System.EventHandler(this.openFileBtn_Click);
|
||||
//
|
||||
// closeFileBtn
|
||||
//
|
||||
this.closeFileBtn.Enabled = false;
|
||||
this.closeFileBtn.Location = new System.Drawing.Point(112, 12);
|
||||
this.closeFileBtn.Name = "closeFileBtn";
|
||||
this.closeFileBtn.Size = new System.Drawing.Size(94, 29);
|
||||
this.closeFileBtn.TabIndex = 1;
|
||||
this.closeFileBtn.Text = "Close file";
|
||||
this.closeFileBtn.UseVisualStyleBackColor = true;
|
||||
this.closeFileBtn.Click += new System.EventHandler(this.closeFileBtn_Click);
|
||||
//
|
||||
// openTextEditorBtn
|
||||
//
|
||||
this.openTextEditorBtn.Enabled = false;
|
||||
this.openTextEditorBtn.Location = new System.Drawing.Point(12, 112);
|
||||
this.openTextEditorBtn.Location = new System.Drawing.Point(12, 59);
|
||||
this.openTextEditorBtn.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.openTextEditorBtn.Name = "openTextEditorBtn";
|
||||
this.openTextEditorBtn.Size = new System.Drawing.Size(94, 29);
|
||||
this.openTextEditorBtn.Size = new System.Drawing.Size(82, 22);
|
||||
this.openTextEditorBtn.TabIndex = 2;
|
||||
this.openTextEditorBtn.Text = "Text edit";
|
||||
this.openTextEditorBtn.UseVisualStyleBackColor = true;
|
||||
this.openTextEditorBtn.Click += new System.EventHandler(this.openTextEditorBtn_Click);
|
||||
//
|
||||
// openBcsvEditorBtn
|
||||
//
|
||||
this.openBcsvEditorBtn.Enabled = false;
|
||||
this.openBcsvEditorBtn.Location = new System.Drawing.Point(112, 112);
|
||||
this.openBcsvEditorBtn.Name = "openBcsvEditorBtn";
|
||||
this.openBcsvEditorBtn.Size = new System.Drawing.Size(313, 29);
|
||||
this.openBcsvEditorBtn.TabIndex = 3;
|
||||
this.openBcsvEditorBtn.Text = "BCSV Editor [DEBUG BUILD ONLY]";
|
||||
this.openBcsvEditorBtn.UseVisualStyleBackColor = true;
|
||||
this.openBcsvEditorBtn.Click += new System.EventHandler(this.openBcsvEditorBtn_Click);
|
||||
//
|
||||
// openARCFileDialog
|
||||
//
|
||||
this.openARCFileDialog.FileName = "Message.arc";
|
||||
@@ -91,52 +71,63 @@ namespace BMGEditor
|
||||
//
|
||||
// aboutBtn
|
||||
//
|
||||
this.aboutBtn.Location = new System.Drawing.Point(323, 12);
|
||||
this.aboutBtn.Location = new System.Drawing.Point(167, 11);
|
||||
this.aboutBtn.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.aboutBtn.Name = "aboutBtn";
|
||||
this.aboutBtn.Size = new System.Drawing.Size(102, 29);
|
||||
this.aboutBtn.Size = new System.Drawing.Size(89, 22);
|
||||
this.aboutBtn.TabIndex = 4;
|
||||
this.aboutBtn.Text = "About";
|
||||
this.aboutBtn.UseVisualStyleBackColor = true;
|
||||
this.aboutBtn.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// updateCheckBtn
|
||||
// openTextEditorEmptyBtn
|
||||
//
|
||||
this.updateCheckBtn.Location = new System.Drawing.Point(282, 47);
|
||||
this.updateCheckBtn.Name = "updateCheckBtn";
|
||||
this.updateCheckBtn.Size = new System.Drawing.Size(143, 29);
|
||||
this.updateCheckBtn.TabIndex = 5;
|
||||
this.updateCheckBtn.Text = "Check for updates";
|
||||
this.updateCheckBtn.UseVisualStyleBackColor = true;
|
||||
this.updateCheckBtn.Click += new System.EventHandler(this.updateCheckBtn_Click);
|
||||
this.openTextEditorEmptyBtn.Location = new System.Drawing.Point(10, 11);
|
||||
this.openTextEditorEmptyBtn.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.openTextEditorEmptyBtn.Name = "openTextEditorEmptyBtn";
|
||||
this.openTextEditorEmptyBtn.Size = new System.Drawing.Size(151, 22);
|
||||
this.openTextEditorEmptyBtn.TabIndex = 5;
|
||||
this.openTextEditorEmptyBtn.Text = "Text edit [without ARC]";
|
||||
this.openTextEditorEmptyBtn.UseVisualStyleBackColor = true;
|
||||
this.openTextEditorEmptyBtn.Click += new System.EventHandler(this.openTextEditorEmptyBtn_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(20, 42);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(160, 15);
|
||||
this.label1.TabIndex = 6;
|
||||
this.label1.Text = "These buttons will be deleted";
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(437, 153);
|
||||
this.Controls.Add(this.updateCheckBtn);
|
||||
this.ClientSize = new System.Drawing.Size(284, 92);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.openTextEditorEmptyBtn);
|
||||
this.Controls.Add(this.aboutBtn);
|
||||
this.Controls.Add(this.openBcsvEditorBtn);
|
||||
this.Controls.Add(this.openTextEditorBtn);
|
||||
this.Controls.Add(this.closeFileBtn);
|
||||
this.Controls.Add(this.openFileBtn);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "MainForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "MainForm";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Button openFileBtn;
|
||||
private Button closeFileBtn;
|
||||
private Button openTextEditorBtn;
|
||||
private Button openBcsvEditorBtn;
|
||||
private OpenFileDialog openARCFileDialog;
|
||||
private Button aboutBtn;
|
||||
private Button updateCheckBtn;
|
||||
private Button openTextEditorEmptyBtn;
|
||||
private Label label1;
|
||||
}
|
||||
}
|
||||
@@ -54,13 +54,7 @@ namespace BMGEditor
|
||||
arc.Close();
|
||||
return;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
openBcsvEditorBtn.Enabled = true;
|
||||
#else
|
||||
#endif
|
||||
openTextEditorBtn.Enabled = true;
|
||||
closeFileBtn.Enabled = true;
|
||||
arcOpen = true;
|
||||
}
|
||||
else
|
||||
@@ -71,9 +65,7 @@ namespace BMGEditor
|
||||
{
|
||||
arc.Close();
|
||||
arcOpen = false;
|
||||
openBcsvEditorBtn.Enabled = false;
|
||||
openTextEditorBtn.Enabled = false;
|
||||
closeFileBtn.Enabled = false;
|
||||
}
|
||||
|
||||
private void openTextEditorBtn_Click(object sender, EventArgs e)
|
||||
@@ -87,9 +79,10 @@ namespace BMGEditor
|
||||
MessageBox.Show("BMG Editor by Bussun", "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
private void updateCheckBtn_Click(object sender, EventArgs e)
|
||||
private void openTextEditorEmptyBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
Program.CheckUpdates();
|
||||
Form bmgEdit = new BMGEditForm();
|
||||
bmgEdit.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
79
BMGEditor/UI/PreferencesAbout.Designer.cs
generated
Normal file
79
BMGEditor/UI/PreferencesAbout.Designer.cs
generated
Normal file
@@ -0,0 +1,79 @@
|
||||
namespace BMGEditor
|
||||
{
|
||||
partial class PreferencesAbout
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Segoe UI", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
|
||||
this.label1.Location = new System.Drawing.Point(12, 9);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(93, 40);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Luma";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point);
|
||||
this.label2.Location = new System.Drawing.Point(21, 49);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(243, 20);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "A BMG editor for Super Mario Galaxy";
|
||||
//
|
||||
// PreferencesAbout
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(348, 183);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "PreferencesAbout";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "PreferencesAbout";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
}
|
||||
}
|
||||
20
BMGEditor/UI/PreferencesAbout.cs
Normal file
20
BMGEditor/UI/PreferencesAbout.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BMGEditor
|
||||
{
|
||||
public partial class PreferencesAbout : Form
|
||||
{
|
||||
public PreferencesAbout()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
BMGEditor/UI/PreferencesAbout.en-US.resx
Normal file
120
BMGEditor/UI/PreferencesAbout.en-US.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
||||
141
BMGEditor/UI/PreferencesAbout.resx
Normal file
141
BMGEditor/UI/PreferencesAbout.resx
Normal file
@@ -0,0 +1,141 @@
|
||||
<root>
|
||||
<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="label1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 21.75pt, style=Bold</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>93, 40</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>PreferencesAbout</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Luma</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>A BMG editor for Super Mario Galaxy</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>7, 15</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>PreferencesAbout</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 20</value>
|
||||
</data>
|
||||
<data name="label2.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 11.25pt, style=Italic</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>348, 183</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>21, 49</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 9</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
</root>
|
||||
2
BMGEditor/UI/TextEntryEditorForm.Designer.cs
generated
2
BMGEditor/UI/TextEntryEditorForm.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace BMGEditor.UI
|
||||
namespace BMGEditor
|
||||
{
|
||||
partial class TextEntryEditorForm
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BMGEditor.UI
|
||||
namespace BMGEditor
|
||||
{
|
||||
public partial class TextEntryEditorForm : Form
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user