Skip to content

Commit

Permalink
Add SymuForm
Browse files Browse the repository at this point in the history
Refactoring Symu.SymuForm in SymuForm
  • Loading branch information
lmorisse committed May 22, 2020
1 parent 7674f2d commit 2ac6d8c
Show file tree
Hide file tree
Showing 22 changed files with 94 additions and 41 deletions.
4 changes: 2 additions & 2 deletions Symu examples/SymuBeliefsAndInfluence/Home.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
using System.Windows.Forms;
using Symu.Classes.Scenario;
using Symu.Common;
using Symu.Engine.Form;
using Symu.Environment;
using Symu.Repository.Networks.Beliefs;
using SymuBeliefsAndInfluence.Classes;
using SymuForm;
using SymuTools;

#endregion

namespace SymuBeliefsAndInfluence
{
public partial class Home : SymuForm
public partial class Home : BaseForm
{
private readonly ExampleEnvironment _environment = new ExampleEnvironment();
private int _initialTasksDone;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,12 @@
<Project>{28ca606e-49d3-4136-ad3f-6b46eab9be75}</Project>
<Name>SymuTools</Name>
</ProjectReference>
<ProjectReference Include="..\..\Symu source code\SymuForm\SymuForm.csproj">
<Project>{fb0a9519-923e-4a4f-a6ac-dab4c7a03f63}</Project>
<Name>SymuForm</Name>
</ProjectReference>
<ProjectReference Include="..\..\Symu source code\Symu\Symu.csproj">
<Project>{67a5cc91-b376-4d62-be91-7fcbb95df7d8}</Project>
<Project>{bd01bccd-7194-4bd1-8e62-9be1343af2ce}</Project>
<Name>Symu</Name>
</ProjectReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Symu source code\SymuTools\SymuTools.csproj" />
<ProjectReference Include="..\..\Symu source code\Symu\Symu.csproj" />
<ProjectReference Include="..\SymuBeliefsAndInfluence\SymuBeliefsAndInfluence.csproj" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions Symu examples/SymuGroupAndInteraction/Home.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
using Symu.Classes.Agents.Models.CognitiveModel;
using Symu.Classes.Scenario;
using Symu.Common;
using Symu.Engine.Form;
using Symu.Environment;
using Symu.Repository.Networks.Knowledges;
using SymuForm;
using SymuGroupAndInteraction.Classes;

#endregion

namespace SymuGroupAndInteraction
{
public partial class Home : SymuForm
public partial class Home : BaseForm
{
private readonly ExampleEnvironment _environment = new ExampleEnvironment();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,16 @@
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.3.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Symu source code\SymuForm\SymuForm.csproj">
<Project>{fb0a9519-923e-4a4f-a6ac-dab4c7a03f63}</Project>
<Name>SymuForm</Name>
</ProjectReference>
<ProjectReference Include="..\..\Symu source code\SymuTools\SymuTools.csproj">
<Project>{5475a2e5-e10f-46ef-b24e-450d717af7cf}</Project>
<Name>SymuTools</Name>
</ProjectReference>
<ProjectReference Include="..\..\Symu source code\Symu\Symu.csproj">
<Project>{67a5cc91-b376-4d62-be91-7fcbb95df7d8}</Project>
<Project>{bd01bccd-7194-4bd1-8e62-9be1343af2ce}</Project>
<Name>Symu</Name>
</ProjectReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Symu source code\SymuTools\SymuTools.csproj" />
<ProjectReference Include="..\..\Symu source code\Symu\Symu.csproj" />
<ProjectReference Include="..\SymuGroupAndInteraction\SymuGroupAndInteraction.csproj" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions Symu examples/SymuLearnAndForget/Home.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
using Symu.Classes.Agents.Models.CognitiveModel;
using Symu.Classes.Scenario;
using Symu.Common;
using Symu.Engine.Form;
using Symu.Environment;
using Symu.Repository.Networks.Knowledges;
using SymuForm;
using SymuLearnAndForget.Classes;
using static SymuTools.Constants;

#endregion

namespace SymuLearnAndForget
{
public partial class Home : SymuForm
public partial class Home : BaseForm
{
private readonly ExampleEnvironment _environment = new ExampleEnvironment();
private ushort _fullKnowledge;
Expand Down
6 changes: 5 additions & 1 deletion Symu examples/SymuLearnAndForget/SymuLearnAndForget.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,16 @@
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.3.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Symu source code\SymuForm\SymuForm.csproj">
<Project>{fb0a9519-923e-4a4f-a6ac-dab4c7a03f63}</Project>
<Name>SymuForm</Name>
</ProjectReference>
<ProjectReference Include="..\..\Symu source code\SymuTools\SymuTools.csproj">
<Project>{5475a2e5-e10f-46ef-b24e-450d717af7cf}</Project>
<Name>SymuTools</Name>
</ProjectReference>
<ProjectReference Include="..\..\Symu source code\Symu\Symu.csproj">
<Project>{67a5cc91-b376-4d62-be91-7fcbb95df7d8}</Project>
<Project>{bd01bccd-7194-4bd1-8e62-9be1343af2ce}</Project>
<Name>Symu</Name>
</ProjectReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Symu source code\SymuTools\SymuTools.csproj" />
<ProjectReference Include="..\..\Symu source code\Symu\Symu.csproj" />
<ProjectReference Include="..\SymuLearnAndForget\SymuLearnAndForget.csproj" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions Symu examples/SymuMessageAndTask/Home.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
using System.Windows.Forms;
using Symu.Classes.Scenario;
using Symu.Common;
using Symu.Engine.Form;
using Symu.Environment;
using SymuForm;
using SymuMessageAndTask.Classes;

#endregion

namespace SymuMessageAndTask
{
public partial class Home : SymuForm
public partial class Home : BaseForm
{
private readonly ExampleEnvironment _environment = new ExampleEnvironment();

Expand Down
6 changes: 5 additions & 1 deletion Symu examples/SymuMessageAndTask/SymuMessageAndTask.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,16 @@
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.3.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Symu source code\SymuForm\SymuForm.csproj">
<Project>{fb0a9519-923e-4a4f-a6ac-dab4c7a03f63}</Project>
<Name>SymuForm</Name>
</ProjectReference>
<ProjectReference Include="..\..\Symu source code\SymuTools\SymuTools.csproj">
<Project>{5475a2e5-e10f-46ef-b24e-450d717af7cf}</Project>
<Name>SymuTools</Name>
</ProjectReference>
<ProjectReference Include="..\..\Symu source code\Symu\Symu.csproj">
<Project>{67a5cc91-b376-4d62-be91-7fcbb95df7d8}</Project>
<Project>{bd01bccd-7194-4bd1-8e62-9be1343af2ce}</Project>
<Name>Symu</Name>
</ProjectReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Symu source code\SymuTools\SymuTools.csproj" />
<ProjectReference Include="..\..\Symu source code\Symu\Symu.csproj" />
<ProjectReference Include="..\SymuMessageAndTask\SymuMessageAndTask.csproj" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions Symu examples/SymuMurphiesAndBlockers/Home.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
using System.Windows.Forms;
using Symu.Classes.Scenario;
using Symu.Common;
using Symu.Engine.Form;
using Symu.Environment;
using SymuForm;
using SymuMurphiesAndBlockers.Classes;
using SymuTools;

#endregion

namespace SymuMurphiesAndBlockers
{
public partial class Home : SymuForm
public partial class Home : BaseForm
{
private readonly ExampleEnvironment _environment = new ExampleEnvironment();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@
<Project>{28ca606e-49d3-4136-ad3f-6b46eab9be75}</Project>
<Name>SymuTools</Name>
</ProjectReference>
<ProjectReference Include="..\..\Symu source code\SymuForm\SymuForm.csproj">
<Project>{fb0a9519-923e-4a4f-a6ac-dab4c7a03f63}</Project>
<Name>SymuForm</Name>
</ProjectReference>
<ProjectReference Include="..\..\Symu source code\Symu\Symu.csproj">
<Project>{67a5cc91-b376-4d62-be91-7fcbb95df7d8}</Project>
<Project>{bd01bccd-7194-4bd1-8e62-9be1343af2ce}</Project>
<Name>Symu</Name>
</ProjectReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Symu source code\SymuTools\SymuTools.csproj" />
<ProjectReference Include="..\..\Symu source code\Symu\Symu.csproj" />
<ProjectReference Include="..\SymuBeliefsAndInfluence\SymuBeliefsAndInfluence.csproj" />
</ItemGroup>

Expand Down
21 changes: 0 additions & 21 deletions Symu source code/Symu/Symu.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,4 @@
<ProjectReference Include="..\SymuTools\SymuTools.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="System.Windows.Forms">
<HintPath>..\..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Windows.Forms.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<Compile Update="Engine\Form\SymuForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="Engine\Form\SymuForm.Designer.cs">
<DependentUpon>SymuForm.cs</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Engine\Form\SymuForm.resx">
<DependentUpon>SymuForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>

</Project>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@

#endregion

namespace Symu.Engine.Form
namespace SymuForm
{
/// <summary>
/// Symu Engine to use in GUI mode
/// Use SymuEngine in batch mode
/// </summary>
public partial class SymuForm : System.Windows.Forms.Form
public partial class BaseForm : System.Windows.Forms.Form
{
private SymuEnvironment _environment;
private bool _pauseWorker;

public SymuForm()
public BaseForm()
{
InitializeComponent();
}
Expand Down
File renamed without changes.
Binary file not shown.
38 changes: 38 additions & 0 deletions Symu source code/SymuForm/SymuForm.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>SymuForm</AssemblyName>
<RootNamespace>SymuForm</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MathNet.Numerics" Version="4.9.1" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeQuality.Analyzers" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\SymuTools\SymuTools.csproj" />
<ProjectReference Include="..\Symu\Symu.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="System.Windows.Forms">
<HintPath>Resources\System.Windows.Forms.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<Compile Update="BaseForm.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions Symu source code/SymuOrg.sln
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Symu", "Symu\Symu.csproj",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SymuTests", "SymuTests\SymuTests.csproj", "{A2CCA960-1021-4230-9D47-2FF4D0A1E27A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SymuForm", "SymuForm\SymuForm.csproj", "{BEEBE0EF-EABD-4DA6-A57E-9BB7D57F8165}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -45,6 +47,10 @@ Global
{A2CCA960-1021-4230-9D47-2FF4D0A1E27A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2CCA960-1021-4230-9D47-2FF4D0A1E27A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2CCA960-1021-4230-9D47-2FF4D0A1E27A}.Release|Any CPU.Build.0 = Release|Any CPU
{BEEBE0EF-EABD-4DA6-A57E-9BB7D57F8165}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BEEBE0EF-EABD-4DA6-A57E-9BB7D57F8165}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BEEBE0EF-EABD-4DA6-A57E-9BB7D57F8165}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BEEBE0EF-EABD-4DA6-A57E-9BB7D57F8165}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 2ac6d8c

Please sign in to comment.