OSDN Git Service

メインの縦長と横長を設定で選択できるようにする
authorKazuhiro Fujieda <fujieda@users.osdn.me>
Wed, 6 May 2020 05:24:34 +0000 (14:24 +0900)
committerKazuhiro Fujieda <fujieda@users.osdn.me>
Sun, 30 Aug 2020 05:58:23 +0000 (14:58 +0900)
KancolleSniffer/Config.cs
KancolleSniffer/Forms/ConfigDialog.Designer.cs
KancolleSniffer/Forms/ConfigDialog.cs
KancolleSniffer/Main.cs

index df215ac..7f09eb1 100644 (file)
@@ -220,6 +220,7 @@ namespace KancolleSniffer
         public bool HideOnMinimized { get; set; }\r
         public bool ExitSilently { get; set; }\r
         public int Zoom { get; set; } = 100;\r
+        public string Shape { get; set; } = "縦長";\r
         public int QuestLines { get; set; } = 6;\r
         public bool SaveLocationPerMachine { get; set; }\r
         public List<LocationPerMachine> LocationList { get; set; } = new List<LocationPerMachine>();\r
index 5f7d50f..da7f172 100644 (file)
@@ -139,6 +139,9 @@ namespace KancolleSniffer.Forms
             this.openSoundFileDialog = new System.Windows.Forms.OpenFileDialog();\r
             this.folderBrowserDialogOutputDir = new System.Windows.Forms.FolderBrowserDialog();\r
             this.openDebugLogDialog = new System.Windows.Forms.OpenFileDialog();\r
+            this.label19 = new System.Windows.Forms.Label();\r
+            this.comboBoxShape = new System.Windows.Forms.ComboBox();\r
+            this.label20 = new System.Windows.Forms.Label();\r
             this.tabControl.SuspendLayout();\r
             this.tabPageWindow.SuspendLayout();\r
             ((System.ComponentModel.ISupportInitialize)(this.numericUpDownQuest)).BeginInit();\r
@@ -184,6 +187,9 @@ namespace KancolleSniffer.Forms
             // \r
             // tabPageWindow\r
             // \r
+            this.tabPageWindow.Controls.Add(this.label20);\r
+            this.tabPageWindow.Controls.Add(this.comboBoxShape);\r
+            this.tabPageWindow.Controls.Add(this.label19);\r
             this.tabPageWindow.Controls.Add(this.label18);\r
             this.tabPageWindow.Controls.Add(this.label17);\r
             this.tabPageWindow.Controls.Add(this.label8);\r
@@ -1190,6 +1196,36 @@ namespace KancolleSniffer.Forms
             this.openDebugLogDialog.CheckFileExists = false;\r
             this.openDebugLogDialog.Title = "ログファイルの選択";\r
             // \r
+            // label19\r
+            // \r
+            this.label19.AutoSize = true;\r
+            this.label19.Location = new System.Drawing.Point(125, 100);\r
+            this.label19.Name = "label19";\r
+            this.label19.Size = new System.Drawing.Size(17, 12);\r
+            this.label19.TabIndex = 13;\r
+            this.label19.Text = "形";\r
+            // \r
+            // comboBoxShape\r
+            // \r
+            this.comboBoxShape.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.comboBoxShape.FormattingEnabled = true;\r
+            this.comboBoxShape.Items.AddRange(new object[] {\r
+            "縦長",\r
+            "横長"});\r
+            this.comboBoxShape.Location = new System.Drawing.Point(145, 97);\r
+            this.comboBoxShape.Name = "comboBoxShape";\r
+            this.comboBoxShape.Size = new System.Drawing.Size(64, 20);\r
+            this.comboBoxShape.TabIndex = 14;\r
+            // \r
+            // label20\r
+            // \r
+            this.label20.AutoSize = true;\r
+            this.label20.Location = new System.Drawing.Point(210, 98);\r
+            this.label20.Name = "label20";\r
+            this.label20.Size = new System.Drawing.Size(11, 12);\r
+            this.label20.TabIndex = 15;\r
+            this.label20.Text = "*";\r
+            // \r
             // ConfigDialog\r
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\r
@@ -1343,5 +1379,8 @@ namespace KancolleSniffer.Forms
         private System.Windows.Forms.Label label18;\r
         private System.Windows.Forms.CheckBox checkBoxWarnBadDamageWithDamecon;\r
         private System.Windows.Forms.CheckBox checkBoxAutoBattleResult;\r
+        private System.Windows.Forms.Label label20;\r
+        private System.Windows.Forms.ComboBox comboBoxShape;\r
+        private System.Windows.Forms.Label label19;\r
     }\r
 }
\ No newline at end of file
index b82c5c0..0821a07 100644 (file)
@@ -74,6 +74,7 @@ namespace KancolleSniffer.Forms
             checkBoxExitSilently.Checked = _config.ExitSilently;\r
             checkBoxLocationPerMachine.Checked = _config.SaveLocationPerMachine;\r
             comboBoxZoom.SelectedItem = _config.Zoom + "%";\r
+            comboBoxShape.SelectedItem = _config.Shape;\r
             numericUpDownQuest.Value = _config.QuestLines;\r
 \r
             checkBoxFlash.Checked = (_config.NotificationFlags & NotificationType.FlashWindow) != 0;\r
@@ -161,6 +162,7 @@ namespace KancolleSniffer.Forms
             _config.ExitSilently = checkBoxExitSilently.Checked;\r
             _config.SaveLocationPerMachine = checkBoxLocationPerMachine.Checked;\r
             _config.Zoom = int.Parse(comboBoxZoom.SelectedItem.ToString().Substring(0, 3));\r
+            _config.Shape = (string)comboBoxShape.SelectedItem;\r
             _config.QuestLines = (int)numericUpDownQuest.Value;\r
             _config.NotificationFlags = (checkBoxFlash.Checked ? NotificationType.FlashWindow : 0) |\r
                                         (checkBoxBalloon.Checked ? NotificationType.ShowBaloonTip : 0) |\r
index ba85d11..2c40aca 100644 (file)
@@ -44,7 +44,7 @@ namespace KancolleSniffer
         {\r
             Config.Load();\r
             _configDialog = new ConfigDialog(this);\r
-            var form = new HorizontalMainForm();\r
+            var form = Config.Shape == "横長" ? (Form)new HorizontalMainForm() : new VerticalMainForm();\r
             _form = form;\r
             _mainBehavior = new MainWindow(this, form);\r
             _proxyManager = new ProxyManager(_form, Config);\r