mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 04:34:56 +00:00
Adds ability to get URL for both light and dark logo options
This commit is contained in:
@@ -283,7 +283,7 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo
|
/// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string GetUrl()
|
public string GetLogoUrlLight()
|
||||||
{
|
{
|
||||||
if (Type == "url")
|
if (Type == "url")
|
||||||
return Url;
|
return Url;
|
||||||
@@ -292,6 +292,16 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string GetLogoUrlDark()
|
||||||
|
{
|
||||||
|
if (Type == "url")
|
||||||
|
return Url;
|
||||||
|
if (Type == "system")
|
||||||
|
return string.Format("http://{0}:8080/logo-dark.png",
|
||||||
|
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -327,8 +327,8 @@ namespace PepperDash.Essentials
|
|||||||
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
|
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
|
||||||
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
||||||
|
|
||||||
this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetUrl();
|
this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetLogoUrlLight();
|
||||||
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetUrl();
|
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetLogoUrlDark();
|
||||||
this.SourceListKey = PropertiesConfig.SourceListKey;
|
this.SourceListKey = PropertiesConfig.SourceListKey;
|
||||||
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
||||||
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
||||||
|
|||||||
@@ -250,8 +250,8 @@ namespace PepperDash.Essentials
|
|||||||
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
|
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
|
||||||
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
||||||
|
|
||||||
this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetUrl();
|
this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetLogoUrlLight();
|
||||||
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetUrl();
|
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetLogoUrlDark();
|
||||||
this.SourceListKey = PropertiesConfig.SourceListKey;
|
this.SourceListKey = PropertiesConfig.SourceListKey;
|
||||||
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
||||||
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
||||||
|
|||||||
@@ -340,8 +340,8 @@ namespace PepperDash.Essentials
|
|||||||
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetUrl();
|
this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetLogoUrlLight();
|
||||||
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetUrl();
|
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetLogoUrlDark();
|
||||||
this.SourceListKey = PropertiesConfig.SourceListKey;
|
this.SourceListKey = PropertiesConfig.SourceListKey;
|
||||||
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
||||||
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
||||||
|
|||||||
Reference in New Issue
Block a user