From 2a479331b9af4048f7f77a961bf5d017c89838d7 Mon Sep 17 00:00:00 2001 From: Kazuhiro Fujieda Date: Sat, 15 Aug 2020 13:22:27 +0900 Subject: [PATCH] =?utf8?q?=E5=85=A5=E6=B8=A0=E3=81=A8=E9=81=A0=E5=BE=81?= =?utf8?q?=E3=81=AE=E3=82=BF=E3=82=A4=E3=83=9E=E3=83=BC=E4=BB=A5=E5=A4=96?= =?utf8?q?=E3=81=AE=E9=83=A8=E5=88=86=E3=81=AE=E3=82=AF=E3=83=AA=E3=83=83?= =?utf8?q?=E3=82=AF=E3=82=92=E7=84=A1=E5=8A=B9=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- KancolleSniffer/Forms/HorizontalMainForm.Designer.cs | 4 +--- KancolleSniffer/Forms/VerticalMainForm.Designer.cs | 3 +-- KancolleSniffer/View/MainWindow/MissionPanel.cs | 16 ++++++++-------- KancolleSniffer/View/MainWindow/NDockPanel.cs | 17 +++++++++-------- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/KancolleSniffer/Forms/HorizontalMainForm.Designer.cs b/KancolleSniffer/Forms/HorizontalMainForm.Designer.cs index 5ff5982..f1221b2 100644 --- a/KancolleSniffer/Forms/HorizontalMainForm.Designer.cs +++ b/KancolleSniffer/Forms/HorizontalMainForm.Designer.cs @@ -184,7 +184,6 @@ namespace KancolleSniffer.Forms // ndockPanel // this.ndockPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.ndockPanel.Cursor = System.Windows.Forms.Cursors.Hand; this.ndockPanel.Location = new System.Drawing.Point(458, 87); this.ndockPanel.Name = "ndockPanel"; this.ndockPanel.Size = new System.Drawing.Size(140, 64); @@ -193,7 +192,6 @@ namespace KancolleSniffer.Forms // missionPanel // this.missionPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.missionPanel.Cursor = System.Windows.Forms.Cursors.Hand; this.missionPanel.Location = new System.Drawing.Point(458, 20); this.missionPanel.Name = "missionPanel"; this.missionPanel.Size = new System.Drawing.Size(220, 49); @@ -234,7 +232,7 @@ namespace KancolleSniffer.Forms this.dropDownButtonMaterialHistory.TabIndex = 80; this.dropDownButtonMaterialHistory.Text = "dropDownButton1"; // - // mainFleetPanel + // fleetPanel // this.fleetPanel.Context = null; this.fleetPanel.Location = new System.Drawing.Point(232, 3); diff --git a/KancolleSniffer/Forms/VerticalMainForm.Designer.cs b/KancolleSniffer/Forms/VerticalMainForm.Designer.cs index faaf35a..1851a30 100644 --- a/KancolleSniffer/Forms/VerticalMainForm.Designer.cs +++ b/KancolleSniffer/Forms/VerticalMainForm.Designer.cs @@ -184,7 +184,6 @@ namespace KancolleSniffer.Forms // ndockPanel // this.ndockPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.ndockPanel.Cursor = System.Windows.Forms.Cursors.Hand; this.ndockPanel.Location = new System.Drawing.Point(6, 208); this.ndockPanel.Name = "ndockPanel"; this.ndockPanel.Size = new System.Drawing.Size(140, 64); @@ -234,7 +233,7 @@ namespace KancolleSniffer.Forms this.dropDownButtonMaterialHistory.TabIndex = 80; this.dropDownButtonMaterialHistory.Text = "dropDownButton1"; // - // mainFleetPanel + // fleetPanel // this.fleetPanel.Context = null; this.fleetPanel.Location = new System.Drawing.Point(6, 42); diff --git a/KancolleSniffer/View/MainWindow/MissionPanel.cs b/KancolleSniffer/View/MainWindow/MissionPanel.cs index b915da6..ff5f0bc 100644 --- a/KancolleSniffer/View/MainWindow/MissionPanel.cs +++ b/KancolleSniffer/View/MainWindow/MissionPanel.cs @@ -13,6 +13,7 @@ // limitations under the License. using System; +using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Windows.Forms; @@ -72,8 +73,9 @@ namespace KancolleSniffer.View.MainWindow }; } Controls.AddRange(_labels.SelectMany(l => new Control[] {l.Number, l.Params, l.Timer, l.Name}).ToArray()); - SetCursor(); - SetClickHandler(); + var timers = _labels.Select(l => l.Timer).ToArray(); + SetCursor(timers); + SetClickHandler(timers); } public void SetClickHandler(Label caption) @@ -82,17 +84,15 @@ namespace KancolleSniffer.View.MainWindow _caption = caption; } - private void SetCursor() + private void SetCursor(IEnumerable controls) { - Cursor = Cursors.Hand; - foreach (Control control in Controls) + foreach (var control in controls) control.Cursor = Cursors.Hand; } - private void SetClickHandler() + private void SetClickHandler(IEnumerable controls) { - Click += ClickHandler; - foreach (Control control in Controls) + foreach (var control in controls) control.Click += ClickHandler; } diff --git a/KancolleSniffer/View/MainWindow/NDockPanel.cs b/KancolleSniffer/View/MainWindow/NDockPanel.cs index e72c138..cd88247 100644 --- a/KancolleSniffer/View/MainWindow/NDockPanel.cs +++ b/KancolleSniffer/View/MainWindow/NDockPanel.cs @@ -13,6 +13,8 @@ // limitations under the License. using System; +using System.Collections; +using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Windows.Forms; @@ -63,8 +65,9 @@ namespace KancolleSniffer.View.MainWindow }; } Controls.AddRange(_labels.SelectMany(l => new Control[] {l.Number, l.Name, l.Timer}).ToArray()); - SetCursor(); - SetClickHandler(); + var timers = _labels.Select(l => l.Timer).ToArray(); + SetCursor(timers); + SetClickHandler(timers); } public void SetClickHandler(Label caption) @@ -73,17 +76,15 @@ namespace KancolleSniffer.View.MainWindow _caption = caption; } - private void SetCursor() + private void SetCursor(IEnumerable controls) { - Cursor = Cursors.Hand; - foreach (Control control in Controls) + foreach (var control in controls) control.Cursor = Cursors.Hand; } - private void SetClickHandler() + private void SetClickHandler(IEnumerable controls) { - Click += ClickHandler; - foreach (Control control in Controls) + foreach (var control in controls) control.Click += ClickHandler; } -- 2.11.0