From 43f88f3a3abe888a8ee6e172cb93dc68b43cc8f6 Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 11 Aug 2022 08:42:39 -0400 Subject: [PATCH 1/2] Update to latest core --- .../PKSim.Assets.Images.csproj | 4 ++-- src/PKSim.Assets/PKSim.Assets.csproj | 4 ++-- src/PKSim.BatchTool/PKSim.BatchTool.csproj | 4 ++-- src/PKSim.CLI.Core/PKSim.CLI.Core.csproj | 4 ++-- src/PKSim.CLI/PKSim.CLI.csproj | 6 +++--- src/PKSim.Core/PKSim.Core.csproj | 8 ++++---- .../Services/GlobalPKAnalysisRunner.cs | 2 +- .../PKSim.Infrastructure.csproj | 18 +++++++++--------- src/PKSim.Matlab/PKSim.Matlab.csproj | 4 ++-- .../PKSim.Presentation.csproj | 6 +++--- src/PKSim.R/PKSim.R.csproj | 4 ++-- .../Extensions/LayoutControlExtensions.cs | 13 ------------- .../Extensions/LayoutControlItemExtensions.cs | 17 +---------------- src/PKSim.UI/PKSim.UI.csproj | 8 ++++---- src/PKSim.UI/UIConstants.cs | 12 ------------ ...dParameterWithDefaultAlternativeBaseView.cs | 2 +- .../Views/Parameters/MultiParameterEditView.cs | 2 +- src/PKSim/PKSim.csproj | 6 +++--- .../PKSim.Matlab.Tests.csproj | 4 ++-- tests/PKSim.R.Tests/PKSim.R.Tests.csproj | 4 ++-- tests/PKSim.Tests/PKSim.Tests.csproj | 4 ++-- tests/PKSim.UI.Starter/PKSim.UI.Starter.csproj | 6 +++--- tests/PKSim.UI.Tests/PKSim.UI.Tests.csproj | 6 +++--- 23 files changed, 54 insertions(+), 94 deletions(-) diff --git a/src/PKSim.Assets.Images/PKSim.Assets.Images.csproj b/src/PKSim.Assets.Images/PKSim.Assets.Images.csproj index 6505504cc..a5df22220 100644 --- a/src/PKSim.Assets.Images/PKSim.Assets.Images.csproj +++ b/src/PKSim.Assets.Images/PKSim.Assets.Images.csproj @@ -26,8 +26,8 @@ - - + + diff --git a/src/PKSim.Assets/PKSim.Assets.csproj b/src/PKSim.Assets/PKSim.Assets.csproj index 95c6c34ea..2cd609e47 100644 --- a/src/PKSim.Assets/PKSim.Assets.csproj +++ b/src/PKSim.Assets/PKSim.Assets.csproj @@ -26,8 +26,8 @@ - - + + diff --git a/src/PKSim.BatchTool/PKSim.BatchTool.csproj b/src/PKSim.BatchTool/PKSim.BatchTool.csproj index c50da2948..514ac20ea 100644 --- a/src/PKSim.BatchTool/PKSim.BatchTool.csproj +++ b/src/PKSim.BatchTool/PKSim.BatchTool.csproj @@ -59,8 +59,8 @@ - - + + diff --git a/src/PKSim.CLI.Core/PKSim.CLI.Core.csproj b/src/PKSim.CLI.Core/PKSim.CLI.Core.csproj index fc76c3478..17ff68d83 100644 --- a/src/PKSim.CLI.Core/PKSim.CLI.Core.csproj +++ b/src/PKSim.CLI.Core/PKSim.CLI.Core.csproj @@ -27,9 +27,9 @@ - + - + diff --git a/src/PKSim.CLI/PKSim.CLI.csproj b/src/PKSim.CLI/PKSim.CLI.csproj index a9bc16669..33b7f464b 100644 --- a/src/PKSim.CLI/PKSim.CLI.csproj +++ b/src/PKSim.CLI/PKSim.CLI.csproj @@ -61,9 +61,9 @@ - - - + + + diff --git a/src/PKSim.Core/PKSim.Core.csproj b/src/PKSim.Core/PKSim.Core.csproj index e9f7e1ae2..85f8bbe1f 100644 --- a/src/PKSim.Core/PKSim.Core.csproj +++ b/src/PKSim.Core/PKSim.Core.csproj @@ -30,10 +30,10 @@ - - - - + + + + diff --git a/src/PKSim.Core/Services/GlobalPKAnalysisRunner.cs b/src/PKSim.Core/Services/GlobalPKAnalysisRunner.cs index 6f303a955..e859ffdab 100644 --- a/src/PKSim.Core/Services/GlobalPKAnalysisRunner.cs +++ b/src/PKSim.Core/Services/GlobalPKAnalysisRunner.cs @@ -6,7 +6,7 @@ namespace PKSim.Core.Services public interface IGlobalPKAnalysisRunner { /// - /// Creates a based on the given for bioavailability calculations and run the simulation + /// Creates a based on the given for bioavailability calculations and run the simulation /// /// Iv protocol that will be used in the created simulation for the /// Base simulation diff --git a/src/PKSim.Infrastructure/PKSim.Infrastructure.csproj b/src/PKSim.Infrastructure/PKSim.Infrastructure.csproj index 5feb1f173..4b132334a 100644 --- a/src/PKSim.Infrastructure/PKSim.Infrastructure.csproj +++ b/src/PKSim.Infrastructure/PKSim.Infrastructure.csproj @@ -41,15 +41,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/src/PKSim.Matlab/PKSim.Matlab.csproj b/src/PKSim.Matlab/PKSim.Matlab.csproj index 215d08f73..ec4f5346e 100644 --- a/src/PKSim.Matlab/PKSim.Matlab.csproj +++ b/src/PKSim.Matlab/PKSim.Matlab.csproj @@ -26,9 +26,9 @@ - + - + diff --git a/src/PKSim.Presentation/PKSim.Presentation.csproj b/src/PKSim.Presentation/PKSim.Presentation.csproj index 2a66ad28d..977dab264 100644 --- a/src/PKSim.Presentation/PKSim.Presentation.csproj +++ b/src/PKSim.Presentation/PKSim.Presentation.csproj @@ -27,11 +27,11 @@ - + - - + + diff --git a/src/PKSim.R/PKSim.R.csproj b/src/PKSim.R/PKSim.R.csproj index 50c2eaf5e..dc40fe1db 100644 --- a/src/PKSim.R/PKSim.R.csproj +++ b/src/PKSim.R/PKSim.R.csproj @@ -49,9 +49,9 @@ - + - + diff --git a/src/PKSim.UI/Extensions/LayoutControlExtensions.cs b/src/PKSim.UI/Extensions/LayoutControlExtensions.cs index 6cef22917..5c127c74e 100644 --- a/src/PKSim.UI/Extensions/LayoutControlExtensions.cs +++ b/src/PKSim.UI/Extensions/LayoutControlExtensions.cs @@ -47,18 +47,5 @@ public static LayoutControlItem AddButtonItemFor(this LayoutControl layoutContro return item; } - - public static void DoInBatch(this LayoutControl layoutControl, Action action) - { - try - { - layoutControl.BeginUpdate(); - action(); - } - finally - { - layoutControl.EndUpdate(); - } - } } } \ No newline at end of file diff --git a/src/PKSim.UI/Extensions/LayoutControlItemExtensions.cs b/src/PKSim.UI/Extensions/LayoutControlItemExtensions.cs index ebc8a3213..10074111e 100644 --- a/src/PKSim.UI/Extensions/LayoutControlItemExtensions.cs +++ b/src/PKSim.UI/Extensions/LayoutControlItemExtensions.cs @@ -28,21 +28,6 @@ public static void FillWith(this LayoutControlItem layoutControlItem, UxBuilding layoutControlItem.SizeConstraintsType = SizeConstraintsType.Custom; layoutControlItem.MinSize = size; layoutControlItem.Size = size; - } - - public static void AdjustGridViewHeight(this LayoutControlItem layoutControlItem, UxGridView gridView, LayoutControl layoutControl) - { - //We infer to see if we need some extra height for view based on scaling. Nothing else works - - var optimalHeight = gridView.OptimalHeight + gridView.RowCount * COMPUTED_EXTRA_HEIGHT; - layoutControlItem.AdjustControlHeight(optimalHeight, layoutControl); - } - - public static void AdjustTablePanelHeight(this LayoutControlItem layoutControlItem, TablePanel tablePanel, LayoutControl layoutControl) - { - var visibleRows = tablePanel.Rows.Where(x => x.Visible).ToList(); - var visibleRowHeight = visibleRows.Sum(x => ScaleForScreenDPI(Convert.ToInt16(x.Height)) + COMPUTED_EXTRA_HEIGHT); - layoutControlItem.AdjustControlHeight(visibleRowHeight, layoutControl); - } + } } } \ No newline at end of file diff --git a/src/PKSim.UI/PKSim.UI.csproj b/src/PKSim.UI/PKSim.UI.csproj index f2472b9fd..9a54e320c 100644 --- a/src/PKSim.UI/PKSim.UI.csproj +++ b/src/PKSim.UI/PKSim.UI.csproj @@ -60,14 +60,14 @@ - + - - - + + + diff --git a/src/PKSim.UI/UIConstants.cs b/src/PKSim.UI/UIConstants.cs index dff2b3887..c1117227d 100644 --- a/src/PKSim.UI/UIConstants.cs +++ b/src/PKSim.UI/UIConstants.cs @@ -46,18 +46,6 @@ public static class Size public static readonly int SIMULATION_COMPOUND_CONFIGURATION_DEFAULT_HEIGHT = ScaleForScreenDPI(280); public static readonly int SIMULATION_COMPOUND_PROCESS_DEFAULT_HEIGHT = ScaleForScreenDPI(250); public static readonly int SIMULATION_COMPOUND_PROTOCOL_DEFAULT_HEIGHT = ScaleForScreenDPI(50); - - public static readonly int COMPUTED_EXTRA_HEIGHT = computedExtraRowHeight(); - - private static int computedExtraRowHeight() - { - //This extra constant seems to be what we need to have perfect height on 200% scaling. - const int extraHeight = 3; - var scaledExtraHeight = ScaleForScreenDPI(extraHeight); - var needExtraHeight = scaledExtraHeight != extraHeight; - //We return the extra row height (not scaled) - return needExtraHeight ? extraHeight : 0; - } } } } \ No newline at end of file diff --git a/src/PKSim.UI/Views/Compounds/CompoundParameterWithDefaultAlternativeBaseView.cs b/src/PKSim.UI/Views/Compounds/CompoundParameterWithDefaultAlternativeBaseView.cs index 4b0c59aac..7ca7ed069 100644 --- a/src/PKSim.UI/Views/Compounds/CompoundParameterWithDefaultAlternativeBaseView.cs +++ b/src/PKSim.UI/Views/Compounds/CompoundParameterWithDefaultAlternativeBaseView.cs @@ -195,7 +195,7 @@ public virtual void AdjustHeight() HeightChanged(this, new ViewResizedEventArgs(OptimalHeight)); } - public virtual int OptimalHeight => _gridView.OptimalHeight + COMPUTED_EXTRA_HEIGHT + layoutItemGrid.Padding.Height; + public virtual int OptimalHeight => _gridView.OptimalHeight + layoutItemGrid.Padding.Height; public virtual void Repaint() { diff --git a/src/PKSim.UI/Views/Parameters/MultiParameterEditView.cs b/src/PKSim.UI/Views/Parameters/MultiParameterEditView.cs index 3afc5233c..8a112ea5b 100644 --- a/src/PKSim.UI/Views/Parameters/MultiParameterEditView.cs +++ b/src/PKSim.UI/Views/Parameters/MultiParameterEditView.cs @@ -312,7 +312,7 @@ public void RefreshData() gridParameters.RefreshDataSource(); } - public int OptimalHeight => gridView.OptimalHeight + Padding.All + 2; + public int OptimalHeight => gridView.OptimalHeight; public bool AllowMultiSelect { diff --git a/src/PKSim/PKSim.csproj b/src/PKSim/PKSim.csproj index d5f8ad13d..da278fcf7 100644 --- a/src/PKSim/PKSim.csproj +++ b/src/PKSim/PKSim.csproj @@ -76,14 +76,14 @@ - - + + - + diff --git a/tests/PKSim.Matlab.Tests/PKSim.Matlab.Tests.csproj b/tests/PKSim.Matlab.Tests/PKSim.Matlab.Tests.csproj index 5d7b6b412..cb49a556f 100644 --- a/tests/PKSim.Matlab.Tests/PKSim.Matlab.Tests.csproj +++ b/tests/PKSim.Matlab.Tests/PKSim.Matlab.Tests.csproj @@ -22,9 +22,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + - + diff --git a/tests/PKSim.R.Tests/PKSim.R.Tests.csproj b/tests/PKSim.R.Tests/PKSim.R.Tests.csproj index dd954f22c..52983e449 100644 --- a/tests/PKSim.R.Tests/PKSim.R.Tests.csproj +++ b/tests/PKSim.R.Tests/PKSim.R.Tests.csproj @@ -22,9 +22,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + - + diff --git a/tests/PKSim.Tests/PKSim.Tests.csproj b/tests/PKSim.Tests/PKSim.Tests.csproj index bd4f7c2c8..3b3c7a60f 100644 --- a/tests/PKSim.Tests/PKSim.Tests.csproj +++ b/tests/PKSim.Tests/PKSim.Tests.csproj @@ -20,9 +20,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + - + diff --git a/tests/PKSim.UI.Starter/PKSim.UI.Starter.csproj b/tests/PKSim.UI.Starter/PKSim.UI.Starter.csproj index 8d0ddf58e..0e9dfc225 100644 --- a/tests/PKSim.UI.Starter/PKSim.UI.Starter.csproj +++ b/tests/PKSim.UI.Starter/PKSim.UI.Starter.csproj @@ -56,14 +56,14 @@ - - + + - + diff --git a/tests/PKSim.UI.Tests/PKSim.UI.Tests.csproj b/tests/PKSim.UI.Tests/PKSim.UI.Tests.csproj index 5044fdf7d..695589f36 100644 --- a/tests/PKSim.UI.Tests/PKSim.UI.Tests.csproj +++ b/tests/PKSim.UI.Tests/PKSim.UI.Tests.csproj @@ -17,10 +17,10 @@ - + - - + + From 93c86c431f15e40183ffdaa28515c71e329d5d8b Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 11 Aug 2022 08:47:01 -0400 Subject: [PATCH 2/2] once again --- .../BuildingBlockSelectionView.Designer.cs | 34 +++++++++---------- .../IndividualMoleculePropertiesView.cs | 1 + 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/PKSim.UI/Views/BuildingBlockSelectionView.Designer.cs b/src/PKSim.UI/Views/BuildingBlockSelectionView.Designer.cs index 8bd091bed..3f1ab1191 100644 --- a/src/PKSim.UI/Views/BuildingBlockSelectionView.Designer.cs +++ b/src/PKSim.UI/Views/BuildingBlockSelectionView.Designer.cs @@ -49,10 +49,9 @@ private void InitializeComponent() // // btnLoadBuildingBlock // - this.btnLoadBuildingBlock.Location = new System.Drawing.Point(475, 2); - this.btnLoadBuildingBlock.Margin = new System.Windows.Forms.Padding(4); + this.btnLoadBuildingBlock.Location = new System.Drawing.Point(407, 2); this.btnLoadBuildingBlock.Name = "btnLoadBuildingBlock"; - this.btnLoadBuildingBlock.Size = new System.Drawing.Size(203, 27); + this.btnLoadBuildingBlock.Size = new System.Drawing.Size(174, 22); this.btnLoadBuildingBlock.StyleController = this.layoutControl; this.btnLoadBuildingBlock.TabIndex = 7; this.btnLoadBuildingBlock.Text = "btnLoadBuildingBlock"; @@ -65,18 +64,18 @@ private void InitializeComponent() this.layoutControl.Controls.Add(this.btnLoadBuildingBlock); this.layoutControl.Dock = System.Windows.Forms.DockStyle.Fill; this.layoutControl.Location = new System.Drawing.Point(0, 0); + this.layoutControl.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.layoutControl.Name = "layoutControl"; this.layoutControl.Root = this.Root; - this.layoutControl.Size = new System.Drawing.Size(680, 36); + this.layoutControl.Size = new System.Drawing.Size(583, 29); this.layoutControl.TabIndex = 2; this.layoutControl.Text = "uxLayoutControl1"; // // btnCreateBuildingBlock // - this.btnCreateBuildingBlock.Location = new System.Drawing.Point(218, 2); - this.btnCreateBuildingBlock.Margin = new System.Windows.Forms.Padding(4); + this.btnCreateBuildingBlock.Location = new System.Drawing.Point(187, 2); this.btnCreateBuildingBlock.Name = "btnCreateBuildingBlock"; - this.btnCreateBuildingBlock.Size = new System.Drawing.Size(253, 27); + this.btnCreateBuildingBlock.Size = new System.Drawing.Size(216, 22); this.btnCreateBuildingBlock.StyleController = this.layoutControl; this.btnCreateBuildingBlock.TabIndex = 5; this.btnCreateBuildingBlock.Text = "btnCreateBuildingBlock"; @@ -91,36 +90,35 @@ private void InitializeComponent() this.layoutItemBuildingBlock}); this.Root.Name = "Root"; this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); - this.Root.Size = new System.Drawing.Size(680, 36); + this.Root.Size = new System.Drawing.Size(583, 29); this.Root.TextVisible = false; // // layoutItemLoad // this.layoutItemLoad.Control = this.btnLoadBuildingBlock; - this.layoutItemLoad.Location = new System.Drawing.Point(473, 0); + this.layoutItemLoad.Location = new System.Drawing.Point(405, 0); this.layoutItemLoad.Name = "layoutItemLoad"; - this.layoutItemLoad.Size = new System.Drawing.Size(207, 36); + this.layoutItemLoad.Size = new System.Drawing.Size(178, 29); this.layoutItemLoad.TextSize = new System.Drawing.Size(0, 0); this.layoutItemLoad.TextVisible = false; // // layoutItemCreate // this.layoutItemCreate.Control = this.btnCreateBuildingBlock; - this.layoutItemCreate.Location = new System.Drawing.Point(216, 0); + this.layoutItemCreate.Location = new System.Drawing.Point(185, 0); this.layoutItemCreate.Name = "layoutItemCreate"; - this.layoutItemCreate.Size = new System.Drawing.Size(257, 36); + this.layoutItemCreate.Size = new System.Drawing.Size(220, 29); this.layoutItemCreate.TextSize = new System.Drawing.Size(0, 0); this.layoutItemCreate.TextVisible = false; // // cbBuildingBlocks // this.cbBuildingBlocks.Location = new System.Drawing.Point(2, 2); - this.cbBuildingBlocks.Margin = new System.Windows.Forms.Padding(4); this.cbBuildingBlocks.Name = "cbBuildingBlocks"; this.cbBuildingBlocks.Properties.AutoHeight = false; this.cbBuildingBlocks.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); - this.cbBuildingBlocks.Size = new System.Drawing.Size(212, 32); + this.cbBuildingBlocks.Size = new System.Drawing.Size(181, 25); this.cbBuildingBlocks.StyleController = this.layoutControl; this.cbBuildingBlocks.TabIndex = 6; // @@ -129,18 +127,18 @@ private void InitializeComponent() this.layoutItemBuildingBlock.Control = this.cbBuildingBlocks; this.layoutItemBuildingBlock.Location = new System.Drawing.Point(0, 0); this.layoutItemBuildingBlock.Name = "layoutItemBuildingBlock"; - this.layoutItemBuildingBlock.Size = new System.Drawing.Size(216, 36); + this.layoutItemBuildingBlock.Size = new System.Drawing.Size(185, 29); this.layoutItemBuildingBlock.TextSize = new System.Drawing.Size(0, 0); this.layoutItemBuildingBlock.TextVisible = false; // // BuildingBlockSelectionView // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 16F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.layoutControl); - this.Margin = new System.Windows.Forms.Padding(5); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.Name = "BuildingBlockSelectionView"; - this.Size = new System.Drawing.Size(680, 36); + this.Size = new System.Drawing.Size(583, 29); ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControl)).EndInit(); this.layoutControl.ResumeLayout(false); diff --git a/src/PKSim.UI/Views/Individuals/IndividualMoleculePropertiesView.cs b/src/PKSim.UI/Views/Individuals/IndividualMoleculePropertiesView.cs index 27c6ca1b2..a47f12da6 100644 --- a/src/PKSim.UI/Views/Individuals/IndividualMoleculePropertiesView.cs +++ b/src/PKSim.UI/Views/Individuals/IndividualMoleculePropertiesView.cs @@ -51,6 +51,7 @@ public override void InitializeResources() { base.InitializeResources(); layoutItemOntogeny.TextVisible = false; + layoutControl.AutoScroll = false; layoutItemMoleculeParameters.TextVisible = false; OntogenyVisible = false; }