这是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 Action/Action.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ public static int PriorityForActionSource(string source)
/// <returns></returns>
public bool IsPointInside(Point point)
{
// Perhaps counter intuitiative, but a rectangle with no dimensions should always be considered active.
if (Rect.Width == 0 && Rect.Height == 0)
{
return true;
}

return Rect.Contains(point);
}
}
Expand Down
4 changes: 2 additions & 2 deletions Logic/ApplicationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ private static readonly Lazy<ApplicationSettings>
/// </summary>
private List<string> ExcludedProperties;

public string ClientVersion { get; } = "3 R300.5";
public string ClientVersion { get; } = "3 R301.1";
public string Version { get; } = "5";
public int ClientCodeVersion { get; } = 300;
public int ClientCodeVersion { get; } = 301;

private ApplicationSettings()
{
Expand Down
2 changes: 2 additions & 0 deletions MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
xmlns:local="clr-namespace:XiboClient"
mc:Ignorable="d"
Title="Player"
Top="0"
Left="0"
Height="450"
Width="800"
WindowStyle="None"
Expand Down
37 changes: 23 additions & 14 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1123,20 +1123,29 @@ public void ExecuteDurationTrigger(string operation, int sourceId, int duration)
// UI thread
Dispatcher.Invoke(new System.Action(() =>
{
switch (operation)
try
{
case "expire":
// Next Widget in the named region
currentLayout.RegionNext("" + sourceId);
break;
string regionId = currentLayout.GetRegionIdByActiveWidgetId("" + sourceId);
switch (operation)
{

case "extend":
currentLayout.RegionExtend("" + sourceId, duration);
break;
case "expire":
// Next Widget in the named region
currentLayout.RegionNext(regionId);
break;

case "set":
currentLayout.RegionSetDuration("" + sourceId, duration);
break;
case "extend":
currentLayout.RegionExtend(regionId, duration);
break;

case "set":
currentLayout.RegionSetDuration(regionId, duration);
break;
}
}
catch (Exception e)
{
Debug.WriteLine(e.Message, "ExecuteDurationTrigger");
}
}));
}
Expand All @@ -1146,8 +1155,6 @@ public void ExecuteDurationTrigger(string operation, int sourceId, int duration)
/// </summary>
private void SetMainWindowSize()
{
Debug.WriteLine("SetMainWindowSize: IN");

// Override the default size if necessary
if (ApplicationSettings.Default.SizeX != 0 || ApplicationSettings.Default.SizeY != 0)
{
Expand Down Expand Up @@ -1191,7 +1198,9 @@ private void SetMainWindowSize()
// Use the client size we've calculated to set the actual size of the form
WindowState = WindowState.Normal;

Debug.WriteLine("SetMainWindowSize: OUT");
Trace.WriteLine(
new LogMessage("MainForm", string.Format("SetMainWindowSize: window set to {0},{1}-{2}x{3}", Top, Left, Width, Height))
, LogType.Audit.ToString());
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.300.0.5")]
[assembly: AssemblyFileVersion("3.300.0.5")]
[assembly: AssemblyVersion("3.301.1.0")]
[assembly: AssemblyFileVersion("3.301.1.0")]
[assembly: Guid("3bd467a4-4ef9-466a-b156-a79c13a863f7")]
17 changes: 17 additions & 0 deletions Rendering/Layout.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,23 @@ public void RegionChangeToWidget(string regionId, int widgetId)
}
}

/// <summary>
/// Get the regionId for an active widget
/// </summary>
/// <param name="widgetId"></param>
/// <returns>The regionId or null</returns>
public string GetRegionIdByActiveWidgetId(string widgetId)
{
foreach (Region region in _regions)
{
if (region.GetCurrentWidgetId() == widgetId)
{
return region.Id;
}
}
return null;
}

/// <summary>
/// Is the provided widgetId playing
/// </summary>
Expand Down
45 changes: 21 additions & 24 deletions Rendering/WebCef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,39 @@ public override void RenderMedia(double position)
{
Name = "region_" + this.regionId
};
webView.RequestContext = new CefSharp.RequestContext();

