/// <summary>
/// Acts the same as the CurrentLayout / View property.
/// </summary>
/// <remarks>this extension method was added to allow backwards compatibility with MediaPortal 1.1</remarks>
/// <param name="self"></param>
/// <returns>instance of GUIListControl or null</returns>
public static void SetCurrentLayout(this GUIFacadeControl self, string layout)
{
PropertyInfo property = GetPropertyInfo<GUIFacadeControl>("CurrentLayout", "View");
property.SetValue(self, Enum.Parse(property.PropertyType, layout), null);
}
Application: MediaPortal.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
at MediaPortal.GUI.Library.GUIImageAllocator.ClearCachedAllocatorImages()
at MediaPortal.GUI.Library.GUIFilmstripControl.OnMessage(MediaPortal.GUI.Library.GUIMessage)
at MediaPortal.GUI.Library.GUIFacadeControl.set_CurrentLayout(Layout)
Exception Info: System.Reflection.TargetInvocationException
at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
at System.Reflection.RuntimePropertyInfo.SetValue(System.Object, System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
at System.Reflection.RuntimePropertyInfo.SetValue(System.Object, System.Object, System.Object[])
at TraktPlugin.GUI.GUIWindowExtensions.SetCurrentLayout(MediaPortal.GUI.Library.GUIFacadeControl, System.String)
at TraktPlugin.TraktDashboard.LoadTrendingMoviesFacade(System.Collections.Generic.IEnumerable`1<TraktAPI.DataStructures.TraktMovieTrending>, MediaPortal.GUI.Library.GUIFacadeControl)
at TraktPlugin.TraktDashboard.LoadTrendingMovies(Boolean)
at TraktPlugin.TraktDashboard.LoadTrendingMovies()
at TraktPlugin.TraktDashboard.<Init>b__76_2(System.Object)
at System.Threading.TimerQueueTimer.CallCallbackInContext(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireQueuedTimerCompletion(System.Object)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
facade.SetCurrentLayout(TraktSkinSettings.DashboardActivityFacadeType);
facade.CurrentLayout = GUIFacadeControl.Layout.List;
facade.SetCurrentLayout(trendingSettings.FacadeType);
facade.CurrentLayout = GUIFacadeControl.Layout.Filmstrip;