From 70ec346d7cdb28c3a5bcba45158d388c669c590e Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 7 Jun 2020 10:15:10 -0700 Subject: [PATCH] Add red color if pocket count out of range #302 --- NHSE.WinForms/Editor.Designer.cs | 44 +++++++++++++++++--------------- NHSE.WinForms/Editor.cs | 2 ++ 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/NHSE.WinForms/Editor.Designer.cs b/NHSE.WinForms/Editor.Designer.cs index 3acdfb1..f6b54d9 100644 --- a/NHSE.WinForms/Editor.Designer.cs +++ b/NHSE.WinForms/Editor.Designer.cs @@ -57,6 +57,8 @@ private void InitializeComponent() this.B_EditFieldItems = new System.Windows.Forms.ToolStripMenuItem(); this.B_EditBulletin = new System.Windows.Forms.ToolStripMenuItem(); this.B_EditFieldGoods = new System.Windows.Forms.ToolStripMenuItem(); + this.B_EditMuseum_Click = new System.Windows.Forms.ToolStripMenuItem(); + this.B_EditVisitors = new System.Windows.Forms.ToolStripMenuItem(); this.B_EditPRODesigns = new System.Windows.Forms.Button(); this.B_EditPatterns = new System.Windows.Forms.Button(); this.B_EditTurnipExchange = new System.Windows.Forms.Button(); @@ -94,8 +96,6 @@ private void InitializeComponent() this.CB_Players = new System.Windows.Forms.ComboBox(); this.PB_Player = new System.Windows.Forms.PictureBox(); this.TC_Editors = new System.Windows.Forms.TabControl(); - this.B_EditMuseum_Click = new System.Windows.Forms.ToolStripMenuItem(); - this.B_EditVisitors = new System.Windows.Forms.ToolStripMenuItem(); this.Menu_Editor.SuspendLayout(); this.CM_Picture.SuspendLayout(); this.Tab_Map.SuspendLayout(); @@ -344,36 +344,50 @@ private void InitializeComponent() this.B_EditMuseum_Click, this.B_EditVisitors}); this.CM_EditMap.Name = "CM_EditMap"; - this.CM_EditMap.Size = new System.Drawing.Size(181, 158); + this.CM_EditMap.Size = new System.Drawing.Size(172, 136); // // B_EditLandFlags // this.B_EditLandFlags.Name = "B_EditLandFlags"; - this.B_EditLandFlags.Size = new System.Drawing.Size(180, 22); + this.B_EditLandFlags.Size = new System.Drawing.Size(171, 22); this.B_EditLandFlags.Text = "Edit Flags"; this.B_EditLandFlags.Click += new System.EventHandler(this.B_EditLandFlags_Click); // // B_EditFieldItems // this.B_EditFieldItems.Name = "B_EditFieldItems"; - this.B_EditFieldItems.Size = new System.Drawing.Size(180, 22); + this.B_EditFieldItems.Size = new System.Drawing.Size(171, 22); this.B_EditFieldItems.Text = "Edit Field Items"; this.B_EditFieldItems.Click += new System.EventHandler(this.B_EditFieldItems_Click); // // B_EditBulletin // this.B_EditBulletin.Name = "B_EditBulletin"; - this.B_EditBulletin.Size = new System.Drawing.Size(180, 22); + this.B_EditBulletin.Size = new System.Drawing.Size(171, 22); this.B_EditBulletin.Text = "Edit Bulletin Board"; this.B_EditBulletin.Click += new System.EventHandler(this.B_EditBulletin_Click); // // B_EditFieldGoods // this.B_EditFieldGoods.Name = "B_EditFieldGoods"; - this.B_EditFieldGoods.Size = new System.Drawing.Size(180, 22); + this.B_EditFieldGoods.Size = new System.Drawing.Size(171, 22); this.B_EditFieldGoods.Text = "Edit Field Goods"; this.B_EditFieldGoods.Click += new System.EventHandler(this.B_EditFieldGoods_Click); // + // B_EditMuseum_Click + // + this.B_EditMuseum_Click.Name = "B_EditMuseum_Click"; + this.B_EditMuseum_Click.Size = new System.Drawing.Size(171, 22); + this.B_EditMuseum_Click.Text = "Edit Museum"; + this.B_EditMuseum_Click.Click += new System.EventHandler(this.B_EditMuseum_Click_Click); + // + // B_EditVisitors + // + this.B_EditVisitors.Name = "B_EditVisitors"; + this.B_EditVisitors.Size = new System.Drawing.Size(171, 22); + this.B_EditVisitors.Text = "Edit Visitors"; + this.B_EditVisitors.Click += new System.EventHandler(this.B_EditVisitors_Click); + // // B_EditPRODesigns // this.B_EditPRODesigns.Location = new System.Drawing.Point(104, 98); @@ -540,6 +554,7 @@ private void InitializeComponent() 0, 0, 0}); + this.NUD_PocketCount2.ValueChanged += new System.EventHandler(this.NUD_PocketCount_ValueChanged); // // NUD_PocketCount1 // @@ -557,6 +572,7 @@ private void InitializeComponent() 0, 0, 0}); + this.NUD_PocketCount1.ValueChanged += new System.EventHandler(this.NUD_PocketCount_ValueChanged); // // B_EditPlayer // @@ -769,20 +785,6 @@ private void InitializeComponent() this.TC_Editors.Size = new System.Drawing.Size(404, 237); this.TC_Editors.TabIndex = 1; // - // B_EditMuseum_Click - // - this.B_EditMuseum_Click.Name = "B_EditMuseum_Click"; - this.B_EditMuseum_Click.Size = new System.Drawing.Size(180, 22); - this.B_EditMuseum_Click.Text = "Edit Museum"; - this.B_EditMuseum_Click.Click += new System.EventHandler(this.B_EditMuseum_Click_Click); - // - // B_EditVisitors - // - this.B_EditVisitors.Name = "B_EditVisitors"; - this.B_EditVisitors.Size = new System.Drawing.Size(180, 22); - this.B_EditVisitors.Text = "Edit Visitors"; - this.B_EditVisitors.Click += new System.EventHandler(this.B_EditVisitors_Click); - // // Editor // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/NHSE.WinForms/Editor.cs b/NHSE.WinForms/Editor.cs index f13cbef..fc6f06a 100644 --- a/NHSE.WinForms/Editor.cs +++ b/NHSE.WinForms/Editor.cs @@ -488,5 +488,7 @@ private void B_EditVisitors_Click(object sender, EventArgs e) if (editor.ShowDialog() == DialogResult.OK) SAV.Main.Visitor = boxed; } + + private void NUD_PocketCount_ValueChanged(object sender, EventArgs e) => ((NumericUpDown) sender).BackColor = (uint) ((NumericUpDown) sender).Value > 20 ? Color.Red : NUD_BankBells.BackColor; } }