OSDN Git Service

一覧ウィンドウでコンボボックスにフォーカスが残ることがあるのを直す
authorKazuhiro Fujieda <fujieda@users.osdn.me>
Sat, 10 Dec 2016 13:02:43 +0000 (22:02 +0900)
committerKazuhiro Fujieda <fujieda@users.osdn.me>
Sat, 10 Dec 2016 13:08:01 +0000 (22:08 +0900)
KancolleSniffer/ListForm.Designer.cs
KancolleSniffer/ListForm.cs

index 441a97c..daf6b47 100644 (file)
@@ -45,6 +45,9 @@ namespace KancolleSniffer
             this.components = new System.ComponentModel.Container();\r
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ListForm));\r
             this.panelShipList = new System.Windows.Forms.Panel();\r
+            this.contextMenuStripShipList = new System.Windows.Forms.ContextMenuStrip(this.components);\r
+            this.csvToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.kantaiSarashiToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
             this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);\r
             this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
             this.label1 = new System.Windows.Forms.Label();\r
@@ -69,16 +72,13 @@ namespace KancolleSniffer
             this.contextMenuStripFleetData = new System.Windows.Forms.ContextMenuStrip(this.components);\r
             this.textToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
             this.deckBuilderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.contextMenuStripShipList = new System.Windows.Forms.ContextMenuStrip(this.components);\r
-            this.csvToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.kantaiSarashiToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
             this.equipPanel = new KancolleSniffer.FleetPanel();\r
             this.itemTreeView = new KancolleSniffer.ItemTreeView();\r
+            this.contextMenuStripShipList.SuspendLayout();\r
             this.contextMenuStrip.SuspendLayout();\r
             this.panelGroupHeader.SuspendLayout();\r
             this.panelRepairHeader.SuspendLayout();\r
             this.contextMenuStripFleetData.SuspendLayout();\r
-            this.contextMenuStripShipList.SuspendLayout();\r
             this.SuspendLayout();\r
             // \r
             // panelShipList\r
@@ -93,6 +93,28 @@ namespace KancolleSniffer
             this.panelShipList.Size = new System.Drawing.Size(238, 263);\r
             this.panelShipList.TabIndex = 0;\r
             // \r
+            // contextMenuStripShipList\r
+            // \r
+            this.contextMenuStripShipList.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.csvToolStripMenuItem,\r
+            this.kantaiSarashiToolStripMenuItem});\r
+            this.contextMenuStripShipList.Name = "contextMenuStripShipList";\r
+            this.contextMenuStripShipList.Size = new System.Drawing.Size(215, 48);\r
+            // \r
+            // csvToolStripMenuItem\r
+            // \r
+            this.csvToolStripMenuItem.Name = "csvToolStripMenuItem";\r
+            this.csvToolStripMenuItem.Size = new System.Drawing.Size(214, 22);\r
+            this.csvToolStripMenuItem.Text = "CSV形式でコピー(&C)";\r
+            this.csvToolStripMenuItem.Click += new System.EventHandler(this.csvToolStripMenuItem_Click);\r
+            // \r
+            // kantaiSarashiToolStripMenuItem\r
+            // \r
+            this.kantaiSarashiToolStripMenuItem.Name = "kantaiSarashiToolStripMenuItem";\r
+            this.kantaiSarashiToolStripMenuItem.Size = new System.Drawing.Size(214, 22);\r
+            this.kantaiSarashiToolStripMenuItem.Text = "艦隊晒し形式でコピー(&K)";\r
+            this.kantaiSarashiToolStripMenuItem.Click += new System.EventHandler(this.kantaiSarashiToolStripMenuItem_Click);\r
+            // \r
             // contextMenuStrip\r
             // \r
             this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
@@ -236,6 +258,7 @@ namespace KancolleSniffer
             this.comboBoxGroup.Size = new System.Drawing.Size(48, 20);\r
             this.comboBoxGroup.TabIndex = 1;\r
             this.comboBoxGroup.SelectedIndexChanged += new System.EventHandler(this.comboBoxGroup_SelectedIndexChanged);\r