// Configure run time CEF settings?
if (!string.IsNullOrEmpty(ApplicationSettings.Default.AuthServerWhitelist)
|| !string.IsNullOrEmpty(ApplicationSettings.Default.ProxyUser))
{
CefSharp.Cef.UIThreadTaskFactory.StartNew(() =>
{
// NTLM/Auth Server White Lists.
if (!string.IsNullOrEmpty(ApplicationSettings.Default.AuthServerWhitelist))
try
{
if (!webView.RequestContext.SetPreference("auth.server_whitelist", ApplicationSettings.Default.AuthServerWhitelist, out string error))
// NTLM/Auth Server White Lists.
if (!string.IsNullOrEmpty(ApplicationSettings.Default.AuthServerWhitelist))
{
Trace.WriteLine(new LogMessage("WebCef", "RenderMedia: auth.server_whitelist. e = " + error), LogType.Error.ToString());
if (!webView.RequestContext.SetPreference("auth.server_whitelist", ApplicationSettings.Default.AuthServerWhitelist, out string error))
{
Trace.WriteLine(new LogMessage("WebCef", "RenderMedia: auth.server_whitelist. e = " + error), LogType.Info.ToString());
}

if (!webView.RequestContext.SetPreference("auth.negotiate_delegate_whitelist", ApplicationSettings.Default.AuthServerWhitelist, out string error2))
{
Trace.WriteLine(new LogMessage("WebCef", "RenderMedia: auth.negotiate_delegate_whitelist. e = " + error2), LogType.Info.ToString());
}
}

if (!webView.RequestContext.SetPreference("auth.negotiate_delegate_whitelist", ApplicationSettings.Default.AuthServerWhitelist, out string error2))
// Proxy
if (!string.IsNullOrEmpty(ApplicationSettings.Default.ProxyUser))
{
Trace.WriteLine(new LogMessage("WebCef", "RenderMedia: auth.negotiate_delegate_whitelist. e = " + error2), LogType.Error.ToString());
webView.RequestHandler = new ProxyRequestHandler();
}
}

// Proxy
if (!string.IsNullOrEmpty(ApplicationSettings.Default.ProxyUser))
}
catch (Exception e)
{
webView.RequestHandler = new ProxyRequestHandler();
Trace.WriteLine(new LogMessage("WebCef", "RenderMedia: Exception setting auto policies on cef. e = " + e.Message), LogType.Info.ToString());
}
});
}
Expand Down Expand Up @@ -123,17 +131,6 @@ private void WebView_FrameLoadEnd(object sender, CefSharp.FrameLoadEndEventArgs
// If we aren't expired yet, we should show it
if (e.Frame.IsMain && !Expired)
{
// Show the browser after some time
if (!Dispatcher.CheckAccess())
{
Dispatcher.BeginInvoke(new System.Action(() =>
{
webView.Visibility = System.Windows.Visibility.Visible;

//this.TransitionIn();
}));
}

// Initialise Interactive Control
webView.GetBrowser().MainFrame.ExecuteJavaScriptAsync("xiboIC.config({hostname:\"localhost\", port: "
+ ApplicationSettings.Default.EmbeddedServerPort + "})");
Expand All @@ -149,13 +146,13 @@ private void WebView_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
Debug.WriteLine(DateTime.Now.ToLongTimeString() + " Navigate Completed", "CefWebView");

/*// Show the browser after some time
// Show the browser after some time
if (!Expired)
{
webView.Visibility = System.Windows.Visibility.Visible;

//this.TransitionIn();
}*/
}

// We've finished rendering the control
DocumentCompleted();
Expand Down
2 changes: 1 addition & 1 deletion XiboClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
<Version>1.8.9</Version>
</PackageReference>
<PackageReference Include="CefSharp.Wpf">
<Version>90.6.70</Version>
<Version>91.1.211</Version>
</PackageReference>
<PackageReference Include="Crc32.NET">
<Version>1.2.0</Version>
Expand Down