コミットメタ情報

リビジョンbb10052910c222a8627e86b0bfd3885e5d23d874 (tree)
日時2017-07-24 19:53:39
作者Kazuhiro Fujieda <fujieda@user...>
コミッターKazuhiro Fujieda

ログメッセージ

閉じるボタンで確認せずに終了できるようにする

変更サマリ

差分

--- a/KancolleSniffer/Config.cs
+++ b/KancolleSniffer/Config.cs
@@ -133,6 +133,7 @@ namespace KancolleSniffer
133133 public Point Location { get; set; } = new Point(int.MinValue, int.MinValue);
134134 public bool TopMost { get; set; }
135135 public bool HideOnMinimized { get; set; }
136+ public bool ExitSilently { get; set; }
136137 public int Zoom { get; set; } = 100;
137138 public bool FlashWindow { get; set; } = true;
138139 public bool ShowBaloonTip { get; set; }
--- a/KancolleSniffer/ConfigDialog.Designer.cs
+++ b/KancolleSniffer/ConfigDialog.Designer.cs
@@ -44,7 +44,7 @@ namespace KancolleSniffer
4444 {
4545 this.components = new System.ComponentModel.Container();
4646 this.tabControl = new System.Windows.Forms.TabControl();
47- this.tabPageShow = new System.Windows.Forms.TabPage();
47+ this.tabPageWindow = new System.Windows.Forms.TabPage();
4848 this.label15 = new System.Windows.Forms.Label();
4949 this.comboBoxZoom = new System.Windows.Forms.ComboBox();
5050 this.label14 = new System.Windows.Forms.Label();
@@ -127,8 +127,9 @@ namespace KancolleSniffer
127127 this.toolTipError = new System.Windows.Forms.ToolTip(this.components);
128128 this.folderBrowserDialogOutputDir = new System.Windows.Forms.FolderBrowserDialog();
129129 this.openDebugLogDialog = new System.Windows.Forms.OpenFileDialog();
130+ this.checkBoxExitSilently = new System.Windows.Forms.CheckBox();
130131 this.tabControl.SuspendLayout();
131- this.tabPageShow.SuspendLayout();
132+ this.tabPageWindow.SuspendLayout();
132133 this.tabPageNotification.SuspendLayout();
133134 ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMarginEquips)).BeginInit();
134135 ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMarginShips)).BeginInit();
@@ -153,7 +154,7 @@ namespace KancolleSniffer
153154 //
154155 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
155156 | System.Windows.Forms.AnchorStyles.Left)));
156- this.tabControl.Controls.Add(this.tabPageShow);
157+ this.tabControl.Controls.Add(this.tabPageWindow);
157158 this.tabControl.Controls.Add(this.tabPageNotification);
158159 this.tabControl.Controls.Add(this.tabPageAchievement);
159160 this.tabControl.Controls.Add(this.tabPageSound);
@@ -169,25 +170,26 @@ namespace KancolleSniffer
169170 this.tabControl.Size = new System.Drawing.Size(264, 202);
170171 this.tabControl.TabIndex = 0;
171172 //
172- // tabPageShow
173- //
174- this.tabPageShow.Controls.Add(this.label15);
175- this.tabPageShow.Controls.Add(this.comboBoxZoom);
176- this.tabPageShow.Controls.Add(this.label14);
177- this.tabPageShow.Controls.Add(this.checkBoxHideOnMinimized);
178- this.tabPageShow.Controls.Add(this.checkBoxTopMost);
179- this.tabPageShow.Location = new System.Drawing.Point(4, 40);
180- this.tabPageShow.Name = "tabPageShow";
181- this.tabPageShow.Padding = new System.Windows.Forms.Padding(8);
182- this.tabPageShow.Size = new System.Drawing.Size(256, 158);
183- this.tabPageShow.TabIndex = 0;
184- this.tabPageShow.Text = "表示";
185- this.tabPageShow.UseVisualStyleBackColor = true;
173+ // tabPageWindow
174+ //
175+ this.tabPageWindow.Controls.Add(this.checkBoxExitSilently);
176+ this.tabPageWindow.Controls.Add(this.label15);
177+ this.tabPageWindow.Controls.Add(this.comboBoxZoom);
178+ this.tabPageWindow.Controls.Add(this.label14);
179+ this.tabPageWindow.Controls.Add(this.checkBoxHideOnMinimized);
180+ this.tabPageWindow.Controls.Add(this.checkBoxTopMost);
181+ this.tabPageWindow.Location = new System.Drawing.Point(4, 40);
182+ this.tabPageWindow.Name = "tabPageWindow";
183+ this.tabPageWindow.Padding = new System.Windows.Forms.Padding(8);
184+ this.tabPageWindow.Size = new System.Drawing.Size(256, 158);
185+ this.tabPageWindow.TabIndex = 0;
186+ this.tabPageWindow.Text = "ウィンドウ";
187+ this.tabPageWindow.UseVisualStyleBackColor = true;
186188 //
187189 // label15
188190 //
189191 this.label15.AutoSize = true;
190- this.label15.Location = new System.Drawing.Point(97, 57);
192+ this.label15.Location = new System.Drawing.Point(99, 79);
191193 this.label15.Name = "label15";
192194 this.label15.Size = new System.Drawing.Size(61, 12);
193195 this.label15.TabIndex = 6;
@@ -201,7 +203,7 @@ namespace KancolleSniffer
201203 "100%",
202204 "125%",
203205 "150%"});
204- this.comboBoxZoom.Location = new System.Drawing.Point(47, 54);
206+ this.comboBoxZoom.Location = new System.Drawing.Point(49, 76);
205207 this.comboBoxZoom.Name = "comboBoxZoom";
206208 this.comboBoxZoom.Size = new System.Drawing.Size(48, 20);
207209 this.comboBoxZoom.TabIndex = 5;
@@ -209,7 +211,7 @@ namespace KancolleSniffer
209211 // label14
210212 //
211213 this.label14.AutoSize = true;
212- this.label14.Location = new System.Drawing.Point(9, 57);
214+ this.label14.Location = new System.Drawing.Point(11, 79);
213215 this.label14.Name = "label14";
214216 this.label14.Size = new System.Drawing.Size(35, 12);
215217 this.label14.TabIndex = 4;
@@ -250,10 +252,10 @@ namespace KancolleSniffer
250252 this.tabPageNotification.Controls.Add(this.checkBoxSound);
251253 this.tabPageNotification.Controls.Add(this.checkBoxBalloon);
252254 this.tabPageNotification.Controls.Add(this.checkBoxFlash);
253- this.tabPageNotification.Location = new System.Drawing.Point(4, 40);
255+ this.tabPageNotification.Location = new System.Drawing.Point(4, 22);
254256 this.tabPageNotification.Name = "tabPageNotification";
255257 this.tabPageNotification.Padding = new System.Windows.Forms.Padding(8);
256- this.tabPageNotification.Size = new System.Drawing.Size(256, 158);
258+ this.tabPageNotification.Size = new System.Drawing.Size(256, 176);
257259 this.tabPageNotification.TabIndex = 1;
258260 this.tabPageNotification.Text = "通知";
259261 this.tabPageNotification.UseVisualStyleBackColor = true;
@@ -397,10 +399,10 @@ namespace KancolleSniffer
397399 this.tabPageAchievement.Controls.Add(this.checkBoxPresetAkashi);
398400 this.tabPageAchievement.Controls.Add(this.groupBox3);
399401 this.tabPageAchievement.Controls.Add(this.groupBox2);
400- this.tabPageAchievement.Location = new System.Drawing.Point(4, 40);
402+ this.tabPageAchievement.Location = new System.Drawing.Point(4, 22);
401403 this.tabPageAchievement.Name = "tabPageAchievement";
402404 this.tabPageAchievement.Padding = new System.Windows.Forms.Padding(8);
403- this.tabPageAchievement.Size = new System.Drawing.Size(256, 158);
405+ this.tabPageAchievement.Size = new System.Drawing.Size(256, 176);
404406 this.tabPageAchievement.TabIndex = 2;
405407 this.tabPageAchievement.Text = "機能";
406408 this.tabPageAchievement.UseVisualStyleBackColor = true;
@@ -500,10 +502,10 @@ namespace KancolleSniffer
500502 this.tabPageSound.Controls.Add(this.textBoxSoundFile);
501503 this.tabPageSound.Controls.Add(this.numericUpDownSoundVolume);
502504 this.tabPageSound.Controls.Add(this.label3);
503- this.tabPageSound.Location = new System.Drawing.Point(4, 40);
505+ this.tabPageSound.Location = new System.Drawing.Point(4, 22);
504506 this.tabPageSound.Name = "tabPageSound";
505507 this.tabPageSound.Padding = new System.Windows.Forms.Padding(8);
506- this.tabPageSound.Size = new System.Drawing.Size(256, 158);
508+ this.tabPageSound.Size = new System.Drawing.Size(256, 176);
507509 this.tabPageSound.TabIndex = 3;
508510 this.tabPageSound.Text = "サウンド";
509511 this.tabPageSound.UseVisualStyleBackColor = true;
@@ -571,12 +573,12 @@ namespace KancolleSniffer
571573 this.tabPageVersion.Controls.Add(this.linkLabelProductName);
572574 this.tabPageVersion.Controls.Add(this.labelVersion);
573575 this.tabPageVersion.Controls.Add(this.labelLatest);
574- this.tabPageVersion.Location = new System.Drawing.Point(4, 40);
576+ this.tabPageVersion.Location = new System.Drawing.Point(4, 22);
575577 this.tabPageVersion.Name = "tabPageVersion";
576578 this.tabPageVersion.Padding = new System.Windows.Forms.Padding(8);
577- this.tabPageVersion.Size = new System.Drawing.Size(256, 158);
579+ this.tabPageVersion.Size = new System.Drawing.Size(256, 176);
578580 this.tabPageVersion.TabIndex = 4;
579- this.tabPageVersion.Text = "バージョン情報";
581+ this.tabPageVersion.Text = "バージョン";
580582 this.tabPageVersion.UseVisualStyleBackColor = true;
581583 //
582584 // richTextBox1
@@ -1024,6 +1026,16 @@ namespace KancolleSniffer
10241026 this.openDebugLogDialog.CheckFileExists = false;
10251027 this.openDebugLogDialog.Title = "ログファイルの選択";
10261028 //
1029+ // checkBoxExitSilently
1030+ //
1031+ this.checkBoxExitSilently.AutoSize = true;
1032+ this.checkBoxExitSilently.Location = new System.Drawing.Point(11, 54);
1033+ this.checkBoxExitSilently.Name = "checkBoxExitSilently";
1034+ this.checkBoxExitSilently.Size = new System.Drawing.Size(189, 16);
1035+ this.checkBoxExitSilently.TabIndex = 7;
1036+ this.checkBoxExitSilently.Text = "閉じるボタンで終了時に確認しない";
1037+ this.checkBoxExitSilently.UseVisualStyleBackColor = true;
1038+ //
10271039 // ConfigDialog
10281040 //
10291041 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -1041,8 +1053,8 @@ namespace KancolleSniffer
10411053 this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ConfigDialog_FormClosing);
10421054 this.Load += new System.EventHandler(this.ConfigDialog_Load);
10431055 this.tabControl.ResumeLayout(false);
1044- this.tabPageShow.ResumeLayout(false);
1045- this.tabPageShow.PerformLayout();
1056+ this.tabPageWindow.ResumeLayout(false);
1057+ this.tabPageWindow.PerformLayout();
10461058 this.tabPageNotification.ResumeLayout(false);
10471059 this.tabPageNotification.PerformLayout();
10481060 ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMarginEquips)).EndInit();
@@ -1080,7 +1092,7 @@ namespace KancolleSniffer
10801092 #endregion
10811093
10821094 private System.Windows.Forms.TabControl tabControl;
1083- private System.Windows.Forms.TabPage tabPageShow;
1095+ private System.Windows.Forms.TabPage tabPageWindow;
10841096 private System.Windows.Forms.TabPage tabPageNotification;
10851097 private System.Windows.Forms.Button buttonCancel;
10861098 private System.Windows.Forms.Button buttonOk;
@@ -1163,5 +1175,6 @@ namespace KancolleSniffer
11631175 private System.Windows.Forms.Label label7;
11641176 private System.Windows.Forms.CheckBox checkBoxPushbulletOn;
11651177 private System.Windows.Forms.Button buttonPushbulletTest;
1178+ private System.Windows.Forms.CheckBox checkBoxExitSilently;
11661179 }
11671180 }
\ No newline at end of file
--- a/KancolleSniffer/ConfigDialog.cs
+++ b/KancolleSniffer/ConfigDialog.cs
@@ -65,6 +65,7 @@ namespace KancolleSniffer
6565
6666 checkBoxTopMost.Checked = _config.TopMost;
6767 checkBoxHideOnMinimized.Checked = _config.HideOnMinimized;
68+ checkBoxExitSilently.Checked = _config.ExitSilently;
6869 comboBoxZoom.SelectedItem = _config.Zoom + "%";
6970
7071 checkBoxFlash.Checked = _config.FlashWindow;
@@ -169,6 +170,7 @@ namespace KancolleSniffer
169170
170171 _config.TopMost = checkBoxTopMost.Checked;
171172 _config.HideOnMinimized = checkBoxHideOnMinimized.Checked;
173+ _config.ExitSilently = checkBoxExitSilently.Checked;
172174 _config.Zoom = int.Parse(comboBoxZoom.SelectedItem.ToString().Substring(0, 3));
173175 _config.FlashWindow = checkBoxFlash.Checked;
174176 _config.ShowBaloonTip = checkBoxBalloon.Checked;
--- a/KancolleSniffer/MainForm.cs
+++ b/KancolleSniffer/MainForm.cs
@@ -188,12 +188,15 @@ namespace KancolleSniffer
188188
189189 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
190190 {
191- using (var dialog = new ConfirmDialog())
191+ if (!_config.ExitSilently)
192192 {
193- if (dialog.ShowDialog(this) != DialogResult.Yes)
193+ using (var dialog = new ConfirmDialog())
194194 {
195- e.Cancel = true;
196- return;
195+ if (dialog.ShowDialog(this) != DialogResult.Yes)
196+ {
197+ e.Cancel = true;
198+ return;
199+ }
197200 }
198201 }
199202 e.Cancel = false;
旧リポジトリブラウザで表示