1
0
mirror of https://github.com/MainMemory/BlupiEdit.git synced 2025-03-16 18:45:07 +01:00

Adding TabControl and title bar text.

This commit is contained in:
MainMemory 2014-06-21 16:22:31 -05:00
parent 36b254bc46
commit ca193405f1
2 changed files with 145 additions and 82 deletions

View File

@ -28,95 +28,144 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.changeLevelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.changeLevelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.SuspendLayout(); this.tabPage1 = new System.Windows.Forms.TabPage();
// this.tabPage2 = new System.Windows.Forms.TabPage();
// menuStrip1 this.tabPage3 = new System.Windows.Forms.TabPage();
// this.menuStrip1.SuspendLayout();
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tabControl1.SuspendLayout();
this.SuspendLayout();
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem}); this.fileToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(584, 24); this.menuStrip1.Size = new System.Drawing.Size(584, 24);
this.menuStrip1.TabIndex = 0; this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.Text = "menuStrip1";
// //
// fileToolStripMenuItem // fileToolStripMenuItem
// //
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.openToolStripMenuItem, this.openToolStripMenuItem,
this.changeLevelToolStripMenuItem, this.changeLevelToolStripMenuItem,
this.saveToolStripMenuItem, this.saveToolStripMenuItem,
this.saveAsToolStripMenuItem, this.saveAsToolStripMenuItem,
this.toolStripSeparator1, this.toolStripSeparator1,
this.exitToolStripMenuItem}); this.exitToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "&File"; this.fileToolStripMenuItem.Text = "&File";
// //
// openToolStripMenuItem // openToolStripMenuItem
// //
this.openToolStripMenuItem.Name = "openToolStripMenuItem"; this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.openToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
this.openToolStripMenuItem.Text = "&Open..."; this.openToolStripMenuItem.Text = "&Open...";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
// //
// changeLevelToolStripMenuItem // changeLevelToolStripMenuItem
// //
this.changeLevelToolStripMenuItem.Enabled = false; this.changeLevelToolStripMenuItem.Enabled = false;
this.changeLevelToolStripMenuItem.Name = "changeLevelToolStripMenuItem"; this.changeLevelToolStripMenuItem.Name = "changeLevelToolStripMenuItem";
this.changeLevelToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.changeLevelToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
this.changeLevelToolStripMenuItem.Text = "&Change Level..."; this.changeLevelToolStripMenuItem.Text = "&Change Level...";
this.changeLevelToolStripMenuItem.Click += new System.EventHandler(this.changeLevelToolStripMenuItem_Click); this.changeLevelToolStripMenuItem.Click += new System.EventHandler(this.changeLevelToolStripMenuItem_Click);
// //
// saveToolStripMenuItem // saveToolStripMenuItem
// //
this.saveToolStripMenuItem.Enabled = false; this.saveToolStripMenuItem.Enabled = false;
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.saveToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
this.saveToolStripMenuItem.Text = "&Save"; this.saveToolStripMenuItem.Text = "&Save";
// //
// saveAsToolStripMenuItem // saveAsToolStripMenuItem
// //
this.saveAsToolStripMenuItem.Enabled = false; this.saveAsToolStripMenuItem.Enabled = false;
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem"; this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
this.saveAsToolStripMenuItem.Text = "Save &As..."; this.saveAsToolStripMenuItem.Text = "Save &As...";
// //
// exitToolStripMenuItem // toolStripSeparator1
// //
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.toolStripSeparator1.Size = new System.Drawing.Size(151, 6);
this.exitToolStripMenuItem.Text = "E&xit"; //
// // exitToolStripMenuItem
// toolStripSeparator1 //
// this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.exitToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
this.toolStripSeparator1.Size = new System.Drawing.Size(151, 6); this.exitToolStripMenuItem.Text = "E&xit";
// //
// MainForm // tabControl1
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.tabControl1.Controls.Add(this.tabPage1);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.tabControl1.Controls.Add(this.tabPage2);
this.ClientSize = new System.Drawing.Size(584, 562); this.tabControl1.Controls.Add(this.tabPage3);
this.Controls.Add(this.menuStrip1); this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.MainMenuStrip = this.menuStrip1; this.tabControl1.Location = new System.Drawing.Point(0, 24);
this.Name = "MainForm"; this.tabControl1.Name = "tabControl1";
this.Text = "BlupiEdit"; this.tabControl1.SelectedIndex = 0;
this.Load += new System.EventHandler(this.MainForm_Load); this.tabControl1.Size = new System.Drawing.Size(584, 538);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed); this.tabControl1.TabIndex = 1;
this.menuStrip1.ResumeLayout(false); //
this.menuStrip1.PerformLayout(); // tabPage1
this.ResumeLayout(false); //
this.PerformLayout(); this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(576, 512);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Tiles";
this.tabPage1.UseVisualStyleBackColor = true;
//
// tabPage2
//
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(576, 512);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Objects";
this.tabPage2.UseVisualStyleBackColor = true;
//
// tabPage3
//
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
this.tabPage3.Size = new System.Drawing.Size(576, 512);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "Properties";
this.tabPage3.UseVisualStyleBackColor = true;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(584, 562);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1;
this.Name = "MainForm";
this.Text = "BlupiEdit";
this.Load += new System.EventHandler(this.MainForm_Load);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.tabControl1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
} }
@ -130,6 +179,10 @@
private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TabPage tabPage3;
} }
} }

View File

@ -49,6 +49,16 @@ namespace BlupiEdit
{ {
LevelData.LoadLevel(ls.UserID, ls.LevelNum); LevelData.LoadLevel(ls.UserID, ls.LevelNum);
// TODO: more stuff // TODO: more stuff
StringBuilder sb = new StringBuilder("BlupiEdit - Speedy Blupi");
if (LevelData.IsBlupi2) sb.Append(" 2");
sb.Append(" - ");
if (ls.UserID == 0)
sb.AppendFormat("World {0:000}", ls.LevelNum);
else
sb.AppendFormat("User {0} Design {1:000}", ls.UserID, ls.LevelNum);
if (!string.IsNullOrEmpty(LevelData.CurrentLevel.LevelName))
sb.AppendFormat(" - {0}", LevelData.CurrentLevel.LevelName);
Text = sb.ToString();
} }
} }
} }