Last edit for today

This commit is contained in:
2021-11-28 00:13:43 +01:00
parent e5814a4b0c
commit afc268f546
8 changed files with 266 additions and 74 deletions

View File

@@ -28,111 +28,78 @@
/// </summary>
private void InitializeComponent()
{
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.quitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BMGEditForm));
this.panel1 = new System.Windows.Forms.Panel();
this.entriesListBox = new System.Windows.Forms.ListBox();
this.menuStrip1.SuspendLayout();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.openEntryBtn = new System.Windows.Forms.ToolStripButton();
this.panel1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// menuStrip1
//
this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(800, 28);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.openToolStripMenuItem,
this.closeToolStripMenuItem,
this.saveToolStripMenuItem,
this.quitToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(46, 24);
this.fileToolStripMenuItem.Text = "File";
//
// openToolStripMenuItem
//
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.Size = new System.Drawing.Size(128, 26);
this.openToolStripMenuItem.Text = "Open";
//
// closeToolStripMenuItem
//
this.closeToolStripMenuItem.Name = "closeToolStripMenuItem";
this.closeToolStripMenuItem.Size = new System.Drawing.Size(128, 26);
this.closeToolStripMenuItem.Text = "Close";
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(128, 26);
this.saveToolStripMenuItem.Text = "Save";
//
// quitToolStripMenuItem
//
this.quitToolStripMenuItem.Name = "quitToolStripMenuItem";
this.quitToolStripMenuItem.Size = new System.Drawing.Size(128, 26);
this.quitToolStripMenuItem.Text = "Quit";
//
// panel1
//
this.panel1.Controls.Add(this.toolStrip1);
this.panel1.Controls.Add(this.entriesListBox);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 28);
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(800, 422);
this.panel1.Size = new System.Drawing.Size(800, 450);
this.panel1.TabIndex = 1;
//
// entriesListBox
//
this.entriesListBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.entriesListBox.Dock = System.Windows.Forms.DockStyle.Bottom;
this.entriesListBox.FormattingEnabled = true;
this.entriesListBox.ItemHeight = 20;
this.entriesListBox.Location = new System.Drawing.Point(0, 0);
this.entriesListBox.Location = new System.Drawing.Point(0, 46);
this.entriesListBox.Name = "entriesListBox";
this.entriesListBox.Size = new System.Drawing.Size(800, 422);
this.entriesListBox.Size = new System.Drawing.Size(800, 404);
this.entriesListBox.TabIndex = 0;
//
// toolStrip1
//
this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.openEntryBtn});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(800, 27);
this.toolStrip1.TabIndex = 1;
this.toolStrip1.Text = "toolStrip1";
//
// 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(80, 24);
this.openEntryBtn.Text = "openEntry";
this.openEntryBtn.Click += new System.EventHandler(this.openEntryBtn_Click);
//
// BMGEditForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.panel1);
this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1;
this.Name = "BMGEditForm";
this.Text = "BMGEditForm";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BMGEditForm_FormClosing);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem quitToolStripMenuItem;
private System.Windows.Forms.ListBox entriesListBox;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton openEntryBtn;
}
}

View File

@@ -1,4 +1,5 @@
using System;
using BMGEditor.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -36,5 +37,10 @@ namespace BMGEditor
m_FileTbl.Close();
}
private void openEntryBtn_Click(object sender, EventArgs e)
{
Form txtEditForm = new TextEntryEditorForm(m_File.Entries[entriesListBox.SelectedIndex]);
txtEditForm.Show();
}
}
}

View File

@@ -57,7 +57,19 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="openEntryBtn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEISURBVEhL3ZErDsJAGIR7DlA47oArV8CDR9RiSDAQPBcA
Qx1BgUMQBEk1ooJAKE0I4Wlqf5gmu1n6oqW7hiZfthkx33aqeZ5HKvEFpmmSYRhSQScXINB1XSroDAke
96cUpAmupyPZsx7Z8x4drAnPpQmsgU7LdoHDJNIEYjnAlyBXJ3jPhVyaYLca8nLMhX+CPJXAOT+ouTj5
p5in4asApdWpS8XRwT+zShIFG/fOyxlZJbGC9f5G5bHzUf6LJFJQqTViyxlxEmRiHhLUW10qDbeRpUGC
ErwjE/OQoG9dIsviYGWsXMwxc24BYLcO5pgZc+cWJIG5MbsyAUDnHwlUAkFHJZraR9NeMVq3zi+WF/0A
AAAASUVORK5CYII=
</value>
</data>
</root>

View File

@@ -92,9 +92,9 @@
//
// richTextBox1
//
this.richTextBox1.Location = new System.Drawing.Point(235, 234);
this.richTextBox1.Location = new System.Drawing.Point(130, 234);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(125, 120);
this.richTextBox1.Size = new System.Drawing.Size(230, 120);
this.richTextBox1.TabIndex = 7;
this.richTextBox1.Text = "";
//
@@ -113,6 +113,7 @@
this.Controls.Add(this.textBox1);
this.Name = "TextEntryEditorForm";
this.Text = "TextEntryEditorForm";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TextEntryEditorForm_FormClosing);
this.ResumeLayout(false);
this.PerformLayout();

View File

@@ -12,9 +12,17 @@ namespace BMGEditor.UI
{
public partial class TextEntryEditorForm : Form
{
BMG.TextEntry m_Entry;
public TextEntryEditorForm(BMG.TextEntry txtEntry)
{
InitializeComponent();
m_Entry = txtEntry;
richTextBox1.Text = m_Entry.text;
}
private void TextEntryEditorForm_FormClosing(object sender, FormClosingEventArgs e)
{
m_Entry.text = richTextBox1.Text;
}
}
}