From: Kazuhiro Fujieda Date: Fri, 28 Aug 2020 13:29:46 +0000 (+0900) Subject: 横長のメインウィンドウの左右を入れ替えた横長2を追加する X-Git-Tag: v12.0~3 X-Git-Url: http://git.osdn.net/view?p=kancollesniffer%2FKancolleSniffer.git;a=commitdiff_plain;h=6365edc60880eb0d4c72ebcce2d5da01ca43ae73 横長のメインウィンドウの左右を入れ替えた横長2を追加する --- diff --git a/KancolleSniffer/Forms/ConfigDialog.Designer.cs b/KancolleSniffer/Forms/ConfigDialog.Designer.cs index da7f172..e6ad1e7 100644 --- a/KancolleSniffer/Forms/ConfigDialog.Designer.cs +++ b/KancolleSniffer/Forms/ConfigDialog.Designer.cs @@ -44,6 +44,9 @@ namespace KancolleSniffer.Forms { this.tabControl = new System.Windows.Forms.TabControl(); this.tabPageWindow = new System.Windows.Forms.TabPage(); + this.label20 = new System.Windows.Forms.Label(); + this.comboBoxShape = new System.Windows.Forms.ComboBox(); + this.label19 = new System.Windows.Forms.Label(); this.label18 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); @@ -139,9 +142,6 @@ 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(); @@ -209,6 +209,37 @@ namespace KancolleSniffer.Forms this.tabPageWindow.Text = "ウィンドウ"; this.tabPageWindow.UseVisualStyleBackColor = true; // + // 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 = "*"; + // + // comboBoxShape + // + this.comboBoxShape.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxShape.FormattingEnabled = true; + this.comboBoxShape.Items.AddRange(new object[] { + "縦長", + "横長1", + "横長2"}); + 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; + // + // 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 = "å½¢"; + // // label18 // this.label18.AutoSize = true; @@ -1196,36 +1227,6 @@ 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); diff --git a/KancolleSniffer/Forms/HorizontalMainForm.Designer.cs b/KancolleSniffer/Forms/HorizontalMainForm.Designer.cs index f1221b2..4fa2503 100644 --- a/KancolleSniffer/Forms/HorizontalMainForm.Designer.cs +++ b/KancolleSniffer/Forms/HorizontalMainForm.Designer.cs @@ -49,8 +49,8 @@ namespace KancolleSniffer.Forms System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HorizontalMainForm)); this.labelAkashiRepairTimer = new System.Windows.Forms.Label(); this.labelNDockCaption = new System.Windows.Forms.Label(); - this.labelConstruct = new System.Windows.Forms.Label(); - this.labelQuest = new System.Windows.Forms.Label(); + this.labelKDockCaption = new System.Windows.Forms.Label(); + this.labelQuestCaption = new System.Windows.Forms.Label(); this.labelMissionCaption = new System.Windows.Forms.Label(); this.notifyIconMain = new System.Windows.Forms.NotifyIcon(this.components); this.labelMaterialCaption = new System.Windows.Forms.Label(); @@ -86,23 +86,23 @@ namespace KancolleSniffer.Forms this.labelNDockCaption.TabIndex = 3; this.labelNDockCaption.Text = "入渠"; // - // labelConstruct + // labelKDockCaption // - this.labelConstruct.AutoSize = true; - this.labelConstruct.Location = new System.Drawing.Point(603, 73); - this.labelConstruct.Name = "labelConstruct"; - this.labelConstruct.Size = new System.Drawing.Size(29, 12); - this.labelConstruct.TabIndex = 6; - this.labelConstruct.Text = "建造"; + this.labelKDockCaption.AutoSize = true; + this.labelKDockCaption.Location = new System.Drawing.Point(603, 73); + this.labelKDockCaption.Name = "labelKDockCaption"; + this.labelKDockCaption.Size = new System.Drawing.Size(29, 12); + this.labelKDockCaption.TabIndex = 6; + this.labelKDockCaption.Text = "建造"; // - // labelQuest + // labelQuestCaption // - this.labelQuest.AutoSize = true; - this.labelQuest.Location = new System.Drawing.Point(8, 43); - this.labelQuest.Name = "labelQuest"; - this.labelQuest.Size = new System.Drawing.Size(29, 12); - this.labelQuest.TabIndex = 8; - this.labelQuest.Text = "任務"; + this.labelQuestCaption.AutoSize = true; + this.labelQuestCaption.Location = new System.Drawing.Point(8, 43); + this.labelQuestCaption.Name = "labelQuestCaption"; + this.labelQuestCaption.Size = new System.Drawing.Size(29, 12); + this.labelQuestCaption.TabIndex = 8; + this.labelQuestCaption.Text = "任務"; // // labelMissionCaption // @@ -261,8 +261,8 @@ namespace KancolleSniffer.Forms this.Controls.Add(this.dropDownButtonRepairList); this.Controls.Add(this.labelRepairListCaption); this.Controls.Add(this.labelMaterialCaption); - this.Controls.Add(this.labelQuest); - this.Controls.Add(this.labelConstruct); + this.Controls.Add(this.labelQuestCaption); + this.Controls.Add(this.labelKDockCaption); this.Controls.Add(this.labelNDockCaption); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); @@ -276,8 +276,8 @@ namespace KancolleSniffer.Forms #endregion private System.Windows.Forms.Label labelNDockCaption; - private System.Windows.Forms.Label labelConstruct; - private System.Windows.Forms.Label labelQuest; + private System.Windows.Forms.Label labelKDockCaption; + private System.Windows.Forms.Label labelQuestCaption; private System.Windows.Forms.Label labelMissionCaption; private System.Windows.Forms.NotifyIcon notifyIconMain; private System.Windows.Forms.Label labelMaterialCaption; diff --git a/KancolleSniffer/Forms/VerticalMainForm.Designer.cs b/KancolleSniffer/Forms/VerticalMainForm.Designer.cs index 1851a30..07f1e83 100644 --- a/KancolleSniffer/Forms/VerticalMainForm.Designer.cs +++ b/KancolleSniffer/Forms/VerticalMainForm.Designer.cs @@ -49,8 +49,8 @@ namespace KancolleSniffer.Forms System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VerticalMainForm)); this.labelAkashiRepairTimer = new System.Windows.Forms.Label(); this.labelNDockCaption = new System.Windows.Forms.Label(); - this.labelConstruct = new System.Windows.Forms.Label(); - this.labelQuest = new System.Windows.Forms.Label(); + this.labelKDockCaption = new System.Windows.Forms.Label(); + this.labelQuestCaption = new System.Windows.Forms.Label(); this.labelMissionCaption = new System.Windows.Forms.Label(); this.notifyIconMain = new System.Windows.Forms.NotifyIcon(this.components); this.labelMaterialCaption = new System.Windows.Forms.Label(); @@ -86,23 +86,23 @@ namespace KancolleSniffer.Forms this.labelNDockCaption.TabIndex = 3; this.labelNDockCaption.Text = "入渠"; // - // labelConstruct + // labelKDockCaption // - this.labelConstruct.AutoSize = true; - this.labelConstruct.Location = new System.Drawing.Point(151, 194); - this.labelConstruct.Name = "labelConstruct"; - this.labelConstruct.Size = new System.Drawing.Size(29, 12); - this.labelConstruct.TabIndex = 6; - this.labelConstruct.Text = "建造"; + this.labelKDockCaption.AutoSize = true; + this.labelKDockCaption.Location = new System.Drawing.Point(151, 194); + this.labelKDockCaption.Name = "labelKDockCaption"; + this.labelKDockCaption.Size = new System.Drawing.Size(29, 12); + this.labelKDockCaption.TabIndex = 6; + this.labelKDockCaption.Text = "建造"; // - // labelQuest + // labelQuestCaption // - this.labelQuest.AutoSize = true; - this.labelQuest.Location = new System.Drawing.Point(8, 341); - this.labelQuest.Name = "labelQuest"; - this.labelQuest.Size = new System.Drawing.Size(29, 12); - this.labelQuest.TabIndex = 8; - this.labelQuest.Text = "任務"; + this.labelQuestCaption.AutoSize = true; + this.labelQuestCaption.Location = new System.Drawing.Point(8, 341); + this.labelQuestCaption.Name = "labelQuestCaption"; + this.labelQuestCaption.Size = new System.Drawing.Size(29, 12); + this.labelQuestCaption.TabIndex = 8; + this.labelQuestCaption.Text = "任務"; // // labelMissionCaption // @@ -262,8 +262,8 @@ namespace KancolleSniffer.Forms this.Controls.Add(this.labelRepairListCaption); this.Controls.Add(this.labelMaterialCaption); this.Controls.Add(this.labelMissionCaption); - this.Controls.Add(this.labelQuest); - this.Controls.Add(this.labelConstruct); + this.Controls.Add(this.labelQuestCaption); + this.Controls.Add(this.labelKDockCaption); this.Controls.Add(this.labelNDockCaption); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); @@ -277,8 +277,8 @@ namespace KancolleSniffer.Forms #endregion private System.Windows.Forms.Label labelNDockCaption; - private System.Windows.Forms.Label labelConstruct; - private System.Windows.Forms.Label labelQuest; + private System.Windows.Forms.Label labelKDockCaption; + private System.Windows.Forms.Label labelQuestCaption; private System.Windows.Forms.Label labelMissionCaption; private System.Windows.Forms.NotifyIcon notifyIconMain; private System.Windows.Forms.Label labelMaterialCaption; diff --git a/KancolleSniffer/Main.cs b/KancolleSniffer/Main.cs index 2c40aca..d9ce30d 100644 --- a/KancolleSniffer/Main.cs +++ b/KancolleSniffer/Main.cs @@ -44,7 +44,7 @@ namespace KancolleSniffer { Config.Load(); _configDialog = new ConfigDialog(this); - var form = Config.Shape == "横長" ? (Form)new HorizontalMainForm() : new VerticalMainForm(); + var form = Config.Shape.StartsWith("横長") ? (Form)new HorizontalMainForm() : new VerticalMainForm(); _form = form; _mainBehavior = new MainWindow(this, form); _proxyManager = new ProxyManager(_form, Config); diff --git a/KancolleSniffer/MainWindow.cs b/KancolleSniffer/MainWindow.cs index cdef84b..81aa9ad 100644 --- a/KancolleSniffer/MainWindow.cs +++ b/KancolleSniffer/MainWindow.cs @@ -40,12 +40,14 @@ namespace KancolleSniffer public FleetPanel fleetPanel { get; set; } public Label labelNDockCaption { get; set; } public NDockPanel ndockPanel { get; set; } + public Label labelKDockCaption { get; set; } public KDockPanel kdockPanel { get; set; } public Label labelMissionCaption { get; set; } public MissionPanel missionPanel { get; set; } public Label labelMaterialCaption { get; set; } public DropDownButton dropDownButtonMaterialHistory { get; set; } public MaterialHistoryPanel materialHistoryPanel { get; set; } + public Label labelQuestCaption { get; set; } public Label labelQuestCount { get; set; } public QuestPanel questPanel { get; set; } public Label labelAkashiRepair { get; set; } @@ -92,6 +94,8 @@ namespace KancolleSniffer private void SetupView() { SetScaleFactorOfDpiScaling(); + if (Config.Shape == "横長2") + ChangeHorizontalLayout(); SetupQuestPanel(); SetEventHandlers(); _c.fleetPanel.AkashiRepairTimer = _c.labelAkashiRepairTimer; @@ -104,6 +108,28 @@ namespace KancolleSniffer PerformZoom(); } + private void ChangeHorizontalLayout() + { + var diff = _c.missionPanel.Left - _c.hqPanel.Left; + foreach (var control in new Control[] + { + _c.hqPanel, _c.questPanel, _c.labelQuestCaption, _c.labelQuestCount, _c.materialHistoryPanel, + _c.dropDownButtonMaterialHistory, _c.labelMaterialCaption + }) + { + control.Left += diff; + } + foreach (var control in new Control[] + { + _c.missionPanel, _c.labelMissionCaption, _c.labelRepairListCaption, _c.panelRepairList, + _c.dropDownButtonRepairList, _c.labelAkashiRepair, _c.labelAkashiRepairTimer, + _c.ndockPanel, _c.labelNDockCaption, _c.kdockPanel, _c.labelKDockCaption + }) + { + control.Left -= diff; + } + } + private void SetEventHandlers() { SetMainFormEventHandler();