mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-12 03:05:01 +00:00
style: run code cleanup & apply VS suggestions
This commit is contained in:
@@ -1,15 +1,9 @@
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PepperDash.Essentials.Touchpanel
|
||||
{
|
||||
public interface ITheme:IKeyed
|
||||
{
|
||||
public interface ITheme : IKeyed
|
||||
{
|
||||
string Theme { get; }
|
||||
|
||||
void UpdateTheme(string theme);
|
||||
|
||||
@@ -3,7 +3,6 @@ using Newtonsoft.Json.Linq;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Core.Logging;
|
||||
using PepperDash.Essentials.AppServer.Messengers;
|
||||
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
|
||||
|
||||
namespace PepperDash.Essentials.Touchpanel
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@ using Newtonsoft.Json.Linq;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Core.Logging;
|
||||
using PepperDash.Essentials.AppServer.Messengers;
|
||||
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Touchpanel
|
||||
@@ -41,7 +40,7 @@ namespace PepperDash.Essentials.Touchpanel
|
||||
|
||||
|
||||
_zoomControl.ZoomInCallFeedback.OutputChange += (s, a) =>
|
||||
{
|
||||
{
|
||||
PostStatusMessage(JToken.FromObject(
|
||||
new
|
||||
{
|
||||
|
||||
@@ -10,13 +10,12 @@ using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash.Essentials.Core.DeviceInfo;
|
||||
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
|
||||
using PepperDash.Essentials.Core.UI;
|
||||
using PepperDash.Essentials.Touchpanel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Feedback = PepperDash.Essentials.Core.Feedback;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.TouchPanel
|
||||
namespace PepperDash.Essentials.Touchpanel
|
||||
{
|
||||
//public interface IMobileControlTouchpanelController
|
||||
//{
|
||||
@@ -75,7 +74,7 @@ namespace PepperDash.Essentials.Devices.Common.TouchPanel
|
||||
|
||||
AddPostActivationAction(SubscribeForMobileControlUpdates);
|
||||
|
||||
ThemeFeedback = new StringFeedback($"{Key}-theme",() => Theme);
|
||||
ThemeFeedback = new StringFeedback($"{Key}-theme", () => Theme);
|
||||
AppUrlFeedback = new StringFeedback($"{Key}-appUrl", () => _appUrl);
|
||||
QrCodeUrlFeedback = new StringFeedback($"{Key}-qrCodeUrl", () => _bridge?.QrCodeUrl);
|
||||
McServerUrlFeedback = new StringFeedback($"{Key}-mcServerUrl", () => _bridge?.McServerUrl);
|
||||
@@ -357,10 +356,11 @@ namespace PepperDash.Essentials.Devices.Common.TouchPanel
|
||||
_bridge = bridge;
|
||||
|
||||
_bridge.UserCodeChanged += UpdateFeedbacks;
|
||||
_bridge.AppUrlChanged += (s, a) => {
|
||||
this.LogInformation("AppURL changed");
|
||||
_bridge.AppUrlChanged += (s, a) =>
|
||||
{
|
||||
this.LogInformation("AppURL changed");
|
||||
SetAppUrl(_bridge.AppUrl);
|
||||
UpdateFeedbacks(s, a);
|
||||
UpdateFeedbacks(s, a);
|
||||
};
|
||||
|
||||
SetAppUrl(_bridge.AppUrl);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Newtonsoft.Json;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.TouchPanel
|
||||
namespace PepperDash.Essentials.Touchpanel
|
||||
{
|
||||
public class MobileControlTouchpanelProperties : CrestronTouchpanelPropertiesConfig
|
||||
{
|
||||
|
||||
@@ -27,14 +27,14 @@ namespace PepperDash.Essentials.Touchpanel
|
||||
var theme = content.ToObject<MobileControlSimpleContent<string>>();
|
||||
|
||||
Debug.LogMessage(Serilog.Events.LogEventLevel.Information, "Setting theme to {theme}", this, theme.Value);
|
||||
_tpDevice.UpdateTheme(theme.Value);
|
||||
_tpDevice.UpdateTheme(theme.Value);
|
||||
|
||||
PostStatusMessage(JToken.FromObject(new {theme = theme.Value}));
|
||||
PostStatusMessage(JToken.FromObject(new { theme = theme.Value }));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class ThemeUpdateMessage:DeviceStateMessageBase
|
||||
public class ThemeUpdateMessage : DeviceStateMessageBase
|
||||
{
|
||||
[JsonProperty("theme")]
|
||||
public string Theme { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user