OSDN Git Service

一覧を戦況に自動で切り替えるかを設定可能にする
authorKazuhiro Fujieda <fujieda@users.osdn.me>
Wed, 11 Dec 2019 11:09:33 +0000 (20:09 +0900)
committerKazuhiro Fujieda <fujieda@users.osdn.me>
Sun, 29 Dec 2019 06:20:33 +0000 (15:20 +0900)
KancolleSniffer/Config.cs
KancolleSniffer/ConfigDialog.Designer.cs
KancolleSniffer/ConfigDialog.cs
KancolleSniffer/ListForm.cs

index f7d865d..56d9e9a 100644 (file)
@@ -62,10 +62,11 @@ namespace KancolleSniffer
         public Size Size { get; set; }\r
         public string Mode { get; set; }\r
         public ShipCategory ShipCategories { get; set; } = ShipCategory.All;\r
-        public bool ShipType;\r
+        public bool ShipType { get; set; }\r
         public bool ShowHpInPercent { get; set; }\r
         public ListForm.SortOrder SortOrder { get; set; } = ListForm.SortOrder.ExpToNext;\r
         public List<List<int>> ShipGroup { get; set; }\r
+        public bool AutoBattleResult { get; set; } = true;\r
 \r
         public ShipListConfig()\r
         {\r
index 39e48f8..a71a112 100644 (file)
@@ -71,6 +71,7 @@ namespace KancolleSniffer
             this.checkBoxBalloon = new System.Windows.Forms.CheckBox();\r
             this.checkBoxFlash = new System.Windows.Forms.CheckBox();\r
             this.tabPageAchievement = new System.Windows.Forms.TabPage();\r
+            this.checkBoxAutoBattleResult = new System.Windows.Forms.CheckBox();\r
             this.checkBoxWarnBadDamageWithDamecon = new System.Windows.Forms.CheckBox();\r
             this.checkBoxPresetAkashi = new System.Windows.Forms.CheckBox();\r
             this.groupBox3 = new System.Windows.Forms.GroupBox();\r
@@ -493,6 +494,7 @@ namespace KancolleSniffer
             // \r
             // tabPageAchievement\r
             // \r
+            this.tabPageAchievement.Controls.Add(this.checkBoxAutoBattleResult);\r
             this.tabPageAchievement.Controls.Add(this.checkBoxWarnBadDamageWithDamecon);\r
             this.tabPageAchievement.Controls.Add(this.checkBoxPresetAkashi);\r
             this.tabPageAchievement.Controls.Add(this.groupBox3);\r
@@ -505,24 +507,34 @@ namespace KancolleSniffer
             this.tabPageAchievement.Text = "機能";\r
             this.tabPageAchievement.UseVisualStyleBackColor = true;\r
             // \r
+            // checkBoxAutoBattleResult\r
+            // \r
+            this.checkBoxAutoBattleResult.AutoSize = true;\r
+            this.checkBoxAutoBattleResult.Location = new System.Drawing.Point(143, 134);\r
+            this.checkBoxAutoBattleResult.Name = "checkBoxAutoBattleResult";\r
+            this.checkBoxAutoBattleResult.Size = new System.Drawing.Size(96, 16);\r
+            this.checkBoxAutoBattleResult.TabIndex = 21;\r
+            this.checkBoxAutoBattleResult.Text = "戦況自動切替";\r
+            this.checkBoxAutoBattleResult.UseVisualStyleBackColor = true;\r
+            // \r
             // checkBoxWarnBadDamageWithDamecon\r
             // \r
             this.checkBoxWarnBadDamageWithDamecon.AutoSize = true;\r
-            this.checkBoxWarnBadDamageWithDamecon.Location = new System.Drawing.Point(20, 114);\r
+            this.checkBoxWarnBadDamageWithDamecon.Location = new System.Drawing.Point(20, 112);\r
             this.checkBoxWarnBadDamageWithDamecon.Name = "checkBoxWarnBadDamageWithDamecon";\r
-            this.checkBoxWarnBadDamageWithDamecon.Size = new System.Drawing.Size(168, 16);\r
+            this.checkBoxWarnBadDamageWithDamecon.Size = new System.Drawing.Size(124, 16);\r
             this.checkBoxWarnBadDamageWithDamecon.TabIndex = 20;\r
-            this.checkBoxWarnBadDamageWithDamecon.Text = "ダメコン装備でも大破警告する";\r
+            this.checkBoxWarnBadDamageWithDamecon.Text = "ダメコンあり大破警告";\r
             this.checkBoxWarnBadDamageWithDamecon.UseVisualStyleBackColor = true;\r
             // \r
             // checkBoxPresetAkashi\r
             // \r
             this.checkBoxPresetAkashi.AutoSize = true;\r
-            this.checkBoxPresetAkashi.Location = new System.Drawing.Point(20, 135);\r
+            this.checkBoxPresetAkashi.Location = new System.Drawing.Point(20, 134);\r
             this.checkBoxPresetAkashi.Name = "checkBoxPresetAkashi";\r
-            this.checkBoxPresetAkashi.Size = new System.Drawing.Size(141, 16);\r
+            this.checkBoxPresetAkashi.Size = new System.Drawing.Size(113, 16);\r
             this.checkBoxPresetAkashi.TabIndex = 19;\r
-            this.checkBoxPresetAkashi.Text = "プリセット明石修理を使う";\r
+            this.checkBoxPresetAkashi.Text = "プリセット明石修理";\r
             this.checkBoxPresetAkashi.UseVisualStyleBackColor = true;\r
             // \r
             // groupBox3\r
@@ -1330,5 +1342,6 @@ namespace KancolleSniffer
         private System.Windows.Forms.Label label17;\r
         private System.Windows.Forms.Label label18;\r
         private System.Windows.Forms.CheckBox checkBoxWarnBadDamageWithDamecon;\r
+        private System.Windows.Forms.CheckBox checkBoxAutoBattleResult;\r
     }\r
 }