+            this.comboBoxGroup.DropDownClosed += new System.EventHandler(this.comboBoxGroup_DropDownClosed);\r
             // \r
             // label12\r
             // \r
@@ -325,28 +348,6 @@ namespace KancolleSniffer
             this.deckBuilderToolStripMenuItem.Text = "デッキビルダー形式でコピー(&D)";\r
             this.deckBuilderToolStripMenuItem.Click += new System.EventHandler(this.deckBuilderToolStripMenuItem_Click);\r
             // \r
-            // contextMenuStripShipList\r
-            // \r
-            this.contextMenuStripShipList.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
-            this.csvToolStripMenuItem,\r
-            this.kantaiSarashiToolStripMenuItem});\r
-            this.contextMenuStripShipList.Name = "contextMenuStripShipList";\r
-            this.contextMenuStripShipList.Size = new System.Drawing.Size(215, 48);\r
-            // \r
-            // csvToolStripMenuItem\r
-            // \r
-            this.csvToolStripMenuItem.Name = "csvToolStripMenuItem";\r
-            this.csvToolStripMenuItem.Size = new System.Drawing.Size(214, 22);\r
-            this.csvToolStripMenuItem.Text = "CSV形式でコピー(&C)";\r
-            this.csvToolStripMenuItem.Click += new System.EventHandler(this.csvToolStripMenuItem_Click);\r
-            // \r
-            // kantaiSarashiToolStripMenuItem\r
-            // \r
-            this.kantaiSarashiToolStripMenuItem.Name = "kantaiSarashiToolStripMenuItem";\r
-            this.kantaiSarashiToolStripMenuItem.Size = new System.Drawing.Size(214, 22);\r
-            this.kantaiSarashiToolStripMenuItem.Text = "艦隊晒し形式でコピー(&K)";\r
-            this.kantaiSarashiToolStripMenuItem.Click += new System.EventHandler(this.kantaiSarashiToolStripMenuItem_Click);\r
-            // \r
             // equipPanel\r
             // \r
             this.equipPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \r
@@ -369,7 +370,7 @@ namespace KancolleSniffer
             this.itemTreeView.Size = new System.Drawing.Size(238, 263);\r
             this.itemTreeView.TabIndex = 0;\r
             // \r
-            // ShipListForm\r
+            // ListForm\r
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\r
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
@@ -390,18 +391,18 @@ namespace KancolleSniffer
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
             this.KeyPreview = true;\r
             this.MaximizeBox = false;\r
-            this.Name = "ShipListForm";\r
+            this.Name = "ListForm";\r
             this.Text = "一覧";\r
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ShipListForm_FormClosing);\r
             this.Load += new System.EventHandler(this.ShipListForm_Load);\r
             this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ShipListForm_KeyPress);\r
+            this.contextMenuStripShipList.ResumeLayout(false);\r
             this.contextMenuStrip.ResumeLayout(false);\r
             this.panelGroupHeader.ResumeLayout(false);\r
             this.panelGroupHeader.PerformLayout();\r
             this.panelRepairHeader.ResumeLayout(false);\r
             this.panelRepairHeader.PerformLayout();\r
             this.contextMenuStripFleetData.ResumeLayout(false);\r
-            this.contextMenuStripShipList.ResumeLayout(false);\r
             this.ResumeLayout(false);\r
             this.PerformLayout();\r
 \r
index 64ebd2a..41f4dfb 100644 (file)
@@ -530,6 +530,11 @@ namespace KancolleSniffer
                 _groupSettings[group].Remove(_shipList[idx].Id);\r
         }\r
 \r
+        private void comboBoxGroup_DropDownClosed(object sender, EventArgs e)\r
+        {\r
+            SetActiveControl();\r
+        }\r
+\r
         private void comboBoxGroup_SelectedIndexChanged(object sender, EventArgs e)\r
         {\r
             UpdateList();\r