这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Logic/ApplicationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public class ApplicationSettings
private static string _default = "default";

// Application Specific Settings we want to protect
private string _clientVersion = "1.8.0-alpha2";
private string _clientVersion = "1.8.0-alpha3";
private string _version = "5";
private int _clientCodeVersion = 120;
private int _clientCodeVersion = 121;

public string ClientVersion { get { return _clientVersion; } }
public string Version { get { return _version; } }
Expand Down
16 changes: 13 additions & 3 deletions Logic/RequiredFiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ private void SetRequiredFiles()
// Fill in some information that we already know
if (rf.FileType == "media")
{
string[] filePart = attributes["path"].Value.Split('.');
rf.Id = int.Parse(attributes["id"].Value);
rf.Path = attributes["path"].Value;
rf.SaveAs = (attributes["saveAs"] == null || string.IsNullOrEmpty(attributes["saveAs"].Value)) ? rf.Path : attributes["saveAs"].Value;
Expand All @@ -129,8 +128,19 @@ private void SetRequiredFiles()
else if (rf.FileType == "layout")
{
rf.Id = int.Parse(attributes["id"].Value);
rf.Path = attributes["path"].Value + ".xlf";
rf.SaveAs = rf.Path;
rf.Path = attributes["path"].Value;
rf.Http = (attributes["download"].Value == "http");

if (rf.Http)
{
rf.SaveAs = attributes["saveAs"].Value;
}
else
{
rf.Path = rf.Path + ".xlf";
rf.SaveAs = rf.Path;
}

rf.ChunkSize = rf.Size;
}
else if (rf.FileType == "resource")
Expand Down
38 changes: 23 additions & 15 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public partial class MainForm : Form
private int _scheduleId;
private int _layoutId;
private bool _screenSaver = false;
private bool _showingSplash = false;

double _layoutWidth;
double _layoutHeight;
Expand Down Expand Up @@ -483,16 +484,19 @@ private void ChangeToNextLayout(string layoutPath)
catch (Exception ex)
{
Trace.WriteLine(new LogMessage("MainForm - ChangeToNextLayout", "Layout Change to " + layoutPath + " failed. Exception raised was: " + ex.Message), LogType.Error.ToString());

ShowSplashScreen();

// In 10 seconds fire the next layout?
System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
timer.Interval = 10000;
timer.Tick += new EventHandler(splashScreenTimer_Tick);
if (!_showingSplash)
{
ShowSplashScreen();

// In 10 seconds fire the next layout?
System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
timer.Interval = 15000;
timer.Tick += new EventHandler(splashScreenTimer_Tick);

// Start the timer
timer.Start();
// Start the timer
timer.Start();
}
}

// We have finished changing the layout
Expand All @@ -512,6 +516,8 @@ void splashScreenTimer_Tick(object sender, EventArgs e)
timer.Stop();
timer.Dispose();

_showingSplash = false;

_schedule.NextLayout();
}

Expand All @@ -520,13 +526,6 @@ void splashScreenTimer_Tick(object sender, EventArgs e)
/// </summary>
private void PrepareLayout(string layoutPath)
{
// Create a start record for this layout
_stat = new Stat();
_stat.type = StatType.Layout;
_stat.scheduleID = _scheduleId;
_stat.layoutID = _layoutId;
_stat.fromDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

// Get this layouts XML
XmlDocument layoutXml = new XmlDocument();
DateTime layoutModifiedTime;
Expand Down Expand Up @@ -677,6 +676,13 @@ private void PrepareLayout(string layoutPath)
}
}

// Create a start record for this layout
_stat = new Stat();
_stat.type = StatType.Layout;
_stat.scheduleID = _scheduleId;
_stat.layoutID = _layoutId;
_stat.fromDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

foreach (XmlNode region in listRegions)
{
// Is there any media
Expand Down Expand Up @@ -763,6 +769,8 @@ private static void GenerateBackgroundImage(string sourceFile, int backgroundWid
/// </summary>
private void ShowSplashScreen()
{
_showingSplash = true;

if (!string.IsNullOrEmpty(ApplicationSettings.Default.SplashOverride))
{
try
Expand Down
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Xibo Digital Signage")]
[assembly: AssemblyProduct("Xibo")]
[assembly: AssemblyCopyright("Copyright Dan Garner © 2008-2015")]
[assembly: AssemblyCopyright("Copyright Dan Garner © 2008-2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
Binary file modified XiboClient.v11.suo
Binary file not shown.
2 changes: 1 addition & 1 deletion XmdsAgents/FileAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public void Run()
file.Complete = true;
}
}
else if (file.FileType == "media" && file.Http)
else if (file.Http)
{
// Download using HTTP and the rf.Path
using (WebClient wc = new WebClient())
Expand Down
2 changes: 1 addition & 1 deletion XmdsAgents/RequiredFilesAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ void fileAgent_OnComplete(int fileId, string fileType)
if (rf.FileType == "layout")
{
// Raise an event to say it is completed
OnComplete(rf.Path);
OnComplete(rf.SaveAs);
}
}

Expand Down