diff --git a/BMGEditor/Program.cs b/BMGEditor/Program.cs
index 99db95d..a02bf41 100644
--- a/BMGEditor/Program.cs
+++ b/BMGEditor/Program.cs
@@ -25,6 +25,7 @@ namespace BMGEditor
{
ApplicationConfiguration.Initialize();
Bcsv.PopulateHashtable();
+ CheckUpdates();
Application.Run(new MainForm());
}
diff --git a/BMGEditor/UI/BMGEditForm.Designer.cs b/BMGEditor/UI/BMGEditForm.Designer.cs
index ed59609..e0496af 100644
--- a/BMGEditor/UI/BMGEditForm.Designer.cs
+++ b/BMGEditor/UI/BMGEditForm.Designer.cs
@@ -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;
}
}
\ No newline at end of file
diff --git a/BMGEditor/UI/BMGEditForm.Methods.cs b/BMGEditor/UI/BMGEditForm.Methods.cs
new file mode 100644
index 0000000..4daf7a7
--- /dev/null
+++ b/BMGEditor/UI/BMGEditForm.Methods.cs
@@ -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();
+ }
+ }
+}
diff --git a/BMGEditor/UI/BMGEditForm.cs b/BMGEditor/UI/BMGEditForm.cs
index e026d40..5a68494 100644
--- a/BMGEditor/UI/BMGEditForm.cs
+++ b/BMGEditor/UI/BMGEditForm.cs
@@ -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();
}
}
}
diff --git a/BMGEditor/UI/BMGEditForm.resx b/BMGEditor/UI/BMGEditForm.resx
index 7a06bed..adaa9ea 100644
--- a/BMGEditor/UI/BMGEditForm.resx
+++ b/BMGEditor/UI/BMGEditForm.resx
@@ -61,10 +61,10 @@
17, 17
-
+
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEKSURBVEhL3ZG9DsFQHMXvczDZvIOtXsHObuhqkViI3Quw
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEKSURBVEhL3ZG9DsFQHMXvczDZvIOtXsHObuhqkViI3Quw
6CYmNoMYJJ0NBiFFIoIytOuf0+TeXP3yde+iyS+3OcP53Z4y3/dJJ4HAsiwyTVMp6BQCBIZhKAWdEcHV
vSlBmeB82NFy1KLluEWOPRC5MoHdMWhazwi4RJlALgf4EuT6BI+5kCsTrGddUY658E+QvyXYHq9UnRyC
U87f4aUApcXhnrI9Jzg/laQKFntXlHM+lSQK5psL5fvbp/JvJLGCQqmSWM5JkiCT84igXGtSrruKLQ0T
@@ -72,32 +72,10 @@
qgAAAABJRU5ErkJggg==
-
+
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEKSURBVEhL3ZG9DsFQHMXvczDZvIOtXsHObuhqkViI3Quw
- 6CYmNoMYJJ0NBiFFIoIytOuf0+TeXP3yde+iyS+3OcP53Z4y3/dJJ4HAsiwyTVMp6BQCBIZhKAWdEcHV
- vSlBmeB82NFy1KLluEWOPRC5MoHdMWhazwi4RJlALgf4EuT6BI+5kCsTrGddUY658E+QvyXYHq9UnRyC
- U87f4aUApcXhnrI9Jzg/laQKFntXlHM+lSQK5psL5fvbp/JvJLGCQqmSWM5JkiCT84igXGtSrruKLQ0T
- luAdmZxHBG37FFuWBC/j5XKOmX8WAH7rcI6ZMffPgjQwN2bXJgDo/COBTpjneQ2dML0PY3cISreGe8HM
- qgAAAABJRU5ErkJggg==
-
-
-
-
- iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEKSURBVEhL3ZG9DsFQHMXvczDZvIOtXsHObuhqkViI3Quw
- 6CYmNoMYJJ0NBiFFIoIytOuf0+TeXP3yde+iyS+3OcP53Z4y3/dJJ4HAsiwyTVMp6BQCBIZhKAWdEcHV
- vSlBmeB82NFy1KLluEWOPRC5MoHdMWhazwi4RJlALgf4EuT6BI+5kCsTrGddUY658E+QvyXYHq9UnRyC
- U87f4aUApcXhnrI9Jzg/laQKFntXlHM+lSQK5psL5fvbp/JvJLGCQqmSWM5JkiCT84igXGtSrruKLQ0T
- luAdmZxHBG37FFuWBC/j5XKOmX8WAH7rcI6ZMffPgjQwN2bXJgDo/COBTpjneQ2dML0PY3cISreGe8HM
- qgAAAABJRU5ErkJggg==
-
-
-
-
- iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEKSURBVEhL3ZG9DsFQHMXvczDZvIOtXsHObuhqkViI3Quw
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEKSURBVEhL3ZG9DsFQHMXvczDZvIOtXsHObuhqkViI3Quw
6CYmNoMYJJ0NBiFFIoIytOuf0+TeXP3yde+iyS+3OcP53Z4y3/dJJ4HAsiwyTVMp6BQCBIZhKAWdEcHV
vSlBmeB82NFy1KLluEWOPRC5MoHdMWhazwi4RJlALgf4EuT6BI+5kCsTrGddUY658E+QvyXYHq9UnRyC
U87f4aUApcXhnrI9Jzg/laQKFntXlHM+lSQK5psL5fvbp/JvJLGCQqmSWM5JkiCT84igXGtSrruKLQ0T
@@ -105,4 +83,7 @@
qgAAAABJRU5ErkJggg==
+
+ 115, 17
+
\ No newline at end of file
diff --git a/BMGEditor/UI/MainForm.Designer.cs b/BMGEditor/UI/MainForm.Designer.cs
index 208b442..75d4c2b 100644
--- a/BMGEditor/UI/MainForm.Designer.cs
+++ b/BMGEditor/UI/MainForm.Designer.cs
@@ -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;
}
}
\ No newline at end of file
diff --git a/BMGEditor/UI/MainForm.cs b/BMGEditor/UI/MainForm.cs
index 7c9617f..fc9da78 100644
--- a/BMGEditor/UI/MainForm.cs
+++ b/BMGEditor/UI/MainForm.cs
@@ -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();
}
}
}
diff --git a/BMGEditor/UI/PreferencesAbout.Designer.cs b/BMGEditor/UI/PreferencesAbout.Designer.cs
new file mode 100644
index 0000000..07d4d3b
--- /dev/null
+++ b/BMGEditor/UI/PreferencesAbout.Designer.cs
@@ -0,0 +1,79 @@
+namespace BMGEditor
+{
+ partial class PreferencesAbout
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ 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;
+ }
+}
\ No newline at end of file
diff --git a/BMGEditor/UI/PreferencesAbout.cs b/BMGEditor/UI/PreferencesAbout.cs
new file mode 100644
index 0000000..16b99e7
--- /dev/null
+++ b/BMGEditor/UI/PreferencesAbout.cs
@@ -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();
+ }
+ }
+}
diff --git a/BMGEditor/UI/PreferencesAbout.en-US.resx b/BMGEditor/UI/PreferencesAbout.en-US.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/BMGEditor/UI/PreferencesAbout.en-US.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/BMGEditor/UI/PreferencesAbout.resx b/BMGEditor/UI/PreferencesAbout.resx
new file mode 100644
index 0000000..e4190f3
--- /dev/null
+++ b/BMGEditor/UI/PreferencesAbout.resx
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+ Segoe UI, 21.75pt, style=Bold
+
+
+ 93, 40
+
+
+ PreferencesAbout
+
+
+ $this
+
+
+
+ CenterParent
+
+
+ label2
+
+
+ System.Windows.Forms.Form, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ label1
+
+
+ Luma
+
+
+
+ True
+
+
+ 0
+
+
+ A BMG editor for Super Mario Galaxy
+
+
+ 1
+
+
+ 7, 15
+
+
+ PreferencesAbout
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 243, 20
+
+
+ Segoe UI, 11.25pt, style=Italic
+
+
+ 1
+
+
+ 348, 183
+
+
+ 21, 49
+
+
+ True
+
+
+ 12, 9
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 0
+
+
\ No newline at end of file
diff --git a/BMGEditor/UI/TextEntryEditorForm.Designer.cs b/BMGEditor/UI/TextEntryEditorForm.Designer.cs
index b7b22b9..c7913aa 100644
--- a/BMGEditor/UI/TextEntryEditorForm.Designer.cs
+++ b/BMGEditor/UI/TextEntryEditorForm.Designer.cs
@@ -1,4 +1,4 @@
-namespace BMGEditor.UI
+namespace BMGEditor
{
partial class TextEntryEditorForm
{
diff --git a/BMGEditor/UI/TextEntryEditorForm.cs b/BMGEditor/UI/TextEntryEditorForm.cs
index b2829c0..d9d93bc 100644
--- a/BMGEditor/UI/TextEntryEditorForm.cs
+++ b/BMGEditor/UI/TextEntryEditorForm.cs
@@ -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
{