style: run code cleanup & apply VS suggestions

This commit is contained in:
Andrew Welker
2025-03-25 22:14:15 -05:00
parent 4d98191fa7
commit 789111cb9a
64 changed files with 329 additions and 390 deletions

View File

@@ -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);

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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);

View File

@@ -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
{

View File

@@ -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; }