Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/features/IHasInputs' into hotfix…
Browse files Browse the repository at this point in the history
…/update-actions
  • Loading branch information
jkdevito committed Oct 1, 2024
2 parents f9499ae + 4a65c82 commit 6119e98
Show file tree
Hide file tree
Showing 25 changed files with 381 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/EssentialsPlugins-builds-caller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build Essentials Plugin

on:
push:
branches:
- '**'

jobs:
getVersion:
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-getversion.yml@main
secrets: inherit
build-3Series:
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-3Series-builds.yml@main
secrets: inherit
needs: getVersion
if: needs.getVersion.outputs.newVersion == 'true'
with:
newVersion: ${{ needs.getVersion.outputs.newVersion }}
version: ${{ needs.getVersion.outputs.version }}
tag: ${{ needs.getVersion.outputs.tag }}
channel: ${{ needs.getVersion.outputs.channel }}
build-4Series:
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-4Series-builds.yml@main
secrets: inherit
needs: getVersion
if: needs.getVersion.outputs.newVersion == 'true'
with:
newVersion: ${{ needs.getVersion.outputs.newVersion }}
version: ${{ needs.getVersion.outputs.version }}
tag: ${{ needs.getVersion.outputs.tag }}
channel: ${{ needs.getVersion.outputs.channel }}

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

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

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

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
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "epi-display-panasonic-projector", "epi-display-panasonic-projector.csproj", "{B986CEE5-DAC4-40BF-BCFE-0C2CA83350FE}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "epi-display-panasonic-projector", "src\epi-display-panasonic-projector.csproj", "{B986CEE5-DAC4-40BF-BCFE-0C2CA83350FE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
25 changes: 25 additions & 0 deletions epi-display-panasonic-projector.4Series.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34728.123
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "epi-display-panasonic-projector.4Series", "src\epi-display-panasonic-projector.4Series.csproj", "{5F9426AF-369A-4DB6-AC36-2816DD7955B4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5F9426AF-369A-4DB6-AC36-2816DD7955B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5F9426AF-369A-4DB6-AC36-2816DD7955B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5F9426AF-369A-4DB6-AC36-2816DD7955B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F9426AF-369A-4DB6-AC36-2816DD7955B4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F5CC4E55-FBFF-4EC9-A0D1-AFA8496F4958}
EndGlobalSection
EndGlobal
34 changes: 34 additions & 0 deletions releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"releaseRules": [
{ "scope": "force-patch", "release": "patch" },
{ "scope": "no-release", "release": false }
]
}
],
"@semantic-release/release-notes-generator",
["@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
[
"@semantic-release/exec",
{
"verifyReleaseCmd": "echo \"newVersion=true\" >> $GITHUB_OUTPUT",
"publishCmd": "echo \"version=${nextRelease.version}\" >> $GITHUB_OUTPUT && echo \"tag=${nextRelease.gitTag}\" >> $GITHUB_OUTPUT && echo \"type=${nextRelease.type}\" >> $GITHUB_OUTPUT && echo \"channel=${nextRelease.channel}\" >> $GITHUB_OUTPUT"
}
]
],
"branches": [
"main",
{
"name": "replace-me-feature-branch",
"prerelease": "replace-me-prerelease",
"channel": "replace-me-prerelease"
}
]
}
21 changes: 21 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project>
<PropertyGroup>
<Version>1.0.0-local</Version>
<InformationalVersion>$(Version)</InformationalVersion>
<Authors>PepperDash Technologies</Authors>
<Company>PepperDash Technologies</Company>
<Product>PepperDash Panasonic Projector</Product>
<Copyright>Copyright © 2024</Copyright>
<RepositoryUrl>https://github.com/PepperDash/epi-panasonic-projectors</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Crestron; 4series</PackageTags>
<PackageOutputPath>../output</PackageOutputPath>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<None Include="..\LICENSE.md" Pack="true" PackagePath=""/>
<None Include="..\README.md" Pack="true" PackagePath=""/>
</ItemGroup>
</Project>
20 changes: 20 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project>
<ItemGroup>
<None Include="$(TargetDir)\$(TargetName).$(Version).cpz" Condition="$(ProjectType) == 'Program'">
<Pack>true</Pack>
<PackagePath>content;</PackagePath>
</None>
<None Include="$(PackageOutputPath)\$(TargetName).$(Version).cplz" Condition="$(ProjectType) == 'ProgramLibrary'">
<Pack>true</Pack>
<PackagePath>content;</PackagePath>
</None>
</ItemGroup>
<Target Name="Create CPLZ" AfterTargets="Build; Rebuild" Condition="$(ProjectType) == 'ProgramLibrary'">
<Message Text="Creating CPLZ"></Message>
<MakeDir Directories="$(PackageOutputPath)" Condition="!Exists($(PackageOutputPath))"></MakeDir>
<ZipDirectory SourceDirectory="$(TargetDir)" DestinationFile="$(PackageOutputPath)\$(TargetName).$(Version).cplz" Overwrite="true"/>
</Target>
<Target Name="Clean CPLZ" AfterTargets="AfterClean" Condition="$(ProjectType) == 'ProgramLibrary'">
<Delete Files="$(PackageOutputPath)\$(TargetName).$(Version).cplz"/>
</Target>
</Project>
File renamed without changes.
File renamed without changes.
96 changes: 96 additions & 0 deletions src/PanasonicInput.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
using System;
using System.Collections.Generic;
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
using PepperDash.Essentials.Displays;

namespace PepperDash.Essentials.Displays
{
#if SERIES4
public class PanasonicInputs : ISelectableItems<byte>
{
private Dictionary<byte, ISelectableItem> _items = new Dictionary<byte, ISelectableItem>();

public Dictionary<byte, ISelectableItem> Items
{
get
{
return _items;
}
set
{
if (_items == value)
return;

_items = value;

ItemsUpdated?.Invoke(this, null);
}
}

private byte _currentItem;

public byte CurrentItem
{
get
{
return _currentItem;
}
set
{
if (_currentItem == value)
return;

_currentItem = value;

CurrentItemChanged?.Invoke(this, null);
}
}

public event EventHandler ItemsUpdated;
public event EventHandler CurrentItemChanged;

}

public class PanasonicInput : ISelectableItem
{
private bool _isSelected;

private readonly PanasonicProjectorController _parent;

private Action _inputMethod;

public PanasonicInput(string key, string name, PanasonicProjectorController parent, Action inputMethod)
{
Key = key;
Name = name;
_parent = parent;
_inputMethod = inputMethod;
}

public string Key { get; private set; }
public string Name { get; private set; }

public event EventHandler ItemUpdated;

public bool IsSelected
{
get { return _isSelected; }
set
{
if (value == _isSelected)
return;

_isSelected = value;
var handler = ItemUpdated;
if (handler != null)
handler(this, EventArgs.Empty);
}
}

public void Select()
{
_inputMethod();
}
}
#endif
}
File renamed without changes.
Loading

0 comments on commit 6119e98

Please sign in to comment.