Skip to content

Commit b91a8a6

Browse files
Merge branch 'darya-main' of git://github.com/MrsSima/REAL.NET
2 parents cbabe87 + d6fc384 commit b91a8a6

25 files changed

+190
-698
lines changed

src/AirSim/View/MainWindow.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private void InitAndLaunchPlugins()
7777
var libs = new PluginLauncher<PluginConfig>();
7878
const string folder = "../../../plugins/SamplePlugin/bin";
7979
var dirs = new List<string>(System.IO.Directory.GetDirectories(folder));
80-
var config = new PluginConfig(this.model, null, null, this.Console, null);
80+
var config = new PluginConfig(this.model, null, null, this.Console, null, null);
8181
foreach (var dir in dirs)
8282
{
8383
libs.LaunchPlugins(dir, config);

src/EditorPluginInterfaces/EditorPluginInterfaces.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
</CodeAnalysisRuleSet>
4646
</PropertyGroup>
4747
<ItemGroup>
48+
<Reference Include="PresentationFramework" />
4849
<Reference Include="System" />
4950
<Reference Include="System.Core" />
5051
<Reference Include="System.Xml.Linq" />

src/EditorPluginInterfaces/ElementEventArgs.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,7 @@ public class ElementEventArgs : EventArgs
2525
/// Element.
2626
/// </summary>
2727
public Repo.IElement Element { get; set; }
28+
29+
public bool IsAllowed { get; set; }
2830
}
2931
}

src/EditorPluginInterfaces/IModel.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ namespace EditorPluginInterfaces
2121
/// </summary>
2222
public interface IModel
2323
{
24+
/// <summary>
25+
/// Model name.
26+
/// </summary>
27+
string ModelName { get; set; }
28+
2429
/// <summary>
2530
/// New vertex was added into a model.
2631
/// </summary>

src/EditorPluginInterfaces/PluginConfig.cs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
namespace EditorPluginInterfaces
1616
{
17+
using System;
18+
using System.Windows.Controls;
1719
using Toolbar;
1820

1921
/// <summary>
@@ -46,6 +48,26 @@ public class PluginConfig
4648
/// </summary>
4749
public IPalette Palette { get; }
4850

51+
/// <summary>
52+
/// Main window's left panel area
53+
/// </summary>
54+
public Grid LeftPanelGrid { get; }
55+
56+
/// <summary>
57+
/// Allows plugin to subscribe to the model change.
58+
/// </summary>
59+
public Action<String> OnMainModelChanged;
60+
61+
/// <summary>
62+
/// Allows plugin to remove model selector from the editor.
63+
/// </summary>
64+
public Action<bool> ChangeSelectorVisibility;
65+
66+
/// <summary>
67+
/// Allows plugin to change model in the editor.
68+
/// </summary>
69+
public Action<string> ChangeModel;
70+
4971
/// <summary>
5072
/// Initializes a new instance of <see cref="PluginConfig"/>
5173
/// </summary>
@@ -55,13 +77,14 @@ public class PluginConfig
5577
/// <param name="toolbar">Toolbar</param>
5678
/// <param name="console">Console</param>
5779
/// <param name="palette">Palette</param>
58-
public PluginConfig(IModel model, IScene scene, IToolbar toolbar, IConsole console, IPalette palette)
80+
public PluginConfig(IModel model, IScene scene, IToolbar toolbar, IConsole console, IPalette palette, Grid leftPanelGrid)
5981
{
6082
this.Model = model;
6183
this.Scene = scene;
6284
this.Toolbar = toolbar;
6385
this.Console = console;
6486
this.Palette = palette;
87+
this.LeftPanelGrid = leftPanelGrid;
6588
}
6689
}
6790
}

src/Repo/Repo.fsproj

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,13 @@
102102
<Compile Include="FacadeLayer\Repo.fs" />
103103
<Compile Include="RepoFactory.fs" />
104104
<Content Include="app.config" />
105+
<Content Include="packages.config" />
105106
</ItemGroup>
106107
<ItemGroup>
107108
<Reference Include="mscorlib" />
109+
<Reference Include="Newtonsoft.Json">
110+
<HintPath>..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
111+
</Reference>
108112
<Reference Include="System" />
109113
<Reference Include="System.Core" />
110114
<Reference Include="System.IO.Compression" />
@@ -122,14 +126,6 @@
122126
</When>
123127
</Choose>
124128
<Choose>
125-
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'">
126-
<ItemGroup>
127-
<Reference Include="Newtonsoft.Json">
128-
<HintPath>..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll</HintPath>
129-
<Private>True</Private>
130-
<Paket>True</Paket>
131-
</Reference>
132-
</ItemGroup>
133-
</When>
129+
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.1'" />
134130
</Choose>
135131
</Project>

src/WpfControlsLib/Constraints/ConstraintItem.cs

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/WpfControlsLib/Constraints/Constraints.cs

Lines changed: 0 additions & 120 deletions
This file was deleted.

src/WpfControlsLib/Constraints/ConstraintsValues.cs

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)