OSDN Git Service

メインウィンドウに7隻編成や連合艦隊が表示されないことがあるのを直す
authorKazuhiro Fujieda <fujieda@users.osdn.me>
Sun, 18 Feb 2018 08:04:49 +0000 (17:04 +0900)
committerKazuhiro Fujieda <fujieda@users.osdn.me>
Sun, 18 Feb 2018 08:04:49 +0000 (17:04 +0900)
KancolleSniffer/MainForm.Designer.cs
KancolleSniffer/MainForm.cs

index 4417612..4659665 100644 (file)
@@ -1445,6 +1445,7 @@ namespace KancolleSniffer
             this.Text = "KancolleSniffer";\r
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);\r
             this.Load += new System.EventHandler(this.MainForm_Load);\r
+            this.Shown += new System.EventHandler(this.MainForm_Shown);\r
             this.Resize += new System.EventHandler(this.MainForm_Resize);\r
             this.panelHeadquarters.ResumeLayout(false);\r
             this.panelHeadquarters.PerformLayout();\r
index 18fd894..73e6d58 100644 (file)
@@ -94,6 +94,19 @@ namespace KancolleSniffer
             _sniffer.RepeatingTimerController = new RepeatingTimerController(_notificationManager, _config);\r
         }\r
 \r
+        /// <summary>\r
+        /// パネルのz-orderがくるうのを避ける\r
+        /// https://stackoverflow.com/a/5777090/1429506\r
+        /// </summary>\r
+        private void MainForm_Shown(object sender, EventArgs e)\r
+        {\r
+            // ReSharper disable once NotAccessedVariable\r
+            IntPtr handle;\r
+            foreach (var panel in new[] {panelShipInfo, panel7Ships, panelCombinedFleet})\r
+                // ReSharper disable once RedundantAssignment\r
+                handle = panel.Handle;\r
+        }\r
+\r
         private class RepeatingTimerController : Sniffer.IRepeatingTimerController\r
         {\r
             private readonly NotificationManager _manager;\r