\ No newline at end of file
index 961de2f..e5644ed 100644 (file)
@@ -94,6 +94,7 @@ namespace KancolleSniffer
             checkBoxNextCell.Checked = (_config.Spoilers & Spoiler.NextCell) != 0;\r
             checkBoxPresetAkashi.Checked = _config.UsePresetAkashi;\r
             checkBoxWarnBadDamageWithDamecon.Checked = _config.WarnBadDamageWithDameCon;\r
+            checkBoxAutoBattleResult.Checked = _config.ShipList.AutoBattleResult;\r
 \r
             numericUpDownSoundVolume.Value = _config.Sounds.Volume;\r
             foreach (var name in Config.NotificationNames)\r
@@ -200,6 +201,7 @@ namespace KancolleSniffer
                                (checkBoxNextCell.Checked ? Spoiler.NextCell : 0);\r
             _config.UsePresetAkashi = checkBoxPresetAkashi.Checked;\r
             _config.WarnBadDamageWithDameCon = checkBoxWarnBadDamageWithDamecon.Checked;\r
+            _config.ShipList.AutoBattleResult = checkBoxAirBattleResult.Checked;\r
 \r
             _config.Sounds.Volume = (int)numericUpDownSoundVolume.Value;\r
             foreach (var name in Config.NotificationNames)\r
index c0fb857..6e4d5b0 100644 (file)
@@ -169,7 +169,8 @@ namespace KancolleSniffer
 \r
         private void MoveToBattleResult()\r
         {\r
-            if (comboBoxGroup.SelectedIndex == BattleResultIndex || _sniffer.InSortie == -1)\r
+            if (!_config.ShipList.AutoBattleResult || comboBoxGroup.SelectedIndex == BattleResultIndex ||\r
+                _sniffer.InSortie == -1)\r
                 return;\r
             _prevSelectedIndex = comboBoxGroup.SelectedIndex;\r
             comboBoxGroup.SelectedIndex = BattleResultIndex;\r