From 8401ab1852e2b5a5faab41417e02d963ab88067f Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 17 Jan 2019 17:15:34 -0500 Subject: [PATCH] feat: Added SimplSharpProMono to eRuntimeEnvironment enum --- CHANGELOG.md | 5 +++++ ICD.Common.Utils/IcdConsole.cs | 4 ++++ ICD.Common.Utils/IcdEnvironment.SimplSharp.cs | 7 ++++++- ICD.Common.Utils/IcdEnvironment.cs | 1 + ICD.Common.Utils/ProgramUtils.cs | 4 ++++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd0afaa..ecc2759 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added + - Added SimplSharpProMono to eRuntimeEnvironment enum + +### Changed + - Small fixes for better VC4 support ## [8.2.0] - 2019-01-10 ### Added diff --git a/ICD.Common.Utils/IcdConsole.cs b/ICD.Common.Utils/IcdConsole.cs index 5ca1894..fe00a64 100644 --- a/ICD.Common.Utils/IcdConsole.cs +++ b/ICD.Common.Utils/IcdConsole.cs @@ -123,6 +123,10 @@ namespace ICD.Common.Utils public static bool SendControlSystemCommand(string command, ref string result) { #if SIMPLSHARP + // No console on VC4 + if (IcdEnvironment.RuntimeEnvironment == IcdEnvironment.eRuntimeEnvironment.SimplSharpProMono) + return false; + return CrestronConsole.SendControlSystemCommand(command, ref result); #else return false; diff --git a/ICD.Common.Utils/IcdEnvironment.SimplSharp.cs b/ICD.Common.Utils/IcdEnvironment.SimplSharp.cs index 68a8ef9..3452213 100644 --- a/ICD.Common.Utils/IcdEnvironment.SimplSharp.cs +++ b/ICD.Common.Utils/IcdEnvironment.SimplSharp.cs @@ -12,7 +12,12 @@ namespace ICD.Common.Utils public static eRuntimeEnvironment RuntimeEnvironment { - get { return GetRuntimeEnvironment(CrestronEnvironment.RuntimeEnvironment); } + get + { + return CrestronEnvironment.DevicePlatform == eDevicePlatform.Server + ? eRuntimeEnvironment.SimplSharpProMono + : GetRuntimeEnvironment(CrestronEnvironment.RuntimeEnvironment); + } } /// diff --git a/ICD.Common.Utils/IcdEnvironment.cs b/ICD.Common.Utils/IcdEnvironment.cs index f947cab..f0d6a36 100644 --- a/ICD.Common.Utils/IcdEnvironment.cs +++ b/ICD.Common.Utils/IcdEnvironment.cs @@ -11,6 +11,7 @@ namespace ICD.Common.Utils { SimplSharp, SimplSharpPro, + SimplSharpProMono, Standard } diff --git a/ICD.Common.Utils/ProgramUtils.cs b/ICD.Common.Utils/ProgramUtils.cs index d291371..91fbdbf 100644 --- a/ICD.Common.Utils/ProgramUtils.cs +++ b/ICD.Common.Utils/ProgramUtils.cs @@ -33,6 +33,10 @@ namespace ICD.Common.Utils name = name.Substring(0, proLength).PadRight(26); break; + case IcdEnvironment.eRuntimeEnvironment.SimplSharpProMono: + // No console + return; + case IcdEnvironment.eRuntimeEnvironment.Standard: name += ' '; break;