Skip to content

Commit

Permalink
Merge pull request #185 from xibosignage/develop
Browse files Browse the repository at this point in the history
Release v2 R256
  • Loading branch information
dasgarner authored Dec 16, 2020
2 parents 39caf95 + cc3ac2e commit d6237dc
Show file tree
Hide file tree
Showing 29 changed files with 666 additions and 351 deletions.
30 changes: 30 additions & 0 deletions Error/LayoutInvalidException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Xibo - Digitial Signage - http://www.xibo.org.uk
* Copyright (C) 2020 Xibo Signage Ltd
*
* This file is part of Xibo.
*
* Xibo is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* Xibo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
*/
using System;

namespace XiboClient.Error
{
class LayoutInvalidException : Exception
{
public LayoutInvalidException(string message) : base(message)
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace XiboClient.Error
{
class DefaultLayoutException : Exception
class ShowSplashScreenException : Exception
{
}
}
5 changes: 4 additions & 1 deletion InfoScreen.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,12 @@ private void Update()
labelControlCount.Content = ClientInfo.Instance.ControlCount;

textBoxSchedule.Text = ClientInfo.Instance.ScheduleManagerStatus;
textBoxRequiredFiles.Text = ClientInfo.Instance.RequiredFilesList;
textBoxRequiredFiles.Text = ClientInfo.Instance.UnsafeList
+ Environment.NewLine
+ ClientInfo.Instance.RequiredFilesList;

// Log grid
logDataGridView.Items.Clear();
foreach (LogMessage message in ClientInfo.Instance.LogMessages.Read())
{
logDataGridView.Items.Add(message);
Expand Down
50 changes: 50 additions & 0 deletions Log/ClientInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ private static readonly Lazy<ClientInfo>
/// </summary>
public string XmrSubscriberStatus;

/// <summary>
/// Unsafe list
/// </summary>
public string UnsafeList;

/// <summary>
/// Control Count
/// </summary>
Expand Down Expand Up @@ -134,6 +139,15 @@ public void UpdateRequiredFiles(string requiredFilesString)
RequiredFilesList = requiredFilesString;
}

/// <summary>
/// Update the unsafe files list
/// </summary>
/// <param name="unsafeList"></param>
public void UpdateUnsafeList(string unsafeList)
{
UnsafeList = unsafeList;
}

/// <summary>
/// Update Status Marker File
/// </summary>
Expand Down Expand Up @@ -225,5 +239,41 @@ public void NotifyStatusToXmds()
Trace.WriteLine(new LogMessage("ClientInfo - notifyStatusToXmds", "Failed to notify status to XMDS. e = " + e.Message), LogType.Error.ToString());
}
}

/// <summary>
/// Get the drive info for the current drive
/// </summary>
/// <returns></returns>
public DriveInfo GetDriveInfo()
{
// Use Drive Info
foreach (DriveInfo drive in DriveInfo.GetDrives())
{
if (drive.IsReady && ApplicationSettings.Default.LibraryPath.Contains(drive.RootDirectory.FullName))
{
return drive;
}
}

return null;
}

/// <summary>
/// Get Drive Free Space
/// </summary>
/// <returns></returns>
public long GetDriveFreeSpace()
{
try
{
DriveInfo driveInfo = ClientInfo.Instance.GetDriveInfo();
return (driveInfo != null) ? driveInfo.TotalFreeSpace : -1;
}
catch (Exception e)
{
Trace.WriteLine(new LogMessage("ClientInfo", "GetDriveFreeSpace: unable to get drive, e: " + e.Message), LogType.Audit.ToString());
return -1;
}
}
}
}
4 changes: 2 additions & 2 deletions Logic/ApplicationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ private static readonly Lazy<ApplicationSettings>
/// </summary>
private List<string> ExcludedProperties;

public string ClientVersion { get; } = "2 R255.3";
public string ClientVersion { get; } = "2 R256.5";
public string Version { get; } = "5";
public int ClientCodeVersion { get; } = 255;
public int ClientCodeVersion { get; } = 256;

private ApplicationSettings()
{
Expand Down
190 changes: 0 additions & 190 deletions Logic/BlackList.cs

This file was deleted.

Loading

0 comments on commit d6237dc

Please sign in to comment.