Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel PIs #640

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/MoBi.Assets/MoBi.Assets.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OSPSuite.Assets" Version="10.0.368" />
<PackageReference Include="OSPSuite.Assets.Images" Version="10.0.368" />
<PackageReference Include="OSPSuite.Core" Version="10.0.368" />
<PackageReference Include="OSPSuite.Assets" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.Assets.Images" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.Core" Version="10.0.371-rsgvdwow" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/MoBi.BatchTool/MoBi.BatchTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OSPSuite.Core" Version="10.0.368" />
<PackageReference Include="OSPSuite.Core" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.DevExpress" Version="20.1.6" />
<PackageReference Include="OSPSuite.FuncParser" Version="4.0.0.50" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModel" Version="4.0.0.45" GeneratePathProperty="true" />
Expand Down
14 changes: 7 additions & 7 deletions src/MoBi.Core/MoBi.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
<PackageReference Include="FluentNHibernate" Version="2.1.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="OSPSuite.Utility" Version="4.0.0.4" />
<PackageReference Include="OSPSuite.Core" Version="10.0.368" />
<PackageReference Include="OSPSuite.Assets" Version="10.0.368" />
<PackageReference Include="OSPSuite.Assets.Images" Version="10.0.368" />
<PackageReference Include="OSPSuite.Infrastructure.Export" Version="10.0.368" />
<PackageReference Include="OSPSuite.Infrastructure.Reporting" Version="10.0.368" />
<PackageReference Include="OSPSuite.Infrastructure.Serialization" Version="10.0.368" />
<PackageReference Include="OSPSuite.Infrastructure.Import" Version="10.0.368" />
<PackageReference Include="OSPSuite.Core" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.Assets" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.Assets.Images" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.Infrastructure.Export" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.Infrastructure.Reporting" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.Infrastructure.Serialization" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.Infrastructure.Import" Version="10.0.371-rsgvdwow" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions src/MoBi.Engine/MoBi.Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OSPSuite.Core" Version="10.0.368" />
<PackageReference Include="OSPSuite.Assets" Version="10.0.368" />
<PackageReference Include="OSPSuite.Core" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.Assets" Version="10.0.371-rsgvdwow" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/MoBi.Presentation/MoBi.Presentation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
<PackageReference Include="Northwoods.GoWin" Version="5.2.0" />
<PackageReference Include="OSPSuite.TeXReporting" Version="3.0.0.4" />
<PackageReference Include="OSPSuite.Utility" Version="4.0.0.4" />
<PackageReference Include="OSPSuite.Presentation" Version="10.0.368" />
<PackageReference Include="OSPSuite.Presentation" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.Presentation.Importer" Version="10.0.92" />
<PackageReference Include="OSPSuite.Presentation.Serialization" Version="10.0.368" />
<PackageReference Include="OSPSuite.Presentation.Serialization" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.TeXReporting" Version="3.0.0.4" />
<PackageReference Include="OSPSuite.Utility" Version="4.0.0.4" />
<PackageReference Include="OSPSuite.Core" Version="10.0.368" />
<PackageReference Include="OSPSuite.Core" Version="10.0.371-rsgvdwow" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\LICENSE">
Expand Down
15 changes: 13 additions & 2 deletions src/MoBi.Presentation/Presenter/Main/MenuAndToolBarPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using OSPSuite.Presentation.Views;
using OSPSuite.Assets;
using OSPSuite.Presentation.Presenters.Events;
using System.Collections.Generic;

namespace MoBi.Presentation.Presenter.Main
{
Expand Down Expand Up @@ -58,15 +59,19 @@ public class MenuAndToolBarPresenter : AbstractMenuAndToolBarPresenter, IMenuAnd
private readonly ICache<Type, string> _dynamicRibbonPageCache = new Cache<Type, string>(t => string.Empty);
private bool _parameterIdentificationRunning;
private bool _sensitivityRunning;
private IList<string> _activePIs = new List<string>();
private string _currentlyActivePI;
private readonly IEventPublisher _eventPublisher;

public MenuAndToolBarPresenter(IMenuAndToolBarView view, IMenuBarItemRepository menuBarItemRepository,
IButtonGroupRepository buttonGroupRepository, IMRUProvider mruProvider, ISkinManager skinManager, IMoBiContext context)
IButtonGroupRepository buttonGroupRepository, IMRUProvider mruProvider, ISkinManager skinManager, IMoBiContext context, IEventPublisher eventPublisher)
: base(view, menuBarItemRepository, mruProvider)
{
_skinManager = skinManager;
_context = context;
_menuBarItemRepository = menuBarItemRepository;
_buttonGroupRepository = buttonGroupRepository;
_eventPublisher = eventPublisher;
}

