From 1ccb9d12c3d920463c0d77036a3c3d0c579c7e5a Mon Sep 17 00:00:00 2001 From: Kazuhiro Fujieda Date: Wed, 6 May 2020 14:24:34 +0900 Subject: [PATCH] =?utf8?q?=E3=83=A1=E3=82=A4=E3=83=B3=E3=81=AE=E7=B8=A6?= =?utf8?q?=E9=95=B7=E3=81=A8=E6=A8=AA=E9=95=B7=E3=82=92=E8=A8=AD=E5=AE=9A?= =?utf8?q?=E3=81=A7=E9=81=B8=E6=8A=9E=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88?= =?utf8?q?=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- KancolleSniffer/Config.cs | 1 + KancolleSniffer/Forms/ConfigDialog.Designer.cs | 39 ++++++++++++++++++++++++++ KancolleSniffer/Forms/ConfigDialog.cs | 2 ++ KancolleSniffer/Main.cs | 2 +- 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/KancolleSniffer/Config.cs b/KancolleSniffer/Config.cs index df215ac..7f09eb1 100644 --- a/KancolleSniffer/Config.cs +++ b/KancolleSniffer/Config.cs @@ -220,6 +220,7 @@ namespace KancolleSniffer public bool HideOnMinimized { get; set; } public bool ExitSilently { get; set; } public int Zoom { get; set; } = 100; + public string Shape { get; set; } = "縦長"; public int QuestLines { get; set; } = 6; public bool SaveLocationPerMachine { get; set; } public List LocationList { get; set; } = new List(); diff --git a/KancolleSniffer/Forms/ConfigDialog.Designer.cs b/KancolleSniffer/Forms/ConfigDialog.Designer.cs index 5f7d50f..da7f172 100644 --- a/KancolleSniffer/Forms/ConfigDialog.Designer.cs +++ b/KancolleSniffer/Forms/ConfigDialog.Designer.cs @@ -139,6 +139,9 @@ namespace KancolleSniffer.Forms this.openSoundFileDialog = new System.Windows.Forms.OpenFileDialog(); this.folderBrowserDialogOutputDir = new System.Windows.Forms.FolderBrowserDialog(); this.openDebugLogDialog = new System.Windows.Forms.OpenFileDialog(); + this.label19 = new System.Windows.Forms.Label(); + this.comboBoxShape = new System.Windows.Forms.ComboBox(); + this.label20 = new System.Windows.Forms.Label(); this.tabControl.SuspendLayout(); this.tabPageWindow.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownQuest)).BeginInit(); @@ -184,6 +187,9 @@ namespace KancolleSniffer.Forms // // tabPageWindow // + this.tabPageWindow.Controls.Add(this.label20); + this.tabPageWindow.Controls.Add(this.comboBoxShape); + this.tabPageWindow.Controls.Add(this.label19); this.tabPageWindow.Controls.Add(this.label18); this.tabPageWindow.Controls.Add(this.label17); this.tabPageWindow.Controls.Add(this.label8); @@ -1190,6 +1196,36 @@ namespace KancolleSniffer.Forms this.openDebugLogDialog.CheckFileExists = false; this.openDebugLogDialog.Title = "ログファイルの選択"; // + // label19 + // + this.label19.AutoSize = true; + this.label19.Location = new System.Drawing.Point(125, 100); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(17, 12); + this.label19.TabIndex = 13; + this.label19.Text = "形"; + // + // comboBoxShape + // + this.comboBoxShape.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxShape.FormattingEnabled = true; + this.comboBoxShape.Items.AddRange(new object[] { + "縦長", + "横長"}); + this.comboBoxShape.Location = new System.Drawing.Point(145, 97); + this.comboBoxShape.Name = "comboBoxShape"; + this.comboBoxShape.Size = new System.Drawing.Size(64, 20); + this.comboBoxShape.TabIndex = 14; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(210, 98); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(11, 12); + this.label20.TabIndex = 15; + this.label20.Text = "*"; + // // ConfigDialog // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -1343,5 +1379,8 @@ namespace KancolleSniffer.Forms private System.Windows.Forms.Label label18; private System.Windows.Forms.CheckBox checkBoxWarnBadDamageWithDamecon; private System.Windows.Forms.CheckBox checkBoxAutoBattleResult; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.ComboBox comboBoxShape; + private System.Windows.Forms.Label label19; } } \ No newline at end of file diff --git a/KancolleSniffer/Forms/ConfigDialog.cs b/KancolleSniffer/Forms/ConfigDialog.cs index b82c5c0..0821a07 100644 --- a/KancolleSniffer/Forms/ConfigDialog.cs +++ b/KancolleSniffer/Forms/ConfigDialog.cs @@ -74,6 +74,7 @@ namespace KancolleSniffer.Forms checkBoxExitSilently.Checked = _config.ExitSilently; checkBoxLocationPerMachine.Checked = _config.SaveLocationPerMachine; comboBoxZoom.SelectedItem = _config.Zoom + "%"; + comboBoxShape.SelectedItem = _config.Shape; numericUpDownQuest.Value = _config.QuestLines; checkBoxFlash.Checked = (_config.NotificationFlags & NotificationType.FlashWindow) != 0; @@ -161,6 +162,7 @@ namespace KancolleSniffer.Forms _config.ExitSilently = checkBoxExitSilently.Checked; _config.SaveLocationPerMachine = checkBoxLocationPerMachine.Checked; _config.Zoom = int.Parse(comboBoxZoom.SelectedItem.ToString().Substring(0, 3)); + _config.Shape = (string)comboBoxShape.SelectedItem; _config.QuestLines = (int)numericUpDownQuest.Value; _config.NotificationFlags = (checkBoxFlash.Checked ? NotificationType.FlashWindow : 0) | (checkBoxBalloon.Checked ? NotificationType.ShowBaloonTip : 0) | diff --git a/KancolleSniffer/Main.cs b/KancolleSniffer/Main.cs index ba85d11..2c40aca 100644 --- a/KancolleSniffer/Main.cs +++ b/KancolleSniffer/Main.cs @@ -44,7 +44,7 @@ namespace KancolleSniffer { Config.Load(); _configDialog = new ConfigDialog(this); - var form = new HorizontalMainForm(); + var form = Config.Shape == "横長" ? (Form)new HorizontalMainForm() : new VerticalMainForm(); _form = form; _mainBehavior = new MainWindow(this, form); _proxyManager = new ProxyManager(_form, Config); -- 2.11.0