OSDN Git Service

横長のメインウィンドウの左右を入れ替えた横長2を追加する
authorKazuhiro Fujieda <fujieda@users.osdn.me>
Fri, 28 Aug 2020 13:29:46 +0000 (22:29 +0900)
committerKazuhiro Fujieda <fujieda@users.osdn.me>
Sun, 30 Aug 2020 05:58:24 +0000 (14:58 +0900)
KancolleSniffer/Forms/ConfigDialog.Designer.cs
KancolleSniffer/Forms/HorizontalMainForm.Designer.cs
KancolleSniffer/Forms/VerticalMainForm.Designer.cs
KancolleSniffer/Main.cs
KancolleSniffer/MainWindow.cs

index da7f172..e6ad1e7 100644 (file)
@@ -44,6 +44,9 @@ namespace KancolleSniffer.Forms
         {\r
             this.tabControl = new System.Windows.Forms.TabControl();\r
             this.tabPageWindow = new System.Windows.Forms.TabPage();\r
+            this.label20 = new System.Windows.Forms.Label();\r
+            this.comboBoxShape = new System.Windows.Forms.ComboBox();\r
+            this.label19 = new System.Windows.Forms.Label();\r
             this.label18 = new System.Windows.Forms.Label();\r
             this.label17 = new System.Windows.Forms.Label();\r
             this.label8 = new System.Windows.Forms.Label();\r
@@ -139,9 +142,6 @@ 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
@@ -209,6 +209,37 @@ namespace KancolleSniffer.Forms
             this.tabPageWindow.Text = "ウィンドウ";\r
             this.tabPageWindow.UseVisualStyleBackColor = true;\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
+            // 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
+            "横長1",\r
+            "横長2"});\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
+            // 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
             // label18\r
             // \r
             this.label18.AutoSize = true;\r
@@ -1196,36 +1227,6 @@ 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
index f1221b2..4fa2503 100644 (file)
@@ -49,8 +49,8 @@ namespace KancolleSniffer.Forms
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HorizontalMainForm));\r
             this.labelAkashiRepairTimer = new System.Windows.Forms.Label();\r
             this.labelNDockCaption = new System.Windows.Forms.Label();\r
-            this.labelConstruct = new System.Windows.Forms.Label();\r
-            this.labelQuest = new System.Windows.Forms.Label();\r
+            this.labelKDockCaption = new System.Windows.Forms.Label();\r
+            this.labelQuestCaption = new System.Windows.Forms.Label();\r
             this.labelMissionCaption = new System.Windows.Forms.Label();\r
             this.notifyIconMain = new System.Windows.Forms.NotifyIcon(this.components);\r
             this.labelMaterialCaption = new System.Windows.Forms.Label();\r
@@ -86,23 +86,23 @@ namespace KancolleSniffer.Forms
             this.labelNDockCaption.TabIndex = 3;\r
             this.labelNDockCaption.Text = "入渠";\r
             // \r
-            // labelConstruct\r
+            // labelKDockCaption\r
             // \r
-            this.labelConstruct.AutoSize = true;\r
-            this.labelConstruct.Location = new System.Drawing.Point(603, 73);\r
-            this.labelConstruct.Name = "labelConstruct";\r
-            this.labelConstruct.Size = new System.Drawing.Size(29, 12);\r
-            this.labelConstruct.TabIndex = 6;\r
-            this.labelConstruct.Text = "建造";\r
+            this.labelKDockCaption.AutoSize = true;\r
+            this.labelKDockCaption.Location = new System.Drawing.Point(603, 73);\r
+            this.labelKDockCaption.Name = "labelKDockCaption";\r
+            this.labelKDockCaption.Size = new System.Drawing.Size(29, 12);\r
+            this.labelKDockCaption.TabIndex = 6;\r
+            this.labelKDockCaption.Text = "建造";\r
             // \r
-            // labelQuest\r
+            // labelQuestCaption\r
             // \r
-            this.labelQuest.AutoSize = true;\r
-            this.labelQuest.Location = new System.Drawing.Point(8, 43);\r
-            this.labelQuest.Name = "labelQuest";\r
-            this.labelQuest.Size = new System.Drawing.Size(29, 12);\r
-            this.labelQuest.TabIndex = 8;\r
-            this.labelQuest.Text = "任務";\r
+            this.labelQuestCaption.AutoSize = true;\r
+            this.labelQuestCaption.Location = new System.Drawing.Point(8, 43);\r
+            this.labelQuestCaption.Name = "labelQuestCaption";\r
+            this.labelQuestCaption.Size = new System.Drawing.Size(29, 12);\r
+            this.labelQuestCaption.TabIndex = 8;\r
+            this.labelQuestCaption.Text = "任務";\r
             // \r
             // labelMissionCaption\r
             // \r