protected override void AddRibbonPages()
Expand Down Expand Up @@ -350,18 +355,24 @@ private bool enableJournalItems

public void Visit(ParameterIdentification parameterIdentification)
{
_currentlyActivePI = parameterIdentification.Id;
_parameterIdentificationRunning = _activePIs.Contains(parameterIdentification.Id);
updateParameterIdentifcationItems(parameterIdentification);
_eventPublisher.PublishEvent(new ParameterIdentificationSelectedEvent(parameterIdentification));
}

public void Handle(ParameterIdentificationStartedEvent parameterIdentificationEvent)
{
_activePIs.Add(parameterIdentificationEvent.ParameterIdentification.Id);
_parameterIdentificationRunning = true;
updateParameterIdentifcationItems(parameterIdentificationEvent.ParameterIdentification);
}

public void Handle(ParameterIdentificationTerminatedEvent parameterIdentificationEvent)
{
_parameterIdentificationRunning = false;
_activePIs.Remove(parameterIdentificationEvent.ParameterIdentification.Id);
if (parameterIdentificationEvent.ParameterIdentification.Id == _currentlyActivePI)
_parameterIdentificationRunning = false;
updateParameterIdentifcationItems(parameterIdentificationEvent.ParameterIdentification);
}

Expand Down
10 changes: 5 additions & 5 deletions src/MoBi.UI/MoBi.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
<PackageReference Include="OSPSuite.DataBinding.DevExpress" Version="5.0.0.1" />
<PackageReference Include="OSPSuite.DevExpress" Version="20.1.6" />
<PackageReference Include="OSPSuite.Utility" Version="4.0.0.4" />
<PackageReference Include="OSPSuite.Infrastructure" Version="10.0.368" />
<PackageReference Include="OSPSuite.Infrastructure.Castle" Version="10.0.368" />
<PackageReference Include="OSPSuite.Presentation" Version="10.0.368" />
<PackageReference Include="OSPSuite.UI" Version="10.0.368" />
<PackageReference Include="OSPSuite.Infrastructure" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.Infrastructure.Castle" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.Presentation" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.UI" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.UI.Importer" Version="10.0.92" />
<PackageReference Include="OSPSuite.Utility" Version="4.0.0.4" />
<PackageReference Include="OSPSuite.Core" Version="10.0.368" />
<PackageReference Include="OSPSuite.Core" Version="10.0.371-rsgvdwow" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\LICENSE">
Expand Down
4 changes: 2 additions & 2 deletions src/MoBi/MoBi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OSPSuite.Core" Version="10.0.368" />
<PackageReference Include="OSPSuite.Core" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.DevExpress" Version="20.1.6" />
<PackageReference Include="OSPSuite.FuncParser" Version="4.0.0.50" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModel" Version="4.0.0.45" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModelSolver_CVODES" Version="4.1.0.8" GeneratePathProperty="true" />
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.112" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.Presentation" Version="10.0.368" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.Presentation" Version="10.0.371-rsgvdwow" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.TeXReporting" Version="3.0.0.4" GeneratePathProperty="true" />

</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions tests/MoBi.Tests/MoBi.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="OSPSuite.BDDHelper" Version="4.0.0.1" />
<PackageReference Include="OSPSuite.Core" Version="10.0.368" />
<PackageReference Include="OSPSuite.Infrastructure" Version="10.0.368" />
<PackageReference Include="OSPSuite.Infrastructure.Castle" Version="10.0.368" />
<PackageReference Include="OSPSuite.UI" Version="10.0.368" />
<PackageReference Include="OSPSuite.Core" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.Infrastructure" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.Infrastructure.Castle" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.UI" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.FuncParser" Version="4.0.0.50" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModel" Version="4.0.0.45" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModelSolver_CVODES" Version="4.1.0.8" GeneratePathProperty="true" />
Expand Down
4 changes: 2 additions & 2 deletions tests/MoBi.UI.Tests/MoBi.UI.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="OSPSuite.BDDHelper" Version="4.0.0.1" />
<PackageReference Include="OSPSuite.Core" Version="10.0.368" />
<PackageReference Include="OSPSuite.UI" Version="10.0.368" />
<PackageReference Include="OSPSuite.Core" Version="10.0.371-rsgvdwow" />
<PackageReference Include="OSPSuite.UI" Version="10.0.371-rsgvdwow" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\MoBi.Core\MoBi.Core.csproj" />
Expand Down