From bc53b52ca44240e6f3bd78201ac892e7070893b2 Mon Sep 17 00:00:00 2001 From: Kazuhiro Fujieda Date: Sun, 18 Feb 2018 17:04:49 +0900 Subject: [PATCH] =?utf8?q?=E3=83=A1=E3=82=A4=E3=83=B3=E3=82=A6=E3=82=A3?= =?utf8?q?=E3=83=B3=E3=83=89=E3=82=A6=E3=81=AB7=E9=9A=BB=E7=B7=A8=E6=88=90?= =?utf8?q?=E3=82=84=E9=80=A3=E5=90=88=E8=89=A6=E9=9A=8A=E3=81=8C=E8=A1=A8?= =?utf8?q?=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84=E3=81=93=E3=81=A8?= =?utf8?q?=E3=81=8C=E3=81=82=E3=82=8B=E3=81=AE=E3=82=92=E7=9B=B4=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- KancolleSniffer/MainForm.Designer.cs | 1 + KancolleSniffer/MainForm.cs | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/KancolleSniffer/MainForm.Designer.cs b/KancolleSniffer/MainForm.Designer.cs index 4417612..4659665 100644 --- a/KancolleSniffer/MainForm.Designer.cs +++ b/KancolleSniffer/MainForm.Designer.cs @@ -1445,6 +1445,7 @@ namespace KancolleSniffer this.Text = "KancolleSniffer"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); this.Load += new System.EventHandler(this.MainForm_Load); + this.Shown += new System.EventHandler(this.MainForm_Shown); this.Resize += new System.EventHandler(this.MainForm_Resize); this.panelHeadquarters.ResumeLayout(false); this.panelHeadquarters.PerformLayout(); diff --git a/KancolleSniffer/MainForm.cs b/KancolleSniffer/MainForm.cs index 18fd894..73e6d58 100644 --- a/KancolleSniffer/MainForm.cs +++ b/KancolleSniffer/MainForm.cs @@ -94,6 +94,19 @@ namespace KancolleSniffer _sniffer.RepeatingTimerController = new RepeatingTimerController(_notificationManager, _config); } + /// + /// パネルのz-orderがくるうのを避ける + /// https://stackoverflow.com/a/5777090/1429506 + /// + private void MainForm_Shown(object sender, EventArgs e) + { + // ReSharper disable once NotAccessedVariable + IntPtr handle; + foreach (var panel in new[] {panelShipInfo, panel7Ships, panelCombinedFleet}) + // ReSharper disable once RedundantAssignment + handle = panel.Handle; + } + private class RepeatingTimerController : Sniffer.IRepeatingTimerController { private readonly NotificationManager _manager; -- 2.11.0