@@ -261,8 +261,8 @@ namespace KancolleSniffer.Forms
             this.Controls.Add(this.dropDownButtonRepairList);\r
             this.Controls.Add(this.labelRepairListCaption);\r
             this.Controls.Add(this.labelMaterialCaption);\r
-            this.Controls.Add(this.labelQuest);\r
-            this.Controls.Add(this.labelConstruct);\r
+            this.Controls.Add(this.labelQuestCaption);\r
+            this.Controls.Add(this.labelKDockCaption);\r
             this.Controls.Add(this.labelNDockCaption);\r
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\r
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
@@ -276,8 +276,8 @@ namespace KancolleSniffer.Forms
 \r
         #endregion\r
         private System.Windows.Forms.Label labelNDockCaption;\r
-        private System.Windows.Forms.Label labelConstruct;\r
-        private System.Windows.Forms.Label labelQuest;\r
+        private System.Windows.Forms.Label labelKDockCaption;\r
+        private System.Windows.Forms.Label labelQuestCaption;\r
         private System.Windows.Forms.Label labelMissionCaption;\r
         private System.Windows.Forms.NotifyIcon notifyIconMain;\r
         private System.Windows.Forms.Label labelMaterialCaption;\r
index 1851a30..07f1e83 100644 (file)
@@ -49,8 +49,8 @@ namespace KancolleSniffer.Forms
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VerticalMainForm));\r
             this.labelAkashiRepairTimer = new System.Windows.Forms.Label();\r
             this.labelNDockCaption = new System.Windows.Forms.Label();\r
-            this.labelConstruct = new System.Windows.Forms.Label();\r
-            this.labelQuest = new System.Windows.Forms.Label();\r
+            this.labelKDockCaption = new System.Windows.Forms.Label();\r
+            this.labelQuestCaption = new System.Windows.Forms.Label();\r
             this.labelMissionCaption = new System.Windows.Forms.Label();\r
             this.notifyIconMain = new System.Windows.Forms.NotifyIcon(this.components);\r
             this.labelMaterialCaption = new System.Windows.Forms.Label();\r
@@ -86,23 +86,23 @@ namespace KancolleSniffer.Forms
             this.labelNDockCaption.TabIndex = 3;\r
             this.labelNDockCaption.Text = "入渠";\r
             // \r
-            // labelConstruct\r
+            // labelKDockCaption\r
             // \r
-            this.labelConstruct.AutoSize = true;\r
-            this.labelConstruct.Location = new System.Drawing.Point(151, 194);\r
-            this.labelConstruct.Name = "labelConstruct";\r
-            this.labelConstruct.Size = new System.Drawing.Size(29, 12);\r
-            this.labelConstruct.TabIndex = 6;\r
-            this.labelConstruct.Text = "建造";\r
+            this.labelKDockCaption.AutoSize = true;\r
+            this.labelKDockCaption.Location = new System.Drawing.Point(151, 194);\r
+            this.labelKDockCaption.Name = "labelKDockCaption";\r
+            this.labelKDockCaption.Size = new System.Drawing.Size(29, 12);\r
+            this.labelKDockCaption.TabIndex = 6;\r
+            this.labelKDockCaption.Text = "建造";\r
             // \r
-            // labelQuest\r
+            // labelQuestCaption\r
             // \r
-            this.labelQuest.AutoSize = true;\r
-            this.labelQuest.Location = new System.Drawing.Point(8, 341);\r
-            this.labelQuest.Name = "labelQuest";\r
-            this.labelQuest.Size = new System.Drawing.Size(29, 12);\r
-            this.labelQuest.TabIndex = 8;\r
-            this.labelQuest.Text = "任務";\r
+            this.labelQuestCaption.AutoSize = true;\r
+            this.labelQuestCaption.Location = new System.Drawing.Point(8, 341);\r
+            this.labelQuestCaption.Name = "labelQuestCaption";\r
+            this.labelQuestCaption.Size = new System.Drawing.Size(29, 12);\r
+            this.labelQuestCaption.TabIndex = 8;\r
+            this.labelQuestCaption.Text = "任務";\r
             // \r
             // labelMissionCaption\r
             // \r
