Skip to content

Commit

Permalink
Include missing tests in pcl/net45 version
Browse files Browse the repository at this point in the history
Make ControlColorsSection compile in pcl mode
  • Loading branch information
cwensley committed Oct 20, 2014
1 parent 8f2751a commit 9d0575e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Source/Eto.Test/Eto.Test/Eto.Test - Pcl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@
<Compile Include="UnitTests\Handlers\TestPanelHandler.cs" />
<Compile Include="UnitTests\Handlers\TestWindowHandler.cs" />
<Compile Include="UnitTests\Drawing\BitmapTests.cs" />
<Compile Include="Sections\Controls\ControlColorsSection.cs" />
<Compile Include="Sections\Controls\LinkButtonSection.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="TestIcon.ico" />
Expand Down
12 changes: 10 additions & 2 deletions Source/Eto.Test/Eto.Test/Sections/Controls/ControlColorsSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ public class ControlColorsSection : AllControlsBase
protected override Control CreateOptions()
{
var foregroundPicker = new ColorPicker();
foregroundPicker.ValueChanged += (sender, e) => foregroundUpdates.ForEach(r => r(foregroundPicker.Value));
foregroundPicker.ValueChanged += (sender, e) =>
{
foreach (var update in foregroundUpdates)
update(foregroundPicker.Value);
};

var backgroundPicker = new ColorPicker();
backgroundPicker.ValueChanged += (sender, e) => backgroundUpdates.ForEach(r => r(backgroundPicker.Value));
backgroundPicker.ValueChanged += (sender, e) =>
{
foreach (var update in backgroundUpdates)
update(backgroundPicker.Value);
};

var formColorPicker = new ColorPicker { Value = BackgroundColor };
formColorPicker.ValueChanged += (sender, e) => BackgroundColor = formColorPicker.Value;
Expand Down

0 comments on commit 9d0575e

Please sign in to comment.