Compare commits

...

5 Commits

Author SHA1 Message Date
Jason Alborough
ab1008ef70 fix: remove inheritance and keep separate fb in class. 2022-04-29 17:34:20 -04:00
Jason Alborough
9805c91431 fix: include fileIO 2022-04-21 15:12:18 -04:00
Jason Alborough
d0f60d5e2b Merge branch 'development-2.0.0' into feature/value-with-feedback 2022-04-21 15:07:34 -04:00
Jason Alborough
68e5cc59a1 Merge branch 'development-2.0.0' into feature/value-with-feedback
# Conflicts:
#	essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj
2022-04-20 14:37:19 -04:00
Jason Alborough
7e9ce898aa feature: add valueswithfeedbacks #933 2022-04-20 09:35:05 -04:00
4 changed files with 100 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core.Feedbacks
{
public class BoolWithFeedback
{
private bool _Value;
public BoolFeedback Feedback;
public bool Value
{
get
{
return _Value;
}
set
{
_Value = value;
Feedback.FireUpdate();
}
}
public BoolWithFeedback()
{
Feedback = new BoolFeedback(() => { return Value; });
}
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core.Feedbacks
{
public class IntWithFeedback
{
private int _Value;
public IntFeedback Feedback;
public int Value
{
get
{
return _Value;
}
set
{
_Value = value;
Feedback.FireUpdate();
}
}
public IntWithFeedback()
{
Feedback = new IntFeedback((() => Value));
}
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core.Feedbacks
{
public class StringWithFeedback
{
private string _Value;
public StringFeedback Feedback;
public string Value
{
get
{
return _Value;
}
set
{
_Value = value;
Feedback.FireUpdate();
}
}
public StringWithFeedback()
{
Feedback = new StringFeedback(() => Value);
}
}
}

View File

@@ -219,11 +219,14 @@
<Compile Include="Factory\IDeviceFactory.cs" />
<Compile Include="Factory\ReadyEventArgs.cs" />
<Compile Include="Feedbacks\BoolFeedback.cs" />
<Compile Include="Feedbacks\BoolWithFeedback.cs" />
<Compile Include="Feedbacks\FeedbackCollection.cs" />
<Compile Include="Feedbacks\FeedbackEventArgs.cs" />
<Compile Include="Feedbacks\IntFeedback.cs" />
<Compile Include="Feedbacks\IntWithFeedback.cs" />
<Compile Include="Feedbacks\SerialFeedback.cs" />
<Compile Include="Feedbacks\StringFeedback.cs" />
<Compile Include="Feedbacks\StringWithFeedback.cs" />
<Compile Include="File\FileIO.cs" />
<Compile Include="Fusion\EssentialsHuddleSpaceFusionSystemControllerBase.cs" />
<Compile Include="Fusion\FusionCustomPropertiesBridge.cs" />
@@ -387,6 +390,9 @@
<Name>PepperDash_Essentials_Interfaces</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="NewFolder1\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>