@@ -262,8 +262,8 @@ namespace KancolleSniffer.Forms
             this.Controls.Add(this.labelRepairListCaption);\r
             this.Controls.Add(this.labelMaterialCaption);\r
             this.Controls.Add(this.labelMissionCaption);\r
-            this.Controls.Add(this.labelQuest);\r
-            this.Controls.Add(this.labelConstruct);\r
+            this.Controls.Add(this.labelQuestCaption);\r
+            this.Controls.Add(this.labelKDockCaption);\r
             this.Controls.Add(this.labelNDockCaption);\r
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\r
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
@@ -277,8 +277,8 @@ namespace KancolleSniffer.Forms
 \r
         #endregion\r
         private System.Windows.Forms.Label labelNDockCaption;\r
-        private System.Windows.Forms.Label labelConstruct;\r
-        private System.Windows.Forms.Label labelQuest;\r
+        private System.Windows.Forms.Label labelKDockCaption;\r
+        private System.Windows.Forms.Label labelQuestCaption;\r
         private System.Windows.Forms.Label labelMissionCaption;\r
         private System.Windows.Forms.NotifyIcon notifyIconMain;\r
         private System.Windows.Forms.Label labelMaterialCaption;\r
index 2c40aca..d9ce30d 100644 (file)
@@ -44,7 +44,7 @@ namespace KancolleSniffer
         {\r
             Config.Load();\r
             _configDialog = new ConfigDialog(this);\r
-            var form = Config.Shape == "横長" ? (Form)new HorizontalMainForm() : new VerticalMainForm();\r
+            var form = Config.Shape.StartsWith("横長") ? (Form)new HorizontalMainForm() : new VerticalMainForm();\r
             _form = form;\r
             _mainBehavior = new MainWindow(this, form);\r
             _proxyManager = new ProxyManager(_form, Config);\r
index cdef84b..81aa9ad 100644 (file)
@@ -40,12 +40,14 @@ namespace KancolleSniffer
             public FleetPanel fleetPanel { get; set; }\r
             public Label labelNDockCaption { get; set; }\r
             public NDockPanel ndockPanel { get; set; }\r
+            public Label labelKDockCaption { get; set; }\r
             public KDockPanel kdockPanel { get; set; }\r
             public Label labelMissionCaption { get; set; }\r
             public MissionPanel missionPanel { get; set; }\r
             public Label labelMaterialCaption { get; set; }\r
             public DropDownButton dropDownButtonMaterialHistory { get; set; }\r
             public MaterialHistoryPanel materialHistoryPanel { get; set; }\r
+            public Label labelQuestCaption { get; set; }\r
             public Label labelQuestCount { get; set; }\r
             public QuestPanel questPanel { get; set; }\r
             public Label labelAkashiRepair { get; set; }\r
@@ -92,6 +94,8 @@ namespace KancolleSniffer
         private void SetupView()\r
         {\r
             SetScaleFactorOfDpiScaling();\r
+            if (Config.Shape == "横長2")\r
+                ChangeHorizontalLayout();\r
             SetupQuestPanel();\r
             SetEventHandlers();\r
             _c.fleetPanel.AkashiRepairTimer = _c.labelAkashiRepairTimer;\r
@@ -104,6 +108,28 @@ namespace KancolleSniffer
             PerformZoom();\r
         }\r
 \r
+        private void ChangeHorizontalLayout()\r
+        {\r
+            var diff = _c.missionPanel.Left - _c.hqPanel.Left;\r
+            foreach (var control in new Control[]\r
+            {\r
+                _c.hqPanel, _c.questPanel, _c.labelQuestCaption, _c.labelQuestCount, _c.materialHistoryPanel,\r
+                _c.dropDownButtonMaterialHistory, _c.labelMaterialCaption\r
+            })\r
+            {\r
+                control.Left += diff;\r
+            }\r
+            foreach (var control in new Control[]\r
+            {\r
+                _c.missionPanel, _c.labelMissionCaption, _c.labelRepairListCaption, _c.panelRepairList,\r
+                _c.dropDownButtonRepairList, _c.labelAkashiRepair, _c.labelAkashiRepairTimer,\r
+                _c.ndockPanel, _c.labelNDockCaption, _c.kdockPanel, _c.labelKDockCaption\r
+            })\r
+            {\r
+                control.Left -= diff;\r
+            }\r
+        }\r
+\r
         private void SetEventHandlers()\r
         {\r
             SetMainFormEventHandler();\r