这是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
6 changes: 6 additions & 0 deletions Logic/ApplicationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ public object this[string propertyName]

public decimal XmdsCollectionIntervalFactor()
{
if (XmdsErrorCountSinceSuccessful == 0)
return 1;

return (XmdsErrorCountSinceSuccessful > 10) ? 5 : XmdsErrorCountSinceSuccessful / 2;
}

Expand All @@ -190,5 +193,8 @@ public void IncrementXmdsErrorCount()
_xmdsErrorCountSinceSuccessful++;
};
}

// Settings HASH
public string Hash { get; set; }
}
}
Binary file modified XiboClient.v11.suo
Binary file not shown.
10 changes: 10 additions & 0 deletions XmdsAgents/RegisterAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,20 @@ public static string ProcessRegisterXml(string xml)
{
string message = "";

// Work out if we need to do anything (have the settings changed since the last time)
string md5 = Hashes.MD5(xml);

try
{
// Load the result into an XML document
XmlDocument result = new XmlDocument();
result.LoadXml(xml);

// If the XML we received has not changed, then go no further.
if (ApplicationSettings.Default.Hash == md5)
return result.DocumentElement.Attributes["message"].Value;

// Test the XML
if (result.DocumentElement.Attributes["code"].Value == "READY")
{
// Get the config element
Expand Down Expand Up @@ -162,6 +170,8 @@ public static string ProcessRegisterXml(string xml)
}
}

// Store the MD5 hash and the save
ApplicationSettings.Default.Hash = md5;
ApplicationSettings.Default.Save();
}
else
Expand Down
Binary file added bin/x86/Release/Xibo.scr
Binary file not shown.
Binary file modified bin/x86/Release/XiboClient.XmlSerializers.dll
Binary file not shown.
Binary file modified bin/x86/Release/XiboClient.exe
Binary file not shown.
Binary file modified bin/x86/Release/XiboClient.pdb
Binary file not shown.